Inada Naoki
4f74052b45
bpo-40116: dict: Add regression test for iteration order. (GH-31550)
2022-03-03 13:06:29 +09:00
slateny
a8c87a239e
bpo-21910: Clarify docs for codecs writelines method (GH-31245)
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-02 17:21:41 -08:00
Gregory Beauregard
75d2d945b4
bpo-46643: Fix stringized P.args/P.kwargs with get_type_hints (GH-31238)
2022-03-02 17:14:52 -08:00
Brett Cannon
50ec3453c5
bpo-46860: Respect `--with-suffix` on case-insensitive file systems (GH-31593)
...
Previously, case-insensitive file systems were forced to use `.exe` as the file suffix no matter what `--with-suffix` was set to.
2022-03-02 14:23:59 -08:00
slateny
3257d49d23
bpo-45492: Corrected documentation for co_names in inspect library doc (GH-31456)
2022-03-02 19:03:38 +00:00
Victor Stinner
b6b711a1aa
bpo-46848: Move _PyBytes_Find() to internal C API (GH-31642)
...
Move _PyBytes_Find() and _PyBytes_ReverseFind() functions to the
internal C API.
bytesobject.c now includes pycore_bytesobject.h.
2022-03-02 14:15:26 +01:00
Inada Naoki
03642df1a1
dict: Internal cleanup (GH-31641)
...
* Make empty_key from split table to combined table.
* Use unicode_get_hash() when possible.
2022-03-02 19:05:12 +09:00
Nikita Sobolev
20a1c8ee4b
bpo-46195: Do not add `Optional` in `get_type_hints` (GH-30304)
...
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-01 21:29:46 -08:00
Dennis Sweeney
6ddb09f35b
bpo-46848: Use stringlib/fastsearch in mmap (GH-31625)
...
Speed up mmap.find(). Add _PyBytes_Find() and _PyBytes_ReverseFind().
2022-03-01 23:46:30 -05:00
Inada Naoki
9833bb91e4
bpo-46845: Reduce dict size when all keys are Unicode (GH-31564)
2022-03-02 08:09:28 +09:00
Eric Snow
21099fc064
bpo-46712: Let generate_global_objects.py Run on Earlier Python Versions (gh-31637)
...
https://bugs.python.org/issue46712
2022-03-01 14:29:54 -07:00
Mark Shannon
3b0f1c5a71
bpo-46841: Use inline cache for `BINARY_SUBSCR`. (GH-31618)
2022-03-01 16:00:34 +00:00
Kumar Aditya
e91b0a7139
bpo-46541: remove usage of _Py_IDENTIFIER from _ssl module (GH-31599)
2022-03-02 00:38:21 +09:00
Victor Stinner
9204bb72a2
bpo-46633: Skip tests on ASAN and/or MSAN builds (GH-31632)
...
Skip tests on ASAN and/or MSAN builds:
* multiprocessing tests
* test___all__
* test_concurrent_futures
* test_decimal
* test_peg_generator
* test_tools
The ASAN job of GitHub Actions no longer excludes these tests.
2022-03-01 15:44:08 +01:00
Dong-hee Na
0cc6364185
bpo-46541: Remove usage of _Py_IDENTIFIER from multibytecodec (GH-31475)
2022-03-01 23:35:43 +09:00
Mark Dickinson
c60e6b6ad7
bpo-46311: Clean up PyLong_FromLong and PyLong_FromLongLong (GH-30496)
2022-03-01 14:20:52 +00:00
Brandt Bucher
7820a5897e
bpo-46841: Use inline caching for `COMPARE_OP` (GH-31622)
2022-03-01 13:53:13 +00:00
Inada Naoki
df9f759755
compiler: Merge except_table and cnotab (GH-31614)
2022-03-01 10:27:20 +09:00
Brandt Bucher
422fdb3717
Add missing "to" to two tp_flags notes (GH-31624)
2022-02-28 17:20:14 -08:00
Guido van Rossum
7d611b4cab
bpo-46771: Remove two controversial lines from Task.cancel() (GH-31623)
...
Also from the _asyncio C accelerator module,
and adjust one test that the change caused to fail.
For more discussion see the discussion starting here:
https://github.com/python/cpython/pull/31394#issuecomment-1053545331
(Basically, @asvetlov proposed to return False from cancel()
when there is already a pending cancellation, and I went along,
even though it wasn't necessary for the task group implementation,
and @agronholm has come up with a counterexample that fails
because of this change. So now I'm changing it back to the old
semantics (but still bumping the counter) until we can have a
proper discussion about this.)
2022-02-28 15:15:56 -08:00
Eric Snow
08deed1af5
bpo-46753: Add the empty tuple to the _PyRuntimeState.global_objects. (gh-31345)
...
https://bugs.python.org/issue46753
2022-02-28 15:15:48 -07:00
Raymond Hettinger
d5b7bba43b
Statistics internals: Make fewer calls to _coerce() when data types are mixed (GH-31619)
2022-02-28 11:43:52 -06:00
Victor Stinner
7496f95873
bpo-45431: Rename CFrame to _PyCFrame in the C API (GH-31584)
...
Rename also struct _cframe to struct _PyCFrame.
Add a comment suggesting using public functions rather than using
directly the private _PyCFrame structure.
2022-02-28 16:03:57 +01:00
Mark Shannon
4558af5a8f
bpo-46841: Move the cache for `LOAD_GLOBAL` inline. (GH-31575)
2022-02-28 12:56:29 +00:00
Steve Dower
da7d99a4de
bpo-46567: Add Tcl/Tk build for Windows ARM64 (GH-31574)
2022-02-28 12:06:43 +00:00
Brandt Bucher
424ecab494
bpo-46841: Use inline caching for `UNPACK_SEQUENCE` (GH-31591)
2022-02-28 11:54:14 +00:00
Erlend Egeberg Aasland
c32aef4853
bpo-46541: Remove unneeded visits from sqlite3 (GH-31609)
2022-02-28 18:07:40 +09:00
Dong-hee Na
088dd76dba
bpo-46541: Remove unnecessary Py_VISIT (GH-31608)
2022-02-28 08:06:58 +01:00
Jannis Vajen
345572a1a0
bpo-46786: Make ElementTree write the HTML tags embed, source, track, wbr as empty tags (GH-31406)
...
See https://html.spec.whatwg.org/multipage/syntax.html#void-elements
for reference.
2022-02-27 15:25:54 +01:00
Victor Stinner
5a1c637ec6
bpo-46852: Restore test_getformat() test (GH-31601)
2022-02-27 01:12:33 +01:00
Victor Stinner
ad56919c5e
bpo-46857: Fix refleak in OSError INIT_ALIAS() (GH-31594)
...
_Py_GetRefTotal() no longer decrements _PySet_Dummy refcount.
2022-02-27 00:28:24 +01:00
Kumar Aditya
e182c660b6
bpo-46748: Fix ctypes test_frozentable() (GH-31600)
2022-02-27 00:25:46 +01:00
Victor Stinner
e02c47528b
bpo-46606: os.getgroups() doesn't overallocate (GH-31569)
2022-02-27 00:14:28 +01:00
Yuxin Wu
fc44b8136f
[doc] Add a note in howto/logging.rst about "do not log to root logger in libraries" (GH-31271)
2022-02-26 18:29:51 +00:00
Kumar Aditya
0d9b565e62
Propagate errors (however unlikely) from _Py_Deepfreeze_Init() (GH-31596)
2022-02-26 08:35:03 -08:00
Tin Tvrtković
edbee56d69
Taskgroup tweaks (GH-31559)
...
Now uses .cancel()/.uncancel(), for even fewer broken edge cases.
2022-02-26 08:18:48 -08:00
Kumar Aditya
41ddcd3f40
bpo-44011: Document ssl_shutdown_timeout added by revisited asyncio SSL implementation (GH-31597)
2022-02-26 15:06:43 +02:00
Thomas Grainger
b57dbe5d1b
bpo-38415: Remove redundant AsyncContextDecorator.__call__ override from _AsyncGeneratorContextManager (GH-30233)
2022-02-26 14:05:20 +02:00
Charlie Zhao
e466faa9df
bpo-45735: Promise the long-time truth that `args=list` works (GH-30982)
...
For threads, and for multiprocessing, it's always been the case that ``args=list`` works fine when passed to ``Process()`` or ``Thread()``, and such code is common in the wild. But, according to the docs, only a tuple can be used. This brings the docs into synch with reality.
Doc changes by Charlie Zhao.
Co-authored-by: Tim Peters <tim.peters@gmail.com>
2022-02-25 22:17:13 -06:00
Victor Stinner
5ab745fc51
bpo-46852: Remove the float.__set_format__() method (GH-31585)
...
Remove the undocumented private float.__set_format__() method,
previously known as float.__set_format__() in Python 3.7. Its
docstring said: "You probably don't want to use this function. It
exists mainly to be used in Python's test suite."
2022-02-26 00:53:27 +01:00
Oleg Iarygin
4060111f9d
bpo-46816: Remove declarations for non-__STDC__ compilers (GH-31466)
...
After Python switched to C11, there is a guarantee that every compiler
conforms to ISO C so checks of __STDC__ have no sense.
2022-02-26 00:16:59 +01:00
Kumar Aditya
eb002dbe0d
bpo-46712: Share global string identifiers in deepfreeze (GH-31261)
...
Where appropriate, deepfreeze.c now uses `&_Py_ID(blah)` references instead of locally defining constants. This saves some space.
2022-02-25 10:05:24 -08:00
Victor Stinner
ea9612a17b
bpo-46857: Fix test_embed.test_no_memleak() on Windows (GH-31589)
...
Tolerate a leak of 1 reference and 1 memory block until it's fixed.
2022-02-25 18:24:25 +01:00
Kumar Aditya
dd69f73421
bpo-26897: Clarify Popen stdin, stdout, stderr file object docs (GH-30231)
2022-02-25 08:41:19 -08:00
Victor Stinner
87af12bff3
bpo-46836: Rename InterpreterFrame to _PyInterpreterFrame (GH-31583)
...
Rename also struct _interpreter_frame to struct _PyInterpreterFrame.
Reduce risk of name conflicts if a project includes pycore_frame.h.
2022-02-25 16:22:00 +01:00
Victor Stinner
f780d9690f
bpo-45316: Move _PyArg_Fini() to internal C API (GH-31580)
...
Move the private unexported _PyArg_Fini() function to the internal C
API: to the pycore_pylifecycle.h header file.
2022-02-25 16:19:30 +01:00
Victor Stinner
8f2a337a80
bpo-45316: Move private functions to internal C API (GH-31579)
...
Move the unexported private functions to the internal C API:
* pycore_frame.h: _PyFrame_New_NoTrack()
* pycore_function.h: _PyFunction_GetVersionForCurrentState()
* pycore_genobject.h: _PyAsyncGenValueWrapperNew()
* pycore_genobject.h: _PyCoro_GetAwaitableIter()
* pycore_genobject.h: _PyGen_yf()
2022-02-25 16:07:14 +01:00
Raymond Hettinger
26aba295a9
Update dict/OrderedDict differences with code equivalents. (GH-31563)
2022-02-25 08:49:53 -06:00
Victor Stinner
8ddbdd9e96
bpo-45316: Move private PyDict functions to internal C API (GH-31577)
...
Move the following private unexported functions to the internal C API
headers:
* _PyDictKeys_GetVersionForCurrentState()
* _PyDictKeys_StringLookup()
* _PyDict_FromKeys()
* _PyDict_GetItemHint()
* _PyDict_KeysSize()
* _PyDict_LoadGlobal()
* _PyDict_NewKeysForClass()
* _PyDict_Pop_KnownHash()
* _PyDict_SetItem_Take2()
* _PyObjectDict_SetItem()
* _PyObject_MakeDictFromInstanceAttributes()
* _Py_dict_lookup()
2022-02-25 15:41:55 +01:00
Victor Stinner
4a0c7a1aac
bpo-45316: Move private PyCode C API to internal C API (GH-31576)
...
Rename private functions (no exported), add an underscore prefix:
* PyLineTable_InitAddressRange() => _PyLineTable_InitAddressRange()
* PyLineTable_NextAddressRange() => _PyLineTable_NextAddressRange()
* PyLineTable_PreviousAddressRange() => _PyLineTable_PreviousAddressRange()
Move private functions to the internal C API:
* _PyCode_Addr2EndLine()
* _PyCode_Addr2EndOffset()
* _PyCode_Addr2Offset()
* _PyCode_InitAddressRange()
* _PyCode_InitEndAddressRange(
* _PyLineTable_InitAddressRange()
* _PyLineTable_NextAddressRange()
* _PyLineTable_PreviousAddressRange()
No longer export the following internal functions:
* _PyCode_GetVarnames()
* _PyCode_GetCellvars()
* _PyCode_GetFreevars()
* _Py_GetSpecializationStats()
Add "extern" to pycore_code.h functions to identify them more easiliy
(they are still not exported).
2022-02-25 15:41:32 +01:00