Pyobjc

Latest version: v10.2

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

Scan your dependencies

Page 6 of 7

4.0

* Issue 204: Metadata for CGPDFDictionaryGetObject was wrong

Reported by Nickolas Pohilets.

* Updated metadata for Xcode 9 GM.

* Fix 202: Add bindings for ``CGPDFDictionaryRef``, ``CGPDFScannerRef``
``CGPDFStreamRef`` and ``CGPDFStringRef`` to the Quartz bindings (including
some minor updates to function metadata)

Reported by Nickolas Pohilets.

* Issue 205: Add ability to read bytes from ``objc.varlist``

Instances of ``objc.varlist`` now have a method to return a memoryview
that refers to the first section of the list::

def as_buffer(self, count : int) -> memoryview

This returns a memoryview the references the underlying memory for
the first *count* elements in the list.

Reported by Nickolas Pohilets.

* Added bindings for the :doc:`GameKit </apinotes/GameKit>` framework introduced in macOS 10.8.

* Added bindings for the :doc:`GameplayKit </apinotes/GameplayKit>` framework introduced in macOS 10.11.

Note that these bindings are less useful than they could be because
PyObjC currently does not support "vector" types that are used in
some APIs.

4.0b1

* Removed PyObjCTools.TestSupport.filterWarnings, use warnings.catch_warnings
instead.

* Building pyobjc-core using "python setup.py develop" will use 'ccache'
when available.

* Building pyobjc-core will compile the source files from new to old files,
to speed up feedback while working on the source code.

* Legacy BridgeSupport files on macOS 10.13 (which aren't used by default
by PyObjC) can contain junk data in typestring data. Cleanup that data
before using it.

* Deal with loading bundle variables of a C string type, that used to crash
to do an oddity of locating that information.

* Using wrappers for C structs as sequences is deprecated, this
feature was introduced a long while ago when the framework wrappers
were very incomplete and is no longer usefull.

* Add ``objc.options.structs_indexable``. When this option is True
(the default) wrappers for C structs behave as before, when the
option is False these wrappers can no longer be used as writable
tuples, that is all "sequence" methods will raise ``TypeError``.

* Add ``objc.options.structs_writable``. When this option is True
(the default) wrappers for C structs behave as before, when the
option is False these wrappers can no longer be modified.

* Add availability macro ``MAC_OS_X_VERSION_10_13`` to ``objc``.

* New framework wrappers:

- :doc:`ColorSync </apinotes/ColorSync>` (new in macOS 10.13)
- :doc:`CoreML </apinotes/CoreML>` (new in macOS 10.13)
- :doc:`ExternalAccessory </apinotes/ExternalAccessory>` (new in macOS 10.13)
- :doc:`CoreSpotlight </apinotes/CoreSpotlight>` (new in macOS 10.13)
- :doc:`Vision </apinotes/Vision>` (new in macOS 10.13)

* metadata updates:

- :doc:`Accounts </apinotes/Accounts>`
- :doc:`AddressBook </apinotes/AddressBook>`
- :doc:`AppKit </apinotes/AppKit>`
- :doc:`ApplicationServices </apinotes/ApplicationServices>`
- :doc:`Automator </apinotes/Automator>`
- :doc:`AVKit </apinotes/AVKit>`
- :doc:`CalendarStore </apinotes/CalendarStore>`
- :doc:`CFNetwork </apinotes/CFNetwork>`
- :doc:`CloudKit </apinotes/CloudKit>`
- :doc:`Contacts </apinotes/Contacts>`
- :doc:`CoreBluetooth </apinotes/CoreBluetooth>`
- :doc:`CoreData </apinotes/CoreData>`
- :doc:`CoreFoundation </apinotes/CoreFoundation>`
- :doc:`CoreGraphics </apinotes/CoreGraphics>`
- :doc:`CoreImage </apinotes/CoreImage>`
- :doc:`CoreLocation </apinotes/CoreLocation>`
- :doc:`CoreServices </apinotes/CoreServices>`
- :doc:`CoreText </apinotes/CoreText>`
- :doc:`CoreVideo </apinotes/CoreVideo>`
- :doc:`CoreWLAN </apinotes/CoreWLAN>`
- :doc:`CryptoTokenKit </apinotes/CryptoTokenKit>`
- :doc:`EventKit </apinotes/EventKit>`
- :doc:`FinderSync </apinotes/FinderSync>`
- :doc:`Foundation </apinotes/Foundation>`
- :doc:`FSEvents </apinotes/FSEvents>`
- :doc:`GameController </apinotes/GameController>`
- :doc:`IMServicePlugIn </apinotes/IMServicePlugIn>`
- :doc:`ImageCaptureCore </apinotes/ImageCaptureCore>`
- :doc:`ImageIO </apinotes/ImageIO>`
- :doc:`Intents </apinotes/Intents>`
- :doc:`IOSurface </apinotes/IOSurface>`
- :doc:`JavaScriptCore </apinotes/JavaScriptCore>`
- :doc:`LocalAuthentication </apinotes/LocalAuthentication>`
- :doc:`MapKit </apinotes/MapKit>`
- :doc:`MediaLibrary </apinotes/MediaLibrary>`
- :doc:`MediaPlayer </apinotes/MediaPlayer>`
- :doc:`ModelIO </apinotes/ModelIO>`
- :doc:`MultipeerConnectivity </apinotes/MultipeerConnectivity>`
- :doc:`NetFS </apinotes/NetFS>`
- :doc:`NetworkExtension </apinotes/NetworkExtension>`
- :doc:`OpenDirectory </apinotes/OpenDirectory>`
- :doc:`Photos </apinotes/Photos>`
- :doc:`PhotosUI </apinotes/PhotosUI>`
- :doc:`QTKit </apinotes/QTKit>`
- :doc:`Quartz </apinotes/Quartz>`
- :doc:`QuartzCore </apinotes/QuartzCore>`
- :doc:`QuickLook </apinotes/QuickLook>`
- :doc:`SafariServices </apinotes/SafariServices>`
- :doc:`SceneKit </apinotes/SceneKit>`
- :doc:`ScreenSaver </apinotes/ScreenSaver>`
- :doc:`Social </apinotes/Social>`
- :doc:`SpriteKit </apinotes/SpriteKit>`
- :doc:`SystemConfiguration </apinotes/SystemConfiguration>`
- :doc:`WebKit </apinotes/WebKit>`

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

Page 6 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.