summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-101100: Expand list of clean docs (GH-103135)Hugo van Kemenade2023-03-312-0/+357
| | | | | | | | | | | Follow on from https://github.com/python/cpython/pull/103116. Expand list of clean docs files from 3 to 181. These files have no Sphinx warnings, and their presence in this list means that any new warnings introduced will fail the build. The list was created by subtracting the list of files with warnings from a list of all files. I tested with all of those, but found that `touch`ing two clean files (https://github.com/python/cpython/blob/main/Doc/includes/wasm-notavail.rst and https://github.com/python/cpython/blob/main/Doc/whatsnew/changelog.rst) caused a cascade effect and resulted in a number of dirty files being rebuilt too, and failing the build. So those two have been omitted. Automerge-Triggered-By: GH:hugovk
* gh-102799: use exception instance instead of sys.exc_info() (#102885)Irit Katriel2023-03-317-17/+16
|
* Minor docs improvements fix for `codeop` (#103123)gaogaotiantian2023-03-301-7/+7
|
* gh-102110: Add all tools description missed (GH-102625)Missoupro2023-03-302-3/+32
| | | | | Added missing descriptions of some tools. Automerge-Triggered-By: GH:hugovk
* Add IPv6 into to the docstring for socket.getsockname (#102961)Brian Haley2023-03-301-1/+2
| | | Signed-off-by: Brian Haley <haleyb.dev@gmail.com>
* gh-101100: Fix Sphinx warning in gc.rst and refactor docs clean list (#103116)Hugo van Kemenade2023-03-304-3/+32
| | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-103085: Fix python locale.getencoding not to emit deprecation warning ↵Jeong, YunWon2023-03-302-1/+4
| | | | (gh-103086)
* gh-103099: Link mypy docs from typing.rst (#103100)Shantanu2023-03-301-1/+8
|
* gh-100227: Make the Global PyModuleDef Cache Safe for Isolated Interpreters ↵Eric Snow2023-03-295-59/+274
| | | | | | | | | | | | | | | | | | | | | | | (gh-103084) Sharing mutable (or non-immortal) objects between interpreters is generally not safe. We can work around that but not easily. There are two restrictions that are critical for objects that break interpreter isolation. The first is that the object's state be guarded by a global lock. For now the GIL meets this requirement, but a granular global lock is needed once we have a per-interpreter GIL. The second restriction is that the object (and, for a container, its items) be deallocated/resized only when the interpreter in which it was allocated is the current one. This is because every interpreter has (or will have, see gh-101660) its own object allocator. Deallocating an object with a different allocator can cause crashes. The dict for the cache of module defs is completely internal, which simplifies what we have to do to meet those requirements. To do so, we do the following: * add a mechanism for re-using a temporary thread state tied to the main interpreter in an arbitrary thread * add _PyRuntime.imports.extensions.main_tstate` * add _PyThreadState_InitDetached() and _PyThreadState_ClearDetached() (pystate.c) * add _PyThreadState_BindDetached() and _PyThreadState_UnbindDetached() (pystate.c) * make sure the cache dict (_PyRuntime.imports.extensions.dict) and its items are all owned by the main interpreter) * add a placeholder using for a granular global lock Note that the cache is only used for legacy extension modules and not for multi-phase init modules. https://github.com/python/cpython/issues/100227
* GH-89987: Shrink the BINARY_SUBSCR caches (GH-103022)Brandt Bucher2023-03-2914-250/+272
|
* gh-90110: Bring the whitelists up to date. (gh-103114)Eric Snow2023-03-292-2/+3
| | | https://github.com/python/cpython/issues/90110
* GH-102973: add a dev container (GH-102975)Brett Cannon2023-03-294-0/+102
| | | | | | On content update, builds `python` and the docs. Also adds a Dockerfile that should include everything but autoconf 2.69 that's necessary to build CPython and the entire stdlib on Fedora. Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Dusty Phillips <dusty@phillips.codes>
* gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc output ↵Bernhard Wagner2023-03-292-0/+2
| | | | | | | (#103113) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Éric <merwok@netwok.org>
* gh-103068: Check condition expression of breakpoints for pdb (#103069)gaogaotiantian2023-03-293-13/+45
| | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Artem Mukhin <ortem00@gmail.com>
* gh-102582: Fix invalid JSON in Doc/howto/logging-cookbook.rst (GH-102635)Matěj Cepl2023-03-291-10/+14
|
* gh-103054: typing: Improve `Callable` type substitution tests (#103055)Nikita Sobolev2023-03-291-0/+42
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
* gh-103097: Add workaround for Windows ARM64 compiler bug (GH-103098)Steve Dower2023-03-281-0/+9
| | | See https://developercommunity.visualstudio.com/t/Regression-in-MSVC-1433-1434-ARM64-co/10224361 for details of the issue. It only applies to version 14.34.
* 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>