summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-93883: elide traceback indicators when possible (#93994)John Belmonte2022-07-119-137/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gh-93883: elide traceback indicators when possible Elide traceback column indicators when the entire line of the frame is implicated. This reduces traceback length and draws even more attention to the remaining (very relevant) indicators. Example: ``` Traceback (most recent call last): File "query.py", line 99, in <module> bar() File "query.py", line 66, in bar foo() File "query.py", line 37, in foo magic_arithmetic('foo') File "query.py", line 18, in magic_arithmetic return add_counts(x) / 25 ^^^^^^^^^^^^^ File "query.py", line 24, in add_counts return 25 + query_user(user1) + query_user(user2) ^^^^^^^^^^^^^^^^^ File "query.py", line 32, in query_user return 1 + query_count(db, response['a']['b']['c']['user'], retry=True) ~~~~~~~~~~~~~~~~~~^^^^^ TypeError: 'NoneType' object is not subscriptable ``` Rather than going out of our way to provide indicator coverage in every traceback test suite, the indicator test suite should be responible for sufficient coverage (e.g. by adding a basic exception group test to ensure that margin strings are covered).
* Small speed-up for NormalDist.samples (GH-94730)Raymond Hettinger2022-07-111-1/+1
|
* gh-94309: Deprecate typing.Hashable/Sized (GH-94626)MonadChains2022-07-102-0/+10
| | | | | Deprecate typing.Hashable/Sized. Use the collections.abc counterparts directly instead. To be consistent with PEP 585, deprecated aliases will not raise any DeprecationWarning.
* GH-77265: Document NaN handling in statistics functions that sort or count ↵Raymond Hettinger2022-07-101-0/+29
| | | | | | | | | | | | | | | | | (#94676) * Document NaN handling in functions that sort or count * Update Doc/library/statistics.rst Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com> * Update Doc/library/statistics.rst Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com> * Fix trailing whitespace and rewrap text Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
* GH-94694: Fix column offsets for multi-line method lookups (GH-94697)Brandt Bucher2022-07-104-2/+85
|
* Improve dataclass docstring (gh-94686)Tom Fryers2022-07-091-9/+8
|
* gh-94637: Release GIL in SSLContext.set_default_verify_paths (GH-94658)Christian Heimes2022-07-092-1/+8
|
* pycore_interp.h: Fix comment about pytypedefs.h (#93188)Itamar Ostricher2022-07-091-1/+1
| | | | GH-31527 moved this typedef to `Include/pytypedefs.h`, so this comment should point at the correct location
* gh-93649: Fix dependencies of _testcapi (#94695)Christian Heimes2022-07-093-1/+3
| | | | | - header files are located in $(srcdir) - dependencies must not list C files that are also in a makesetup Setup file - generate SRCDIRS for OOT builds
* gh-94700: Rewrite the logging.Formatter API ref in structured form (GH-94701)CAM Gerlach2022-07-091-43/+41
|
* gh-94607: Fix subclassing generics (GH-94610)Ken Jin2022-07-094-0/+38
| | | Co-authored-by: Serhiy Storchaka <3659035+serhiy-storchaka@users.noreply.github.com>
* GH-93252: Fix error handling for failed Python calls (GH-94693)Brandt Bucher2022-07-093-1/+19
|
* Increase test coverage of Objects/exceptions.c (GH-94674)Irit Katriel2022-07-082-5/+59
|
* GH-90699: Intern statically allocated strings (GH-93597)Kumar Aditya2022-07-083-4/+628
| | | This is similar to how strings are interned for deepfreeze.
* gh-93649: Split vectorcall testing from _testcapimodule.c (GH-94549)Petr Viktorin2022-07-089-253/+292
| | | | | | | | | | | | | | The `_testcapimodule.c` file is getting too large to work with effectively. This PR lays out a general structure of how tests can be split up, with more splitting to come later if the structure is OK. Vectorcall tests aren't the biggest issue -- it's just an area I want to work on next, so I'm starting here. An issue specific to vectorcall tests is that it wasn't clear that e.g. `MethodDescriptor2` is related to testing vectorcall: the `/* Test PEP 590 */` section had an ambiguous end. Separate file should make things like this much clearer. OTOH, for some pieces it might not be clear where they should be -- I left `meth_fastcall` with tests of the other calling conventions. IMO, even with the ambiguity it's still worth it to split the huge file up. I'm not sure about the buildsystem changes, hopefully CI will tell me what's wrong. @vstinner, @markshannon: Do you think this is a good idea? Automerge-Triggered-By: GH:encukou
* Use mdash-es consistently in the library docs index (#92762)Oleg Iarygin2022-07-081-4/+4
|
* gh-94199: Remove the ssl.wrap_socket() function (#94203)Victor Stinner2022-07-084-60/+16
| | | | | | | | Remove the ssl.wrap_socket() function, deprecated in Python 3.7: instead, create a ssl.SSLContext object and call its sl.SSLContext.wrap_socket() method. Any package that still uses ssl.wrap_socket() is broken and insecure. The function neither sends a SNI TLS extension nor validates server hostname. Code is subject to CWE-295 : Improper Certificate Validation.
* gh-94215: Fix error handling for line-tracing events (GH-94681)Brandt Bucher2022-07-083-6/+17
| | | | | * Re-enable crasher * Fix error handling for line-tracing events * blurb add
* gh-94622: Add more references to the sqlite3 types anchor (#94623)Erlend Egeberg Aasland2022-07-081-8/+8
|
* gh-94321: Document sqlite3.PrepareProtocol (#94620)Erlend Egeberg Aasland2022-07-073-0/+17
|
* GH-90699: Move generated static initializer to pycore_runtime_generated.h ↵Kumar Aditya2022-07-077-1150/+1170
| | | | (GH-94051)
* gh-93654: Add module docstring to pathlib (GH-94611)Samuel Sloniker2022-07-071-0/+7
| | | Issue: gh-93654
* gh-94343: Ease initialization of reprlib.Repr attributes (GH-94581)finefoot2022-07-074-14/+60
|
* gh-94642: Remove -D_XOPEN_SOURCE from more pkg-config CFLAGS (#94657)Christian Heimes2022-07-072-2/+10
| | | Some pkg-config pc files define CFLAGS with -D_XOPEN_SOURCE=600. We always want _XOPEN_SOURCE=700.
* gh-93910: Fix enum performance regression (GH-94614)Michael Droettboom2022-07-073-8/+13
| | | | | | | | | | | | | | This removes the performance regression in 3.11, **at the expense of not fixing the "bug" that allows accessing values from values** (e.g. `Color.RED.BLUE`). Using the benchmark @markshannon [presented](https://github.com/python/cpython/issues/93910#issuecomment-1165503032), the results are: | Version | Enum | Fast enum | Normal class | | --- | --- | --- | --- | | 3.10 | 2.04 | 0.59 | 0.56 | | 3.11 | 2.78 | 0.31 | 0.15 | | This PR | 1.30 | 0.32 | 0.16 | I share this mostly as information about the source of the regression, as this may be useful. It may be that the lower-risk approach for the beta is just to revert to a previously-known working state.
* GH-94644: fix test_curses ref leak (GH-94647)Kumar Aditya2022-07-071-0/+1
|
* gh-94644: Define HAVE_NCURSESW in pkg-config branch (#94651)Christian Heimes2022-07-072-0/+3
|
* gh-94215: Add reproducer for segfault in frame_setlineno() (GH-94563)Christian Heimes2022-07-071-6/+104
|
* gh-94430: Allow params named `module` or `self` with custom C names in ↵Erlend Egeberg Aasland2022-07-073-2/+50
| | | | Argument Clinic (#94431)
* gh-94628: Add explicit parameter list to sqlite3.connect docs (#94629)Erlend Egeberg Aasland2022-07-071-76/+105
| | | Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-92228: disable the compiler's 'small exit block inlining' optimization ↵Irit Katriel2022-07-075-20/+33
| | | | | | | for blocks that have a line number (GH-94592) Inlining of code that corresponds to source code lines, can make it hard to distinguish later between code which is only reachable from except handlers, and that which is reachable in normal control flow. This caused problems with the debugger's jump feature. This PR turns off the inlining optimisation for code which has line numbers. We still inline things like the implicit "return None".
* gh-94630: Update sqlite3 docs with positional-only and keyword-only symbols ↵Erlend Egeberg Aasland2022-07-061-11/+11
| | | | (#94631)
* gh-94017: Improve clarity of sqlite3 transaction handling docs (#94320)Erlend Egeberg Aasland2022-07-061-39/+61
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
* GH-93896: AAlways set event loop in asyncio.run and IsolatedAsyncioTestCase ↵Kumar Aditya2022-07-063-0/+19
| | | | (#94593)
* gh-90005: Port readline and curses to PY_STDLIB_MOD (GH-94452)Christian Heimes2022-07-066-443/+1928
| | | Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
* gh-94438: in frameobject's mark_stacks switch, the PUSH_EXC_INFO and ↵Irit Katriel2022-07-061-8/+10
| | | | POP_EXCEPT cases are no longer reachable (GH-94582)
* gh-94510: Raise on re-entrant calls to sys.setprofile and sys.settrace ↵Pablo Galindo Salgado2022-07-055-3/+105
| | | | | (GH-94511) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-91330: Tests and docs for dataclass descriptor-typed fields (GH-94424)Erik De Bonte2022-07-053-0/+167
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-94360: Fix a tokenizer crash when reading encoded files with syntax ↵Pablo Galindo Salgado2022-07-053-5/+15
| | | | | | | | | | | errors from stdin (#94386) * gh-94360: Fix a tokenizer crash when reading encoded files with syntax errors from stdin Signed-off-by: Pablo Galindo <pablogsal@gmail.com> * nitty nit Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-90355: Add isolated flag if currently isolated (GH-92857)Carter Dodd2022-07-052-2/+13
| | | | Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-92897: Ensure `venv --copies` respects source build property of the ↵Jeremy Kloth2022-07-055-40/+76
| | | | creating interpreter (GH-92899)
* Docs: Convert PEP 630 (Isolating Extension Modules) to a HOWTO (GH-94489)Petr Viktorin2022-07-052-0/+537
| | | | Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* bpo-46755: Don't log stack info twice in QueueHandler (GH-31355)Erik Montnemery2022-07-054-3/+8
|
* gh-94485: Set line number of module's RESUME instruction to 0, as specified ↵Irit Katriel2022-07-057-26/+33
| | | | | by PEP 626 (GH-94552) Co-authored-by: Mark Shannon <mark@hotpy.org>
* gh-84753: Clarify change made to `inspect` functions (#94554)Łukasz Langa2022-07-051-2/+6
|
* gh-94379: Remove zipimport find_loader() and find_module() methods (#94380)Victor Stinner2022-07-054-74/+8
| | | | | zipimport: Remove find_loader() and find_module() methods, deprecated in Python 3.10: use the find_spec() method instead. See PEP 451 for the rationale.
* Docs: remove redundant "adverb-adjective" hyphens from compound modifiers ↵Ned Batchelder2022-07-0571-118/+118
| | | | | (GH-94551) Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
* gh-94538: Fix Argument Clinic output to custom file (#94539)Erlend Egeberg Aasland2022-07-052-1/+3
|
* gh-93626: Set the release for `__future__.annotations` to `None` (GH-93628)KotlinIsland2022-07-053-3/+11
| | | Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
* gh-93939: Add script to check extension modules (#94545)Christian Heimes2022-07-054-41/+504
| | | | | | | | Add script ``Tools/scripts/check_modules.py`` to check and validate builtin and shared extension modules. The script also handles ``Modules/Setup`` and will eventually replace ``setup.py``. Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>