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

Support Python 3.13 #1291

Merged
merged 2 commits into from
Dec 11, 2024
Merged

Support Python 3.13 #1291

merged 2 commits into from
Dec 11, 2024

Conversation

andersonhc
Copy link
Collaborator

@andersonhc andersonhc commented Oct 23, 2024

e.g. Fixes #0

Checklist:

  • A unit test is covering the code added / modified by this PR

  • This PR is ready to be merged

  • In case of a new feature, docstrings have been added, with also some documentation in the docs/ folder

  • A mention of the change is present in CHANGELOG.md

By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.

@andersonhc andersonhc requested a review from gmischler as a code owner October 23, 2024 03:04
@Lucas-C
Copy link
Member

Lucas-C commented Dec 7, 2024

Currently, this seems blocked by this issue: pylint-dev/pylint#10112:

Unable to import 'collections.abc' using python 3.13.1

@Lucas-C
Copy link
Member

Lucas-C commented Dec 9, 2024

I think now this is blocked by the failing test I'm trying to fix in #1321 🙂

@Lucas-C
Copy link
Member

Lucas-C commented Dec 10, 2024

As #1321 as been merged, I squashed the 11 commits on this branch and rebased it.

@Lucas-C Lucas-C force-pushed the master branch 2 times, most recently from 43734c9 to 6fbc473 Compare December 10, 2024 21:22
@Lucas-C
Copy link
Member

Lucas-C commented Dec 10, 2024

Now it seems that pytest is crashing with Python 3.12 under Windows 😢

  pytest -vv --trace-memory-usage
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    pythonLocation: C:\hostedtoolcache\windows\Python\3.13.1\x64
    PKG_CONFIG_PATH: C:\hostedtoolcache\windows\Python\3.13.1\x64/lib/pkgconfig
    Python_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.13.1\x64
    Python2_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.13.1\x64
    Python3_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.13.1\x64
    CHECK_EXEC_TIME: 
    CHECK_RSS_MEMORY: test-enabled
============================= test session starts =============================
platform win32 -- Python 3.13.1, pytest-8.3.4, pluggy-1.5.0 -- C:\hostedtoolcache\windows\Python\3.13.1\x64\python.exe
cachedir: .pytest_cache
rootdir: D:\a\fpdf2\fpdf2
configfile: setup.cfg
plugins: cov-6.0.0
Windows fatal exception: access violation

Current thread 0x000015d4 (most recent call first):
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\numpy\core\getlimits.py", line 52 in __init__
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\numpy\core\getlimits.py", line 230 in _register_known_types
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\numpy\__init__.py", line 235 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1026 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\camelot\core.py", line 10 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1026 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\camelot\handlers.py", line 8 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1026 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\camelot\io.py", line 5 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1026 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\camelot\__init__.py", line 6 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1026 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "D:\a\fpdf2\fpdf2\test\table\test_table_extraction.py", line 9 in <module>
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\assertion\rewrite.py", line 184 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "<frozen importlib._bootstrap>", line 1387 in _gcd_import
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\importlib\__init__.py", line 88 in import_module
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\pathlib.py", line 587 in import_path
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\python.py", line 493 in importtestmodule
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\python.py", line 546 in _getobj
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\python.py", line 284 in obj
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\python.py", line 562 in _register_setup_module_fixture
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\python.py", line 549 in collect
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\runner.py", line 389 in collect
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\runner.py", line 341 in from_call
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\runner.py", line 391 in pytest_make_collect_report
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\pluggy\_callers.py", line 103 in _multicall
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\pluggy\_hooks.py", line 513 in __call__
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\runner.py", line 567 in collect_one_node
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\main.py", line 835 in _collect_one_node
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\main.py", line 970 in genitems
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\main.py", line 975 in genitems
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\main.py", line 975 in genitems
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\main.py", line 975 in genitems
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\main.py", line 809 in perform_collect
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\main.py", line 347 in pytest_collection
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\pluggy\_callers.py", line 103 in _multicall
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\pluggy\_hooks.py", line 513 in __call__
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\main.py", line 336 in _main
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\main.py", line 283 in wrap_session
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\main.py", line 330 in pytest_cmdline_main
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\pluggy\_callers.py", line 103 in _multicall
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\pluggy\_hooks.py", line 513 in __call__
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\config\__init__.py", line 175 in main
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Lib\site-packages\_pytest\config\__init__.py", line 201 in console_main
  File "C:\hostedtoolcache\windows\Python\3.13.1\x64\Scripts\pytest.exe\__main__.py", line 7 in <module>
  File "<frozen runpy>", line 88 in _run_code
  File "<frozen runpy>", line 198 in _run_module_as_main
collecting ... 

@andersonhc
Copy link
Collaborator Author

andersonhc commented Dec 11, 2024

seems like this issue:
numpy/numpy#27894

@andersonhc andersonhc merged commit 1f28448 into py-pdf:master Dec 11, 2024
13 checks passed
@Lucas-C
Copy link
Member

Lucas-C commented Dec 11, 2024

Thank you @andersonhc 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants