| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
(GH-18312)
|
|
|
| |
Only one example is needed
|
| |
|
| |
|
|
|
|
| |
(#116101)
|
| |
|
|
|
|
|
| |
(GH-116105)
gh-116103: Prevent error in WindowsLoadTracker.__del__ if there was a permission error
|
|
|
|
|
| |
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(#116077)
This was left behind by GH-115987. Basically a lot of diffs like this:
```
- res = _Py_uop_sym_new_unknown(ctx);
+ res = sym_new_unknown(ctx);
```
|
|
|
|
|
| |
This should fix the refleaks bots.
(See https://github.com/python/cpython/pull/116062#issuecomment-1970038174 .)
|
|
|
|
| |
docs now state to not call super().__new__
if super().__new__ is called, a better error message is now used
|
| |
|
| |
|
|
|
|
|
| |
This brings the code under test.support.interpreters, and the corresponding extension modules, in line with recent updates to PEP 734.
(Note: PEP 734 has not been accepted at this time. However, we are using an internal copy of the implementation in the test suite to exercise the existing subinterpreters feature.)
|
|
|
| |
Replace conjuction of next() calls with simpler len()/take() logic. Add key function.
|
|
|
|
| |
lock-free (#115786)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This undoes the *temporary* default disabling of the T2 optimizer pass in gh-115860.
- Add a new test that reproduces Brandt's example from gh-115859; it indeed crashes before gh-116028 with PYTHONUOPSOPTIMIZE=1
- Re-enable the optimizer pass in T2, stop checking PYTHONUOPSOPTIMIZE
- Rename the env var to disable T2 entirely to PYTHON_UOPS_OPTIMIZE (must be explicitly set to 0 to disable)
- Fix skipIf conditions on tests in test_opt.py accordingly
- Export sym_is_bottom() (for debugging)
- Fix various things in the `_BINARY_OP_` specializations in the abstract interpreter:
- DECREF(temp)
- out-of-space check after sym_new_const()
- add sym_matches_type() checks, so even if we somehow reach a binary op with symbolic constants of the wrong type on the stack we won't trigger the type assert
|
|
|
|
|
|
| |
The previous code had two bugs. First, the debug offset in the mimalloc
heap includes the two pymalloc debug words, but the pointer passed to
fill_mem_debug does not include them. Second, the current object heap is
correct source for allocations, but not deallocations.
|
| |
|
|
|
| |
Use of a proxy is intended to defer DNS for the hosts to the proxy itself, rather than a potential for information leak of the host doing DNS resolution itself for any reason. Proxy bypass lists are strictly name based. Most implementations of proxy support agree.
|
|
|
|
|
|
|
|
|
| |
Introduce a new subsubsection, 'Functions', for module level functions,
and place it before the PrettyPrinter class reference.
Also:
- Fix pprint.pprint() references so they properly link to the module
level function.
- Add links to sys.stdout.
|
|
|
|
|
|
|
| |
- Any `sym_set_...` call that attempts to set conflicting information
cause the symbol to become `bottom` (contradiction).
- All `sym_is...` and similar calls return false or NULL for `bottom`.
- Everything's tested.
- The tests still pass with `PYTHONUOPSOPTIMIZE=1`.
|
| |
|
| |
|
|
|
|
| |
(GH-116014)
|
|
|
|
| |
Replace calls to `json.JSONEncoder.default(self, obj)`
by `super().default(obj)` within the examples of the documentation.
|
|
|
| |
Rewrite using AX_CHECK_DEFINE and AC_CHECK_TYPES.
|
|
|
| |
Also mention that the 'expression' parameter can be a string.
|
|
|
|
|
|
| |
A few of our tests measure the time of CPU-bound operation, mainly
to avoid quadratic or worse behaviour.
Add a helper to ignore GC and time spent in other processes.
|
| |
|
| |
|
|
|
|
|
| |
We now use these in the AST parsing code after gh-105880. A few comparable types (e.g.,
NoneType) are already exposed as internal APIs.
|
|
|
|
|
|
|
|
|
|
|
| |
* Increase coverage for compressed file-like objects initialized with a
file name, an open file object, a file object opened by file
descriptor, and a file-like object without name and mode attributes
(io.BytesIO)
* Increase coverage for name, fileno(), mode, readable(), writable(),
seekable() in different modes and states
* No longer skip tests with bytes names
* Test objects implementing the path protocol, not just pathlib.Path.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Demonstration:
>>> ast.FunctionDef.__annotations__
{'name': <class 'str'>, 'args': <class 'ast.arguments'>, 'body': list[ast.stmt], 'decorator_list': list[ast.expr], 'returns': ast.expr | None, 'type_comment': str | None, 'type_params': list[ast.type_param]}
>>> ast.FunctionDef()
<stdin>:1: DeprecationWarning: FunctionDef.__init__ missing 1 required positional argument: 'name'. This will become an error in Python 3.15.
<stdin>:1: DeprecationWarning: FunctionDef.__init__ missing 1 required positional argument: 'args'. This will become an error in Python 3.15.
<ast.FunctionDef object at 0x101959460>
>>> node = ast.FunctionDef(name="foo", args=ast.arguments())
>>> node.decorator_list
[]
>>> ast.FunctionDef(whatever="you want", name="x", args=ast.arguments())
<stdin>:1: DeprecationWarning: FunctionDef.__init__ got an unexpected keyword argument 'whatever'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15.
<ast.FunctionDef object at 0x1019581f0>
|
|
|
|
|
|
| |
Nothing else in Python generally logs the contents of variables, so this
can be very unexpected for developers and could leak sensitive
information in to terminals and log files.
|
|
|
|
|
|
|
|
|
|
| |
In some cases we might cause a StreamWriter to stay alive even when the
application has dropped all references to it. This prevents us from
doing automatical cleanup, and complaining that the StreamWriter wasn't
properly closed.
Fortunately, the extra reference was never actually used for anything so
we can just drop it.
|
|
|
|
| |
Listener.accept() no longer hangs when authkey is an empty bytes object.
|
|
|
|
| |
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
|
|
|
|
|
|
| |
maintainability. (GH-115987)
* Rename _Py_UOpsAbstractInterpContext to _Py_UOpsContext and _Py_UOpsSymType to _Py_UopsSymbol.
* #define shortened form of _Py_uop_... names for improved readability.
|
|
|
|
| |
(GH-115953)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of showing a dot for each iteration, show:
- '.' for zero (on negative) leaks
- number of leaks for 1-9
- 'X' if there are more leaks
This allows more rapid iteration: when bisecting, I don't need
to wait for the final report to see if the test still leaks.
Also, show the full result if there are any non-zero entries.
This shows negative entries, for the unfortunate cases where
a reference is created and cleaned up in different runs.
Test *failure* is still determined by the existing heuristic.
|
| |
|
|
|
|
|
|
| |
python-config (GH-28162)
On --help output to stdout.
On error output to stderr.
|
|
|
|
|
|
|
| |
(GH-12711)
Co-authored-by: paul.j3
Co-authored-by: Jérémie Detrey <jdetrey@users.noreply.github.com>
|
|
|
|
| |
manual /DPy_GIL_DISABLED (GH-115850)
|
|
|
|
| |
Pydoc no longer skips global functions implemented as builtin methods,
such as MethodDescriptorType and WrapperDescriptorType.
|
|
|
|
|
|
| |
descriptor (GH-115540)
This also fixes inspect.Signature.from_callable() for builtins classmethod()
and staticmethod().
|
| |
|
|
|
| |
This allows the module to be compiled with WIN32_LEAN_AND_MEAN enabled
|