Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Icxolu
Copy link
Contributor

@Icxolu Icxolu commented Jun 28, 2025

Closes #5124
Ref #5149

This makes PyCode unconditionally available (using the same strategy as the datetime types, PyTypeInfo when possible, PyTypeCheck otherwise) and adds PyCode::compile to construct an executable code object. The internal Python::run_code is moved to PyCodeMethods::run to allow executing the code object. Python::run|eval are refactored to make use of this.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks great to me!

@Icxolu Icxolu enabled auto-merge July 4, 2025 18:14
@Icxolu Icxolu added this pull request to the merge queue Jul 4, 2025
Merged via the queue into PyO3:main with commit 2dc118e Jul 4, 2025
45 of 46 checks passed
@Icxolu Icxolu deleted the pycode branch July 4, 2025 21:17
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.

Expose Py_CompileString
2 participants