GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-122575: Include `sys.flags.gil` as a sequence attribute by colesbury · Pull Request #122576 · python/cpython Conversation
|
|
@ericsnowcurrently, when you have some time, I'd appreciate your review on this |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| * - .. attribute:: flags.warn_default_encoding | ||
| - :option:`-X warn_default_encoding <-X>` | ||
|
|
||
| * - .. attribute:: flags.gil |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
You should explain that the gil takes values 0, 1, or 2 and possibly explain the corresponding values (or a link to them) (and also say that None means the free-threaded build (if I'm not wrong)).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This isn't the right place for that, is it?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Oh actually I don't really know where it would be the right place... I just wanted to point it out since a new variable is being documented (I don't know whether there already exists another place so feel free to ignore this comment!)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| attr_types = { | ||
| "dev_mode": bool, | ||
| "safe_path": bool, | ||
| "gil": (int, type(None)), |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Does the None value mean that it's the free-threaded build or is it for something else?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Potentially, .. data:: flags
The :term:`named tuple` *flags* exposes the status of command line
flags. The attributes are read only.
+ The number of flags may change in any version of Python,
+ do not unpack ``sys.flags`` or index into it as a tuple.which would document that we change A |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM if you apply the Py_ARRAY_LENGTH() suggestion.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Bénédikt Tran <[email protected]>
|
Ah, you should now update test_pythontypes() of test_sys. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm going to close this for now as @encukou expressed concerns about backwards compatibility on the issue: #122575 (comment) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.