Commit Graph

10681 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
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
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
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
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
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
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
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
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
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
Gregory P. Smith e05a703848
bpo-40701: doc typo historcal -> historical (GH-25334) 2021-04-10 10:55:14 -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 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
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
Brett Cannon 57c6cb5100
bpo-42135: Deprecate implementations of find_module() and find_loader() (GH-25169) 2021-04-06 08:56:57 -07:00
Mark Shannon b37181e692
bpo-43683: Handle generator entry in bytecode (GH-25138)
* Handle check for sending None to starting generator and coroutine into bytecode.

* Document new bytecode and make it fail gracefully if mis-compiled.
2021-04-06 11:48:59 +01:00
Gregory P. Smith 1d023e374c
bpo-17305: Link to the third-party idna package. (GH-25208)
So long as we don't have idna2008 in the standard library, we should at least point people to the third-party solution.
2021-04-06 00:55:45 -07:00
Zackery Spytz 14829b09eb
bpo-43087: Fix error in ctypes "Incomplete Types" doc (GH-24404)
The previous "Fundamental data types" section says a c_char_p must be bytes (or None).
2021-04-05 15:21:00 -04:00
Pablo Galindo 57f21db3f6
Fix the "make suspicious" check on the pprint docs (GH-25193) 2021-04-05 17:38:10 +01:00
Serhiy Storchaka b1dc1aacf8
bpo-43084: Return bool instead of int from curses.window.enclose() (GH-24398) 2021-04-05 16:50:24 +03:00
Ken Jin 2b5913b4ee
bpo-41370: Add note about ForwardRefs and PEP585 generic types in docs (#25183) 2021-04-04 08:14:44 -07:00
Ammar Askar b2a91e0c9e
bpo-43705: Document that SyntaxError's offsets are 1-indexed (GH-25153)
Changed the inline mentions of the attributes into a proper attribute list like `SystemExit` has.

Automerge-Triggered-By: GH:gvanrossum
2021-04-02 14:25:31 -07:00
Zackery Spytz afd1265058
bpo-31956: Add start and stop parameters to array.index() (GH-25059)
Co-Authored-By: Anders Lorentsen <Phaqui@gmail.com>
2021-04-03 00:28:35 +09:00
Ethan Furman 49aec1a185
Enum: add (re)import of Flag for doctests (GH-25118)
Fix issue with CI doctest forgetting that ``Flag`` had already been imported.
2021-03-31 09:20:08 -07:00
Terry Jan Reedy 1b4a9c7956
bpo-42225: IDLE - document two unix-related problems. (#25078)
1. Bad IP masquerade rules can prevent startup.
2. X cannot handle some complex colored chars.
2021-03-31 01:19:38 -04:00
Ethan Furman b775106d94
bpo-40066: Enum: modify `repr()` and `str()` (GH-22392)
* Enum: streamline repr() and str(); improve docs

- repr() is now ``enum_class.member_name``
- stdlib global enums are ``module_name.member_name``
- str() is now ``member_name``
- add HOW-TO section for ``Enum``
- change main documentation to be an API reference
2021-03-30 21:17:26 -07:00
Inada Naoki 4827483f47
bpo-43510: Implement PEP 597 opt-in EncodingWarning. (GH-19481)
See [PEP 597](https://www.python.org/dev/peps/pep-0597/).

* Add `-X warn_default_encoding` and `PYTHONWARNDEFAULTENCODING`.
* Add EncodingWarning
* Add io.text_encoding()
* open(), TextIOWrapper() emits EncodingWarning when encoding is omitted and warn_default_encoding is enabled.
* _pyio.TextIOWrapper() uses UTF-8 as fallback default encoding used when failed to import locale module. (used during building Python)
* bz2, configparser, gzip, lzma, pathlib, tempfile modules use io.text_encoding().
* What's new entry
2021-03-29 12:28:14 +09:00
Irit Katriel fb1d01b963
bpo-31907: [doc] clarify that str.format() does not support arbitrary expressions (#25053) 2021-03-28 16:47:20 -04:00
Jason R. Coombs af50c84643
bpo-43644: Add docs for importlib.resources.as_file. (#25048) 2021-03-27 20:25:53 -04:00
Ville Skyttä 9798cef92b
bpo-39616: clarify SSLContext.check_hostname effect (GH-18484)
It doesn't actually affect whether match_hostname() is called (it
never is in this context any longer), but whether hostname
verification occurs in the first place.
2021-03-27 07:20:11 -07:00
Jürgen Gmach 027b669927
bpo-43354: xmlrpc: Fix type documentation for Fault.faultCode (GH-24707)
The type of `faultCode` has to be an `int` instead of a `str`.

cf http://xmlrpc.com/spec.md

Pinging @pganssle
2021-03-26 14:09:09 -07:00
Jared Sutton 21a2cabb37
bpo-43620: Remove reference to os.sep from os.path.join() doc (#25025)
- removed ambiguous reference to os.sep from os.path.join() doc
2021-03-26 12:02:32 -04:00
Inada Naoki b045cdaf34
Doc: io: Remove "In-memory streams" section (GH-24927) 2021-03-25 16:23:50 +09:00
Brett Cannon 9cb31d6716
bpo-42137: have ModuleType.__repr__ prefer __spec__ over module_repr() (GH-24953)
This is to work towards the removal of the use of  module_repr() in Python 3.12 (documented as deprecated since 3.4).
2021-03-24 08:26:56 -07:00
sblondon 3ba3d513b1
bpo-42914: add a pprint underscore_numbers option (GH-24864)
pprint() gains a new boolean underscore_numbers kwarg to emit
integers with thousands separated by an underscore character
for improved readability (for example 1_000_000 instead of 1000000).
2021-03-24 01:23:20 -07:00
Pablo Galindo d9692027f4
bpo-31861: Complete the C-API docs for PyObject_GetAiter and PyAiter_Check (GH-25004) 2021-03-23 23:57:03 +00:00
Joshua Bronson f0a6fde882
bpo-31861: Add aiter and anext to builtins (#23847)
Co-authored-by: jab <jab@users.noreply.github.com>
Co-authored-by: Daniel Pope <mauve@mauveweb.co.uk>
Co-authored-by: Justin Wang <justin39@gmail.com>
2021-03-23 15:47:21 -07:00