summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [3.10] gh-99146 struct module documentation should have more predictable ↵Miss Islington (bot)2022-11-221-76/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | examples/warnings (GH-99141) (GH-99703) gh-99146 struct module documentation should have more predictable examples/warnings (GH-99141) * nail down a couple examples to have more predictable output * update a number of things, but this is really just a stash... * added an applications section to describe typical uses for native and machine-independent formats * make sure all format strings use a format prefix character * responding to comments from @gpshead. Not likely finished yet. * This got more involved than I expected... * respond to several PR comments * a lot of wordsmithing * try and be more consistent in use of ``x`` vs ``'x'`` * expand examples a bit * update the "see also" to be more up-to-date * original examples relied on import * so present all examples as if * reformat based on @gpshead comment (missed before) * responding to comments * missed this * one more suggested edit * wordsmithing (cherry picked from commit 22d91c16bb03c3d87f53b5fee10325b876262a78) Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com> Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
* [3.10] gh-99645: Fix a bug in handling class cleanups in unittest.TestCase ↵Serhiy Storchaka2022-11-223-5/+35
| | | | | | | | | (GH-99646) (GH-99699) Now addClassCleanup() uses separate lists for different TestCase subclasses, and doClassCleanups() only cleans up the particular class. (cherry picked from commit c2102136be569e6fc8ed90181f229b46d07142f8)
* [3.10] Add more details in test_unittest (GH-99626). (GH-99692)Serhiy Storchaka2022-11-222-35/+63
| | | | (cherry picked from commit 653e563d80fabee8830e0b55f194f82a9beabe70)
* [3.10] GH-97001: Release GIL in termios extension (GH-99503) (#99680)Ronald Oussoren2022-11-222-7/+47
| | | | | | Without releasing the GIL calls to termios APIs might block the entire interpreter.. (cherry picked from commit 959ba45d75953caa911e16b4c2a277978fc4b9b0) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* gh-99341: Cover type ignore nodes when incrementing line numbers (GH-99422)Miss Islington (bot)2022-11-223-0/+20
| | | | | (cherry picked from commit 1acdfec359fdf3db936168480be0f4157273c200) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
* gh-99578: Fix refleak in _imp.create_builtin() (GH-99642)Miss Islington (bot)2022-11-213-1/+35
| | | | | | | Fix a reference bug in _imp.create_builtin() after the creation of the first sub-interpreter for modules "builtins" and "sys". (cherry picked from commit cb2ef8b2acbb231c207207d3375b2f8b0077a6ee) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.10] GH-95815: Document less specific error for os.remove (GH-99571) (#99639)Miss Islington (bot)2022-11-211-1/+1
| | | | | | | | | | | | | GH-95815: Document less specific error for os.remove (GH-99571) os.remove can raise PermissionError instead of IsADirectoryError, when the object to be removed is a directory (in particular on macOS). This reverts a change done in GH-14262. (cherry picked from commit 1cae31d26ba621f6b1f0656ad3d69a0236338bad) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* [3.10] gh-99581: Fix a buffer overflow in the tokenizer when copying lines ↵Pablo Galindo Salgado2022-11-203-1/+25
| | | | that fill the available buffer (GH-99605). (#99630)
* [3.10] gh-98086: Now ``patch.dict`` can decorate async functions (GH-98095) ↵Miss Islington (bot)2022-11-203-0/+36
| | | | | | | | | (GH-99366) gh-98086: Now ``patch.dict`` can decorate async functions (GH-98095) (cherry picked from commit 67b4d2772c5124b908f8ed9b13166a79bbeb88d2) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Chris Withers <chris@withers.org>
* [3.10] gh-78453: Move Unicode C API tests from test_unicode to ↵Serhiy Storchaka2022-11-202-487/+502
| | | | | | | test_capi.test_unicode (GH-99431). (GH-99617) (cherry picked from commit 06d4e02c3b3526b5d90e41a0a0befa8663e08f27) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.10] Remove trailing space to fix azure failures (#99611)Stanley2022-11-201-2/+2
|
* [3.10] gh-85073: Add some missing links to source (GH-99363) (#99589)Stanley2022-11-198-0/+22
| | | | | (cherry picked from commit 27d8dc2c9d3de886a884f79f0621d4586c0e0f7a) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
* Doc: Replace question mark with fullstop (GH-99558)Miss Islington (bot)2022-11-181-1/+1
| | | | | | | The sentence "Set the LC_CTYPE locale to the user preferred locale." should end with a period instead of a question mark. (cherry picked from commit 0e09d2cc59cad61ad6a7a79aade52e9a2cfa7b34) Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
* gh-87604: Avoid publishing list of active per-interpreter audit hooks via ↵Miss Islington (bot)2022-11-154-0/+20
| | | | | | | the gc module (GH-99373) (cherry picked from commit 4e4b13e8f6211abbc0d53056da11357756daa314) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.10] gh-92119: ctypes: Print exception class name instead of its ↵Kamil Turek2022-11-134-6/+11
| | | | | | | representation (GH-98302) (#99452) gh-92119: ctypes: Print exception class name instead of its representation (#98302) (cherry picked from commit b9dedfe61dce2997e3e6be318d8c50b0c19c9394)
* gh-99275: Fix `SystemError` in `ctypes` during `__initsubclass__` (GH-99283)Miss Islington (bot)2022-11-133-1/+15
| | | | | (cherry picked from commit 343eb0f94b26f2a4c1c15505d417e8157ec19660) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-99392: Fix sqlite3 converter recipes (GH-99393)Miss Islington (bot)2022-11-121-3/+22
| | | | | (cherry picked from commit dfc1b17a23fed933cffa09eec125a7e8c90ea867) Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
* bpo-34272: Reorganize C API tests. (GH-8551)Miss Islington (bot)2022-11-126-0/+9
| | | | | | Move some C API tests into Lib/test/test_capi/. (cherry picked from commit f883b7f8ee3209b52863fc662343c8cd81abdc59) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-80448: argparse: Fix IndexError on store_true action (GH-15656)Miss Islington (bot)2022-11-123-2/+7
| | | | | | | | (cherry picked from commit e02cc6d42aee1f0a9ee629f76576eee478224d9d) Co-authored-by: Hai Shi <shihai1992@gmail.com> Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-87604: Clarify in docs that sys.addaudithook is not for sandboxes (GH-99372)Miss Islington (bot)2022-11-111-0/+9
| | | | | (cherry picked from commit c3c3871415c86088d45abcf73ccd2c2b09dc5772) Co-authored-by: Steve Dower <steve.dower@python.org>
* gh-98366: use sphinx.locale._ as gettext() in pyspecific.py (GH-98437)Miss Islington (bot)2022-11-111-4/+4
| | | | | | | | fix(doc-tools): use sphinx.locale._ as gettext() for backward-compatibility in pyspecific.py [why] spinix 5.3 changed locale.translators from a defaultdict(gettext.NullTranslations) to a dict, which leads to failure of pyspecific.py. Use sphinx.locale._ as gettext to fix the issue. (cherry picked from commit d26ee8a0a552de111b8245ef0de63e3f3f535d9f) Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
* GH-99183: Document behavior of count() for empty substrings (GH-99339)Miss Islington (bot)2022-11-101-0/+6
| | | | | (cherry picked from commit 2f4af2d99cffed6ba81e4b8fd886de6ae8625a3f) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* [3.10] gh-99130: Apply bugfixes from importlib_metadata 4.11.4. (#99132)Jason R. Coombs2022-11-104-9/+49
|
* gh-74044: inspect.signature for wrappers around decorated bound methods (GH-736)Miss Islington (bot)2022-11-103-3/+12
| | | | | (cherry picked from commit dbf2faf579b4094387d65ee41f049456ca67c446) Co-authored-by: Anton Ryzhov <anton@ryzhov.me>
* gh-99320: remove tests for old-style class from `test_complex` (GH-99321)Miss Islington (bot)2022-11-101-6/+1
| | | | | (cherry picked from commit 26726c76494d85c7b565b764c732dd4473458409) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-99238: clarify the type of the env dict. (GH-99253)Miss Islington (bot)2022-11-081-3/+7
| | | | | (cherry picked from commit 2eee9d9cd7eb1e396fa9a4af7c5fadeeafbdaa38) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* Fix broken link in `asyncio-subprocesses` doc (GH-99214)Miss Islington (bot)2022-11-081-1/+1
| | | | | | | | | | | | | | | | | | | GH- Fix broken link in Doc/library/asyncio-subprocess.rst This is a trivial fix in documentation to fix a broken link. There is a broken link in [Doc/library/asyncio-subprocess.rst](https://docs.python.org/3/library/asyncio-subprocess.htmlGH-asyncio.subprocess.Process) for the function ``wait_for``: ![image](https://user-images.githubusercontent.com/37690409/200388894-fb6b7c42-b2cc-49ec-a239-e3472890db1f.png) I suppose this refers to the function ``asyncio.wait_for`` which is not clear in the docs. This PR fixes the link and the result looks like the following: ![image](https://user-images.githubusercontent.com/37690409/200389483-b4a92105-7d2c-4285-b0fc-78a6dc0be39c.png) (cherry picked from commit acf4d5d5bdecbc8756276731e09bae245d88518d) Co-authored-by: Mikael Koli <koli.mikael@gmail.com> Automerge-Triggered-By: GH:AlexWaygood
* [3.11] gh-98433: Fix quadratic time idna decoding. (GH-99092) (GH-99222)Miss Islington (bot)2022-11-083-17/+27
| | | | | | | | | | | There was an unnecessary quadratic loop in idna decoding. This restores the behavior to linear. (cherry picked from commit d315722564927c7202dd6e111dc79eaf14240b0d) (cherry picked from commit a6f6c3a3d6f2b580f2d87885c9b8a9350ad7bf15) Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-99124: use concrete exception types in `test_builtin` (GH-99125)Miss Islington (bot)2022-11-081-3/+3
| | | | | (cherry picked from commit c32bc1bffd9d63ede0d0505abab983247a3ad0c6) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-98513: Test abstract methods of some `collections` types (GH-98516)Miss Islington (bot)2022-11-081-0/+5
| | | | | (cherry picked from commit a309ad9f76db4ab9a8f933ab1ffea78ecaca827f) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.10] gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION ↵Miss Islington (bot)2022-11-071-0/+11
| | | | | | | | | | | | inheritance (GH-99002) (GH-99213) gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance (GH-99002) The flag is not inherited, but its effect -- a NULL tp_new -- is. Drop hints for people who come here wanting to “disallow instantiation”. (cherry picked from commit 1438b779971605e516bd0a4051a704d6ffbbd58d) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* doc: Formatting and typo fixes (GH-98974)Miss Islington (bot)2022-11-073-10/+10
| | | | | (cherry picked from commit 728e42fcf51cbb2108caf1382df224c13b53d024) Co-authored-by: jmcb <joelsgp@protonmail.com>
* bpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)Miss Islington (bot)2022-11-073-8/+18
| | | | | (cherry picked from commit 5ff81da6d3a8eb01fc5500fd1c9eaa6543286301) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.10] [ GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols ↵Miss Islington (bot)2022-11-073-3/+15
| | | | (GH-99156). (GH-99188) (GH-99190)
* gh-96055: Update faulthandler to emit proper unexpect signal number (gh-99162)Miss Islington (bot)2022-11-072-4/+18
| | | | | (cherry picked from commit f626b7b504df454d289527a4f922b09deeae9e21) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* [3.10] gh-99086: Fix implicit int compiler warning in configure check for ↵Erlend E. Aasland2022-11-063-2/+3
| | | | | | | | | PTHREAD_SCOPE_SYSTEM (GH-99085) (#99119) (cherry picked from commit 12078e78f6e4a21f344e4eaff529e1ff3b97734f) Co-authored-by: Sam James <sam@cmpct.info> Co-authored-by: Sam James <sam@cmpct.info>
* gh-94286 Fix documentation of print default param (GH-94297)Miss Islington (bot)2022-11-061-1/+1
| | | | | (cherry picked from commit 2db55e0c0069a928775fa819973a76f840c5ab5a) Co-authored-by: Nouran Ali <nouranalimohammed@gmail.com>
* gh-99051: remove duplicated test from `test_weakref` (GH-99052)Miss Islington (bot)2022-11-061-35/+6
| | | | | (cherry picked from commit 8463cb55dabb78571e32d8c8c7de8679ab421c2c) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-83004: Clean up refleak in _pickle initialisation (GH-98841)Miss Islington (bot)2022-11-062-7/+7
| | | | | (cherry picked from commit d3b82b4463c4eb51954c0afd98342f0c5e479baa) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-83004: Clean up refleak in _zoneinfo initialisation (GH-98842)Miss Islington (bot)2022-11-062-2/+4
| | | | | (cherry picked from commit 31f2f6568d89564cc1d686cd6b75ba5578aaa748) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* `test_typing`: use all pickle protocols (GH-99154)Miss Islington (bot)2022-11-061-1/+1
| | | | | (cherry picked from commit a0bc75e2fdd53680cb147881bcb3754bd56aa2fa) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-99134: Update bundled pip to 22.3.1 (gh-99135)Miss Islington (bot)2022-11-053-1/+2
| | | | | | Update bundled pip to 22.3.1 (cherry picked from commit 47ab8480e71ab3949a336a94c7fd146b1fce595d) Co-authored-by: Paul Moore <p.f.moore@gmail.com>
* [3.11] gh-90867: test.support.wait_process() uses LONG_TIMEOUT (GH-99071) ↵Miss Islington (bot)2022-11-041-3/+3
| | | | | | | | | | | | | | (GH-99098) The test.support.wait_process() function now uses a timeout of LONG_TIMEOUT seconds by default, instead of SHORT_TIMEOUT. It doesn't matter if a Python buildbot is slower, it only matters that the process completes. The timeout should just be shorter than "forever". (cherry picked from commit a9a8c8712665377cfa83af4b632b0db529ec1853) Co-authored-by: Victor Stinner <vstinner@python.org> (cherry picked from commit f09da28768b77713566e932e912f107b6b57e8fd)
* minor edits to locale doc (GH-98537)Miss Islington (bot)2022-11-041-13/+16
| | | | | (cherry picked from commit c0bf7607a1c215cd92f2976c9e915b913fc149d1) Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
* Docs: add `named` to the list of styles in the sqlite3.paramstyle attr docs ↵Miss Islington (bot)2022-11-031-3/+4
| | | | | | | (GH-99078) (cherry picked from commit 016c7d37b6acfe2203542a2655080c6402b3be1f) Co-authored-by: Nick Pope <nick@nickpope.me.uk>
* gh-83004: Clean up refleak in _io initialisation (GH-98840)Miss Islington (bot)2022-11-032-3/+4
| | | | | (cherry picked from commit 1208037246eeab4c5c003f1651edfefb045e6fb7) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* [3.10] gh-98740: Fix validation of conditional expressions in RE (GH-98764) ↵Serhiy Storchaka2022-11-034-26/+39
| | | | | | | | | | | | | | | | (GH-99046) In very rare circumstances the JUMP opcode could be confused with the argument of the opcode in the "then" part which doesn't end with the JUMP opcode. This led to incorrect detection of the final JUMP opcode and incorrect calculation of the size of the subexpression. NOTE: Changed return value of functions _validate_inner() and _validate_charset() in Modules/_sre/sre.c. Now they return 0 on success, -1 on failure, and 1 if the last op is JUMP (which usually is a failure). Previously they returned 1 on success and 0 on failure. (cherry picked from commit e9ac890c0273aee413aa528cc202c3efa29f1d7a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-98512: Add more tests for `ValuesView` (GH-98515)Miss Islington (bot)2022-11-032-0/+6
| | | | | (cherry picked from commit 29e027c3e6535aa1c0eacc2fb2002c53405e1f6f) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-65002: Make note that null bytes are used to pad bytes (GH-98635)Miss Islington (bot)2022-11-031-1/+4
| | | | | (cherry picked from commit 8cd21c2c5d34a5c5e857782da58d773f29ff8821) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
* Docs: Add 'as, match statement' to the index (GH-99001)Miss Islington (bot)2022-11-031-0/+1
| | | | | (cherry picked from commit 26720fffd090929fd2058b73e5970cc520b30aef) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>