Commit Graph

110867 Commits

Author SHA1 Message Date
meowmeowmeowcat ed524b4569
bpo-44907: Update error messages in tutorial examples (GH-27755) 2021-08-13 19:40:58 -04:00
dnknth e4ed9d2153
bpo-30077: Add support for Apple aifc/sowt pseudo-compression (GH-24449)
Co-authored-by: Toby Thurston <thurston@eml.cc>
2021-08-13 13:31:25 +02:00
andrei kulakov e43b9bbc31
bpo-36700: [doc] Update base64 RFC references to RFC 4648 (GH-27700)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-13 12:58:55 +02:00
Łukasz Langa dd8eb303b9
bpo-26228: [doc] Adapt PTY documentation updates from GH-4167 (GH-27754)
Co-authored-by: Cornelius Diekmann <c.diekmann@googlemail.com>
2021-08-13 12:57:07 +02:00
andrei kulakov 230403a6a1
Added test case based on recommended test cases from RFC 4648 (GH-27747) 2021-08-13 12:50:37 +02:00
Nikita Sobolev a2ce538e16
bpo-44891: Tests `id` preserving on `* 1` for `str` and `bytes` (GH-27745)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-13 12:36:22 +02:00
Irit Katriel 7bf28cbb4b
bpo-44895: Temporarily add an extra gc.collect() call (GH-27746)
This is part of an investigation of a non-deterministic reference leak. While we're looking for the root cause, this is included temporarily so that CI doesn't fail on this particular issue. This enables it to find other regressions in the meantime, which would otherwise be shadowed by our known issue.
2021-08-13 11:41:35 +02:00
Germán Méndez Bravo 03648a2a91
bpo-43392: Optimize repeated calls to `__import__()` (GH-24735)
Implements a two steps check in `importlib._bootstrap._find_and_load()` to avoid locking when the module has been already imported and it's ready.

---

Using `importlib.__import__()`, after this, does show a big difference:

Before:
```
$ ./python -c 'import timeit; print(timeit.timeit("__import__(\"timeit\")", setup="from importlib import __import__"))'
15.92248619502061
```

After:
```
$ ./python -c 'import timeit; print(timeit.timeit("__import__(\"timeit\")", setup="from importlib import __import__"))'
1.206068897008663
```

