Commit Graph

9072 Commits

Author SHA1 Message Date
Irit Katriel 13be7c414f
PEP 654: Clarifications after python-dev review (#1838)
- subgroup returns None for empty.
- except *(TypeError, ExceptionGroup) is forbidden.
2021-02-23 17:39:29 -08:00
Dennis Sweeney 05fe23f12b
PEP 616: Replace a misleading example (#1837)
* PEP 616: Remove misleading example

* Add a replacement example
2021-02-23 17:54:21 -05:00
Brett Cannon 579038f1d9
PEP 654: fix a grammar mistake 2021-02-23 11:55:29 -08:00
Irit Katriel cbd46e4448
PEP 654: Add Post-History date (#1834) 2021-02-23 06:52:39 -08:00
Florian Bruhin 08d3be348f
PEP 0654: Fix typo (#1835) 2021-02-23 21:59:28 +11:00
Irit Katriel e7193a3e63
PEP-654: fix level of subsection headings (#1832) 2021-02-22 15:24:40 -08:00
Yury Selivanov 3daf8f2199
pep 654: Fix indentation to use consistent 4 spaces in all snippets (#1833) 2021-02-22 12:24:54 -08:00
Yury Selivanov aebbd8c4fc
pep 654: Restore code formatting 2021-02-22 11:48:40 -08:00
Yury Selivanov cef697a03c
A couple PEP 654 edits (#1830)
* Markup edits. Use REsT references, fix a couple of typos.

* Mention TaskGroups in Motivation; add an example of trio.MultiError API
2021-02-22 11:38:55 -08:00
Irit Katriel 4ca905e7ff
PEP 654: "This PEP" --> " this document" (#1831) 2021-02-22 07:23:10 -08:00
Matthew Rahtz a2339f34ea
PEP 646: tweaks, clarifications, and move summary example up (#1828)
Readability changes:
* Tweak framing to also acknowledge that variadic generics have been wanted for other things too (though as far as I've been able to tell there isn't a consistent enough pattern to the other use cases to justify including them in the PEP)
* Move the Array example much earlier (both because reading a detailed example is going to be a faster way of getting the gist for people in a hurry, and because we want to make it clear to numerical computing folks from the start that we can also specify a datatype here). (We still have a more detailed Array example later; I'm leaving that there for the time being pending some discussion with Pradeep, but eventually I guess it'll be removed and absorbed into this earlier example)
* Make it clear that other types can appear in `Union` alongside `TypeVarTuple` instances.

Semantic changes:
* Disallow a `Union` of more than one type variable tuple (I thought this would be easier than concatenation of more than one type variable tuple, but Pradeep points out it could still get hairy for type checkers, so disallow it for now to be on the safe safe)

Also some *more* type fixes...
2021-02-21 20:41:48 -08:00
Yury Selivanov a23ba419ff
Give PEP 654 a proper name. 2021-02-21 19:15:56 -08:00
Irit Katriel b60a7dcae6
Initial version of Exception Groups and except* PEP (#1820) 2021-02-21 19:13:06 -08:00
Inada Naoki b643690860
PEP 597: Fixup (#1827) 2021-02-21 16:01:52 +09:00
Eric Traut 35a0204848
Fixed several omissions and errors in sample code in PEP 646. (#1826)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-02-20 15:20:04 -08:00
Matthew Rahtz 4304da21ec
PEP 646: various improvements (#1825)
Semantic changes:
* Unparameterised variadics are compatible with parameterised variadics in both direction
* Allow suffixing

Readability changes:
* De-emphasise unparameterised `Array` behaving like `Array[Any, ...]` to avoid the suggestion that `Array[Any, ...]` might be supported
* Explicitly forbid `Array[Any, ...]` and similar
* Clarify that only `*args` can be annotated as `*Ts`; other arguments must use `Tuple[*Ts]`
* Remove 'Final Notes' section (I was hoping we'd have more edge cases to add to this, but in the end there haven't been any, and the only example we do have is obscure enough that I think we can just remove it)

Also some minor typo fixes.
2021-02-20 10:55:14 -08:00
Mark Shannon c8f7f9cd7c
PEP 653: Make it clearer that MATCH_DEFAULT is the default. (#1823) 2021-02-19 18:55:47 +00:00
Mark Shannon 89183f61d1
Clarify description of __match_kind__. Drop claims of improved security (#1822) 2021-02-19 17:56:52 +00:00
Łukasz Langa 79fdaaad0b
[pep-0569][pep-0596] Actual dates for 3.8.8, 3.9.2; stop providing RCs for maintenance releases 2021-02-19 16:36:31 +01:00
Inada Naoki 233ecaddab
PEP 597: Use longer option name (#1821) 2021-02-19 17:40:27 +09:00
Mark Shannon aeab09a58f
PEP 653: Precise Semantics for Pattern Matching (#1819) 2021-02-18 15:08:53 +00:00
Łukasz Langa 1f669e94af
[pep-0569][pep-0596] Actual dates for 3.8.8rc1 and 3.9.2rc1 2021-02-17 13:38:35 +01:00
Ned Deily 9cab28f2f6
3.7.10 and 3.6.13 released 2021-02-16 00:19:18 -05:00
Evan Carroll 5f16dd91a6
PEP 3333: Simplify and clairify SERVER_PORT (#1818) (#1817)
There was confusion around what to do with SERVER_PORT if HTTP_HOST is
sent. Now it's clear these two variables are only used if HTTP_HOST is
not present.
2021-02-15 20:00:35 -08:00
Inada Naoki dcf77ae9b0
PEP 624: Add a discussion link in python-dev (#1818) 2021-02-15 17:36:09 +09:00
Inada Naoki 1653e14d8b
PEP 597: Update (#1799) 2021-02-14 23:06:57 +09:00
Matej Dujava 7d7965bf2d
PEP 636: Add missing colons at the end of case statement (#1815)
Signed-off-by: Matej Dujava <mdujava@kocurkovo.cz>

Co-authored-by: Matej Dujava <mdujava@win.kocurkovo.cz>
2021-02-13 07:58:28 -08:00
JimJJewett d0a76d4ffc
PEP 647: comment about backwards-compatibility (#1813) 2021-02-12 14:19:16 -08:00
JimJJewett b51b797708
PEP 647: clarify why type guards are not just a boolean (#1812) 2021-02-12 14:17:43 -08:00
Brandt Bucher f304c6f353
brandtbucher@gmail.com -> brandt@python.org (GH-1814) 2021-02-11 14:32:18 -08:00
Ned Deily f537847712
Update 3.7.x and 3.6.x release dates 2021-02-11 11:35:20 -05:00
Petr Viktorin 4e2254a52a
PEP 652: Maintaining the Stable ABI (#1810) 2021-02-10 00:52:48 +01:00
Mario Corchero c19863770f
PEP648: Updates from discourse thread (#1811)
Some clarifications from discussions in the discourse thread.
2021-02-09 12:08:58 -08:00
Brett Cannon bb4751379a
Many PEPs: Normalize the 'Created' field (#1805) 2021-02-09 08:54:26 -08:00
Gus Monod 1d68240e87
PEP 646: Fix typo in the example code (#1808) 2021-02-09 07:38:54 -08:00
Brandt Bucher 604b51399c
PEP 634/635/636: Accept! (#1807) 2021-02-08 16:37:04 -08:00
Hugo van Kemenade 58718c543e
Lint RST on GitHub Actions and fix PEP 646 (#1802) 2021-02-08 07:20:51 -08:00
Matthew Rahtz 68794b15c3
PEP 646: Update based on typing-sig discussions (#1781)
* PEP 646: Simplify based on typing-sig discussions

Feature removals:
* Remove `Map` (to be added in a separate PEP)
* Remove support for all forms of concatenation other than simply prefixing of a single `TypeVarTuple` (fancier forms of concatenation to also be added in a separate PEP)

Semantic changes:
* Try switching `Ts` back to mean the 'unpacked' version (such that `Ts = int, str; Tuple[Ts] = Tuple[int, str]`) to see whether everything still works. (Might revert this, pending future discussion in typing-sig.)

* PEP 646: Clarify that prefixing is not allowed in Callable

* Update PEP 646 based on discussions in typing-sig

Semantic changes:
* Switch back to `Ts` meaning types packed in a `Tuple`
* Disallow unpacked usages of `Ts`
* Unparameterised `Tensor` behaves like `Tensor[Any, ...]`

Clarifications:
* `TypeVarTuple`s are invariant
* `TypeVarTuple`s can not be bound to unknown-length types (e.g. `Tuple[int, ...]`
* `TypeVarTuple`s can not be bound to unions of types
* Empty `*args` behaves like `Tuple[()]`
* `TypeVarTuple`s can not appear in slices

Readability changes:
* Reorder some sections for better flow

* Update PEP 646 with Eric's suggestions and other tweaks

Semantic changes:
* Revert to `*args: *Ts` for new behaviour, and `*args: Tuple[*Ts]` for old behaviour

Fixes:
* Unpacking in Aliases/Ideal Array Type sections
* Various typo/grammar fixes

Other:
* State explicitly that TypeVarTuples can be used in callback protocols
2021-02-07 08:29:17 -08:00
Brett Cannon 6f091c5969
PEP 648: some touch-ups (#1801) 2021-02-06 14:30:43 -08:00
Stefano Borini cdfc88bebe
PEP 637 Added "how to teach" section (#1800) 2021-02-06 10:18:02 -08:00
Brett Cannon 9e81dc8092
PEP 427: clarify how the build tag plays into wheel file selection (#1798) 2021-02-05 14:36:00 -08:00
Hugo van Kemenade a2890cf4bc
PEP 621, 635, 637, 639, 642, 644, 645, 647, 650: Fix single backticks (#1797) 2021-02-05 08:09:26 -08:00
Inada Naoki 814daa8aea
PEP 624: Update alternative ideas (#1793)
Add note about we can avoid creating a temporary Unicode object
in deprecated APIs for some codecs.
2021-02-04 17:39:05 +09:00
Barry Warsaw d3f48ed58f
Fix case of "Python" in PEP 637 (#1794) 2021-02-03 19:22:25 -08:00
Dustin Ingram 3b0098ad9a
PEP 650: Fix typos, improve example (#1792) 2021-02-03 14:35:49 -08:00
Marti Raudsepp 9b64c6ea75
Various typo/grammar/style fixes (#1789)
Changes detected by Topy (https://github.com/intgr/topy), all changes
verified by hand, false positives have been omitted.

These range from straight-out misspellings to debatable hyphen placement.
The hyphen changes are supported by grammar manuals of style.
2021-02-03 06:06:23 -08:00
Pablo Galindo 4dac5c2699 PEP-619: Update the date of the release of Python3.10.0a5 2021-02-03 11:05:36 +00:00
Kevin P. Fleming faf6247812
PEP 639: Changes for clarity and consistency (#1780) 2021-02-02 12:58:38 -08:00
Stefano Borini 476f8b8703
PEP 637: Added clause for star unpacking leaving the index as a tuple (GH-1790) 2021-02-01 09:33:55 -08:00
Inada Naoki 6c41262962
PEP 597: Refinement (#1791) 2021-01-31 12:44:30 +09:00