Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix pylibftdi for Python3.12 #9

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix pylibftdi for Python3.12
  • Loading branch information
codedstructure committed Apr 3, 2024
commit dd8c743e838ec7d77a211e2ef34a1b66604edfd1
2 changes: 1 addition & 1 deletion .github/workflows/python-lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
# Note we don't test version 3.7 as many dev deps require >= 3.8
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Embedded Systems",
"Topic :: System :: Hardware",
Expand Down
3 changes: 2 additions & 1 deletion src/pylibftdi/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ def _load_library(self, name: str, search_list: list[str] | None = None) -> Any:
# cdll access.
lib = getattr(cdll, dll)
break
except OSError:
# On DLL load fail, Python <3.12 raises OSError, 3.12+ AttributeError.
except (OSError, AttributeError):
lib_path = find_library(dll)
if lib_path is not None:
lib = getattr(cdll, lib_path)
Expand Down
Loading