Pyobjc

Latest version: v10.3.2

Safety actively analyzes 688568 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 8

3.2.1

Updates:

* Small change to the shared setup.py code for framework wrappers to allow
building wheels for wrappers without a C exention on any system.

This was mostly done to make it easier to provide wheels in future releases.

Bugfixes:

* Avoid build error with Python 2.7 when using the OSX 10.12 SDK, triggered
when Python was build using MacPython support.

* Compatibility definitions for MAC_OS_X_VERSION_10_10, MAC_OS_X_VERSION_10_11
and MAC_OS_X_VERSION_10_12 were wrong, adjusted these.

* Fix obscure crash in test suite of pyobjc-core: the definition of a class
that claims to conform to a protocol but didn't actually conform could
result in having a partial class definition in the Objective-C runtime.

* Updated implementation for ``NSMutableArray.extend``. This both avoids an
error with the list interface tests in Python 3.6, and avoids unnecessary
memory usage with large arguments.

3.2

**Backward compatibility note:** Due to a change in the way the default
method signature is calculated PyObjC is now more strict in enforcing
the Python<->Objective-C mapping for selectors and a number of code patterns
that were allowed before are no longer allowed, in particular the following
method definitions raise ``objc.BadPrototypeError``::

class MyObject (NSObject):
def mymethod(self, a, b): ...
def method_arg_(self, a, b, c): ...

If these methods are only used from Python and are never used from Objective-C
the error can be avoided by decorating these methods with ``objc.python_method``::

class MyObject (NSObject):
objc.python_method
def mymethod(self, a, b): ...

This cannnot be used for methods used from Objective-C, for those you will
have to rename the method or you will have to provide an appropriate selector
explictly.

* Fix crash when using some APIs in the LaunchServices framework.

* Issue 100:Building with the Command Line Tools for Xcode installed caused build errors
on OSX 10.10

* Python 3.6 made a change to the bytecode format that affected the way
PyObjC calculates the default method signature for Python methods.

Earlier versions of PyObjC will therefore not work properly with Python 3.6.

* Update metadata for macOS 10.12.1

Note: Building PyObjC on macOS 10.12 requires Xcode 8.1 (or a later version)

* Added bindings for the SafariServices and Intents frameworks, both introducted in macOS 10.12.

* Added bindings for the MediaPlayer framework, introducted in macOS 10.12.1.

* Add bindings for the ModelIO framework, introduced in OSX 10.11.

* Issue 153: Add missing metadata file to ApplicationServices bindings

* Issue 157: Bad reference to "_metadata" in ApplicationServices bindings

* ApplicationServices framework didn't do "from ... import \*" as was intended.

* Don't force the installation of py2app.

* Fix build failure using the OSX 10.10 SDK.

* Issue 21: Tweak build procedure for PyObjC to avoid building pyobjc-core
multiple times when using ``pip install pyobjc``.

* Issue 123: Use Twisted's cfreactor module in the examples using Twisted.

* Issue 148: Fix build issue for the MapKit bindings on a case
sensitive filesystem.

* Added bindings for the IOSurface framework (pyobjc-framework-IOSurface)

* Added bindings for the NetworkExtension framework (pyobjc-framework-NetworkExtension)

* Issue 149: Fix compile problems with Anaconda

* Fix SystemError for accessing a method whose ``__metadata__`` cannot be calculated,
found while researching issue 122.

* Issue 146: Don't hang when running ``python setup.py build`` using PyPy.

Note that PyPy still doesn't work, this just ensures that the build fails instead
of hanging indefinely.

* Issue 143: Fix calculation of default type signature for selectors

Due to this change it is possible to use decorators like this::

def decorator(func):
functools.wraps(func)
def wrapper(*args, **kwds):
return func(*args, **kwds)
return decorator

Before this patch PyObjC gave an error due to the signature of ``wrapper``,
and if ``wrapper`` was defined with an explicit ``self`` argument PyObjC would
not give an error but would calculate the wrong method signature for wrapped
methods.

An unfortunate side effect of this change is that the argument count
of methods must now match the implied argument count of the selector, that is
a method with name ``someMethod_`` must now have exactly two arguments (``self``
and the argument implied by the underscore at the end).

Use ``objc.python_method`` as a decorator for python methods that don't use
this convention and do no need to be registered with the Objective-C runtime
as Objective-C selectors.

* The bridge now considers the default arguments for a function when determining
if the Python signature of a function is compatible with the Objective-C
signature, that is the following method definition is valid::

class MyObject (NSObject):
def someMethod_(self, a, b=2): pass

* The default selector calculated for Python methods with embedded underscores and
without a closing underscore has changed, the embedded underscores are not translated
to colons because the resulting Objective-C selector would not be valid.

That is, in earlier versions the default selector for "some_method" would be
"some:method", and from this version on the default for selector for this
method is "some_method".

