The getpath.py file is frozen at build time and executed as code over a namespace. It is never imported, nor is it meant to be importable or reusable. However, it should be easier to read, modify, and patch than the previous code.
This commit attempts to preserve every previously tested quirk, but these may be changed in the future to better align platforms.
Modify the ``EnumType.__dir__()`` and ``Enum.__dir__()`` to ensure
that user-defined methods and methods inherited from mixin classes always
show up in the output of `help()`. This change also makes it easier for
IDEs to provide auto-completion.
Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges and
invert the value.
Document -X no_debug_ranges and PYTHONNODEBUGRANGES env var in
PyConfig.code_debug_ranges documentation.
* Split exit paths into exceptional and non-exceptional.
* Move exit tracing code to individual bytecodes.
* Wrap all trace entry and exit events in macros to make them clearer and easier to enhance.
* Move return sequence into RETURN_VALUE, YIELD_VALUE and YIELD_FROM. Distinguish between normal trace events and dtrace events.
The following internal macros can not longer be used as l-value:
* asdl_seq_GET()
* asdl_seq_GET_UNTYPED()
* asdl_seq_LEN()
They are modified to use the _Py_RVALUE() macro.
Add a new _Py_RVALUE() macro to prevent using an expression as an
l-value.
Replace a "(void)" cast with the _Py_RVALUE() macro in the following
macros:
* PyCell_SET()
* PyList_SET_ITEM()
* PyTuple_SET_ITEM()
* _PyGCHead_SET_FINALIZED()
* _PyGCHead_SET_NEXT()
* asdl_seq_SET()
* asdl_seq_SET_UNTYPED()
Add also parentheses around macro arguments in PyCell_SET() and
PyTuple_SET_ITEM() macros.
* Inlined code from variance functions
* Added helper functions for the float square root of a fraction
* Call helper functions
* Add blurb
* Fix over-specified test
* Add a test for the _sqrt_frac() helper function
* Increase the tested range
* Add type hints to the internal function.
* Fix test for correct rounding
* Simplify ⌊√(n/m)⌋ calculation
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* Add comment and beef-up tests
* Test for zero denominator
* Add algorithmic references
* Add test for the _isqrt_frac_rto() helper function.
* Compute the 109 instead of hard-wiring it
* Stronger test for _isqrt_frac_rto()
* Bigger range
* Bigger range
* Replace float() call with int/int division to be parallel with the other code path.
* Factor out division. Update proof link. Remove internal type declaration
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>