Commit Graph

114405 Commits

Author SHA1 Message Date
Michael Droettboom 054328f0dd
gh-96189: Fix test_invalid_utf8 on a number of build bots (GH-96190)
The clearing of the temporary directory is not working on some platforms and
leaving behind files.

This has been updated to use the pattern in test_cmd_line.py [1] using the
special TESTFN rather than a test directory.

[1] https://github.com/python/cpython/blob/main/Lib/test/test_cmd_line.py#L559
2022-08-23 13:52:55 -07:00
Yury Selivanov e046cf872e
Drop myself from owners of genobject (#96216) 2022-08-23 12:21:10 -07:00
Kevin Kirsche 58f6953d6d
gh-96175: add missing self._localName assignment in `xml.dom.minidom.Attr` (#96176)
X-Ref: https://github.com/python/typeshed/pull/8590#discussion_r951473977

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-08-23 09:16:02 -07:00
Mark Shannon 575f8880bf
GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
Pablo Galindo Salgado 16ebae4cd4
GH-96187: Prevent _PyCode_GetExtra to return garbage for negative indexes (GH-96188) 2022-08-23 11:13:53 +01:00
Jeong YunWon ba7d4b9dc1
gh-96197: Add `del sys.breakpointhook` behavior test (gh-96198) 2022-08-23 17:58:38 +09:00
C.A.M. Gerlach d6259c58cb
gh-96096: Add undocumented SQLITE_OK/DENY/IGNORE sqlite3 constants (#96134)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-08-23 08:51:20 +02:00
Erlend E. Aasland 04c73e5efb
gh-95432: Add doctest for sqlite3 tutorial (#96193) 2022-08-23 08:48:13 +02:00
Duncan Grisby 1499d73b3e
gh-96159: Fix significant performance degradation in logging.TimedRotat… (GH-96182) 2022-08-23 07:28:43 +01:00
Kumar Aditya 129998bd7b
GH-96075: move interned dict under runtime state (GH-96077) 2022-08-22 12:05:21 -07:00
Kumar Aditya 079baee196
GH-96071: add regression test for #96071 (GH-96137)
Automerge-Triggered-By: GH:ericsnowcurrently
2022-08-22 11:40:23 -07:00
Terry Jan Reedy 216ccacda1
gh-96076: Change test_launcher to use non-admin location for py.ini (GH-96091)
Patch authored by Eryksun.
2022-08-22 17:23:27 +01:00
Erlend E. Aasland 18b1782192
gh-96121: Merge sqlite3.Row examples into sqlite3.Row class doc (#96122)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-08-22 10:03:24 +02:00
Christian Heimes 53e6a9a725
gh-96046: Initialize ht_cached_keys in PyType_Ready() (GH-96047) 2022-08-21 22:24:03 -07:00
sand8089 d8c7a1174c
small grammatical change (GH-96138)
changed a to an under An example that uses most of the list methods
2022-08-21 09:56:52 -05:00
Raymond Hettinger 511dea0a3e
GH-95880: Clarify StringIO append/overwrite behavior. (GH-96104) 2022-08-21 09:42:15 -05:00
Raymond Hettinger 0e28a3a50f
Add polynomial_from_roots() to the itertools recipes (#96102) 2022-08-21 09:41:29 -05:00
Raymond Hettinger eea8f42ded
GH-93179: Document the thread safety of functools.lru_cache (GH-96101) 2022-08-21 09:40:13 -05:00
Nick Coghlan bcc4cb0c7d
gh-96098: Clearly link concurrent.futures from threading & multiprocessing docs (GH-96112)
Clearly link concurrent.futures from threading & multiprocessing docs

Also link directly to asyncio from the beginning of the threading docs.
2022-08-21 14:09:05 +12:00
Dong-hee Na 6ec57e7c5a
gh-90536: Fix link syntax to LLVM-BOLT repository (gh-96141) 2022-08-21 00:11:35 +09:00
Kumar Aditya e0d54a4a79
GH-96071: fix deadlock in PyGILState_Ensure (GH-96124)
Alternative of #96107
2022-08-19 12:43:00 -07:00
Christian Heimes 822955c166
gh-96125: Fix sys.thread_info.name on pthread platforms (GH-96126)
Automerge-Triggered-By: GH:tiran
2022-08-19 12:41:25 -07:00
Brandt Bucher 5bfb3c372b
GH-90997: Wrap yield from/await in a virtual try/except StopIteration (GH-96010) 2022-08-19 12:33:44 -07:00
Carl Friedrich Bolz-Tereick 2d9f252c0c
gh-96019: Fix caching of decompositions in makeunicodedata (GH-96020) 2022-08-19 12:20:44 +03:00
Erlend E. Aasland ee9f22d346
Docs: Fix markup of module name in sqlite3 docs (#96115) 2022-08-19 10:18:08 +02:00
C.A.M. Gerlach 303ef0913e
Doc: Use consistent markup for example Point class in sqlite3 (#96095) 2022-08-19 09:41:16 +02:00
Erlend E. Aasland 1a140af40b
Docs: group sqlite3.Connection attributes and methods (#96090) 2022-08-19 09:30:41 +02:00
Erlend E. Aasland ede771cdf9
gh-94635: Remove sqlite3 doc introduction heading (#96089) 2022-08-19 09:21:11 +02:00
Christian Heimes 6087f491ea
gh-95853: WASM: better version and asset handling in scripts (GH-96045)
- support EMSDK tot-upstream and git releases
- allow WASM assents for wasm64-emscripten and WASI. This makes single file distributions on WASI easier.
- decouple WASM assets from browser builds
2022-08-19 08:36:12 +02:00
MrSuspicious 757c383d24
gh-96039: Corrected wording error in itertools doc (GH-96105) 2022-08-19 01:20:45 -05:00
Christian Heimes d9c1b746b5
gh-96017: Fix some compiler warnings (GH-96018)
- "comparison of integers of different signs" in typeobject.c
- only define static_builtin_index_is_set in DEBUG builds
- only define recreate_gil with ifdef HAVE_FORK
2022-08-19 08:08:43 +02:00
Raymond Hettinger 6740680b57
GH-95822: Need _PyType_Lookup() in descriptor howto code equivalent. (GH-95967) 2022-08-18 23:56:58 -05:00
C.A.M. Gerlach b6d88b7225
gh-95914: Add Py_UNICODE encode APIs removed in PEP 624 to 3.11 What's New (#96016)
* 3.11 Whatsnew: Add Py_UNICODE encode functions removed in PEP 624

* Just use :func: instead of :c:func: for non-resolved funcs so ! works
2022-08-19 00:52:59 +01:00
Pablo Galindo Salgado 9d066e2aa6
gh-95463: Remove backwards incompatible change regarding the _MASK_UTF_FILENAME flags in bpo-28080 (GH-96072)
Automerge-Triggered-By: GH:pablogsal
2022-08-18 16:45:55 -07:00
Raymond Hettinger ba4bb7e464
GH-93179: Document the thread safety of functools.lru_cache (GH-95970) 2022-08-18 17:38:49 -05:00
Kevin Modzelewski 214eb2cce5
gh-90536: Add support for the BOLT post-link binary optimizer (gh-95908)
* Add support for the BOLT post-link binary optimizer

Using [bolt](https://github.com/llvm/llvm-project/tree/main/bolt)
provides a fairly large speedup without any code or functionality
changes. It provides roughly a 1% speedup on pyperformance, and a
4% improvement on the Pyston web macrobenchmarks.

It is gated behind an `--enable-bolt` configure arg because not all
toolchains and environments are supported. It has been tested on a
Linux x86_64 toolchain, using llvm-bolt built from the LLVM 14.0.6
sources (their binary distribution of this version did not include bolt).

Compared to [a previous attempt](https://github.com/faster-cpython/ideas/issues/224),
this commit uses bolt's preferred "instrumentation" approach, as well as adds some non-PIE
flags which enable much better optimizations from bolt.

The effects of this change are a bit more dependent on CPU microarchitecture
than other changes, since it optimizes i-cache behavior which seems
to be a bit more variable between architectures. The 1%/4% numbers
were collected on an Intel Skylake CPU, and on an AMD Zen 3 CPU I
got a slightly larger speedup (2%/4%), and on a c6i.xlarge EC2 instance
I got a slightly lower speedup (1%/3%).

The low speedup on pyperformance is not entirely unexpected, because
BOLT improves i-cache behavior, and the benchmarks in the pyperformance
suite are small and tend to fit in i-cache.

This change uses the existing pgo profiling task (`python -m test --pgo`),
though I was able to measure about a 1% macrobenchmark improvement by
using the macrobenchmarks as the training task. I personally think that
both the PGO and BOLT tasks should be updated to use macrobenchmarks,
but for the sake of splitting up the work this PR uses the existing pgo task.

* Simplify the build flags

* Add a NEWS entry

* Update Makefile.pre.in

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

* Update configure.ac

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

* Add myself to ACKS

* Add docs

* Other review comments

* fix tab/space issue

* Make it more clear that --enable-bolt is experimental

* Add link to bolt's github page

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2022-08-19 06:33:54 +09:00
Steve Dower 22a95cb511
Remove manual build scripts for Windows dependencies and put them in the release-tools repository instead (GH-96088) 2022-08-18 21:48:09 +01:00
Raymond Hettinger 29c8f80760
GH-95861: Add support for Spearman's rank correlation coefficient (GH-95863) 2022-08-18 13:48:27 -05:00
Erlend E. Aasland 91afe66707
Docs: Escape lone stars in sqlite3 docs (#96081) 2022-08-18 20:39:36 +02:00
Erlend E. Aasland c87ea10fc9
gh-95271: Rework sqlite3 tutorial (#95749)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-08-18 20:36:20 +02:00
Victor Stinner cfaa79aac0
gh-93103: Doc uses PyConfig rather than deprecated vars (#96070)
The C API documentation now uses the new PyConfig API, rather than
deprecated global configuration variables.
2022-08-18 16:58:38 +02:00
Dong-hee Na 157aef79b0
gh-95813: Improve HTMLParser from the view of inheritance (#95874)
* gh-95813: Improve HTMLParser from the view of inheritance

* gh-95813: Add unittest

* Address code review
2022-08-18 13:16:33 +02:00
Irit Katriel c5bc67b2a1
gh-95913: Add traceback module additions to what's new in 3.11 (GH-95980) 2022-08-18 11:37:41 +01:00
Irit Katriel 1a720c6003
gh-95913: make the new internal classes pdb.ModuleTarget/ScriptTarget private (GH-96053) 2022-08-18 11:16:07 +01:00
Matthias Görgens 4a6fa89465
Remove dead code in _PyDict_GetItemHint and rename to _PyDict_LookupIndex (GH-95948) 2022-08-18 10:19:21 +01:00
Eric Snow 586fc02be5
gh-90110: Update the c-analyzer Tool (gh-96058) 2022-08-17 16:54:59 -06:00
Eric Snow 5aac85101b
gh-90110: Get the C Analyzer Tool Working Again (gh-96057)
We broke it with a recent `_PyArg_Parser` change.

Also:
* moved the `_PyArg_Parser` whitelist entries over to ignored.tsv now that they are thread-safe
* added some known globals from a currently-excluded file
* dropped some outdated globals from the whitelist
2022-08-17 13:55:01 -06:00
Mark Shannon d8c07f8cb4
Correct news entry. (GH-96043) 2022-08-17 12:59:44 +01:00
Mark Shannon b73e3b6d4a
GH-95589: Dont crash when subclassing extension classes with multiple inheritance (GH-96028)
* Treat tp_weakref and tp_dictoffset like other opaque slots for multiple inheritance.

* Document Py_TPFLAGS_MANAGED_DICT and Py_TPFLAGS_MANAGED_WEAKREF in what's new.
2022-08-17 12:50:53 +01:00
Petr Viktorin 0f2b469ce1
gh-95991: Add some infrastructure for testing Limited API in _testcapi (GH-95992)
- Limited API needs to be enabled per source file
- Some builds don't support Limited API, so Limited API tests must be skipped on those builds
  (currently this is `Py_TRACE_REFS`, but that may change.)
- `Py_LIMITED_API` must be defined before `<Python.h>` is included.

This puts the hoop-jumping in `testcapi/parts.h`, so individual
test files can be relatively simple. (Currently that's only
`vectorcall_limited.c`, imagine more.)
2022-08-17 13:48:43 +02:00