Commit Graph

23858 Commits

Author SHA1 Message Date
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
Terry Jan Reedy 0ec57e25c9
bpo-16781: In 'exec' doc, add 'nonlocal' to 'yield' and 'return' (GH-2446)
These 3 statements cannot be used at module scope -- nor in exec with one namespace.
2021-02-07 00:28:50 -05:00
Andrew Tennikoff 5f18c22339
Simple typo fix (GH-24448) 2021-02-05 10:17:01 -08:00
Raymond Hettinger 755c6e637a
Minor readability improvements. Also note performance impact of __slots__. (GH-24456) 2021-02-04 22:05:42 -08:00
Dong-hee Na f917c243c5
bpo-43106: Add os.O_EVTONLY/O_FSYNC/O_SYMLINK/O_NOFOLLOW_ANY (GH-24428) 2021-02-04 08:32:55 +09:00
Pablo Galindo 8d998f140e Python 3.10.0a5
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEz9yiRbEEPPKl+Xhl/+h0BBaL2EcFAmAZufEACgkQ/+h0BBaL
 2EeK0BAAsOwjU6I7Rqg6qOIVaOmTS/WuZIvGFPb8sP6AXFrHSsjU4o93ekn+fsQe
 qYqrOEDwKHLDT4hLKOMohJBzX++Y4o/yUYqgg+HTeHgBV0f6zMVJcC8PuMsxzWfC
 /tjgUZRjgC6v7yN8KTHrslC2me1ayN9hJHMB4MKwvnTsmekWLauqaQJ7KEedfaQa
 lcDUf8ceu7t/riPZQFnoo6jdlt1A83pmGpLw05I/BEOiNktiow3f8fEDTQ0bkDdZ
 FC8RGGXoSVtwE2+O0w0j0LiHOLd6/9C4dcxtKZw0JfU6Ns8dnnJaX+gpvzKFz0MK
 vQQGw0eNovNFuvBq6GxCsZfwwNKPl2hjlntFXzXUIXqNeWGmfj7Bc1ZWDl7RNUjl
 2XB6jTCXppAfrUPNt5OROKdhxzuAdaO6gZDtuc641ikhGk9GPlgqakmf81uZ++ow
 QnUhMeeJm0b2+lSQTotlq7EzlbwywOu0la9dxYFrOsgiez6e9HVpbwiFSrLySZ5t
 7tvFLZH80A7ScmrQvc57fTZVt+jLsfwgPxITuz0GYbRsd7I6UzA0gvLdMIhciazt
 sdoKkV8NiPfk/A1IlvU/bggC1K/Vxq5MeuPNSaGY8ghe2907w2l308GajjlSOn6v
 wGPbc3QwiNugE1UTiqunQW6DbO7AfG54p4FCnEL9PqMatnajIVg=
 =SPAs
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEz9yiRbEEPPKl+Xhl/+h0BBaL2EcFAmAaP0MACgkQ/+h0BBaL
 2EdeMg//dk70PDP4yakQD2GUSg9ZG1spfA5JyYNauZwaDtHC/XbJLn4d6hbXilKR
 F9Xye18j14fIjRmD7swVumF+c1BP5qxAKkpAB7/hn6xcNmmuHFQnNvwRO50s49EZ
 Btu3mhigf+e4Nymdptw01SQGYhU5ntlHLnsP/NKYqpAihwlBhiZPwvmdgNgUm/Or
 d1MYG7lCcrjIRHJwu1SfJFqpmWfd79JR72HKchvukrvmg+LN3dfDQCAIznwt4G/C
 aZlERAMC9mFMtVKRkcimMDqOUhOrFXcKb7UMqVmIGKwSiwASl24J240aMB0aOnSl
 7BmvIzFnzhtXK4yh+Jd8zyuGjgv2kiir17nRWf5KL6OWiWnNyqnNVgHC5JtkjpQs
 iow+7d3EwwQ/X7UEzg8njcwsY/H+BhaIZFircHQvQ7T3G8BUAzOj+LXoI5C+NI99
 1rTf3KGcNIb4TjyJ/jVQiOkV+JLh54BretrplkkqCJY7h3Obir+PkDVYVd0UBJrf
 wegHfomHOPo9+IHRgKb3RPygSlTRHRgCbN9tc3ciZeMH+4uNS/W2KW1BxYpdezdT
 zUm5NakK5eksggtd3kH9gcLh+2LmjYWPP+IZ76xvBNZK3JfaCqAaC42HyY1WtLak
 NRUCkmY7kPr3RE04f+xMnMSkMBV5Tkugc4FuL02OMvVbnFi8gHI=
 =w2k/
 -----END PGP SIGNATURE-----

