| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Use assertEqual(), not assertTrue(lineno, 2)
|
|
|
|
|
|
|
|
|
| |
Add a link to the `match` statement from its section in the tutorial.
This should be backported to 3.10.
[Initially submitted as #31395 but against the wrong branch. Thanks @Mariatta]
Automerge-Triggered-By: GH:Mariatta
|
| |
|
| |
|
|
|
|
|
| |
``PyType_GetQualName`` returns a new reference.
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
| |
Windows (GH-31390)
|
|
|
|
|
|
| |
This PR for the documentation of the [html.parser](https://docs.python.org/3/library/html.parser.html) module will
- fix a terminology mistake (‘start of a tag’ -> ‘start tag of an element’);
- mention the parameter names of the `HTMLParser.handle_*` methods where missing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-21062)
* Add exception for uninstantiated interpolation (configparser)
The current feedback when users try to pass an uninstantiated
interpolation into a ConfigParser is an error message that does not help
users solve the problem. This current error of `TypeError: before_set()
missing 1 required positional argument: 'value'` does not display until
the parser is used, which usually results in the assumption that
instantiation of the parser was done correctly. The new exception of
InterpolationTypeError, will be raised on the line where the
ConfigParser is instantiated. This will result in users see the line
that has the error in their backtrace for faster debugging.
There have been a number of bugs created in the issue tracker, which
could have been addressed by:
https://bugs.python.org/issue26831 and https://bugs.python.org/issue26469
* 📜🤖 Added by blurb_it.
* Replace custom Error with TypeError
Per feedback from @iritkatriel, the custom InterpolationTypeError has
been dropped in favour of a TypeError with a custom message, and the
unittests have been expanded.
* More verbose message
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
| |
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
| |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
The `module` parameter carries semantic information about the forward ref.
Forward refs are different if they refer to different module even if they
have the same name. This affects the `__eq__`, `__repr__` and `__hash__` methods.
Co-authored-by: Andreas Hangauer <andreas.hangauer@siemens.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
|
|
|
|
|
| |
Closes python/typing#981
https://bugs.python.org/issue46066
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
cases where methodwrapper is given (GH-19261)
Automerge-Triggered-By: GH:isidentical
|
| |
|
|
|
|
| |
character if the f-string is missing a trailing right brace. (#31365)
|
| |
|
|
|
| |
On `obj.read_only_property = x`, raise `AttributeError: property 'read_only_property' of 'A' object has no setter`.
|
|
|
| |
https://bugs.python.org/issue46541
|
|
|
| |
https://bugs.python.org/issue46541
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
asyncio/taskgroups.py is an adaptation of taskgroup.py from EdgeDb, with the following key changes:
- Allow creating new tasks as long as the last task hasn't finished
- Raise [Base]ExceptionGroup (directly) rather than TaskGroupError deriving from MultiError
- Instead of monkey-patching the parent task's cancel() method,
add a new public API to Task
The Task class has a new internal flag, `_cancel_requested`, which is set when `.cancel()` is called successfully. The `.cancelling()` method returns the value of this flag. Further `.cancel()` calls while this flag is set return False. To reset this flag, call `.uncancel()`.
Thus, a Task that catches and ignores `CancelledError` should call `.uncancel()` if it wants to be cancellable again; until it does so, it is deemed to be busy with uninterruptible cleanup.
This new Task API helps solve the problem where TaskGroup needs to distinguish between whether the parent task being cancelled "from the outside" vs. "from inside".
Co-authored-by: Yury Selivanov <yury@edgedb.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
| |
|
|
|
| |
The docstring for `BufferedProtocol` states that the class is still an "experimental API", but it has been considered stable since 3.8.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-44011: New asyncio ssl implementation
Co-Authored-By: Andrew Svetlov <andrew.svetlov@gmail.com>
* fix warning
* fix typo
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
|
| |
* Make sure all backward jumps use JUMP_ABSOLUTE.
* Add news.
* Fix up news item.
* Make test use consistent style.
|
|
|
|
|
|
|
| |
Instead of manually enumerating the global strings in generate_global_objects.py, we extrapolate the list from usage of _Py_ID() and _Py_STR() in the source files.
This is partly inspired by gh-31261.
https://bugs.python.org/issue46541
|
|
|
|
| |
(GH-31293)
|
|
|
| |
https://bugs.python.org/issue46541
|
| |
|
|
|
|
|
|
|
| |
Updated a couple copyright symbols from (c) to ©
The rest of the doc are already using ©
Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>
|
|
|
| |
field was not imported. It has been added now.
|
| |
|
|
|
|
|
| |
Explicitly state that it is lowercase.
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
| |
The reference to `venv` appears in the paragraph below, instead of above.
Fixed the documentation.
|
| |
|
|
|
| |
is not longer used -> is no longer used
|
|
|
| |
"an" followed by consonant should be "a"
|
| |
|
|
|
| |
Added *key* parameter to `bisect.bisect()` and `bisect.insort()` in bisect module docs.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* `precision` field is a decimal integer
* clarify that stated limitations are on presentation type
rather than input value type. Especially misleading is
"precision is not allowed for integer values", since integer
value input to a format like `.1f` is fine.
* regarding max field size, replace "non-number" with "string",
which is the only non-numeric presentation type
Automerge-Triggered-By: GH:ericvsmith
|
| |
|