libusb1


Namelibusb1 JSON
Version 3.1.0 PyPI version JSON
download
home_pagehttps://github.com/vpelletier/python-libusb1
SummaryPure-python wrapper for libusb-1.0
upload_time2023-10-29 03:14:31
maintainer
docs_urlNone
authorVincent Pelletier
requires_python
licenseLGPLv2.1+
keywords usb libusb
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. contents::

Supports all transfer types, both in synchronous and asynchronous mode.

Home: http://github.com/vpelletier/python-libusb1

PyPI: http://pypi.python.org/pypi/libusb1

.. role:: c_code(code)
  :language: c

.. role:: python_code(code)
  :language: python

Dependencies
============

- CPython_ 3.6+, pypy_ 2.0+. Older versions may work, but are not
  recommended as there is no automated regression testing set up for them.
- libusb-1.0_

Supported OSes
==============

python-libusb1 can be expected to work on:

- GNU/Linux
- Windows [#]_ native dll or via Cygwin_
- OSX [#]_ via MacPorts_, Fink_ or Homebrew_
- FreeBSD (including Debian GNU/kFreeBSD)
- OpenBSD

.. [#] Beware of libusb-win32, which implements 0.1 API, not 1.0 .

.. [#] Beware of possible lack of select.poll if you want to use asynchronous
       API.

Installation
============

Releases from PyPI, with name *libusb1*. Installing from command line::

    $ pip install libusb1

Latest version from source tree::

    $ git clone https://github.com/vpelletier/python-libusb1.git
    $ cd python-libusb1
    $ pip install .

Windows installation notes
--------------------------

On Windows, installing wheels from pypi also installs the libusb dll within the
usb1 python module. It does not install any driver, so you still need to decide
which of libusbk or WinUSB to use for each device and install it appropriately
(possibly using Zadig_, or by providing a driver for your users to install).

Installing from source tree does not install the dll, so you need to install the
library where ctypes can find it - and of course the driver as well.

Checking release file signature
-------------------------------

pipy releases are signed. To verify the signature:

- download the release file, note its URL
- download its detached signature by adding `.asc` at the end of the release
  file URL
- add the release key(s) to a gnupg keyring (`KEYS` file in the home
  repository), and use gnupg to validate the signature both corresponds to the
  distribution file and is trusted by your keyring
- install the already-fetched release file

Usage
=====

Finding a device and gaining exclusive access:

.. code:: python

    import usb1
    with usb1.USBContext() as context:
        handle = context.openByVendorIDAndProductID(
            VENDOR_ID,
            PRODUCT_ID,
            skip_on_error=True,
        )
        if handle is None:
            # Device not present, or user is not allowed to access device.
        with handle.claimInterface(INTERFACE):
            # Do stuff with endpoints on claimed interface.

Synchronous I/O:

.. code:: python

    while True:
        data = handle.bulkRead(ENDPOINT, BUFFER_SIZE)
        # Process data...

Asynchronous I/O, with more error handling:

.. code:: python

    def processReceivedData(transfer):
        if transfer.getStatus() != usb1.TRANSFER_COMPLETED:
            # Transfer did not complete successfully, there is no data to read.
            # This example does not resubmit transfers on errors. You may want
            # to resubmit in some cases (timeout, ...).
            return
        data = transfer.getBuffer()[:transfer.getActualLength()]
        # Process data...
        # Resubmit transfer once data is processed.
        transfer.submit()

    # Build a list of transfer objects and submit them to prime the pump.
    transfer_list = []
    for _ in range(TRANSFER_COUNT):
        transfer = handle.getTransfer()
        transfer.setBulk(
            usb1.ENDPOINT_IN | ENDPOINT,
            BUFFER_SIZE,
            callback=processReceivedData,
        )
        transfer.submit()
        transfer_list.append(transfer)
    # Loop as long as there is at least one submitted transfer.
    while any(x.isSubmitted() for x in transfer_list):
        try:
            context.handleEvents()
        except usb1.USBErrorInterrupted:
            pass

For more, see the ``example`` directory.

Documentation
=============

python-libusb1 main documentation is accessible with python's standard
``pydoc`` command.

python-libusb1 follows libusb-1.0 documentation as closely as possible, without
taking decisions for you. Thanks to this, python-libusb1 does not need to
duplicate the nice existing `libusb1.0 documentation`_.

Some description is needed though on how to jump from libusb-1.0 documentation
to python-libusb1, and vice-versa:

``usb1`` module groups libusb-1.0 functions as class methods. The first
parameter (when it's a ``libusb_...`` pointer) defined the class the function
belongs to. For example:

- :c_code:`int libusb_init (libusb_context **context)` becomes USBContext class
  constructor, :python_code:`USBContext.__init__(self)`

- :c_code:`ssize_t libusb_get_device_list (libusb_context *ctx,
  libusb_device ***list)` becomes an USBContext method, returning a
  list of USBDevice instances, :python_code:`USBDevice.getDeviceList(self)`

- :c_code:`uint8_t libusb_get_bus_number (libusb_device *dev)` becomes an
  USBDevice method, :python_code:`USBDevice.getBusNumber(self)`

Error statuses are converted into :python_code:`usb1.USBError` exceptions, with
status as ``value`` instance property.

``usb1`` module also defines a few more functions and classes, which are
otherwise not so convenient to call from Python: the event handling API needed
by async API.

History
=======

0.0.1
-----

Initial release

0.1.1
-----

Massive rework of usb1.py, making it more python-ish and fixing some
memory leaks.

0.1.2
-----

Deprecate "transfer" constructor parameter to allow instance reuse.

0.1.3
-----

Some work on isochronous "in" transfers. They don't raise exceptions anymore,
but data validity and python-induced latency impact weren't properly checked.

0.2.0
-----

Fix asynchronous configuration transfers.

Stand-alone polling thread for multi-threaded apps.

More libusb methods exposed on objects, including ones not yet part of
released libusb versions (up to their commit 4630fc2).

2to3 friendly.

Drop deprecated USBDevice.reprConfigurations method.

0.2.1
-----

Add FreeBSD support.

0.2.2
-----

Add Cygwin support.

OpenBSD support checked (no change).

0.2.3
-----

Add fink and homebrew support on OSX.

Drop PATH_MAX definition.

Try harder when looking for libusb.

1.0.0
-----

Fix FreeBSD ABI compatibility.

Easier to list connected devices.

Easier to terminate all async transfers for clean exit.

Fix few segfault causes.

pypy support.

1.1.0
-----

Descriptor walk API documented.

Version and capability APIs exposed.

Some portability fixes (OSes, python versions).

Isochronous transfer refuses to round transfer size.

Better exception handling in enumeration.

Add examples.

Better documentation.

1.2.0
-----

Wrap hotplug API.

Wrap port number API.

Wrap kernel auto-detach API.

Drop wrapper for libusb_strerror, with compatibility place-holder.

Add a few new upstream enum values.

1.3.0
-----

**Backward-incompatible change**: Enum class now affects caller's local scope,
not its global scope. This should not be of much importance, as:

- This class is probably very little used outside libusb1.py

- This class is probably mostly used at module level, where locals == globals.

  It is possible to get former behaviour by providing the new ``scope_dict``
  parameter to ``Enum`` constructor::

    SOME_ENUM = libusb1.Enum({...}, scope_dict=globals())

Improve start-up time on CPython by not importing standard ``inspect`` module.

Fix some more USBTransfer memory leaks.

Add Transfer.iterISO for more efficient isochronous reception.

1.3.1
-----

Fixed USBContext.waitForEvent.

Fix typo in USBInterfaceSetting.getClassTuple method name. Backward
compatibility preserved.

Remove globals accesses from USBDeviceHandle destructor.

Assorted documentation improvements.

1.3.2
-----

Made USBDevice instances hashable.

Relaxed licensing by moving from GPL v2+ to LGPL v2.1+, for consistency with
libusb1.

1.4.0
-----

Reduce (remove ?) the need to import libusb1 module by exposing USBError and
constants in usb1 module.

Fix libusb1.LIBUSB_ENDPOINT_ENDPOINT_MASK and
libusb1.LIBUSB_ENDPOINT_DIR_MASK naming.

Fix pydoc appearance of several USBContext methods.

Define exception classes for each error values.

1.4.1
-----

Fix wheel generation (``python3 setup.py bdist_wheel``).

1.5.0
-----

controlWrite, bulkWrite and interruptWrite now reject (with TypeError) numeric
values for ``data`` parameter.

Fix libusb1.REQUEST_TYPE_* names (were TYPE_*). Preserve backward
compatibility.

Add USBContext.getDeviceIterator method.

Rename USBContext.exit as USBContext.close for consistency with other USB*
classes. Preserve backward compatibility.

Make USBDeviceHandle.claimInterface a context manager, for easier interface
releasing.

1.5.1
-----

Introduce USBPollerThread.stop .

Fix USBDeviceHandle.getSupportedLanguageList bug when running under python 3.
While fixing this bug it was realised that this method returned ctypes objects.
This was not intended, and it now returns regular integers.

1.5.2
-----

Make USBTransfer.cancel raise specific error instances.

1.5.3
-----

Fix USBTransfer.cancel exception raising introduced in 1.5.2: it was
accidentally becomming a bound method, preventing the raise to actually
happen (in at least CPython 2.x) or raising type conversion errors (in at least
CPython 3.5.2).

1.6
---

Improve asynchronous transfer performance: (very) suboptimal code was used to
initialise asynchronous transfer buffer. As a consequence, usb1 now exposes
``bytearrays`` where it used to expose ``bytes`` or ``str`` objects.

Deprecate libusb1 module import, which should not be needed since all (?)
needed constants were re-bound to usb1 module.

Move testUSB1 module inside usb1, to eventually only expose usb1 as top-level
module.

1.6.1
-----

Fix getSupportedLanguageList.

Fix and extend get{,ASCII}StringDescriptor .

Fix iterISO and getISOBufferList.

1.6.2
-----

Fix getASCIIStringDescriptor: unlike getStringDescriptor, this returns only the
payload of the string descriptor, without its header.

1.6.3
-----

Deprecate USBPollerThread . It is mileading users for which the simple version
(a thread calling ``USBContext.handleEvents``) would be enough. And for more
advanced uses (ie, actually needing to poll non-libusb file descriptors), this
class only works reliably with epoll: kqueue (which should tehcnically work)
has a different API on python level, and poll (which has the same API as epoll
on python level) lacks the critical ability to change the set of monitored file
descriptors while a poll is already running, causing long pauses - if not
deadlocks.

1.6.4
-----

Fix asynchronous control transfers.

1.6.5
-----

Document hotplug handler limitations.

Run 2to3 when running setup.py with python3, and reduce differences with
python3.

Properly cast libusb_set_pollfd_notifiers arguments.
Fix null pointer value: POINTER(None) is the type of a pointer which may be a
null pointer, which falls back to c_void_p. But c_void_p() is an actual null
pointer.

1.6.6
-----

Expose bare string descriptors (aka string indexes) on USBDevice.

1.6.7
-----

get{,ASCII}StringDescriptor now return None for descriptor 0 instead of raising
UnicodeDecodeError. Use getSupportedLanguageList to access it.

Moved getManufacturer, getProduct and getSerialNumber to USBDeviceHandle. Kept
shortcuts for these on USBDevice.

1.7
---

get{,ASCII}StringDescriptor now return None for descriptor 0, use
getSupportedLanguageList to get its content.

getManufacturer, getProduct and getSerialNumber are now on USBDeviceHandle,
with backward-compatibility aliases on their original location.

Synchronous bulk and interrupt API exposes number of bytes sent and received
bytes even when a timeout occurs.

1.7.1
-----

usb1.__version__ is now present, managed by versioneer.

Fix an occasional segfault when closing a transfer from inside its callback
function.

1.8
---

Fix getExtra and libusb1.libusb_control_transfer_get_data .

Fix getMaxPower unit on SuperSpeed devices.

1.8.1
-----

Release process rework:

- embed libusb1 dll for easier deployment on Windows
- cryptographically signed releases

Use libusb_free_pollfds whenever available (libusb1>=1.0.20).

Fix hotplug callback destruction at context teardown.

Drop remnants of python 2.6 support code.

1.9
---

Drop USBPollerThread and deprecate libusb-lock-related USBContext API.

1.9.1
-----

Fix installation from pypi source tarball, broken in 1.8.1 .

1.9.2
-----

Windows wheels: Update bundled libusb to 1.0.24 .

Fix soure-only build when wheel is not available.

1.9.3
-----

Add support for pyinstaller.

Improve the way the windows dlls are embedded in wheels.

Fix support for python 3.10 .

Add support for homebrew on Apple M1.

1.10.1 (yanked)
---------------

NOTE: Release yanked_ from pypi and re-released as 2.0.0.

2.0.0
-----

Drop python <3.4 support.

Do not load the C library on import. Allows applications to customise the
lookup logic (see `usb1.loadLibrary`).

Add LIBUSB_SPEED_SUPER_PLUS.

Better control device iterator end of life.

Fix objects escaping control from their parent.

2.0.1
-----

Fix a TypeError exception in USBContext.handleEvents .

Fix an AttributeError exception in USBContext.hotplugRegisterCallback .

Fix segfault in pypy3 when finalizing USBDevice objects .

Source only: convert examples to python3.

Release process: also run some examples scripts.

3.0.0
-----

Update versioneer to be compatible with 3.11 .

Drop python <3.6 support (consequence of versioneer update), hence the major
version change.

unreleased
----------

Fix bug preventing use of setPollFDNotifiers.

Wrap libusb_interrupt_event_handler, available since libusb 1.0.21, to help
applications wake an event handling thread (ex: durring exit).

Windows wheels: Update bundled libusb dll to 1.0.26 .

.. _CPython: http://www.python.org/

.. _pypy: http://pypy.org/

.. _Cygwin: https://www.cygwin.com/

.. _MacPorts: https://www.macports.org/

.. _Fink: http://www.finkproject.org/

.. _Homebrew: http://brew.sh/

.. _libusb-1.0: https://github.com/libusb/libusb/wiki/

.. _libusb1.0 documentation: http://libusb.sourceforge.net/api-1.0/

.. _Zadig: https://zadig.akeo.ie/

.. _yanked: https://www.python.org/dev/peps/pep-0592/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vpelletier/python-libusb1",
    "name": "libusb1",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "usb,libusb",
    "author": "Vincent Pelletier",
    "author_email": "plr.vincent@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/af/19/53ecbfb96d6832f2272d13b84658c360802fcfff7c0c497ab8f6bf15ac40/libusb1-3.1.0.tar.gz",
    "platform": "any",
    "description": ".. contents::\n\nSupports all transfer types, both in synchronous and asynchronous mode.\n\nHome: http://github.com/vpelletier/python-libusb1\n\nPyPI: http://pypi.python.org/pypi/libusb1\n\n.. role:: c_code(code)\n  :language: c\n\n.. role:: python_code(code)\n  :language: python\n\nDependencies\n============\n\n- CPython_ 3.6+, pypy_ 2.0+. Older versions may work, but are not\n  recommended as there is no automated regression testing set up for them.\n- libusb-1.0_\n\nSupported OSes\n==============\n\npython-libusb1 can be expected to work on:\n\n- GNU/Linux\n- Windows [#]_ native dll or via Cygwin_\n- OSX [#]_ via MacPorts_, Fink_ or Homebrew_\n- FreeBSD (including Debian GNU/kFreeBSD)\n- OpenBSD\n\n.. [#] Beware of libusb-win32, which implements 0.1 API, not 1.0 .\n\n.. [#] Beware of possible lack of select.poll if you want to use asynchronous\n       API.\n\nInstallation\n============\n\nReleases from PyPI, with name *libusb1*. Installing from command line::\n\n    $ pip install libusb1\n\nLatest version from source tree::\n\n    $ git clone https://github.com/vpelletier/python-libusb1.git\n    $ cd python-libusb1\n    $ pip install .\n\nWindows installation notes\n--------------------------\n\nOn Windows, installing wheels from pypi also installs the libusb dll within the\nusb1 python module. It does not install any driver, so you still need to decide\nwhich of libusbk or WinUSB to use for each device and install it appropriately\n(possibly using Zadig_, or by providing a driver for your users to install).\n\nInstalling from source tree does not install the dll, so you need to install the\nlibrary where ctypes can find it - and of course the driver as well.\n\nChecking release file signature\n-------------------------------\n\npipy releases are signed. To verify the signature:\n\n- download the release file, note its URL\n- download its detached signature by adding `.asc` at the end of the release\n  file URL\n- add the release key(s) to a gnupg keyring (`KEYS` file in the home\n  repository), and use gnupg to validate the signature both corresponds to the\n  distribution file and is trusted by your keyring\n- install the already-fetched release file\n\nUsage\n=====\n\nFinding a device and gaining exclusive access:\n\n.. code:: python\n\n    import usb1\n    with usb1.USBContext() as context:\n        handle = context.openByVendorIDAndProductID(\n            VENDOR_ID,\n            PRODUCT_ID,\n            skip_on_error=True,\n        )\n        if handle is None:\n            # Device not present, or user is not allowed to access device.\n        with handle.claimInterface(INTERFACE):\n            # Do stuff with endpoints on claimed interface.\n\nSynchronous I/O:\n\n.. code:: python\n\n    while True:\n        data = handle.bulkRead(ENDPOINT, BUFFER_SIZE)\n        # Process data...\n\nAsynchronous I/O, with more error handling:\n\n.. code:: python\n\n    def processReceivedData(transfer):\n        if transfer.getStatus() != usb1.TRANSFER_COMPLETED:\n            # Transfer did not complete successfully, there is no data to read.\n            # This example does not resubmit transfers on errors. You may want\n            # to resubmit in some cases (timeout, ...).\n            return\n        data = transfer.getBuffer()[:transfer.getActualLength()]\n        # Process data...\n        # Resubmit transfer once data is processed.\n        transfer.submit()\n\n    # Build a list of transfer objects and submit them to prime the pump.\n    transfer_list = []\n    for _ in range(TRANSFER_COUNT):\n        transfer = handle.getTransfer()\n        transfer.setBulk(\n            usb1.ENDPOINT_IN | ENDPOINT,\n            BUFFER_SIZE,\n            callback=processReceivedData,\n        )\n        transfer.submit()\n        transfer_list.append(transfer)\n    # Loop as long as there is at least one submitted transfer.\n    while any(x.isSubmitted() for x in transfer_list):\n        try:\n            context.handleEvents()\n        except usb1.USBErrorInterrupted:\n            pass\n\nFor more, see the ``example`` directory.\n\nDocumentation\n=============\n\npython-libusb1 main documentation is accessible with python's standard\n``pydoc`` command.\n\npython-libusb1 follows libusb-1.0 documentation as closely as possible, without\ntaking decisions for you. Thanks to this, python-libusb1 does not need to\nduplicate the nice existing `libusb1.0 documentation`_.\n\nSome description is needed though on how to jump from libusb-1.0 documentation\nto python-libusb1, and vice-versa:\n\n``usb1`` module groups libusb-1.0 functions as class methods. The first\nparameter (when it's a ``libusb_...`` pointer) defined the class the function\nbelongs to. For example:\n\n- :c_code:`int libusb_init (libusb_context **context)` becomes USBContext class\n  constructor, :python_code:`USBContext.__init__(self)`\n\n- :c_code:`ssize_t libusb_get_device_list (libusb_context *ctx,\n  libusb_device ***list)` becomes an USBContext method, returning a\n  list of USBDevice instances, :python_code:`USBDevice.getDeviceList(self)`\n\n- :c_code:`uint8_t libusb_get_bus_number (libusb_device *dev)` becomes an\n  USBDevice method, :python_code:`USBDevice.getBusNumber(self)`\n\nError statuses are converted into :python_code:`usb1.USBError` exceptions, with\nstatus as ``value`` instance property.\n\n``usb1`` module also defines a few more functions and classes, which are\notherwise not so convenient to call from Python: the event handling API needed\nby async API.\n\nHistory\n=======\n\n0.0.1\n-----\n\nInitial release\n\n0.1.1\n-----\n\nMassive rework of usb1.py, making it more python-ish and fixing some\nmemory leaks.\n\n0.1.2\n-----\n\nDeprecate \"transfer\" constructor parameter to allow instance reuse.\n\n0.1.3\n-----\n\nSome work on isochronous \"in\" transfers. They don't raise exceptions anymore,\nbut data validity and python-induced latency impact weren't properly checked.\n\n0.2.0\n-----\n\nFix asynchronous configuration transfers.\n\nStand-alone polling thread for multi-threaded apps.\n\nMore libusb methods exposed on objects, including ones not yet part of\nreleased libusb versions (up to their commit 4630fc2).\n\n2to3 friendly.\n\nDrop deprecated USBDevice.reprConfigurations method.\n\n0.2.1\n-----\n\nAdd FreeBSD support.\n\n0.2.2\n-----\n\nAdd Cygwin support.\n\nOpenBSD support checked (no change).\n\n0.2.3\n-----\n\nAdd fink and homebrew support on OSX.\n\nDrop PATH_MAX definition.\n\nTry harder when looking for libusb.\n\n1.0.0\n-----\n\nFix FreeBSD ABI compatibility.\n\nEasier to list connected devices.\n\nEasier to terminate all async transfers for clean exit.\n\nFix few segfault causes.\n\npypy support.\n\n1.1.0\n-----\n\nDescriptor walk API documented.\n\nVersion and capability APIs exposed.\n\nSome portability fixes (OSes, python versions).\n\nIsochronous transfer refuses to round transfer size.\n\nBetter exception handling in enumeration.\n\nAdd examples.\n\nBetter documentation.\n\n1.2.0\n-----\n\nWrap hotplug API.\n\nWrap port number API.\n\nWrap kernel auto-detach API.\n\nDrop wrapper for libusb_strerror, with compatibility place-holder.\n\nAdd a few new upstream enum values.\n\n1.3.0\n-----\n\n**Backward-incompatible change**: Enum class now affects caller's local scope,\nnot its global scope. This should not be of much importance, as:\n\n- This class is probably very little used outside libusb1.py\n\n- This class is probably mostly used at module level, where locals == globals.\n\n  It is possible to get former behaviour by providing the new ``scope_dict``\n  parameter to ``Enum`` constructor::\n\n    SOME_ENUM = libusb1.Enum({...}, scope_dict=globals())\n\nImprove start-up time on CPython by not importing standard ``inspect`` module.\n\nFix some more USBTransfer memory leaks.\n\nAdd Transfer.iterISO for more efficient isochronous reception.\n\n1.3.1\n-----\n\nFixed USBContext.waitForEvent.\n\nFix typo in USBInterfaceSetting.getClassTuple method name. Backward\ncompatibility preserved.\n\nRemove globals accesses from USBDeviceHandle destructor.\n\nAssorted documentation improvements.\n\n1.3.2\n-----\n\nMade USBDevice instances hashable.\n\nRelaxed licensing by moving from GPL v2+ to LGPL v2.1+, for consistency with\nlibusb1.\n\n1.4.0\n-----\n\nReduce (remove ?) the need to import libusb1 module by exposing USBError and\nconstants in usb1 module.\n\nFix libusb1.LIBUSB_ENDPOINT_ENDPOINT_MASK and\nlibusb1.LIBUSB_ENDPOINT_DIR_MASK naming.\n\nFix pydoc appearance of several USBContext methods.\n\nDefine exception classes for each error values.\n\n1.4.1\n-----\n\nFix wheel generation (``python3 setup.py bdist_wheel``).\n\n1.5.0\n-----\n\ncontrolWrite, bulkWrite and interruptWrite now reject (with TypeError) numeric\nvalues for ``data`` parameter.\n\nFix libusb1.REQUEST_TYPE_* names (were TYPE_*). Preserve backward\ncompatibility.\n\nAdd USBContext.getDeviceIterator method.\n\nRename USBContext.exit as USBContext.close for consistency with other USB*\nclasses. Preserve backward compatibility.\n\nMake USBDeviceHandle.claimInterface a context manager, for easier interface\nreleasing.\n\n1.5.1\n-----\n\nIntroduce USBPollerThread.stop .\n\nFix USBDeviceHandle.getSupportedLanguageList bug when running under python 3.\nWhile fixing this bug it was realised that this method returned ctypes objects.\nThis was not intended, and it now returns regular integers.\n\n1.5.2\n-----\n\nMake USBTransfer.cancel raise specific error instances.\n\n1.5.3\n-----\n\nFix USBTransfer.cancel exception raising introduced in 1.5.2: it was\naccidentally becomming a bound method, preventing the raise to actually\nhappen (in at least CPython 2.x) or raising type conversion errors (in at least\nCPython 3.5.2).\n\n1.6\n---\n\nImprove asynchronous transfer performance: (very) suboptimal code was used to\ninitialise asynchronous transfer buffer. As a consequence, usb1 now exposes\n``bytearrays`` where it used to expose ``bytes`` or ``str`` objects.\n\nDeprecate libusb1 module import, which should not be needed since all (?)\nneeded constants were re-bound to usb1 module.\n\nMove testUSB1 module inside usb1, to eventually only expose usb1 as top-level\nmodule.\n\n1.6.1\n-----\n\nFix getSupportedLanguageList.\n\nFix and extend get{,ASCII}StringDescriptor .\n\nFix iterISO and getISOBufferList.\n\n1.6.2\n-----\n\nFix getASCIIStringDescriptor: unlike getStringDescriptor, this returns only the\npayload of the string descriptor, without its header.\n\n1.6.3\n-----\n\nDeprecate USBPollerThread . It is mileading users for which the simple version\n(a thread calling ``USBContext.handleEvents``) would be enough. And for more\nadvanced uses (ie, actually needing to poll non-libusb file descriptors), this\nclass only works reliably with epoll: kqueue (which should tehcnically work)\nhas a different API on python level, and poll (which has the same API as epoll\non python level) lacks the critical ability to change the set of monitored file\ndescriptors while a poll is already running, causing long pauses - if not\ndeadlocks.\n\n1.6.4\n-----\n\nFix asynchronous control transfers.\n\n1.6.5\n-----\n\nDocument hotplug handler limitations.\n\nRun 2to3 when running setup.py with python3, and reduce differences with\npython3.\n\nProperly cast libusb_set_pollfd_notifiers arguments.\nFix null pointer value: POINTER(None) is the type of a pointer which may be a\nnull pointer, which falls back to c_void_p. But c_void_p() is an actual null\npointer.\n\n1.6.6\n-----\n\nExpose bare string descriptors (aka string indexes) on USBDevice.\n\n1.6.7\n-----\n\nget{,ASCII}StringDescriptor now return None for descriptor 0 instead of raising\nUnicodeDecodeError. Use getSupportedLanguageList to access it.\n\nMoved getManufacturer, getProduct and getSerialNumber to USBDeviceHandle. Kept\nshortcuts for these on USBDevice.\n\n1.7\n---\n\nget{,ASCII}StringDescriptor now return None for descriptor 0, use\ngetSupportedLanguageList to get its content.\n\ngetManufacturer, getProduct and getSerialNumber are now on USBDeviceHandle,\nwith backward-compatibility aliases on their original location.\n\nSynchronous bulk and interrupt API exposes number of bytes sent and received\nbytes even when a timeout occurs.\n\n1.7.1\n-----\n\nusb1.__version__ is now present, managed by versioneer.\n\nFix an occasional segfault when closing a transfer from inside its callback\nfunction.\n\n1.8\n---\n\nFix getExtra and libusb1.libusb_control_transfer_get_data .\n\nFix getMaxPower unit on SuperSpeed devices.\n\n1.8.1\n-----\n\nRelease process rework:\n\n- embed libusb1 dll for easier deployment on Windows\n- cryptographically signed releases\n\nUse libusb_free_pollfds whenever available (libusb1>=1.0.20).\n\nFix hotplug callback destruction at context teardown.\n\nDrop remnants of python 2.6 support code.\n\n1.9\n---\n\nDrop USBPollerThread and deprecate libusb-lock-related USBContext API.\n\n1.9.1\n-----\n\nFix installation from pypi source tarball, broken in 1.8.1 .\n\n1.9.2\n-----\n\nWindows wheels: Update bundled libusb to 1.0.24 .\n\nFix soure-only build when wheel is not available.\n\n1.9.3\n-----\n\nAdd support for pyinstaller.\n\nImprove the way the windows dlls are embedded in wheels.\n\nFix support for python 3.10 .\n\nAdd support for homebrew on Apple M1.\n\n1.10.1 (yanked)\n---------------\n\nNOTE: Release yanked_ from pypi and re-released as 2.0.0.\n\n2.0.0\n-----\n\nDrop python <3.4 support.\n\nDo not load the C library on import. Allows applications to customise the\nlookup logic (see `usb1.loadLibrary`).\n\nAdd LIBUSB_SPEED_SUPER_PLUS.\n\nBetter control device iterator end of life.\n\nFix objects escaping control from their parent.\n\n2.0.1\n-----\n\nFix a TypeError exception in USBContext.handleEvents .\n\nFix an AttributeError exception in USBContext.hotplugRegisterCallback .\n\nFix segfault in pypy3 when finalizing USBDevice objects .\n\nSource only: convert examples to python3.\n\nRelease process: also run some examples scripts.\n\n3.0.0\n-----\n\nUpdate versioneer to be compatible with 3.11 .\n\nDrop python <3.6 support (consequence of versioneer update), hence the major\nversion change.\n\nunreleased\n----------\n\nFix bug preventing use of setPollFDNotifiers.\n\nWrap libusb_interrupt_event_handler, available since libusb 1.0.21, to help\napplications wake an event handling thread (ex: durring exit).\n\nWindows wheels: Update bundled libusb dll to 1.0.26 .\n\n.. _CPython: http://www.python.org/\n\n.. _pypy: http://pypy.org/\n\n.. _Cygwin: https://www.cygwin.com/\n\n.. _MacPorts: https://www.macports.org/\n\n.. _Fink: http://www.finkproject.org/\n\n.. _Homebrew: http://brew.sh/\n\n.. _libusb-1.0: https://github.com/libusb/libusb/wiki/\n\n.. _libusb1.0 documentation: http://libusb.sourceforge.net/api-1.0/\n\n.. _Zadig: https://zadig.akeo.ie/\n\n.. _yanked: https://www.python.org/dev/peps/pep-0592/\n",
    "bugtrack_url": null,
    "license": "LGPLv2.1+",
    "summary": "Pure-python wrapper for libusb-1.0",
    "version": "3.1.0",
    "project_urls": {
        "Homepage": "https://github.com/vpelletier/python-libusb1"
    },
    "split_keywords": [
        "usb",
        "libusb"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "855c9169aea7690df382b677d9f725accc3ec864849c5ab49991e3823a942392",
                "md5": "ce30166589ebb8c018b668d5c4ecee5e",
                "sha256": "9d9f16e2c199cab91f48ead585d3f5ec7e8e4be428a25ddfed22abf786fa9b3a"
            },
            "downloads": -1,
            "filename": "libusb1-3.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ce30166589ebb8c018b668d5c4ecee5e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 62368,
            "upload_time": "2023-10-29T03:14:24",
            "upload_time_iso_8601": "2023-10-29T03:14:24.767752Z",
            "url": "https://files.pythonhosted.org/packages/85/5c/9169aea7690df382b677d9f725accc3ec864849c5ab49991e3823a942392/libusb1-3.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2f84d851eb09565ff72b0dfbb988f4e1c79d3746c16eda5bb8e81ec6ce3bb16e",
                "md5": "fde32fd15845f3f97aee75449f5047b6",
                "sha256": "bc7874302565721f443a27d8182fcc7152e5b560523f12f1377b130f473e4a0c"
            },
            "downloads": -1,
            "filename": "libusb1-3.1.0-py3-none-win32.whl",
            "has_sig": false,
            "md5_digest": "fde32fd15845f3f97aee75449f5047b6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 127838,
            "upload_time": "2023-10-29T03:14:27",
            "upload_time_iso_8601": "2023-10-29T03:14:27.327188Z",
            "url": "https://files.pythonhosted.org/packages/2f/84/d851eb09565ff72b0dfbb988f4e1c79d3746c16eda5bb8e81ec6ce3bb16e/libusb1-3.1.0-py3-none-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02a5620d383ec17051f42a907f21517eb498ddecd45b2b81e46cc42e6ec4038e",
                "md5": "c779dbafc8959f89114b3d5bcc62ec88",
                "sha256": "77a06ecfb3d002d7c2ce369e28d0138b292fe8db8a3d102b73fda231a716dd35"
            },
            "downloads": -1,
            "filename": "libusb1-3.1.0-py3-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "c779dbafc8959f89114b3d5bcc62ec88",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 140380,
            "upload_time": "2023-10-29T03:14:29",
            "upload_time_iso_8601": "2023-10-29T03:14:29.583540Z",
            "url": "https://files.pythonhosted.org/packages/02/a5/620d383ec17051f42a907f21517eb498ddecd45b2b81e46cc42e6ec4038e/libusb1-3.1.0-py3-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "af1953ecbfb96d6832f2272d13b84658c360802fcfff7c0c497ab8f6bf15ac40",
                "md5": "7b4f094786d1dfc8d011c7649d8ccb97",
                "sha256": "4ee9b0a55f8bd0b3ea7017ae919a6c1f439af742c4a4b04543c5fd7af89b828c"
            },
            "downloads": -1,
            "filename": "libusb1-3.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7b4f094786d1dfc8d011c7649d8ccb97",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 83013,
            "upload_time": "2023-10-29T03:14:31",
            "upload_time_iso_8601": "2023-10-29T03:14:31.821158Z",
            "url": "https://files.pythonhosted.org/packages/af/19/53ecbfb96d6832f2272d13b84658c360802fcfff7c0c497ab8f6bf15ac40/libusb1-3.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-29 03:14:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vpelletier",
    "github_project": "python-libusb1",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "libusb1"
}
        
Elapsed time: 3.24232s