Merge tag 'v3.10.0a5'

Python 3.10.0a5
2021-02-03 06:14:25 +00:00
diegoe a98fe02d73
bpo-43082: Remove redundant 'the' in Descriptor howto (GH-24394) 2021-02-02 19:28:36 -08:00
Steve Dower 1ba08a121a
Add link to Microsoft docs for limitations in Windows Store package (GH-24422) 2021-02-03 01:13:43 +00:00
Ken Jin 2edaf6a4fb
bpo-8264: Document hasattr and getattr behavior for private attributes (GH-23513)
Clarify ``getattr`` and ``setattr`` requirements for accessing name-mangled attributes

Co-Authored-By: Catalin Iacob <iacobcatalin@gmail.com>
2021-02-02 13:06:57 -08:00
Pablo Galindo b0478d738a
Fix Sphynx syntax in the memory.rst document 2021-02-02 20:45:36 +00:00
Pablo Galindo 58fb156edd
bpo-42997: Improve error message for missing : before suites (GH-24292)
* Add to the peg generator a new directive ('&&') that allows to expect
  a token and hard fail the parsing if the token is not found. This
  allows to quickly emmit syntax errors for missing tokens.

* Use the new grammar element to hard-fail if the ':' is missing before
  suites.
2021-02-02 19:54:22 +00:00
Aviral Srivastava 000cde5984
bpo-38307: Add end_lineno attribute to pyclbr Objects (GH-24348)
For back-compatibility, make the new constructor parameter for public classes Function and Class
keyword-only with a default of None.

Co-authored-by: Aviral Srivastava <aviralsrivastava@Avirals-MacBook-Air.local
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-02-01 12:38:44 -05:00
Pablo Galindo a776da90b8
bpo-42927: Update the What's new entry for LOAD_ATTR optimizations (GH-24383) 2021-01-31 22:55:48 +00:00
Adorilson Bezerra 89294e30ff
Doc: errors tutorial improvements (GH-16269)
Improvements:

- Improvements in how try clause works section
  This suggestion is because the execution continues after *except*, not after *try* but before *except*. I guess this form more clear.

- Surrounding some keywords with \*...\*
  For uniformity the highlighted terms  

- Adjust the number of chars per line to 80
2021-01-30 22:07:11 -08:00
L e603443642
bpo-43059: Remove reference to legacy external sqlite3 repository (GH-24364) 2021-01-31 07:19:07 +02:00
Ian Wienand 62437a2fa9
bpo-43047: logging.config formatters documentation update (GH-24358)
The documentation for some parts of the logging.config formatters has
fallen behind the code.  For example, the dictionary-schema section
does not list the "class" attribute, however it is discussed in the
file/ini discussion; and neither references the style argument which
has been added.

This modifies the dictionary-schema formatters documentation to list
the keys available and overall makes it clearer these are passed to
create a logging.Formatter object.

The logging.Formatter documentation describes the default values of
format/datefmt and the various formatting options.  Since we have now
more clearly described how the configuration is created via this type
of object, we remove the discussion in this document to avoid
duplication and rely on users reading the referenced logging.Formatter
documenation directly for such details.

Instead of duplicating the discussion for the two config types, the
file/ini section is modified to link back to the dictionary-schema
discussion, making it clear the same arguments are accepted.

Automerge-Triggered-By: GH:vsajip
2021-01-30 02:37:15 -08:00
Steve Dower 62949f697f
bpo-41282: Add deprecation warning and docs for distutils (PEP 632) (GH-24355) 2021-01-29 21:48:55 +00:00
Jules Lasne 6baaae589d
Fixing typos in turtle.rst (GH-24376)
Automerge-Triggered-By: GH:JulienPalard
2021-01-29 13:40:45 -08:00
Jules Lasne 6372a4ceba
Fixed typo in turtle.rst (GH-24371)
Found it while translating it to french 🤷