---
2021-08-12 11:23:29 -07:00
Pablo Galindo Salgado 953d27261e
Update pegen to use the latest upstream developments (GH-27586) 2021-08-12 17:37:30 +01:00
Pablo Galindo Salgado 8e832fb2a2
bpo-44885: Correct the ast locations of f-strings with format specs and repeated expressions (GH-27729) 2021-08-12 17:13:30 +01:00
Irit Katriel 789a6af29f
bpo-44890: Fix AMD build error (GH-27740) 2021-08-12 15:20:44 +01:00
Irit Katriel 8ac0886091
bpo-44890: collect specialization stats if Py_DEBUG (GH-27731) 2021-08-12 12:15:06 +01:00
Mark Shannon a530a9538f
bpo-44878: Remove loop from interpreter. All dispatching is done by gotos. (GH-27727) 2021-08-12 11:47:38 +01:00
Benjamin Peterson f08e6d1bb3
bpo-33930: Fix typo in the test name. (#27733)
bpo-33930: Fix typo in the test name. (GH-27733)
2021-08-11 18:56:43 -07:00
Zephyr Shannon 81ab8db235
bpo-26228: Fix pty EOF handling (GH-12049)
On non-Linux POSIX platforms, like FreeBSD or macOS,
the FD used to read a forked PTY may signal its exit not
by raising an error but by sending empty data to the read
syscall. This case wasn't handled, leading to hanging
`pty.spawn` calls.

Co-authored-by: Reilly Tucker Siemens <reilly@tuckersiemens.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-12 00:21:46 +02:00
Irit Katriel 64a7812c17
Update test__opcode and _Py_GetSpecializationStats with recent specialization stat changes (GH-27728) 2021-08-11 17:34:01 +01:00
Mark Roseman 08caf2d5d4
bpo-33479: Add architecture and threading model sections to Tkinter module docs (GH-27717)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-11 18:29:15 +02:00
Mark Shannon f66d00fdd7
bpo-44878: Remove the switch from the main interpreter loop when using computed gotos. (GH-27726)
* Refactor dispatch logic to make flow of control clearer. Moves lltrace and dxprofile instrumentation into DISPATCH macro.

* Remove switch in interpreter loop when using computed gotos. There is no need for two nearly-duplicate dispatch tables.
2021-08-11 14:02:11 +01:00
Mark Shannon 3f3d5dcac3
bpo-44878: _PyEval_EvalFrameDefault readability improvements (GH-27725)
* Move a few variable declarations to point of definition.

* Factor out tracing of function entry into helper function.
2021-08-11 11:47:52 +01:00
180909 1841c70f2b
Add .DS_Store on ignore (GH-27711)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-11 11:32:25 +02:00
Mark Shannon c174eafc33
Add missing DISPATCH() (GH-27715) 2021-08-11 09:25:26 +01:00
Pablo Galindo Salgado bfc2d5a5c4
bpo-33930: Fix segfault with deep recursion when cleaning method objects (GH-27678) 2021-08-11 00:34:14 +01:00
Łukasz Langa c0ab59f7de
bpo-44854: Add .editorconfig file to help enforce `make patchcheck` (GH-27638) 2021-08-10 18:30:57 +02:00
Mark Shannon 9816777861
Classify specialization failures. Provides more useful stats, with lower overhead. (GH-27701) 2021-08-10 14:53:05 +01:00
Mark Shannon c7ea1e3dce
Fix stats for STORE_ATTR specialization. (GH-27708) 2021-08-10 11:40:37 +01:00
Irit Katriel d5c217475c
bpo-25782: avoid hang in PyErr_SetObject when current exception has a cycle in its context chain (GH-27626)
Co-authored-by: Dennis Sweeney 36520290+sweeneyde@users.noreply.github.com
2021-08-10 11:37:25 +02:00
Terry Jan Reedy 6b37d0d530
bpo-33479: Remove unqualified tkinter threadsafe claim. (GH-6990)
It has not been true for several years and likely never was.
2021-08-10 11:32:21 +02:00
Zsolt Dollenstein 149addd496
make lib2to3 parse async generators everywhere (GH-6588) 2021-08-10 11:31:32 +02:00
Irit Katriel 8ed1833912
bpo-14853: add back the stdin test, skip if stdin is redirected (GH-27694) 2021-08-09 23:38:26 +01:00
Anthony Shaw c5c5326d47
bpo-39498 Start linking the security warnings in the stdlib modules (GH-18272)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-10 00:35:51 +02:00
Serhiy Storchaka 058fb35b57
bpo-44854: Remove trailing whitespaces (GH-27689) 2021-08-09 21:32:54 +03:00
Irit Katriel 7d14fdb03c
bpo-44872: use new trashcan macros in framobject.c (#27683) 2021-08-09 18:11:38 +01:00
Johannes Reiff b33186bc43
bpo-41402: Fix email ContentManager calling .encode() on bytes (GH-21631) 2021-08-09 18:45:41 +02:00
Zackery Spytz d097876111
bpo-38840: Incorrect __all__ in multiprocessing.managers (GH-18034)
This was causing test___all__ to fail on platforms lacking a shared
memory implementation.

Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-09 18:44:55 +02:00
meowmeowmeowcat b05e9b63fc
bpo-44522: Fix inaccurate information in open() function (GH-27650)
- Use "Low surrogate code units" instead of "Unicode Private Use Area"
2021-08-09 16:14:54 +02:00
Mark Shannon 41bb564cd6
Remove unused variable. (GH-27677) 2021-08-09 14:44:26 +01:00
meowmeowmeowcat 03e5647ab0
bpo-44702: Remove ambiguity in sentence (GH-27676)
Automerge-Triggered-By: GH:pablogsal
2021-08-09 05:01:30 -07:00
Zackery Spytz eb2d4a66ff
bpo-32695: Docs and tests for compresslevel and preset kwargs in tarfile (GH-21470)
Co-Authored-By: Bo Bayles <bbayles@gmail.com>
2021-08-09 12:05:31 +02:00
Mark Shannon ac75f6bdd4
bpo-44826: Specialize STORE_ATTR (GH-27590)
* Generalize cache names for LOAD_ATTR to allow store and delete specializations.

* Factor out specialization of attribute dictionary access.

* Specialize STORE_ATTR.
2021-08-09 10:40:21 +01:00
Mark Shannon b854557b49
bpo-44840: Compiler: Move duplication of exit blocks with no line numbers to after CFG optimization. (GH-27656) 2021-08-09 10:18:59 +01:00
Serhiy Storchaka 2b496e7929
bpo-42053: Remove misleading check in os.fwalk() (GH-27669)
os.fwalk() does not support integer as the first argument,
and never supported.
2021-08-08 21:04:02 +03:00
Serhiy Storchaka 0eec6276fd
bpo-44859: Improve error handling in sqlite3 and and raise more accurate exceptions. (GH-27654)
* MemoryError is now raised instead of sqlite3.Warning when
  memory is not enough for encoding a statement to UTF-8
  in Connection.__call__() and Cursor.execute().
* UnicodEncodeError is now raised instead of sqlite3.Warning when
  the statement contains surrogate characters
  in Connection.__call__() and Cursor.execute().
* TypeError is now raised instead of ValueError for non-string
  script argument in Cursor.executescript().
* ValueError is now raised for script containing the null
  character instead of truncating it in Cursor.executescript().
* Correctly handle exceptions raised when getting boolean value
  of the result of the progress handler.
* Add many tests covering different corner cases.

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-08-08 08:49:44 +03:00
Senthil Kumaran ebecffdb6d
bpo-44830 - Remove the broken Broken Mozilla devguide link. (GH-27664) 2021-08-07 20:18:10 -07:00
Pablo Galindo Salgado a40675c659
bpo-44856: Possible reference leak in error paths of update_bases() and __build_class__ (GH-27647) 2021-08-07 12:10:14 +02:00
Ronald Oussoren 17c2316794
bpo-42971: Add errno.EQFULL (macOS) (GH-24419)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-06 23:35:13 +02:00
Thomas Grainger e9a6f1b78b
bpo-41576: document BaseException in favor of bare except (GH-21917) 2021-08-06 22:44:15 +02:00
Jack DeVries 0ffdced3b6
bpo-27752: improve documentation of csv.Dialect (GH-26795)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-06 22:05:16 +02:00
Raymond Hettinger 1f7d64608b
bpo-44605: Teach @total_ordering() to work with metaclasses (GH-27633) 2021-08-06 14:33:30 -05:00
Serhiy Storchaka 7d747f26e6
bpo-44839: Raise more specific errors in sqlite3 (GH-27613)
MemoryError raised in user-defined functions will now preserve
its type. OverflowError will now be converted to DataError.
Previously both were converted to OperationalError.
2021-08-06 21:28:47 +03:00
Tzu-ping Chung 738ac00a08
Upgrade bundled pip and setuptools (#27625)
pip is now 21.2.3
setuptools is now 57.4.0
2021-08-06 20:22:48 +02:00