| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The current status quo is that private attribute names are not
mangled when a class is matched. I've added a test to
document/legimize this behaviour.
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
|
|
| |
Fixes the failure of PGO building with `mimalloc` on Windows, ensuring that `test_bpo20891` does not break profiling data (`python31*.pgc`).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
These headings were at the same level as the "Deprecated" heading, but
likely intended to be a subheading within that section.
Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
|
|
|
|
|
| |
* fix typo - double spelled word 'use'
* change methods names to the infinitive form
|
| |
|
|
|
|
|
|
|
|
|
| |
This is a quick-and-dirty way to run the C++ tests.
It can definitely be improved in the future, but it should fail when things go wrong.
- Run test functions on import (yes, this can definitely be improved)
- Fudge setuptools metadata (name & version) to make the extension installable
- Install and import the extension in test_cppext
|
|
|
|
|
|
| |
See https://buildbot.python.org/all/#/builders/172/builds/2522
The PR skips the test on non-linux platforms.
Automerge-Triggered-By: GH:pablogsal
|
|
|
|
| |
multiple times (GH-30274)
|
|
|
|
|
|
|
|
|
| |
* fix allocator and deallocator
* 📜🤖 Added by blurb_it.
* code review
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
|
|
|
| |
PR #93994 was merged without being rebased in a few weeks, and
some new test code using the old scheme passed through automatic merge.
|
|
|
|
| |
values (GH-94691)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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).
|
| |
|
|
|
|
|
| |
Deprecate typing.Hashable/Sized. Use the collections.abc counterparts directly instead.
To be consistent with PEP 585, deprecated aliases will not raise any DeprecationWarning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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-31527 moved this typedef to `Include/pytypedefs.h`, so this comment
should point at the correct location
|
|
|
|
|
| |
- 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
|
| |
|
|
|
| |
Co-authored-by: Serhiy Storchaka <3659035+serhiy-storchaka@users.noreply.github.com>
|
| |
|
| |
|
|
|
| |
This is similar to how strings are interned for deepfreeze.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* Re-enable crasher
* Fix error handling for line-tracing events
* blurb add
|
| |
|
| |
|
|
|
|
| |
(GH-94051)
|
|
|
| |
Issue: gh-93654
|
| |
|
|
|
| |
Some pkg-config pc files define CFLAGS with -D_XOPEN_SOURCE=600. We always want _XOPEN_SOURCE=700.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
Argument Clinic (#94431)
|
|
|
| |
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
|
|
|
|
|
|
|
| |
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".
|