summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-100227: Move the Dict of Interned Strings to PyInterpreterState (gh-102339)Eric Snow2023-03-286-718/+727
| | | | | We can revisit the options for keeping it global later, if desired. For now the approach seems quite complex, so we've gone with the simpler isolation solution in the meantime. https://github.com/python/cpython/issues/100227
* GH-102711: Fix warnings found by clang (#102712)Chenxi Mao2023-03-282-2/+3
| | | | | | | | | | | | | | | | | There are some warnings if build python via clang: Parser/pegen.c:812:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] _PyPegen_clear_memo_statistics() ^ void Parser/pegen.c:820:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] _PyPegen_get_memo_statistics() ^ void Fix it to make clang happy. Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
* gh-102558: [Enum] better handling of non-Enum EnumType classes (GH-103060)Ethan Furman2023-03-272-8/+5
|
* gh-103056: [Enum] ensure final _generate_next_value_ is a staticmethod ↵Ethan Furman2023-03-273-0/+23
| | | | (GH-103062)
* gh-74468: [tarfile] Fix incorrect name attribute of ExFileObject (GH-102424)Oleg Iarygin2023-03-273-3/+13
| | | Co-authored-by: Simeon Visser <svisser@users.noreply.github.com>
* gh-100227: Revert gh-102925 "gh-100227: Make the Global Interned Dict Safe ↵Eric Snow2023-03-277-204/+30
| | | | | | | for Isolated Interpreters" (gh-103063) This reverts commit 87be8d9. This approach to keeping the interned strings safe is turning out to be too complex for my taste (due to obmalloc isolation). For now I'm going with the simpler solution, making the dict per-interpreter. We can revisit that later if we want a sharing solution.
* gh-103046: Display current line correctly for `dis.disco()` with CACHE ↵gaogaotiantian2023-03-273-1/+36
| | | | entries (#103047)
* gh-103023: Add SyntaxError check in pdb's `display` command (#103024)gaogaotiantian2023-03-273-13/+26
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-102941: Fix "‘subobj’ may be used uninitialized in this function" ↵Nikita Sobolev2023-03-271-1/+1
| | | | warning in `bytes_methods.c` (#102942)
* Fix typo in _swappedbytes_ in ctypes comment (#102773)Matthias Görgens2023-03-251-1/+1
| | | It's a minor typo, but it makes for a misleading comment. Let's fix it.
* gh-98886: Fix issues with dataclass fields with special underscore names ↵Shantanu2023-03-253-10/+27
| | | | | | | | | | | | | (#102032) This commit prefixes `__dataclass` to several things in the locals dict: - Names like `_dflt_` (which cause trouble, see first test) - Names like `_type_` (not known to be able to cause trouble) - `_return_type` (not known to able to cause trouble) - `_HAS_DEFAULT_FACTORY` (which causes trouble, see second test) In addition, this removes `MISSING` from the locals dict. As far as I can tell, this wasn't needed even in the initial implementation of dataclasses.py (and tests on that version passed with it removed). This makes me wary :-) This is basically a continuation of #96151, where fixing this was welcomed in https://github.com/python/cpython/pull/98143#issuecomment-1280306360
* Update pdb docs for arguments (#102965)gaogaotiantian2023-03-251-21/+21
|
* Fix typos in faulthandler, testcapi error messages (#103020)Liyang Zhang2023-03-252-3/+3
|
* gh-103027: Update `dataclass.make_dataclass` docstring (gh-103028)Nikita Sobolev2023-03-251-2/+5
| | | * gh-103027: Update `dataclass.make_dataclass` docstring
* gh-103025: fix two ctypes doc issues (#103026)Peter Jiping Xie2023-03-251-3/+3
|
* GH-102833: Mention the key function in the docstrings (GH-103009)Raymond Hettinger2023-03-253-9/+33
|
* gh-101100: Test only Doc/ files in nit-picky mode (#103019)Hugo van Kemenade2023-03-251-0/+2
| | | gh-101100: Filter only Doc/ files
* gh-100131: Add optional delete parameter to tempfile.TemporaryDirectory() ↵JakobDev2023-03-244-8/+35
| | | | | | | (#100132) Add optional delete parameter to tempfile.TemporaryDirectory(). Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-102980: Add tests for pdf's display, alias and where commands (#102981)gaogaotiantian2023-03-242-0/+151
|
* gh-102873: logging.LogRecord docs: improve description of `msg` parameter ↵Amin Alaee2023-03-241-2/+3
| | | | | (#102875) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-100372: Use BIO_eof to detect EOF for SSL_FILETYPE_ASN1 (GH-100373)David Benjamin2023-03-243-4/+10
| | | | | | | In PEM, we need to parse until error and then suppress `PEM_R_NO_START_LINE`, because PEM allows arbitrary leading and trailing data. DER, however, does not. Parsing until error and suppressing `ASN1_R_HEADER_TOO_LONG` doesn't quite work because that error also covers some cases that should be rejected. Instead, check `BIO_eof` early and stop the loop that way. Automerge-Triggered-By: GH:Yhg1s
* gh-101100: Test docs in nit-picky mode (#102513)Hugo van Kemenade2023-03-248-46/+116
| | | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* GH-100989: remove annotation from docstring (GH-102991)Raymond Hettinger2023-03-241-2/+2
|
* GH-100989: Revert Improve the accuracy of collections.deque docstrings ↵Raymond Hettinger2023-03-241-24/+13
| | | | (GH-102979)
* gh-94684: uuid: support bytes in the name argument to uuid3/5 (#94709)MonadChains2023-03-234-6/+43
| | | RFC 4122 does not specify that name should be a string, so for completness the functions should also support a name given as a raw byte sequence.
* gh-99726: Fix order of recently added fields for FILE_STAT_BASIC_INFORMATION ↵Steve Dower2023-03-231-1/+1
| | | | (GH-102976)
* GH-100982: Break up COMPARE_AND_BRANCH (GH-102801)Brandt Bucher2023-03-2318-447/+345
|
* gh-102558: [Enum] fix AttributeError during member repr() (GH-102601)Dong-hee Na2023-03-232-1/+10
|
* Minor readability improvement to the factor() recipe (GH-102971)Raymond Hettinger2023-03-231-1/+1
|
* gh-98239: Document that `inspect.getsource()` can raise `TypeError` (#101689)Nikita Sobolev2023-03-231-0/+4
|
* gh-102936: typing: document performance pitfalls of protocols decorated with ↵Alex Waygood2023-03-231-2/+18
| | | | `@runtime_checkable` (#102937)
* Move binomialvariate() to a section for discrete distributions (GH-102955)Raymond Hettinger2023-03-232-23/+28
|
* gh-102810 Improve the sphinx docs for `asyncio.Timeout` (#102934)JosephSBoyle2023-03-231-15/+9
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-102943: Stop checking localized error text in socket tests on Windows ↵AN Long2023-03-231-2/+1
| | | | (GH-102944)
* gh-88965: typing: fix type substitution of a list of types after initial ↵Nikita Sobolev2023-03-233-7/+154
| | | | | | | | | | | | | | | | | | | `ParamSpec` substitution (#102808) Previously, this used to fail: ```py from typing import * T = TypeVar("T") P = ParamSpec("P") class X(Generic[P]): f: Callable[P, int] Y = X[[int, T]] Z = Y[str] ``` Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-102947: Improve traceback when calling `fields()` on a non-dataclass ↵Alex Waygood2023-03-233-1/+15
| | | | (#102948)
* Docs: fixup incorrect escape char in sqlite3 docs (#102945)Erlend E. Aasland2023-03-231-1/+1
|
* gh-102939: Fix "conversion from Py_ssize_t to long" warning in builtins ↵Nikita Sobolev2023-03-231-2/+2
| | | | (GH-102940)
* gh-100227: Make the Global Interned Dict Safe for Isolated Interpreters ↵Eric Snow2023-03-237-30/+204
| | | | | | | | | (gh-102925) This is effectively two changes. The first (the bulk of the change) is where we add _Py_AddToGlobalDict() (and _PyRuntime.cached_objects.main_tstate, etc.). The second (much smaller) change is where we update PyUnicode_InternInPlace() to use _Py_AddToGlobalDict() instead of calling PyDict_SetDefault() directly. Basically, _Py_AddToGlobalDict() is a wrapper around PyDict_SetDefault() that should be used whenever we need to add a value to a runtime-global dict object (in the few cases where we are leaving the container global rather than moving it to PyInterpreterState, e.g. the interned strings dict). _Py_AddToGlobalDict() does all the necessary work to make sure the target global dict is shared safely between isolated interpreters. This is especially important as we move the obmalloc state to each interpreter (gh-101660), as well as, potentially, the GIL (PEP 684). https://github.com/python/cpython/issues/100227
* [doc] Fix error in tutorial example: type(exc) is the type rather than the ↵Jens-Hilmar Bradt2023-03-221-1/+1
| | | | instance (#102751)
* gh-102921: [doc] Clarify `exc` argument name in `BaseExceptionGroup` is ↵Kevin Kirsche2023-03-221-2/+2
| | | | plural (#102922)
* gh-102859: Remove JUMP_IF_FALSE_OR_POP and JUMP_IF_TRUE_OR_POP (#102870)Irit Katriel2023-03-2215-437/+235
|
* gh-102780: Fix uncancel() call in asyncio timeouts (#102815)Kristján Valur Jónsson2023-03-224-6/+50
| | | | | | | Also use `raise TimeOut from <CancelledError instance>` so that the CancelledError is set in the `__cause__` field rather than in the `__context__` field. Co-authored-by: Guido van Rossum <gvanrossum@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-102033: Fix syntax error in `Tools/c-analyzer` (GH-102066)Nikita Sobolev2023-03-2214-335/+3
| | | The easiest way to format strings with `{}` meaningful chars is via `%`.
* GH-101291: Rearrange the size bits in PyLongObject (GH-102464)Mark Shannon2023-03-2225-898/+982
| | | | | | | | | | * Eliminate all remaining uses of Py_SIZE and Py_SET_SIZE on PyLongObject, adding asserts. * Change layout of size/sign bits in longobject to support future addition of immortal ints and tagged medium ints. * Add functions to hide some internals of long object, and for setting sign and digit count. * Replace uses of IS_MEDIUM_VALUE macro with _PyLong_IsCompact().
* GH-89727: Fix pathlib.Path.walk RecursionError on deep trees (GH-100282)Stanislav Zmiev2023-03-223-38/+54
| | | | | | Use a stack to implement `pathlib.Path.walk()` iteratively instead of recursively to avoid hitting recursion limits on deeply nested trees. Co-authored-by: Barney Gale <barney.gale@gmail.com> Co-authored-by: Brett Cannon <brett@python.org>
* gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers (#96932)Benjamin Fogle2023-03-224-12/+33
|
* gh-102027: Fix macro name (#102124)Max Bachmann2023-03-222-1/+3
| | | | | This fixes the ssse3 / sse2 detection when sse4 is available. Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-101947: Remove size check from sqlite3 serialize test (#102914)Erlend E. Aasland2023-03-221-1/+0
| | | The size of the returned data is too implementation specific.
* gh-101313: Add -h and --help arguments to the webbrowser module (gh-101374)Icelain2023-03-222-3/+8
|