-
Notifications
You must be signed in to change notification settings - Fork 233
Add support for Python 3.12 #2711
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
fc5c445
Add support for Python 3.12
weiji14 6bded07
Add conda-forge/label/python_rc channel
weiji14 caa65d3
Merge branch 'main' into python-3.12
weiji14 534bc30
Merge branch 'main' into python-3.12
weiji14 654e8be
Revert "Add conda-forge/label/python_rc channel"
weiji14 5c0d900
Merge branch 'main' into python-3.12
weiji14 a22dfd5
Merge branch 'main' into python-3.12
weiji14 d1b01c3
Fix DeprecationWarning with use of datetime.utcnow() on Python 3.12
weiji14 a048c86
Pretend to be on macOS instead of Windows
weiji14 90a3a49
Use datetime.timezone.utc instead of Python 3.11+ only datetime.UTC
weiji14 486c37a
Merge branch 'main' into python-3.12
weiji14 99fdbf8
Pretend to be on macOS if running on Linux, and vice versa
weiji14 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,7 +43,7 @@ jobs: | |
| - conda-forge | ||
| - nodefaults | ||
| create-args: >- | ||
| python=3.11 | ||
| python=3.12 | ||
| gmt=6.4.0 | ||
| numpy | ||
| pandas | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,7 @@ jobs: | |
| - conda-forge | ||
| - nodefaults | ||
| create-args: >- | ||
| python=3.11 | ||
| python=3.12 | ||
| gmt=6.4.0 | ||
| numpy | ||
| pandas | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GMT Dev Tests failing because
pygit2doesn't have Python 3.12 wheels, and building from source fails at https://github.com/GenericMappingTools/pygmt/actions/runs/6648200102/job/18064869372#step:7:570:Building wheel for pygit2 (pyproject.toml): started Building wheel for pygit2 (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error × Building wheel for pygit2 (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [66 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-312 creating build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/index.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/ffi.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/submodule.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/credentials.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/_run.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/utils.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/config.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/errors.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/_build.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/refspec.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/repository.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/blame.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/packbuilder.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/remote.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/callbacks.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/settings.py -> build/lib.linux-x86_64-cpython-312/pygit2 copying pygit2/__init__.py -> build/lib.linux-x86_64-cpython-312/pygit2 creating build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/transport.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/errors.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/blame.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/checkout.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/net.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/strarray.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/merge.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/diff.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/graph.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/describe.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/refspec.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/buffer.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/proxy.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/commit.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/revert.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/config.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/common.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/oid.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/attr.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/repository.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/remote.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/types.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/pack.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/callbacks.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/clone.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/indexer.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/stash.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/index.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/decl/submodule.h -> build/lib.linux-x86_64-cpython-312/pygit2/decl copying pygit2/_pygit2.pyi -> build/lib.linux-x86_64-cpython-312/pygit2 running build_ext generating cffi module 'build/temp.linux-x86_64-cpython-312/pygit2._libgit2.c' creating build/temp.linux-x86_64-cpython-312 building 'pygit2._pygit2' extension creating build/temp.linux-x86_64-cpython-312/src gcc -pthread -B /home/runner/micromamba/envs/pygmt/compiler_compat -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/runner/micromamba/envs/pygmt/include -fPIC -O2 -isystem /home/runner/micromamba/envs/pygmt/include -fPIC -I/usr/local/include -I/home/runner/micromamba/envs/pygmt/include/python3.12 -c src/blob.c -o build/temp.linux-x86_64-cpython-312/src/blob.o In file included from src/blob.c:30: src/diff.h:33:10: fatal error: git2.h: No such file or directory 33 | #include <git2.h> | ^~~~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pygit2 Building wheel for frozenlist (pyproject.toml): started Building wheel for frozenlist (pyproject.toml): finished with status 'done' Created wheel for frozenlist: filename=frozenlist-1.4.0-cp312-cp312-linux_x86_64.whl size=53997 sha256=39bb8d4c56a724d4cd9ed87de83b7de69e78a79763d0d9f5ae5e95f8497b5b83 Stored in directory: /home/runner/.cache/pip/wheels/f1/9c/94/9386cb0ea511a93226456388d41d35f1c24ba15a62ffd7b1ef Building wheel for multidict (pyproject.toml): started Building wheel for multidict (pyproject.toml): finished with status 'done' Created wheel for multidict: filename=multidict-6.0.4-cp312-cp312-linux_x86_64.whl size=34743 sha256=b99632e55f0994365432703c422b45c7b80332be4690bfa943602cb30e69d013 Stored in directory: /home/runner/.cache/pip/wheels/f6/d8/ff/3c14a64b8f2ab1aa94ba2888f5a988be6ab446ec5c8d1a82da Building wheel for yarl (pyproject.toml): started Building wheel for yarl (pyproject.toml): finished with status 'done' Created wheel for yarl: filename=yarl-1.9.2-cp312-cp312-linux_x86_64.whl size=70034 sha256=d286d55089432e38d0441fa83a86e4a994b9537a62cec71e97187e4d2d41a9ec Stored in directory: /home/runner/.cache/pip/wheels/84/e3/6a/7d0fa1abee8e4aa39922b5bd54689b4b5e4269b2821f482a32 Successfully built antlr4-python3-runtime dulwich frozenlist multidict yarl Failed to build pygit2 ERROR: Could not build wheels for pygit2, which is required to install pyproject.toml-based projectsMight need to wait for libgit2/pygit2#1240.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than waiting for
pygit2to release Python 3.12 wheels, we could also keep the GMT Dev Tests on Python 3.11 for now?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like
pygit2has Python 3.12 wheels now - https://pypi.org/project/pygit2/1.13.2/#files