| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| gen_heap_type_members(ast_parser, writer) | ||
|
|
||
| ver_define = "PYTHON{0}{1}".format(PY_MAJOR, PY_MINOR) | ||
| writer.append(code="#if " + ver_define) |
There was a problem hiding this comment.
Why are these still behind a compile-time flag? Do you plan to change that?
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah, I am approaching this gradually.
Sorry, something went wrong.
There was a problem hiding this comment.
I checked this out, and the rest of the conditional stuff came from 1b466df. Since it was only used to determine if methods in Python.Runtime itself implement slots (which we can do on our own), I took a liberty to mostly revert it in this PR. Reversal is in this commit
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #1292 +/- ##
=======================================
Coverage 87.97% 87.97%
=======================================
Files 1 1
Lines 291 291
=======================================
Hits 256 256
Misses 35 35
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
Hm, Travis build on Linux with Python 3.9 regularly fails with this change. Could I have screwed up something here? @filmor, you've recently added support for 3.9. Was there anything specific to Linux? |
Sorry, something went wrong.
|
Nope, the only reason why support for 3.9 took so long was that I had to adjust the interop generation as it wasn't working with the new header-files anymore. |
Sorry, something went wrong.
|
@filmor , oh, nvm. Looks like Travis just used older commit for 3.9 o-O It passes now. |
Sorry, something went wrong.
There was a problem hiding this comment.
I think this is fine for now, just minor things that I think could be fixed.
Sorry, something went wrong.
Instead, for each supported Python version a separate class is generated (e.g. TypeOffset36). Then the Runtime picks the correct class using reflection, and copies only the necessary TypeOffset members over from it. ManagedDataOffsets.Magic is now also read at runtime from tp_basicsize of PyType
| Back | FazBrowse Home | New Git URL |
This is a stage of removing the need to prepare a separate build of Python.Runtime for each Python version.
What does this implement/fix? Explain your changes.
This removes the need to pick TypeOffset at compile time. Instead, for each supported Python version a separate class is generated (e.g. TypeOffset36). Then the Runtime (via new class ABI) picks the correct class based on actual Python version using reflection, and copies only the necessary TypeOffset members over from it.
ManagedDataOffsets.Magic is now also read at runtime from tp_basicsize of the builtins.type class.
Any other comments?
N/A
Checklist
Check all those that are applicable and complete. N/A