* (Python 3) Methods and functions with keyword-only arguments that don't have defaults
cause a ``objc.BadPrototypeError`` exception when proxied to Objective-C
because those can never be called from Objective-C without causing an
exception.

3.1

* Fix value of ``FLT_MAX`` and ``FLT_MIN`` in framework bindings.

* Fix for the functions in ``PyObjCTools.AppHelper``: those functions didn't work
correctly when the calling thread didn't have a runloop.

Patch by Max Bélanger.

* Issue 126: Load the LaunchServices definitions through the CoreServices
umbrella framework to avoid problems on OSX 10.11.

* Issue 124: Sporadic crash at program shutdown due to a race condition between
Python interpreter shutdown and Cocoa cleanup.

This is mostly a workaround, I don't have a full solution for this yet and
I'm not sure if one is possible.

* Added ``objc.PyObjC_BUILD_RELEASE`` which contains the version of the SDK
that was used to build PyObjC in the same format as the OSX availability
macros.

* Added *maxTimeout* parameter to ``PyObjCTools.AppHelper.runConsoleEventLoop``
to fix issue 117. The default value is 3 seconds, which means that
the console eventloop will stop within 3 seconds of calling ``stopEventLoop``.

* Re-enable faster method calls for simple method calls.

* Support OSX 10.10 in PyObjCTools.TestSupport (version comparison was too
naive)

* Add bindings for ApplicationServices, currently only the HIServices sub
framework is exposed.

* Add bindings for NetFS, introduced in OSX 10.7.

* Add bindings for ImageCaptureCore. Initial patch by Max Bélanger.

* Add bindings for IMServicePlugIn, introduced in OSX 10.7.

* Add bindings for SceneKit, introduced in OSX 10.8.

* Add bindings for CoreBluetooth, MapKit, AVKit, MediaLibrary,
MediaAccessibility, GameController (all new in OSX 10.9)

* Add bindings for FinderSync, CloudKit, CryptoTokenKit,
MultipeerConnectivity, NotificationCenter (all new in OSX 10.10)

* Add bindings for Contacts, ContactsUI, Photos, PhotosUI (new in OSX 10.11)

* Added function ``objc.callbackPointer``.

* Updated bindings for AppKit, CoreData, CoreFoundation, CoreGraphics,
CoreLocation, CoreText, CoreVideo, CoreWLAN, EventKit, FSEvents,
ImageIO, ImageKit, JavaScriptCore, LaunchServices, OpenDirectory,
PDFKit, QuartzComposer, QuartzCore, QuartzFilters, QuickLookUI,
ServiceManagement, Social, StoreKit and WebKit with the new APIs
introduced in OSX 10.9, 10.10 and 10.11.

* Unchanged framework bindings: Collaboration, DictionaryServices,
ExceptionHandling, InputMethodKit, InstallerPlugins, InstantMessage,
InterfaceBuilderKit, LatentSemanticMapping, PreferencePanes, PubSub.

.. note::

InterfaceBuilderKit will likely be removed in a future version of PyObjC

* TODO: DiskArbitration, GameController, SpriteKit bindings are incomplete

* Fix hard crash with invalid type strings in metadata.

* Default value for struct wrappers was incorrect for fields that have
a type encoding that's custom to PyObjC.

* Fix a type string validation error that could cause PyObjC to continue
processing beyond the end of a type string (which can effectively hang
the python interpreter with 100% CPU usage)

* Fix edge-case in NSCoding support that causes PyObjC to use proxy objects
of the wrong type in some cases.

* Fix incompatibility with Python 3.6 (where ``inspect.getargspec`` no longer
exists)

* Added (private) function ``objc._copyMetadataRegistry``. This function returns
a copy of the internal registry that's used to find additional information
about method signatures.

Note that the data structure returned by this function is subject to change,
that the data structure is undocumented and that modifying it does not affect
the data used by PyObjC.

3.0.4

* Fix installation on OSX 10.10 when using "pip install pyobjc".

Issues 102, 103.

* Fix crash when ``sys.modules`` contains an object that is not a string.

Issue 95.

* Fix crash on OSX 10.8 or later when using a 32-bit build and accessing
an instance of "Object" (that is, pre-Nextstep classes).

* Fix a crash when using blocks without metadata, but with a block
signature from the block runtime.

Issue 106

* ``PyObjCTools.MachSignals`` likely hasn't worked at all since PyObjC 2.0
because it uses a C module that was never ported to PyObjC 2.0. This private
module is reintroduced in this release (with a slightly changed API)

Issue 109

3.0.3

* Fix a number of OSX 10.10 support issues.

3.0.1

* Issue 86: Fix installation issue with setuptools 3.6.

* Issue 85: Remove debug output from the wrapper for ``NSApplicationMain``.

* Issue 82: NSArray.__iter__ was accedently removed in PyObjC 3.0

* PyObjCTools.Debugging didn't work properly on recent OSX versions (at least OSX 10.9)
because ``/usr/bin/atos`` no longer worked.

Page 7 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.