Commit Graph

23890 Commits

Author SHA1 Message Date
Pablo Galindo 62e3b6370c
Add an attribution to the Green Tree Snakes in the AST docs (GH-24727) 2021-03-03 18:25:41 +00:00
Ethan Furman 44e580f448
bpo-43162: [Enum] update docs, renable doc tests (GH-24487)
* update docs, renable doc tests
* make deprecation warning active for two releases
2021-03-03 09:54:30 -08:00
Julien Palard b04f1cb9df
Doc: typo fix. (GH-24721) 2021-03-03 11:32:12 +01:00
Ken Jin 727a68b6e5
Reorder contents of 3.10's What's New (#24687) 2021-03-02 16:52:03 -08:00
Adorilson Bezerra a347bc0b35
Doc: Improve library/json document. (GH-24390) 2021-03-02 10:51:58 +09:00
Erik Soma 72fcd14a82
bpo-42840: Document providing kwargs to type. (#24173)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-03-01 15:21:04 -08:00
Jules Lasne dbfabcc0c3
Fixed linenumber missing when audit hook has an error (GH-24692)
See https://github.com/sphinx-doc/sphinx/issues/8932

Co-authored-by: tk0miya <i.tkomiya@gmail.com>
2021-03-01 22:59:58 +01:00
Pablo Galindo 4b7f4ff168 Python 3.10.0a6
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEz9yiRbEEPPKl+Xhl/+h0BBaL2EcFAmA9GvwACgkQ/+h0BBaL
 2EdANQ//ZXng28iguSWtQl3g9jMaxGHsau/yLgCoGte5gTgnmYfMJW4mL9kH0oKP
 ich0LgZKnyaqhYrW+ynVU4x3LFNm/TbDl0KCumz1bZ5f7ejvEVX7cEPZmyMh3jxc
 GmlnGHrUvlrfsi1ggtzt4neSwgu6/hzR9BkH8j61mC4gE3XdsfuxEOoBQmh2zL2X
 CzZqORBSiddwpheUO81DdxePsJKceJ7LR0N6iIlz1TFuDMnwdOnTjP5eqptzuhYt
 fIbYK7QhzMTX3yC3bIQW/0P4G6vr8osIH+0YG6MXWrWKfhdfSb1ZsDEBNuQVGBeQ
 2ENzsA+SMSOS91gSduAo+CKIJeXZHoAaobbW8/a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JA59GgRvAs0WiCNpSR6yKLpMu5G+xrO0gu524xWIGFGx
 Iib+mxXzjJZGGg4scYGkd51Bi9PbH8DvujUtqJo4rZZ3vNitgV8=
 =1XC3
 -----END PGP SIGNATURE-----

Merge tag 'v3.10.0a6'

Python 3.10.0a6
2021-03-01 19:41:45 +00:00
Mariatta Wijaya f193874056
Fix grammar in enum documentation. (GH-24689)
There is an extra `s` in the singular word `method`.
Reported in docs mailing list by Steven Nguyen.

Automerge-Triggered-By: GH:Mariatta
2021-03-01 10:56:03 -08:00
Pablo Galindo cc12888f9b
Remove unused suspicious rule in the docs 2021-03-01 16:48:59 +00:00
Erlend Egeberg Aasland f4d7d46cb4
closes bpo-43349: Fix tuning(7) manpage hyperlink. (GH-24680) 2021-03-01 08:44:46 -06:00
Ned Deily a65b050516
bpo-42603: Add whatsnew and ACKS entries. (GH-24675) 2021-03-01 00:27:20 -05:00
Daniel F Moisset a22bca6b1e
bpo-42128: Add documentation for pattern matching (PEP 634) (#24664)
This is a first edition, ready to go out with the implementation. We'll iterate during the rest of the period leading up to 3.10.0.

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandt@python.org>
Co-authored-by: Raymond Hettinger <1623689+rhettinger@users.noreply.github.com>
Co-authored-by: Guido van Rossum <guido@python.org>
2021-02-28 20:08:38 -08:00
Pablo Galindo a8e2615aa8
bpo-42128: Add documentation for the new match-based AST nodes (GH-24673)
* bpo-42128: Add documentation for the new match-based AST nodes

* Update Doc/library/ast.rst

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>

* Fix trailing whitespace

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2021-02-28 18:08:37 -08:00
Carol Willing 41934b399b
GH-42128: Add Pattern Matching to What's New (#24667)
* Add Pattern Matching to What's New

* add review suggestions

* fix stray indent

* Add suggestions from gvr and lr

* trim whitespace
2021-02-28 15:43:17 -08:00
Dennis Sweeney e8f5ddd33e
Add whatsnew note for GH-22904 (#24672) 2021-02-28 15:32:04 -06:00
Paul Bryan 1e3c68246e
bpo-43345: Enhance TypedDict documentation. (#24668) 2021-02-27 23:02:14 -08:00
Brandt Bucher 145bf269df
bpo-42128: Structural Pattern Matching (PEP 634) (GH-22917)
Co-authored-by: Guido van Rossum <guido@python.org>
Co-authored-by: Talin <viridia@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2021-02-26 14:51:55 -08:00
Alex cc02b4f2e8
bpo-38302: __pow__/__rpow__ now called when __ipow__ returns NotImplemented (#16459) 2021-02-26 11:58:39 -08:00
takahashi 25935a2881
Update logging.config.rst (GH-24630)
# a typo fix

Automerge-Triggered-By: GH:vsajip
2021-02-26 02:30:05 -08:00
Guanzhong Chen 32181be608
bpo-43293: Doc: move note about GIL to top of threading module (GH-24622)
The note about the GIL was buried pretty deep in the threading documentation,
and this made it hard for first time users to discover why their attempts
at using threading to parallelizing their application did not work.

In this commit, the note is moved to the top of the module documention for
visibility.
2021-02-24 18:39:38 +00:00
Terry Jan Reedy 2827e8a177
bpo-43283: Add IDLE doc paragraph about print speed (GH-24615)
Printing to IDLE's Shell is often slower than printing to a system
terminal, but it can be made faster by pre-formatting a single
string before printing.
2021-02-23 19:39:51 -05:00
Inada Naoki 2d6f2eed14
bpo-36346: Document removal schedule of deprecate APIs (GH-20879)
We will remove wstr cache in Python 3.12. See PEP 623.
2021-02-23 08:06:51 +09:00
Inada Naoki 5a4aa4c03e
bpo-23882: Doc: Clarify unittest discovery document (GH-21560)
Unittest discovery support namespace package as start
directory. But it doesn't find namespace package in
the start directory automatically.

Otherwise, unittest discovery search into unexpected
directories like `vendor/` or `node_modules/`.
2021-02-22 15:14:26 +09:00
Terry Jan Reedy 4cf7bb8e22
bpo-43283: Rearrange some IDLE doc paragraphs. (GH-24604)
In the Running User Code section, gather together paragraphs about two
processes and the sys.stdstream replacements, preparing to add another.
2021-02-21 02:44:11 -05:00
Terry Jan Reedy 2f9ef514fb
bpo-27646: Say that 'yield from' expression can be any iterable (GH-24595)
Previously, the doc at least strongly implied that it had to be an iterator.
2021-02-20 21:33:25 -05:00
Pablo Galindo d439fb304c
bpo-43277: Add PySet_CheckExact to the C-API (GH-24598)
For some mysterious reason we have PySet_Check, PyFrozenSet_Check, PyAnySet_Check, PyAnySet_CheckExact and PyFrozenSet_CheckExact but no PySet_CheckExact.
2021-02-20 18:03:08 +00:00
Victor Stinner 46496f9d12
bpo-42990: Functions inherit current builtins (GH-24564)
The types.FunctionType constructor now inherits the current builtins
if the globals dictionary has no "__builtins__" key, rather than
using {"None": None} as builtins: same behavior as eval() and exec()
functions.

Defining a function with "def function(...): ..." in Python is not
affected, globals cannot be overriden with this syntax: it also
inherits the current builtins.

PyFrame_New(), PyEval_EvalCode(), PyEval_EvalCodeEx(),
PyFunction_New() and PyFunction_NewWithQualName() now inherits the
current builtins namespace if the globals dictionary has no
"__builtins__" key.

* Add _PyEval_GetBuiltins() function.
* _PyEval_BuiltinsFromGlobals() now uses _PyEval_GetBuiltins() if
  builtins cannot be found in globals.
* Add tstate parameter to _PyEval_BuiltinsFromGlobals().
2021-02-20 15:17:18 +01:00
Irit Katriel 292f23186c
Fix typo in dis module doc (GH-24509) 2021-02-20 09:52:37 +05:30
Terry Jan Reedy b30fcba3a8
bpo-43042: Augment tutorial sentence (GH-24514)
Calling same function also gets new local namespace.
2021-02-19 19:26:21 -05:00
Erlend Egeberg Aasland 2d3e463e4a
closes bpo-43266: Improve array formatting. (GH-24573) 2021-02-19 09:32:31 -06:00
Nicholas Sim 4a6bf276ed
bpo-35134: Move non-limited C API files to Include/cpython/ (GH-24561)
Include/{odictobject.h,parser_interface.h,picklebufobject.h,pydebug.h,pyfpe.h}
into Include/cpython/.

Parser: peg_api: include Python.h instead of parser_interface.h.
2021-02-19 15:55:46 +01:00
Erlend Egeberg Aasland e92d67dfbb
closes bpo-43254: Fix *snprintf() man page refs. (GH-24563) 2021-02-18 19:53:33 -06:00
Jeremy Paige 743932d508
Remove all links to mingw.org (GH-24552)
This lease on this domain has lapsed. This not only makes these dead links, but a potential attack vector for readers of python.org as the domain can be obtained by an untrustworthy party.


I considered redirecting these links to http://mingw-w64.org/ which is a maintained fork of mingw, but beyond my unfamiliarity with the exact level of compatibility, at the time of this PR that site had an expired cert and so is not much of a vulnerability fix.

Automerge-Triggered-By: GH:Mariatta
2021-02-18 11:43:35 -08:00
Victor Stinner 44085a3fc9
bpo-42990: Refactor _PyFrame_New_NoTrack() (GH-24566)
* Refactor _PyFrame_New_NoTrack() and PyFunction_NewWithQualName()
  code.
* PyFrame_New() checks for _PyEval_BuiltinsFromGlobals() failure.
* Fix a ref leak in _PyEval_BuiltinsFromGlobals() error path.
* Complete PyFunction_GetModule() documentation: it returns a
  borrowed reference and it can return NULL.
* Move _PyEval_BuiltinsFromGlobals() definition to the internal C
  API.
* PyFunction_NewWithQualName() uses _Py_IDENTIFIER() API for the
  "__name__" string to make it compatible with subinterpreters.
2021-02-18 19:20:16 +01:00
David CARLIER 7be00ee64a
bpo-42960: Add resource.RLIMIT_KQUEUES constant from FreeBSD (GH-24251) 2021-02-18 16:26:20 +01:00
Victor Stinner a3c3ffa68e
bpo-42990: Add __builtins__ attribute to functions (GH-24559)
Expose the new PyFunctionObject.func_builtins member in Python as a
new __builtins__ attribute on functions.

Document also the behavior change in What's New in Python 3.10.
2021-02-18 12:35:37 +01:00
Victor Stinner 801bb0b503
bpo-43103: Add configure --without-static-libpython (GH-24418)
Add a new configure --without-static-libpython option to not build
the libpythonMAJOR.MINOR.a static library and not install the
python.o object file.

Fix smelly.py and stable_abi.py tools when libpython3.10.a is
missing.
2021-02-17 11:14:42 +01:00
Erlend Egeberg Aasland cc54001c2e
bpo-40170: Always define PyIter_Check() as a function (GH-24548) 2021-02-16 16:05:58 +01:00
Erlend Egeberg Aasland 871eb4237b
bpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535) 2021-02-16 08:50:00 +01:00
Pablo Galindo 813db24f7c
Add a warning block around the get_referrers() documentation (GH-24511) 2021-02-15 23:03:38 +00:00
Ken Jin a2f0654b0a
bpo-42967: Fix urllib.parse docs and make logic clearer (GH-24536) 2021-02-15 09:00:20 -08:00
Erlend Egeberg Aasland 4bb2a1ebc5
bpo-43181: Convert PyObject_TypeCheck to static inline function (GH-24533) 2021-02-15 17:19:24 +01:00
Adam Goldschmidt fcbe0cb04d
bpo-42967: only use '&' as a query string separator (#24297)
bpo-42967: [security] Address a web cache-poisoning issue reported in urllib.parse.parse_qsl().

urllib.parse will only us "&" as query string separator by default instead of both ";" and "&" as allowed in earlier versions. An optional argument seperator with default value "&" is added to specify the separator.


Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>
2021-02-14 14:41:57 -08:00
Zackery Spytz 762fe7deed
bpo-43200: Fix link to shutil.copy() in the shutil doc (GH-24505)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-02-12 23:57:12 -05:00
Gregory P. Smith fd053fdd39
bpo-43172: readline now passes its tests when built against libedit (GH-24499)
bpo-43172: readline now passes its tests when built against libedit.

Existing irreconcilable API differences remain in readline.get_begidx
and readline.get_endidx behavior based on libreadline vs libedit use.
A note about that has been documented.
2021-02-12 12:04:46 -08:00
Tom Forbes 749d40a53f
Fix link to sqlite3 enable_shared_cache documentation (GH-24496) 2021-02-10 19:56:16 +02:00
Ken Jin da21f7b6e1
bpo-41824: Add versionadded for typing.ForwardRef docs (#24224) 2021-02-08 17:58:50 -08:00
Ken Jin 5f77dee056
Improve docs of PEP 604 Union (#24301) 2021-02-08 17:57:11 -08:00
Raymond Hettinger 30a8b28396
bpo-43147: Remove archaic terminology. (GH-24462) 2021-02-07 16:44:42 -08:00