Title: make ast module usage compatible to python 3.14 by tnias · Pull Request #29 · andreax79/python-cstruct · GitHub
Open Graph Title: make ast module usage compatible to python 3.14 by tnias · Pull Request #29 · andreax79/python-cstruct
X Title: make ast module usage compatible to python 3.14 by tnias · Pull Request #29 · andreax79/python-cstruct
Description: Python 3.8 deprecated some AST nodes, which got removed in Python 3.14.
The Python 3.14 releaes notes for the ast module state:
Remove the following classes, which have been deprecated aliases of Constant since Python 3.8 and have emitted deprecation warnings since Python 3.12:
Bytes
Ellipsis
NameConstant
Num
Str
[...]
Remove the following deprecated properties on ast.Constant, which were present for compatibility with the now-removed AST classes:
Constant.n
Constant.s
Use Constant.value instead. (Contributed by Alex Waygood in gh-119562.)
Running the tests with Python 3.12 or 3.13 already prints deprecation warnings.
DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
So far I've tested this with the following python versions:
Python 3.6 (used make test from docker/i386/Makefile) (alpine)
Python 3.7 (debian 10 docker container. see spoiler below) (alpine)
Python 3.8 (alpine)
Python 3.9 (alpine)
Python 3.10 (alpine) (applied patch to nixpkgs version)
Python 3.11 (alpine) (applied patch to nixpkgs version)
Python 3.12 (alpine) (applied patch to nixpkgs version)
Python 3.13 (applied patch to nixpkgs version)
Python 3.14 (applied patch to nixpkgs version)
Details on how I ran the tests against python 3.7 (click to unfold)
# docker build -t debian-10-python-cstruct . && docker run --rm -it debian-10-python-cstruct
FROM debian:10
RUN cat <
Open Graph Description: Python 3.8 deprecated some AST nodes, which got removed in Python 3.14. The Python 3.14 releaes notes for the ast module state: Remove the following classes, which have been deprecated aliases of...
X Description: Python 3.8 deprecated some AST nodes, which got removed in Python 3.14. The Python 3.14 releaes notes for the ast module state: Remove the following classes, which have been deprecated aliases of...
Opengraph URL: https://github.com/andreax79/python-cstruct/pull/29
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:09675c12-5f1b-65a4-07dd-0bb66cfdf881 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A6D2:326B0D:ABE28F:DD7A32:697E6052 |
| html-safe-nonce | f4d29aefe5d9f6292c8d20cce1f01743311c2572904e385cd1a126c9bd88cb29 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNkQyOjMyNkIwRDpBQkUyOEY6REQ3QTMyOjY5N0U2MDUyIiwidmlzaXRvcl9pZCI6IjI1MDk3NjQwOTM5NDI4NDk2MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0059bd046ad3260f56321fdbe0ba6c6bc9077cb2ab6e503626b2b8814bf5489c |
| hovercard-subject-tag | pull_request:3160675313 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/andreax79/python-cstruct/pull/29/files |
| twitter:image | https://avatars.githubusercontent.com/u/9853194?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/9853194?s=400&v=4 |
| og:image:alt | Python 3.8 deprecated some AST nodes, which got removed in Python 3.14. The Python 3.14 releaes notes for the ast module state: Remove the following classes, which have been deprecated aliases of... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/andreax79/python-cstruct git https://github.com/andreax79/python-cstruct.git |
| octolytics-dimension-user_id | 1288154 |
| octolytics-dimension-user_login | andreax79 |
| octolytics-dimension-repository_id | 12209630 |
| octolytics-dimension-repository_nwo | andreax79/python-cstruct |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 12209630 |
| octolytics-dimension-repository_network_root_nwo | andreax79/python-cstruct |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width