| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Remove the _tstate_lock from _shutdown_locks, don't remove None.
|
| |
|
|
|
|
| |
PyAST_obj2mod_ex() is similar to PyAST_obj2mod() with an additional
'feature_version' parameter which is unused.
|
| |
|
| |
|
|
|
|
|
| |
GH-14039: allow (no more than) one wholly empty arena on the usable_arenas list.
This prevents thrashing in some easily-provoked simple cases that could end up creating and destroying an arena on each loop iteration in client code. Intuitively, if the only arena on the list becomes empty, it makes scant sense to give it back to the system unless we know we'll never need another free pool again before another arena frees a pool. If the latter obtains, then - yes - this will "waste" an arena.
|
| |
|
|
|
| |
Remove ";" to fix Sphinx formatting.
|
|
|
|
|
| |
Add a new _PyCompilerFlags_INIT macro to initialize PyCompilerFlags
variables, rather than initializing cf_flags and cf_feature_version
explicitly in each variable.
|
|
|
|
|
| |
* Update PyCompilerFlags structure documentation.
* Document the new cf_feature_version field in the Changes in the C
API section of the What's New in Python 3.8 doc.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a race condition at Python shutdown when waiting for threads.
Wait until the Python thread state of all non-daemon threads get
deleted (join all non-daemon threads), rather than just wait until
Python threads complete.
* Add threading._shutdown_locks: set of Thread._tstate_lock locks
of non-daemon threads used by _shutdown() to wait until all Python
thread states get deleted. See Thread._set_tstate_lock().
* Add also threading._shutdown_locks_lock to protect access to
threading._shutdown_locks.
* Add test_finalization_shutdown() test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-13073)
Calling setlocale(LC_CTYPE, "") on a system where GetACP() returns CP_UTF8 results in empty strings in _tzname[].
This causes time.tzname to be an empty string.
I have reported the bug to the UCRT team and will follow up, but it will take some time get a fix into production.
In the meantime one possible workaround is to temporarily change the locale by calling setlocale(LC_CTYPE, "C") before calling _tzset and restore the current locale after if the GetACP() == CP_UTF8 or CP_UTF7
@zooba
https://bugs.python.org/issue36779
|
|
|
|
|
|
|
|
| |
regrtest now uses sys.unraisablehook() to mark a test as "environment
altered" (ENV_CHANGED) if it emits an "unraisable exception".
Moreover, regrtest logs a warning in this case.
Use "python3 -m test --fail-env-changed" to catch unraisable
exceptions in tests.
|
|
|
|
|
|
| |
Use catch_unraisable_exception() to ignore 'Exception ignored in:'
error when the internal BufferedWriter of the BufferedRWPair is
destroyed. The C implementation doesn't give access to the
internal BufferedWriter, so just ignore the warning instead.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-14011)
because "getaddrinfo()" behaves different on AIX
https://bugs.python.org/issue35545
|
|
|
|
|
| |
* bpo-29505: Enable fuzz testing of the json module, enforce size limit on int(x) fuzz and json input size to avoid timeouts.
Contributed by by Ammar Askar for Google.
|
|
|
| |
Python 3.6 changed the size of bytecode instruction, while the documentation for `EXTENDED_ARG` was not updated accordingly.
|
|
|
|
|
|
|
| |
Fix MSVC warning:
objects\codeobject.c(285): warning C4244: '=':
conversion from 'Py_ssize_t' to 'unsigned char',
possible loss of data
|
|
|
|
| |
Mock the HTTPConnection.close() method in a few unit tests to avoid
logging "Exception ignored in: ..." messages.
|
|
|
|
|
|
| |
Rename compile() feature_version parameter to _feature_version and
convert it to a keyword-only parameter.
Update also test_type_comments to pass feature_version as a tuple.
|
|
|
|
|
|
|
| |
(A single int is still allowed, but undocumented.)
https://bugs.python.org/issue35766
|
| |
|
| |
|
|
|
| |
If preadv2 is not available, preadv will raise NotImplementedError.
|
|
|
| |
This test "works" if things are run in the right order, so it's better to use @skip than @expectedFailure here.
|
|
|
|
|
|
|
| |
If internal tasks weak set is changed by another thread during iteration.
https://bugs.python.org/issue36607
|
|
|
|
|
|
| |
(GH-13965)
|
|
|
|
|
|
|
|
| |
of pyexpat line in Setup. (GH-13064)
When the line is uncommented, the equals character causes it to be incorrectly interpreted
as a macro definition by makesetup. This results in invalid Makefile output.
The expat code only requires XML_POOR_ENTROPY to be defined; the value is unnecessary.
|
|
|
| |
Implement also MockNonBlockWriterIO.seek() method.
|
|
|
|
| |
_pyio.IOBase destructor now does nothing if getting the closed
attribute fails to better mimick _io.IOBase finalizer.
|
|
|
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue37215
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Fix an unintended ValueError from :func:`subprocess.run` when checking for
conflicting `input` and `stdin` or `capture_output` and `stdout` or `stderr` args
when they were explicitly provided but with `None` values within a passed in
`**kwargs` dict rather than as passed directly by name.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, inspect.getfile(str) will report nonsense:
```pytb
>>> inspect.getfile(str)
TypeError: <module 'builtins' (built-in)> is a built-in class
```
This fixes that
https://bugs.python.org/issue37173
|
|
|
| |
https://gitlab.com/python-devs/importlib_metadata/merge_requests/76
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add_argument (GH-13805)
There is a possibility that someone (like me) accidentally will omit parentheses with `FileType` arguments after `FileType`, and parser will contain wrong file until someone will try to use it.
Example:
```python
parser = argparse.ArgumentParser()
parser.add_argument('-x', type=argparse.FileType)
```
https://bugs.python.org/issue37150
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Replace two Python function calls with a single one to ensure that no
memory allocation is done between the invalid object is created and
when _PyObject_IsFreed() is called.
|
| |
|