Commit Graph

24019 Commits

Author SHA1 Message Date
Christian Heimes b467d9a240
bpo-43522: Fix SSLContext.hostname_checks_common_name (GH-24899)
Fix problem with ssl.SSLContext.hostname_checks_common_name. OpenSSL does not
copy hostflags from *struct SSL_CTX* to *struct SSL*.

Signed-off-by: Christian Heimes <christian@python.org>
2021-04-17 10:07:19 +02:00
Ikko Ashimine cfaa2d338b
Fix typo in exceptions.rst (GH-25434)
attemps -> attempts
2021-04-17 12:02:53 +05:30
Zackery Spytz adf24bd835
bpo-43856: Add a versionadded directive to the importlib.metadata docs (GH-25445)
Use a versionadded directive to generate the text "New in version
3.8." (to match with the documentation of other modules).

Automerge-Triggered-By: GH:jaraco
2021-04-16 16:13:38 -07:00
Victor Stinner 62ec638648
bpo-43862: Enhance -W cmdline option documentation (GH-25439)
The -W format is "action:message:category:module:lineno".

Update also the Python manual page.
2021-04-16 19:12:14 +02:00
Pablo Galindo ff3d9c0f1a
Improve the section with SyntaxError message improvements to the What's New of 3.10 (GH-25428) 2021-04-16 01:28:48 +01:00
Pablo Galindo b280248be8
bpo-43822: Improve syntax errors for missing commas (GH-25377) 2021-04-15 21:38:45 +01:00
Jason R. Coombs 23acadcc1c
bpo-37741: make importlib.metadata docs discoverable through a module directive. (GH-25415)
Automerge-Triggered-By: GH:jaraco
2021-04-14 17:56:21 -07:00
Zackery Spytz 0c4c436325
Fix typo in 3.10's What's New documentation (GH-25409)
"occured" ->  "occurred"
2021-04-14 09:16:11 -07:00
Pablo Galindo 5bf8bf2267
bpo-38530: Offer suggestions on NameError (GH-25397)
When printing NameError raised by the interpreter, PyErr_Display
will offer suggestions of simmilar variable names in the function that the exception
was raised from:

    >>> schwarzschild_black_hole = None
    >>> schwarschild_black_hole
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    NameError: name 'schwarschild_black_hole' is not defined. Did you mean: schwarzschild_black_hole?
2021-04-14 15:10:33 +01:00
Pablo Galindo c4073a24f9
Fix typo in the What's New for 3.10 (GH-25396) 2021-04-14 14:16:47 +01:00
Erlend Egeberg Aasland 3386ca0b36
bpo-20364: Improve sqlite3 placeholder docs (GH-25003) 2021-04-14 15:28:55 +03:00
Inada Naoki 333d10cbb5
bpo-43712 : fileinput: Add encoding parameter (GH-25272) 2021-04-14 14:12:58 +09:00
Bob Kline 133705b85c
bpo-43777: Drop description of "pip search" command from tutorial (GH-25287) 2021-04-14 14:09:32 +09:00
Pablo Galindo 37494b441a
bpo-38530: Offer suggestions on AttributeError (#16856)
When printing AttributeError, PyErr_Display will offer suggestions of similar 
attribute names in the object that the exception was raised from:

>>> collections.namedtoplo
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'collections' has no attribute 'namedtoplo'. Did you mean: namedtuple?
2021-04-14 02:36:07 +01:00
Lewis Gaul 11159d2c9d
bpo-43080: pprint for dataclass instances (GH-24389)
* Added pprint support for dataclass instances which don't have a custom __repr__.
2021-04-13 19:59:24 -04:00
Inada Naoki 695d47b51e
bpo-43785: Update bz2 document (GH-25351) 2021-04-14 08:22:49 +09:00
Julien Palard fd79af7ae2
Doc: Try to enhance wording on circular imports. (GH-24705) 2021-04-13 18:03:22 +02:00
Inada Naoki c2b7a66b91
bpo-43731: Add an `encoding` parameter to logging.fileConfig() (GH-25273) 2021-04-13 18:17:03 +09:00
Victor Stinner 85918e4ab6
bpo-43774: Add more links to configure options (GH-25363) 2021-04-12 23:27:35 +02:00
Pablo Galindo 20ac34772a
Fix Sphinx errors in the documentation and re-activate the suspicious check (GH-25368)
The suspicious check is still executed as part of the release process and release managers have been
lately fixing some actual errors that the suspicious target can find. For this reason, reactivate the suspicious
until we decide what to do in a coordinated fashion.
2021-04-12 20:53:15 +01:00
Ken Jin 37a5e22023
Use double quotes over single quotes for match statement grammar (GH-24943) 2021-04-12 10:03:20 -07:00
Victor Stinner 2459b92a4d
bpo-43774: Remove --without-cycle-gc doc (GH-25364)
The configure --without-cycle-gc option has been removed in Python
2.3 by the commit cccd1e7248. It's now
time to remove the last reference to it in the documentation.
2021-04-12 16:58:45 +01:00
Zackery Spytz 67c0b3d89c
bpo-41661: Document os.path.relpath() exception on Windows with different drives (GH-25346) 2021-04-12 16:39:31 +01:00
Cédric Krier e126547c07
bpo-34311: Add locale.localize (GH-15275)
* Add method localize to the locale module
* Update the documentation of the locale module
2021-04-12 14:17:40 +02:00
Jelle Zijlstra 9825bdfbd5
bpo-43723: Deprecate camelCase aliases from threading (GH-25174)
The snake_case names have existed since Python 2.6, so there is
no reason to keep the old camelCase names around. One similar
method, threading.Thread.isAlive, was already removed in
Python 3.9 (bpo-37804).
2021-04-12 10:42:53 +02:00
Victor Stinner 553ee2781a
bpo-43682: Make staticmethod objects callable (GH-25117)
Static methods (@staticmethod) are now callable as regular functions.
2021-04-12 00:21:22 +02:00
Mark Dickinson 79650d0118
Fix description of behaviour of an exception class in 'from' clause (GH-24303) 2021-04-11 09:33:59 +01:00
Jelle Zijlstra 522433601a
bpo-43783: Add ParamSpecArgs/Kwargs (GH-25298) 2021-04-10 19:57:05 -07:00
Eric V. Smith 750f484752
bpo-43764: Add match_args=False parameter to dataclass decorator and to make_dataclasses function. (GH-25337)
Add match_args=False parameter to dataclass decorator and to make_dataclass function.
2021-04-10 21:28:42 -04:00
Antti Haapala c3a478b7e5
Fix typo about line number in the 3.10 What's New document (GH-25328)
This was a typo copied from PEP 626.
2021-04-11 01:20:41 +01:00
DevilXD ac05f82ad4
bpo-41974: Remove part of the note regarding complex.__float__ (GH-25197)
(The deleted example no longer works and is thus irrelevant.)
2021-04-10 15:36:40 -07:00
Victor Stinner 09bbebea16
bpo-43753: Add Py_Is() and Py_IsNone() functions (GH-25227)
Add the Py_Is(x, y) function to test if the 'x' object is the 'y'
object, the same as "x is y" in Python. Add also the Py_IsNone(),
Py_IsTrue(), Py_IsFalse() functions to test if an object is,
respectively, the None singleton, the True singleton or the False
singleton.
2021-04-11 00:17:39 +02:00
Gregory P. Smith e05a703848
bpo-40701: doc typo historcal -> historical (GH-25334) 2021-04-10 10:55:14 -07:00
Shreyan Avigyan ea9b2d6319
bpo-43739: Add type declaration Doc/extending/extending.rst example 2021-04-10 08:54:32 -07:00
Christian Heimes 2d7fdc9073
bpo-38820: OpenSSL 3.0.0: Use supported hashing algos in doc test (GH-25319)
ripemd160 is not available in OpenSSL 3.0.0's default crypto provider.
It's only present in legacy provider.

Signed-off-by: Christian Heimes <christian@python.org>
2021-04-09 22:23:10 +02:00
Christian Heimes 6f37ebc61e
bpo-43794: OpenSSL 3.0.0: set OP_IGNORE_UNEXPECTED_EOF by default (GH-25309)
Signed-off-by: Christian Heimes <christian@python.org>
2021-04-09 17:59:21 +02:00
Victor Stinner 507a574de3
bpo-43682: @staticmethod inherits attributes (GH-25268)
Static methods (@staticmethod) and class methods (@classmethod) now
inherit the method attributes (__module__, __name__, __qualname__,
__doc__, __annotations__) and have a new __wrapped__ attribute.

Changes:

* Add a repr() method to staticmethod and classmethod types.
* Add tests on the @classmethod decorator.
2021-04-09 17:51:22 +02:00
Victor Stinner bd88ccb943
bpo-43774: Document the Python Build System (GH-25302)
* Elaborate PGO and LTO documentaton.
* Document MAINCC, PURIFY and LINKCC variables.
2021-04-09 14:35:10 +02:00
Victor Stinner 5436695363
bpo-43774: Enhance configure documentation (GH-25293) 2021-04-09 01:58:20 +02:00
Saiyang Gou 1e051a21b7
bpo-39702: Remove dotted_name from decorator documentation (GH-25234) 2021-04-08 15:34:09 -07:00
Victor Stinner f32d022147
bpo-43778: Fix Sphinx glossary_search extension (GH-25286)
Create the _static/ directory if it doesn't exist.

Add also constants for the static directory and the JSON filename.
2021-04-09 00:07:01 +02:00
Victor Stinner a41782cc84
bpo-43774: Document configure options (GH-25283)
Add Doc/using/configure.rst documentation to document configure,
preprocessor, compiler and linker options.

Add a new section about the "Python debug build".
2021-04-08 22:32:21 +02:00
Barney Gale 3f3d82b848
bpo-39899: os.path.expanduser(): don't guess other Windows users' home directories if the basename of the current user's home directory doesn't match their username. (GH-18841)
This makes `ntpath.expanduser()` match `pathlib.Path.expanduser()` in this regard, and is more in line with `posixpath.expanduser()`'s cautious approach.

Also remove the near-duplicate implementation of `expanduser()` in pathlib, and by doing so fix a bug where KeyError could be raised when expanding another user's home directory.
2021-04-07 23:50:13 +01:00
Saiyang Gou 58d72cab89
bpo-36540: Improve doc of function definition regarding positional-only arguments (GH-25235) 2021-04-07 20:06:43 +01:00
Barney Gale 8aac1bea2e
bpo-42999: Expand and clarify pathlib.Path.link_to() documentation. (GH-24294) 2021-04-07 16:56:32 +01:00
Barney Gale abf964942f
bpo-39906: Add follow_symlinks parameter to pathlib.Path.stat() and chmod() (GH-18864) 2021-04-07 16:53:39 +01:00
Saiyang Gou 1be456ae9d
bpo-38605: Update "Future statements" docs since PEP 563 is always enabled (GH-25236)
Update documentation section for "Future statements" to reflect that `from __future__ import annotations` is on by default, and no features require using the future statement now.
2021-04-06 22:02:20 -07:00
Saiyang Gou 0fdf11e8e9
bpo-43755: Update docs to reflect that lambda is not allowed in `comp_if` since 3.9 (GH-25231) 2021-04-06 23:15:37 +01:00
Ken Jin 5143fd15b4
Update pattern matching docs for changes to the PEP (#25185)
See:
- https://github.com/python/peps/pull/1909 (__match_args__ must be a tuple)
- https://github.com/python/peps/pull/1908 (allow keyword patterns for int(x) etc.)
2021-04-06 09:03:00 -07:00
Brett Cannon 57c6cb5100
bpo-42135: Deprecate implementations of find_module() and find_loader() (GH-25169) 2021-04-06 08:56:57 -07:00