Automerge-Triggered-By: GH:JulienPalard
2021-01-29 09:46:39 -08:00
Victor Stinner 64fc105b2d
bpo-42955: Remove sub-packages from sys.stdlib_module_names (GH-24353) 2021-01-28 00:03:23 +01:00
Ken 7a34380ad7
bpo-43008: Make IDLE respect sys.excepthook (GH-24302)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-01-26 18:55:52 -05:00
Irit Katriel dea5bf9d15
bpo-33387: update documentation for exception handling opcode changes (GH-24334)
* bpo-33387: remove obsolete comment

* bpo-33387: update SETUP_WITH opcode documentation
2021-01-26 10:17:13 +00:00
Pablo Galindo c92cd0f3c8
Fix minor typo in the rest format in the enum docs (GH-24335) 2021-01-25 23:23:30 +00:00
Pablo Galindo 7c8e0b0336
Document new parenthesized with statements (GH-24281) 2021-01-25 23:15:51 +00:00
Ethan Furman 7aaeb2a3d6
bpo-38250: [Enum] single-bit flags are canonical (GH-24215)
Flag members are now divided by one-bit verses multi-bit, with multi-bit being treated as aliases. Iterating over a flag only returns the contained single-bit flags.

Iterating, repr(), and str() show members in definition order.

When constructing combined-member flags, any extra integer values are either discarded (CONFORM), turned into ints (EJECT) or treated as errors (STRICT). Flag classes can specify which of those three behaviors is desired:

>>> class Test(Flag, boundary=CONFORM):
...     ONE = 1
...     TWO = 2
...
>>> Test(5)
<Test.ONE: 1>

Besides the three above behaviors, there is also KEEP, which should not be used unless necessary -- for example, _convert_ specifies KEEP as there are flag sets in the stdlib that are incomplete and/or inconsistent (e.g. ssl.Options). KEEP will, as the name suggests, keep all bits; however, iterating over a flag with extra bits will only return the canonical flags contained, not the extra bits.

Iteration is now in member definition order.  If member definition order
matches increasing value order, then a more efficient method of flag
decomposition is used; otherwise, sort() is called on the results of
that method to get definition order.


``re`` module:

repr() has been modified to support as closely as possible its previous
output; the big difference is that inverted flags cannot be output as
before because the inversion operation now always returns the comparable
positive result; i.e.

   re.A|re.I|re.M|re.S is ~(re.L|re.U|re.S|re.T|re.DEBUG)

in both of the above terms, the ``value`` is 282.

re's tests have been updated to reflect the modifications to repr().
2021-01-25 14:26:19 -08:00
Victor Stinner 9852cb3811
bpo-42955: Rename module_names to sys.stdlib_module_names (GH-24332)
* Rename _Py_module_names to _Py_stdlib_module_names.
* Rename Python/module_names.h to Python/stdlib_module_names.h.
2021-01-25 23:12:50 +01:00
Serhiy Storchaka f066bd94b9
bpo-37319: Improve documentation, code and tests of randrange. (GH-19112) 2021-01-25 23:02:04 +02:00
Julien Palard 5c1f15b4b1
bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282) 2021-01-25 15:46:06 +01:00
Victor Stinner 483359174e
bpo-42955: Fix sys.module_names doc (GH-24329)
Replace versionchanged markup with versionadded.
2021-01-25 13:59:02 +01:00
Victor Stinner db584bdad3
bpo-42955: Add sys.modules_names (GH-24238)
Add sys.module_names, containing the list of the standard library
module names.
2021-01-25 13:24:42 +01:00
Serhiy Storchaka cf19cc3b92
bpo-27772: Make preceding width with 0 valid in string format. (GH-11270)
Previously it was an error with confusing error message.
2021-01-25 11:56:33 +02:00
Illia Volochii b745a6143a
bpo-42996: Update a reference to PKCS #5 in hashlib docs to version 2.1 (GH-24289)
RFC 8018 superseded RFC 8018.

Automerge-Triggered-By: GH:tiran
2021-01-22 04:06:00 -08:00
Борис Верховский 644d52818a
bpo-40304: Correct type(name, bases, dict) doc (GH-19553)
Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
2021-01-22 00:47:23 -05:00