Commit Graph

11411 Commits

Author SHA1 Message Date
Taneli Hukkinen 591f6754b5
bpo-40059: Add tomllib (PEP-680) (GH-31498)
This adds a new standard library module, `tomllib`, for parsing TOML.

The implementation is based on Tomli (https://github.com/hukkin/tomli).

## Steps taken (converting `tomli` to `tomllib`)

- Move everything in `tomli:src/tomli` to `Lib/tomllib`. Exclude `py.typed`.
- Remove `__version__ = ...` line from `Lib/tomllib/__init__.py`
- Move everything in `tomli:tests` to `Lib/test/test_tomllib`. Exclude the following test data dirs recursively:
  - `tomli:tests/data/invalid/_external/`
  - `tomli:tests/data/valid/_external/`
- Create `Lib/test/test_tomllib/__main__.py`:

  ```python
  import unittest

  from . import load_tests


  unittest.main()
  ```


- Add the following to `Lib/test/test_tomllib/__init__.py`:

  ```python
  import os
  from test.support import load_package_tests

  def load_tests(*args):
      return load_package_tests(os.path.dirname(__file__), *args)
  ```

  Also change `import tomli as tomllib` to `import tomllib`.

- In `cpython/Lib/tomllib/_parser.py` replace `__fp` with `fp` and `__s` with
  `s`. Add the `/` to `load` and `loads` function signatures.

- Run `make regen-stdlib-module-names`

- Create `Doc/library/tomllib.rst` and reference it in `Doc/library/fileformats.rst`
2022-03-08 09:26:13 +01:00
Meer Suri 8debeed307
bpo-46494: Mention the typing_extensions pkg in typing docs (GH-31260) 2022-03-07 20:04:04 -08:00
Ned Batchelder 13331a12c3
importlib.metadata: Remove empty footnote section (GH-30451) 2022-03-07 19:55:41 -08:00
Géry Ogam 46a116c1c9
bpo-38738: Fix formatting of True and False in the threading documentation (GH-31678)
* Fix formatting of True and False in the threading documentation
* Update threading.rst
2022-03-04 12:13:09 -08:00
slateny cedd2473a9
bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631) 2022-03-04 12:35:52 -05:00
Brandt Bucher 586b24d3be
bpo-46841: Fix error message hacks in `GET_AWAITABLE` (GH-31664) 2022-03-04 12:41:17 +00:00
vidhya 10117f1d8c
bpo-6634: [doc] clarify that sys.exit() does not always exit the interpreter (GH-31639) 2022-03-03 14:23:47 +00:00
slateny a8c87a239e
bpo-21910: Clarify docs for codecs writelines method (GH-31245)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-02 17:21:41 -08:00
slateny 3257d49d23
bpo-45492: Corrected documentation for co_names in inspect library doc (GH-31456) 2022-03-02 19:03:38 +00:00
Nikita Sobolev 20a1c8ee4b
bpo-46195: Do not add `Optional` in `get_type_hints` (GH-30304)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-01 21:29:46 -08:00
Kumar Aditya 41ddcd3f40
bpo-44011: Document ssl_shutdown_timeout added by revisited asyncio SSL implementation (GH-31597) 2022-02-26 15:06:43 +02:00
Charlie Zhao e466faa9df
bpo-45735: Promise the long-time truth that `args=list` works (GH-30982)
For threads, and for multiprocessing, it's always been the case that ``args=list`` works fine when passed to ``Process()`` or ``Thread()``, and such code is common in the wild. But, according to the docs, only a tuple can be used. This brings the docs into synch with reality.

Doc changes by Charlie Zhao.
Co-authored-by: Tim Peters <tim.peters@gmail.com>
2022-02-25 22:17:13 -06:00
Victor Stinner 5ab745fc51
bpo-46852: Remove the float.__set_format__() method (GH-31585)
Remove the undocumented private float.__set_format__() method,
previously known as float.__set_format__() in Python 3.7. Its
docstring said: "You probably don't want to use this function. It
exists mainly to be used in Python's test suite."
2022-02-26 00:53:27 +01:00
Kumar Aditya dd69f73421
bpo-26897: Clarify Popen stdin, stdout, stderr file object docs (GH-30231) 2022-02-25 08:41:19 -08:00
Raymond Hettinger 26aba295a9
Update dict/OrderedDict differences with code equivalents. (GH-31563) 2022-02-25 08:49:53 -06:00
Brandt Bucher 0f41aac109
bpo-46841: Use *inline* caching for `BINARY_OP` (GH-31543) 2022-02-25 12:11:34 +00:00
slateny 53ecf9e08d
bpo-34429: Noted TemporaryFile behavior on non-Posix/non-Cygwin systems (GH-31547) 2022-02-25 11:07:52 +00:00
Victor Stinner 4fccf91073
bpo-46659: Enhance LocaleTextCalendar for C locale (GH-31214)
If the LC_TIME locale is "C", use the user preferred locale.
2022-02-24 14:29:08 +01:00
Victor Stinner b899126094
bpo-46659: Deprecate locale.getdefaultlocale() (GH-31206)
The locale.getdefaultlocale() function is deprecated and will be
removed in Python 3.13. Use locale.setlocale(),
locale.getpreferredencoding(False) and locale.getlocale() functions
instead.
2022-02-22 22:06:43 +01:00
vidhya bba8008f99
bpo-20923 : [doc] Explain ConfigParser 'valid section name' and .SECTCRE (GH-31413) 2022-02-22 18:06:41 +00:00
Andrew Svetlov 4140bcb1cd
bpo-45390: Propagate CancelledError's message from cancelled task to its awaiter (GH-31383)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-02-21 22:59:04 +02:00
Mark Shannon 59585d6b2e
bpo-46329: Streamline calling sequence a bit. (GH-31465)
* Move handling of bound-methods to PRECALL.

* Remove call_shape.postcall_shrink

* Remove call_shape.callable

* Remove call_shape.callable. Change CALL oparg to match PRECALL oparg.

* Move KW_NAMES before PRECALL.

* Update opcode docs in dis.rst
2022-02-21 18:26:47 +00:00
Charles Brunet 99331fcf17
Counter doc mentions three methods, but lists four (GH-30706)
Was probably caused by the addition of the `total()` method
2022-02-18 18:23:53 -08:00
Nikita Sobolev 395029b0bd
bpo-46571: improve `typing.no_type_check` to skip foreign objects (GH-31042)
There are several changes:
1. We now don't explicitly check for any base / sub types, because new name check covers it
2. I've also checked that `no_type_check` do not modify foreign functions. It was the same as with `type`s
3. I've also covered `except TypeError` in `no_type_check` with a simple test case, it was not covered at all
4. I also felt like adding `lambda` test is a good idea: because `lambda` is a bit of both in class bodies: a function and an assignment

<!-- issue-number: [bpo-46571](https://bugs.python.org/issue46571) -->
https://bugs.python.org/issue46571
<!-- /issue-number -->
2022-02-18 17:53:29 -08:00
Jörn Heissler f80a97b492
[docs] Correct typos in SSLContext.sni_callback (GH-30623)
Co-authored-by: Jörn Heissler <nosuchaddress@joern-heissler.de>
2022-02-18 17:49:04 -08:00
Serhiy Storchaka 2923d87ca2
bpo-46777: Fix incorrect use of directives in asyncio documentation (GH-31388) 2022-02-18 10:58:48 +02:00
Géry Ogam 2945f5a7c5
Update html.parser.rst (GH-30678)
This PR for the documentation of the [html.parser](https://docs.python.org/3/library/html.parser.html) module will

- fix a terminology mistake (‘start of a tag’ -> ‘start tag of an element’);
- mention the parameter names of the `HTMLParser.handle_*` methods where missing.
2022-02-17 04:20:40 -08:00
97littleleaf11 de6043e596
bpo-46066: Deprecate kwargs syntax for TypedDict definitions (GH-31126)
Closes python/typing#981

https://bugs.python.org/issue46066
2022-02-16 19:26:07 -08:00
Hakan Çelik 562c13f573
bpo-29418: Implement inspect.ismethodwrapper and fix inspect.isroutine for cases where methodwrapper is given (GH-19261)
Automerge-Triggered-By: GH:isidentical
2022-02-16 04:46:20 -08:00
Zackery Spytz 08ec80113b
bpo-46737: Add default arguments to random.gauss and normalvariate (GH-31360) 2022-02-15 17:12:15 -06:00
David Gilbertson 04215a4272
Update the OMG link (GH-30383) 2022-02-14 13:49:11 -08:00
Rafael Fontenelle 6b9f27dd0b
doc: use colon for all color's rangs (GH-28998) 2022-02-14 11:46:40 -08:00
180909 5d53cf30f9
bpo-38619: Update the documentation for UUID.hex (GH-29830)
Explicitly state that it is lowercase.

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-02-14 10:58:22 -08:00
David Gilbertson 4e4e7c2684
Update __main__.rst (GH-30896)
The reference to `venv` appears in the paragraph below, instead of above.
Fixed the documentation.
2022-02-14 10:53:16 -08:00
Zackery Spytz 96084f4256
bpo-46747: Add missing key parameters in the bisect docs (GH-31323)
Added *key* parameter to `bisect.bisect()` and `bisect.insort()` in bisect module docs.
2022-02-14 11:16:49 -05:00
John Belmonte 1d6ce67c29
Corrections to format precision description. (GH-31291)
* `precision` field is a decimal integer
  * clarify that stated limitations are on presentation type
    rather than input value type.  Especially misleading is
    "precision is not allowed for integer values", since integer
    value input to a format like `.1f` is fine.
  * regarding max field size, replace "non-number" with "string",
    which is the only non-numeric presentation type

Automerge-Triggered-By: GH:ericvsmith
2022-02-13 16:00:32 -08:00
Meer Suri 9d9cfd61ec
bpo-46586: Fix documentation links (GH-31216)
* Fix enum.property documentation link
2022-02-11 20:21:38 -08:00
Alex Waygood e0bc8ee945
bpo-46483: [doc] pathlib classes no longer support parameterized generics (GH-31281)
Remove pathlib classes from the list in stdtypes.rst of classes
that can be parameterized at runtime.
2022-02-11 22:39:37 +02:00
Géry Ogam 4f9386661d
Fix the signature of multiprocessing.set_executable (GH-31276)
Automerge-Triggered-By: GH:merwok
2022-02-11 06:42:54 -08:00
Henry Schreiner 5a3f97291e
bpo-43532: add version added to KW_ONLY (GH-31235)
Minor missing version note mentioned at the end of  (and affected me independently before reading that note).

Automerge-Triggered-By: GH:ericvsmith
2022-02-09 12:56:10 -08:00
Jelle Zijlstra 243436f377
bpo-46475: Add typing.Never and typing.assert_never (GH-30842) 2022-02-08 10:50:26 -08:00
Victor Stinner 7a0486eaa9
bpo-46659: calendar uses locale.getlocale() (GH-31166)
The calendar.LocaleTextCalendar and calendar.LocaleHTMLCalendar
classes module now use locale.getlocale(), instead of using
locale.getdefaultlocale(), if no locale is specified.
2022-02-08 00:24:09 +01:00
James Hilton-Balfe 7ba1cc8049
bpo-46534: Implement PEP 673 Self in typing.py (GH-30924)
Co-authored-by: Pradeep Kumar Srinivasan <gohanpra@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-02-07 12:47:48 -08:00
Hugo van Kemenade 6c4e44ef8a
bpo-23952: Document cgi module's maxlen variable (GH-30338) 2022-02-06 05:59:32 -08:00
andrei kulakov fea7290a0e
bpo-31369: include ``RegexFlag`` in ``re.__all__`` (GH-30279)
* added RegexFlag to re.__all__; added RegexFlag.NOFLAG

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-02-04 19:54:28 -08:00
Manish Kumar ⛄ ba650af7d6
Optimize images by IMGbot (GH-21348)
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2022-02-04 15:49:43 +09:00
Nikita Sobolev 734b1f119b
bpo-46569: [Enum] fix typo in `StrEnum` docs (GH-31007) 2022-02-03 07:22:41 -08:00
Miro Hrončok 6baa98e538
bpo-46624: Defer to 3.12: "Remove deprecated support for non-integer values" (GH-31098) 2022-02-03 07:48:13 -06:00
Zackery Spytz b4bd1e1422
bpo-44977: Deprecate delegation of int to __trunc__ (GH-31031)
Calling int(a) when type(a) implements __trunc__ but not __int__
or __index__ now raises a DeprecationWarning.
2022-02-03 11:43:25 +02:00
Hugo van Kemenade e8659b47de
bpo-45173: Keep configparser deprecations until Python 3.12 (GH-30952)
* Revert "bpo-45173 Remove configparser deprecations"

This reverts commit df2284bc41.

* bpo-45173: Note these configparser deprecations will be removed in 3.12
2022-02-02 08:59:39 -08:00
Raymond Hettinger 06a491179f
Add recipe for subslices (GH-31028) 2022-02-01 22:18:52 -06:00
Raymond Hettinger f77beacf01
Fix minor details in the Counter docs (GH-31029) 2022-02-01 22:18:11 -06:00
Jelle Zijlstra abcc3d75f6
bpo-46414: Add typing.reveal_type (#30646)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-02-01 18:48:55 -08:00
Barney Gale 18cb2ef46c
bpo-29688: document and test `pathlib.Path.absolute()` (GH-26153)
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Brian Helba <brian.helba@kitware.com>
2022-01-28 15:40:55 -08:00
Mark Shannon 89fd7c3452
bpo-46329: Split calls into precall and call instructions. (GH-30855)
* Add PRECALL_FUNCTION opcode.

* Move 'call shape' varaibles into struct.

* Replace CALL_NO_KW and CALL_KW with KW_NAMES and CALL instructions.

* Specialize for builtin methods taking using the METH_FASTCALL | METH_KEYWORDS protocol.

* Allow kwnames for specialized calls to builtin types.

* Specialize calls to tuple(arg) and str(arg).
2022-01-28 12:42:30 +00:00
Gregory P. Smith ace0aa2a27
bpo-42982: update pbkdf2 example & add another link (GH-30966)
Automerge-Triggered-By: GH:gpshead
2022-01-27 12:18:28 -08:00
Kinshuk Dua 08c0ed2d9c
bpo-23556: [doc] Fix inaccuracy in documentation for raise without args. Improve tests for context in nested except handlers. (GH-29236) 2022-01-27 10:24:48 +00:00
Illia Volochii 897ce90187
bpo-42982: Improve the text on suggested number of iterations of PBKDF2 (GH-24276)
Less specific number wording (as there is no one right number - the old 100k is too big for some applications and woefully small for others). We now link to NIST SP 800-132 to tell people what to read in there on how to decide for their application.

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
2022-01-27 00:39:09 -08:00
Julien Palard bcafab849e
[doc]: Spotted errors while working on rstlint. (GH-30879)
Also ignored some `make suspicious` false positives while assuring
true positives were properly seen by rstlint.
2022-01-27 08:57:43 +01:00
Gregory P. Smith b50322d203
bpo-45162: Revert "Remove many old deprecated unittest features" (GH-30935)
Revert "bpo-45162: Remove many old deprecated unittest features (GH-28268)"

This reverts commit b0a6ede3d0.

We're deferring this change until 3.12 while upstream projects that use
the legacy assertion method names are fixed.  See the issue for links
to the discussion. Many upstream projects now have issues and PRs
filed.
2022-01-26 20:39:15 -08:00
Terry Jan Reedy fcde0bc10d
bpo-45296: Clarify close, quit, and exit in IDLE (GH-30936)
In the File menu, 'Close' and 'Exit' are now 'Close Window' (the current
one) and 'Exit' is now 'Exit IDLE' (by closing all windows).
In Shell, 'quit()' and 'exit()' mean 'close Shell'.
If there are no other windows, this also exits IDLE.
2022-01-26 22:16:31 -05:00
Brandt Bucher 8548366864
bpo-46528: Simplify the VM's stack manipulations (GH-30902) 2022-01-26 12:47:45 -08:00
Nikita Sobolev b9d8980d89
bpo-43698: do not use `...` as argument name in docs (GH-30502) 2022-01-26 19:06:10 +09:00
Raymond Hettinger ee60550e9b
Move doctests to the main docs. Eliminate duplication. Improve coverage. (GH-30869) 2022-01-25 06:56:53 -06:00
Irit Katriel b18fd54f8c
bpo-46431: Add example of subclassing ExceptionGroup. Document the message and exceptions attributes (GH-30852) 2022-01-24 21:50:18 +00:00
Mario Corchero d7c6863979
bpo-41906: Accept built filters in dictConfig (GH-30756)
When configuring the logging stack, accept already built filters (or
just callables) in the filters array of loggers and handlers.
This facilitates passing quick callables as filters.

Automerge-Triggered-By: GH:vsajip
2022-01-24 04:39:50 -08:00
Nikita Sobolev 58f3d98098
bpo-46422: use `dis.Positions` in `dis.Instruction` (GH-30716)
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2022-01-24 14:09:20 +03:00
Mark Shannon 0367a36fdc
bpo-43683: Streamline YIELD_VALUE and SEND (GH-30723)
* Split YIELD_VALUE into ASYNC_GEN_WRAP; YIELD_VALUE for async generators.

* Split SEND into SEND; YIELD_VALUE.

* Document new opcodes.
2022-01-24 11:08:53 +00:00
Jelle Zijlstra d75a51bea3
fix typo in typing.rst (#30841) 2022-01-23 15:36:08 -08:00
Raymond Hettinger 270a09184d
Improve grouper() recipe to demonstrate all forms of zip() (GH-30837) 2022-01-23 14:31:10 -06:00
Jelle Zijlstra c8a536624e
bpo-46468: document that "-m http.server" defaults to port 8000 (GH-30776)
Code link:
70c16468de/Lib/http/server.py (L1270)

It's been this way since at least 3.4.

Also improved some wording in the same section.
2022-01-22 14:31:15 +02:00
Nikita Sobolev 5d73524116
bpo-46460: remove duplicated `versionchanged` from `dis.rst` (GH-30752) 2022-01-22 11:15:58 +00:00
Thomas Klausner 40fcd16889
bpo-30512: Add CAN Socket support for NetBSD (GH-30066) 2022-01-21 09:44:05 +02:00
Mark Shannon b04dfbbe4b
bpo-46409: Make generators in bytecode (GH-30633)
* Add RETURN_GENERATOR and JUMP_NO_INTERRUPT opcodes.

* Trim frame and generator by word each.

* Minor refactor of frame.c

* Update test.test_sys to account for smaller frames.

* Treat generator functions as normal functions when evaluating and specializing.
2022-01-20 11:46:39 +00:00
Florian Bruhin 4b99803b86
doc: Clarify os.urandom return type (#30282)
Other descriptions in the same file also use 'bytestring' to refer to bytes objects
2022-01-19 13:22:15 -08:00
Evan d45cd2d207
Update documentation in datetime module strftime-and-strptime-behavior fix typo in '%W' format code description (GH-30232)
A small change to the documentation of datetime module , in the format codes section of stftime and strptime. Changed the description of format code '%W' from 'as a decimal number' to 'a zero padded   decimal number' so it's in line with the example having leading zeros.  Similar to the format code '%U' above.

Automerge-Triggered-By: GH:pganssle
2022-01-19 09:39:57 -08:00
Ken Jin 1faf7c4eff
bpo-45680: Minor formatting fix in stdtypes.rst (GH-30690)
Makes quotation consistent with rest of docs in commit 0eae9a2a2d.
2022-01-19 23:37:05 +08:00
Alex Waygood 0eae9a2a2d
bpo-45680: Clarify documentation on ``GenericAlias`` objects (GH-29335)
The documentation on ``GenericAlias`` objects implies at multiple points that
only container classes can define ``__class_getitem__``. This is misleading.
This PR proposes a rewrite of the documentation to clarify that non-container
classes can define ``__class_getitem__``, and to clarify what it means when a
non-container class is parameterized.

See also: initial discussion of issues with this piece of documentation in
GH-29308, and previous BPO issue [42280](https://bugs.python.org/issue42280).

Also improved references in glossary and typing docs. Fixed some links.

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2022-01-19 22:53:41 +08:00
Victor Stinner a847785b40
bpo-43869: Time Epoch is the same on all platforms (GH-30664) 2022-01-19 11:27:11 +01:00
John Marshall 3852269b91
bpo-45554: Document multiprocessing.Process.exitcode values (GH-30142)
This addresses [bpo-45554]() by expanding the `exitcode` documentation to also describe what `exitcode` will be in cases of normal termination, `sys.exit()` called, and on uncaught exceptions.

Automerge-Triggered-By: GH:pitrou
2022-01-18 13:31:27 -08:00
Kumar Aditya 65940fa5c1
bpo-20823: Clarify copyreg.pickle() documentation (GH-30230) 2022-01-18 21:53:43 +02:00
Miguel Brito ff7703c4b6
bpo-43869: Improve epoch docs (GH-25777) 2022-01-18 16:55:16 +01:00
Erlend Egeberg Aasland bdf2ab1887
bpo-46402: Promote SQLite URI tricks in `sqlite3` docs (GH-30660)
Provide some examples of URI parameters in sqlite connect().

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2022-01-18 07:37:02 -05:00
Ethan Furman 62a6594e66
bpo-40066: [Enum] fix tests (GH-30643)
- skip doctest that changes depending on target system
- skip doctest that only fails on CI
- substitute in values that change depending on target system
2022-01-17 08:52:42 -08:00
Kumar Aditya 83d544b929
bpo-40066: [Enum] skip failing doc test (GH-30637) 2022-01-17 07:18:13 -08:00
Victor Stinner 42a64c03ec
Revert "bpo-40066: [Enum] update str() and format() output (GH-30582)" (GH-30632)
This reverts commit acf7403f9b.
2022-01-17 13:58:40 +01:00
Ethan Furman acf7403f9b
bpo-40066: [Enum] update str() and format() output (GH-30582)
Undo rejected PEP-663 changes:

- restore `repr()` to its 3.10 status
- restore `str()` to its 3.10 status

New changes:

- `IntEnum` and `IntFlag` now leave `__str__` as the original `int.__str__` so that str() and format() return the same result
- zero-valued flags without a name have a slightly changed repr(), e.g. `repr(Color(0)) == '<Color: 0>'`
- update `dir()` for mixed-in types to return all the methods and attributes of the mixed-in type
- added `_numeric_repr_` to `Flag` to control display of unnamed values
- enums without doc strings have a more comprehensive doc string added
- `ReprEnum` added -- inheriting from this makes it so only `__repr__` is replaced, not `__str__` nor `__format__`; `IntEnum`, `IntFlag`, and `StrEnum` all inherit from `ReprEnum`
2022-01-15 22:41:43 -08:00
Hugo van Kemenade 305588c67c
bpo-20281, bpo-29964: update datetime docs to refer %z and %Z to a pre-existing footnote (GH-30354) 2022-01-14 14:49:12 -08:00
Hugo van Kemenade 73140de97c
bpo-23183: Document the timeit output (GH-30359)
Co-authored-by: Robert Collins <robertc@robertcollins.net>
2022-01-14 17:25:36 +00:00
Irit Katriel c590b581bb
bpo-46328: Add sys.exception() (GH-30514) 2022-01-13 12:35:58 +00:00
Christian Heimes 443b308fee
bpo-40479: Fix hashlib's usedforsecurity for OpenSSL 3.0.0 (GH-30455) 2022-01-13 09:46:38 +01:00
Jelle Zijlstra 0bbf30e2b9
bpo-46342: make @typing.final introspectable (GH-30530)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2022-01-12 11:38:25 -08:00
Ben Kehoe dce642f244
bpo-46307: Add string.Template.get_identifiers() method (GH-30493)
Add `string.Template.get_identifiers()` method that returns the identifiers within the template. By default, raises an error if it encounters an invalid identifier (like `substitute()`). The keyword-only argument `raise_on_invalid` can be set to `False` to ignore invalid identifiers (like `safe_substitute()`).

Automerge-Triggered-By: GH:warsaw
2022-01-11 11:15:42 -08:00
Michael Oliver 73decdf021
Remove unused `Any` from `Concatenate` example in typing docs (GH-30516) 2022-01-11 21:59:26 +08:00
Inada Naoki 0b2b9d2513
bpo-23882: unittest: Drop PEP 420 support from discovery. (GH-29745) 2022-01-10 10:38:33 +09:00
Erlend Egeberg Aasland b6aa38f1ca
bpo-46261: Update `sqlite3.Cursor.lastrowid` docs (GH-30407) 2022-01-08 21:17:09 +02:00
Zsolt Dollenstein ef5376e69e
bpo-46290: Fix parameter names in dataclasses docs (GH-30450) 2022-01-08 12:56:35 +02:00
Hugo van Kemenade 6d07a9fb7c
bpo-28546: [doc] Clarify setting pdb breakpoints (GH-30360)
Co-authored-by: Ian Kelling <ian@iankelling.org>
2022-01-07 19:41:23 +00:00
Irit Katriel 9b7aa6a9d6
bpo-46216: remove spurious link to os.system() from os.time() documentation (GH-30326)
Automerge-Triggered-By: GH:iritkatriel
2022-01-07 10:28:08 -08:00
Vinay Sajip 46c7a6566b
bpo-46251: Add 'Security Considerations' section to logging configura… (GH-30411) 2022-01-06 22:35:08 +00:00
Irit Katriel 9925e70e48
bpo-45292: [PEP-654] exception groups and except* documentation (GH-30158) 2022-01-06 19:05:34 +00:00
Mark Shannon e028ae99ec
bpo-45923: Handle call events in bytecode (GH-30364)
* Add a RESUME instruction to handle "call" events.
2022-01-06 13:09:25 +00:00
penguin_wwy 3db762db72
bpo-46031: add POP_JUMP_IF_NOT_NONE and POP_JUMP_IF_NONE (GH-30019) 2022-01-06 11:38:35 +00:00
Nikita Sobolev e5894ca8fd
bpo-46266: Add calendar day of week constants to __all__ (GH-30412) 2022-01-05 14:21:04 -06:00
Brandt Bucher 31e43cbe5f
bpo-46009: Remove GEN_START (GH-30367) 2022-01-04 11:38:32 -08:00
Philipp Claßen f404e26d74
Fix missing "," in the documentation of Executor Objects (GH-30404) 2022-01-04 10:48:04 -08:00
Kumar Aditya 7d7817cf0f
bpo-20369: concurrent.futures.wait() now deduplicates futures given a… (GH-30168)
* bpo-20369: concurrent.futures.wait() now deduplicates futures given as arg.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2022-01-04 13:36:13 +00:00
Hugo van Kemenade b949845b36
bpo-33252: Document that ResourceWarning is ignored by default (GH-30358)
`ResourceWarning` is ignored by default.

Document this behaviour, for consistency with others in this table such as `DeprecationWarning`.

Documentation PR can skip NEWS file.

Automerge-Triggered-By: GH:iritkatriel
2022-01-04 03:34:31 -08:00
Irit Katriel a94461d718
bpo-46202: Remove opcode POP_EXCEPT_AND_RERAISE (GH-30302)
* bpo-46202: remove opcode POP_EXCEPT_AND_RERAISE

* do not assume that an exception group is truthy
2022-01-04 10:37:12 +00:00
Raymond Hettinger 770f43d47e
Add doctest and improve readability for move_to_end() example. (#30370) 2022-01-03 14:26:08 -08:00
Irit Katriel 51700bf08b
bpo-34931: [doc] clarify behavior of os.path.splitext() on paths with multiple leading periods (GH-30347) 2022-01-03 20:10:07 +00:00
David CARLIER c960b191b8
bpo-46222: posixmodule sendfile FreeBSD's constants updates. (GH-30327)
* posixodule sendfile FreeBSD's constants updates.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2022-01-03 15:01:04 +02:00
Irit Katriel 65e7c1f90e
bpo-46219, 46221: simplify except* implementation following exc_info changes. Move helpers to exceptions.c. Do not assume that exception groups are truthy. (GH-30289) 2022-01-02 23:22:42 +00:00
Jade Lovelace 8e75c6b49b
argparse docs: prog default is the basename of argv[0] (GH-30298) 2022-01-02 12:16:25 -08:00
Nikita Sobolev ce4d25f3cd
bpo-46196: document method cmd.Cmd.columnize (#30303)
The method is already written and tested, now it's officially public.
2022-01-02 13:33:20 -05:00
Raymond Hettinger a09bc3a404
bpo-46095: Improve SeqIter documentation. (GH-30316) 2022-01-01 10:37:26 -08:00
Sebastian Pipping e18d81569f
bpo-45321: Add missing error codes to module `xml.parsers.expat.errors` (GH-30188)
The idea is to ensure that module `xml.parsers.expat.errors`
contains all known error codes and messages,
even when CPython is compiled or run with an outdated version of libexpat.

https://bugs.python.org/issue45321
2021-12-31 10:57:00 +01:00
Jason R. Coombs 99945c6b5c
bpo-46109: Separate out files relating to importlib.resources (GH-30160)
* Separate out files relating to importlib.resources

* Update Introduction to direct readers to the submodule documentation.

* Create separate file for abcs relating to resources.

* Move abc docs back to where they were.
2021-12-30 21:17:05 -05:00
Hugo van Kemenade 2cf7d02b99
bpo-46178: Remove/rename redundant Travis CI code (#30309) 2021-12-30 16:16:27 -08:00
Nikita Sobolev d12bec6993
bpo-43424: Deprecate `webbrowser.MacOSXOSAScript._name` attribute (GH-30241) 2021-12-30 10:30:13 +09:00
David CARLIER 66c47b63a0
bpo-46176: mmap module adding MAP_STACK constant. (GH-30252) 2021-12-29 22:52:29 +09:00
David Gilbertson f9a4352056
Fix typo in io.rst (GH-30218) 2021-12-26 13:11:08 +02:00
Joe 10bf0a9ac3
doc: fix a typo in unittest.mock.rst (GH-30227) 2021-12-26 13:09:17 +02:00
Nikita Sobolev 1b30660c3b
bpo-46120: State that `|` is preferred over `Union` (GH-30222)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
2021-12-24 13:36:09 -08:00
Kumar Aditya cf15419a99
typos (#30239) 2021-12-23 12:25:12 +02:00
Kumar Aditya 71ef0b4c2b
bpo-46157: fix typo in docs (GH-30237) 2021-12-23 11:17:31 +02:00
Mark Dickinson e9a01e231a
Update potentially confusing note for mean. (GH-30174) 2021-12-21 09:00:53 +00:00
Alex Waygood 7c5c3f7254
bpo-46104: Fix example broken by GH-30148 (GH-30203)
See discussion in GH-30179.
2021-12-20 12:48:35 +08:00
Kumar Aditya da4b214304
bpo-42413: Replace `concurrent.futures.TimeoutError` and `asyncio.TimeoutError` with builtin `TimeoutError` (GH-30197)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2021-12-19 13:22:40 +02:00
andrei kulakov ae36cd1e79
bpo-37578: glob.glob -- added include_hidden parameter (GH-30153)
Automerge-Triggered-By: GH:asvetlov
2021-12-18 06:23:34 -08:00
Vivek Vashist 6f2df42951
bpo-46113: Minor fixes in stdtypes documentation (GH-30167)
* Fix#1 - isidentifier() function output

* Fix#2 Update the str.splitlines() function parameter

* Fix#3 Removed unwanted full stop for str and bytes types double quotes examples.

* Fix#4 Updated class dict from **kwarg to **kwargs
2021-12-18 21:52:51 +08:00
Alex Waygood 6ada013df1
bpo-46104: Reduce use of pre-PEP 526 syntax in typing docs (GH-30148)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2021-12-18 18:23:51 +08:00
Irit Katriel 396b58345f
bpo-45711: Remove type and traceback from exc_info (GH-30122)
* Do not PUSH/POP traceback or type to the stack as part of exc_info

* Remove exc_traceback and exc_type from _PyErr_StackItem

* Add to what's new, because this change breaks things like Cython
2021-12-17 14:46:22 +00:00
Julien Palard 62a0a2a25d
Doc: some rst linting. (GH-30149) 2021-12-17 13:55:03 +01:00
Irit Katriel 30322c497e
bpo-22047: [argparse] deprecate nested argument groups and mutually exclusive groups (GH-30098) 2021-12-16 15:31:08 +00:00
Irit Katriel a951c95a13
bpo-28816: [doc] clarify that zipimport invokes importers only for python files (GH-30060) 2021-12-16 09:12:24 +00:00
Vivek Vashist f025ae63dc
Add Positional only arguments forward slash (/) to sorted() function in Built-in Functions document (GH-30113)
sorted() function is missing forward slash (/) in Built-in Functions documentation page.

Automerge-Triggered-By: GH:asvetlov
2021-12-15 03:24:38 -08:00
Mark Shannon 9f8f45144b
bpo-44525: Split calls into PRECALL and CALL (GH-30011)
* Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW.

* Update specialization to handle new CALL opcodes.

* Specialize call to method descriptors.

* Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW.
2021-12-14 18:22:44 +00:00
Irit Katriel d60457a667
bpo-45292: [PEP-654] add except* (GH-29581) 2021-12-14 16:48:15 +00:00
Vinay Sajip cb589d1b6b
bpo-46063: Improve algorithm for computing which rolled-over log file… (GH-30093) 2021-12-14 00:53:37 +00:00
Gareth Rees a62be77266
bpo-45643: Add signal.SIGSTKFLT on platforms where this is defined (GH-29266) 2021-12-13 18:22:43 +01:00
Paul Bryan e09705f58f
Clarify new_event_loop return value. (GH-30078) 2021-12-13 14:39:22 +02:00
Irit Katriel 481f3ffdbe
bpo-37602: Clarify that the lib2to3 nonzero fixer changes only definitions (GH-30075) 2021-12-13 10:04:34 +00:00
Andre Delfino d0669c5e69
Remove erroneous padding in dataclasses (GH-30076)
Automerge-Triggered-By: GH:ericvsmith
2021-12-12 10:05:48 -08:00
Eric V. Smith e029c53e1a
bpo-44674: Use unhashability as a proxy for mutability for default dataclass __init__ arguments. (GH-29867)
`@dataclass` in 3.10 prohibits using list, dict, or set as default values. It does this to avoid the mutable default problem. This test is both too strict, and not strict enough. Too strict, because some immutable subclasses should be safe, and not strict enough, because other mutable types should be prohibited. With this change applied, `@dataclass` now uses unhashability as a proxy for mutability: if objects aren't hashable, they're assumed to be mutable.
2021-12-11 16:12:17 -05:00
180909 4fe5585240
bpo-19737: Improved the documentation for globals (GH-29823)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-12-11 01:04:21 +01:00
Louis Sautier c1051e08b3
bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976)
Signed-off-by: Louis Sautier <sautier.louis@gmail.com>
2021-12-11 00:00:02 +01:00
andrei kulakov 8c74713d0e
bpo-42182: stdtypes doc - update and fix links to several dunder methods (GH-27384) 2021-12-10 11:40:06 +02:00
Bernát Gábor e2cfc89e09
bpo-45391: mark UnionType as a class in documentation (GH-28757)
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
2021-12-09 20:56:14 +08:00
David CARLIER 267539bff7
bpo-46016: fcntl module add FreeBSD's F_DUP2FD_CLOEXEC flag support (GH-29993) 2021-12-08 23:28:51 +01:00
Mark Shannon 69806b9516
bpo-46009: Do not exhaust generator when send() method raises (GH-29986) 2021-12-08 12:09:26 +00:00
Irit Katriel 7989e9dff6
bpo-40222: update doc entry with respect to the change in WITH_EXCEPT_START (GH-29975) 2021-12-08 09:41:28 +00:00
Ken Jin c7e7a4b969
bpo-35821: Fix restructuredtext code formatting in logging.rst (GH-29963) 2021-12-07 23:25:13 +08:00
Victor Stinner cf7eaa4617
Revert "bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)" (GH-29951)
This reverts commit 9bf2cbc4c4.
2021-12-07 12:31:04 +01:00
Vinay Sajip 2bf551757e
bpo-35821: Add an example to Logger.propagate documentation. (GH-29841) 2021-12-07 11:15:44 +00:00
James Gerity 8db06528ca
bpo-46001: Change OverflowError to RecursionError in JSON library docstrings (GH-29943) 2021-12-07 11:58:40 +02:00
Taras Sereda 8518ee348c
removal of duplicated text paragraph (#29666) 2021-12-07 01:12:29 +02:00
Irit Katriel 5bb7ef2768
bpo-45607: Make it possible to enrich exception displays via setting their __note__ field (GH-29880) 2021-12-03 22:01:15 +00:00
Alex Waygood b2afdc95cc
bpo-45535: Improve output of Enum ``dir()`` (GH-29316)
Modify the ``EnumType.__dir__()`` and ``Enum.__dir__()`` to ensure
that user-defined methods and methods inherited from mixin classes always
show up in the output of `help()`. This change also makes it easier for
IDEs to provide auto-completion.
2021-12-02 08:49:52 -08:00
Christian Clauss 226d22ff2d
docs: Improve example for urlparse() (GH-29816) 2021-12-02 10:52:32 +02:00
Weipeng Hong c2bb29ce9a
bpo-30533: Add docs for `inspect.getmembers_static` (#29874)
* Add docs for `inspect.getmembers_static`

* update
2021-12-01 11:23:46 -08:00
Rob f27bef3043
bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) 2021-12-01 14:24:46 +02:00
Irit Katriel 8a45ca542a
bpo-45711: Change exc_info related APIs to derive type and traceback from the exception instance (GH-29780) 2021-11-30 22:37:04 +00:00
Vishal Pandey f97ec09baf
bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right (GH-29801) 2021-11-30 11:01:44 +00:00
Gideon 6266e4af87
bpo-45917: Add math.exp2() method - return 2 raised to the power of x (GH-29829)
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2021-11-29 18:55:43 +00:00
andrei kulakov c1f93f0d37
bpo-43905: Expand dataclasses.astuple() and asdict() docs (GH-26154)
Expanded ``astuple()`` docs, warning about deepcopy being applied 
and providing a workaround.

Automerge-Triggered-By: GH:ericvsmith
2021-11-29 10:10:32 -08:00
Erlend Egeberg Aasland c4a69a4ad0
bpo-45828: Use unraisable exceptions within sqlite3 callbacks (FH-29591) 2021-11-29 15:22:32 +00:00
Sergey Kolesnikov e0f8a3e9b9
Add missing 'await writer.drain()' call to example (GH-29162)
Automerge-Triggered-By: GH:asvetlov
2021-11-25 09:15:24 -08:00
Zbigniew Siciarz 4dd82194f4
bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151)
Automerge-Triggered-By: GH:asvetlov
2021-11-25 04:30:48 -08:00
Jim Crist-Harif d71c7bc733
bpo-45693: Document `port` parameter to `loop.create_server` (GH-29760)
Document the `port` parameter to `loop.create_server` in `asyncio`. In
particular, note that if `host` resolves to multiple network interfaces,
passing in `port=0` will result in a different random unused port being
used for each interface.

Automerge-Triggered-By: GH:ericvsmith
2021-11-24 11:43:57 -08:00
Jason R. Coombs d5cd2effa6
bpo-45514: Deprecate importlib resources legacy functions. (GH-29036)
* bpo-45514: Apply changes from importlib_resources@a3ef4128c6

* Mark legacy functions as deprecated in the docs and link to the migration docs in importlib_resources docs.

* Apply changes from importlib_resources@329ae9d5f2c.

* Indicate importlib.resources as a module.

Co-authored-by: Filipe Laíns <lains@riseup.net>
2021-11-24 02:51:37 -05:00
Miro Hrončok ae1965ccb4
bpo-45703: Invalidate _NamespacePath cache on importlib.invalidate_ca… (GH-29384)
Consider the following directory structure:

    .
    └── PATH1
        └── namespace
            └── sub1
                └── __init__.py

And both PATH1 and PATH2 in sys path:

    $ PYTHONPATH=PATH1:PATH2 python3.11
    >>> import namespace
    >>> import namespace.sub1
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace'])
    >>> ...

While this interpreter still runs, PATH2/namespace/sub2 is created:

    .
    ├── PATH1
    │   └── namespace
    │       └── sub1
    │           └── __init__.py
    └── PATH2
        └── namespace
            └── sub2
                └── __init__.py

The newly created module cannot be imported:

    >>> ...
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace'])
    >>> import namespace.sub2
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'namespace.sub2'

Calling importlib.invalidate_caches() now newly allows to import it:

    >>> import importlib
    >>> importlib.invalidate_caches()
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace'])
    >>> import namespace.sub2
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace', '.../PATH2/namespace'])

This was not previously possible.
2021-11-23 07:38:02 -08:00
Petr Viktorin 2c047f604e
Clarify that discutils.(plat)include is for CPython's headers (GH-29578)
Change the docs to note that "include" and "platinclude" are
for CPython's headers, and not necessarily for headers of
third-party libraries.

See discussion in: https://discuss.python.org/t/clarification-on-a-wheels-header-data/9305/19
2021-11-23 11:28:14 +01:00
Mark Shannon 135cabd328
bpo-44525: Copy free variables in bytecode to allow calls to inner functions to be specialized (GH-29595)
* Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead.

* Add reference to function to frame, borrow references to builtins and globals.

* Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions.
2021-11-23 09:53:24 +00:00
Raymond Hettinger d2b55b07d2
bpo-45766: Add direct proportion option to linear_regression(). (#29490)
* bpo-45766: Add direct proportion option to linear_regression().

* Update 2021-11-09-09-18-06.bpo-45766.dvbcMf.rst

* Use ellipsis to avoid round-off issues.

* Update Misc/NEWS.d/next/Library/2021-11-09-09-18-06.bpo-45766.dvbcMf.rst

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

* Update signature in main docs

* Fix missing comma

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-21 08:39:26 -06:00
Logan Jones fdc0e09c33
bpo-44733: Add max_tasks_per_child to ProcessPoolExecutor (GH-27373)
Co-authored-by: Antoine Pitrou <antoine@python.org>
2021-11-20 21:19:41 +01:00
Brett Cannon be36e06340
bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently required by CPython (GH-29170)
It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`.
2021-11-19 16:40:34 -08:00
Terry Jan Reedy 4575c01b75
bpo-45788: Link sys.prefix doc to 'Installation paths' (#29606)
... To the Installation paths section of the sysconfig doc.
2021-11-18 15:08:24 -05:00
Alex Waygood 31b3a70edb
[doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the data model (GH-29389)
The documentation explaining Python's data model does not adequately explain
the differences between ``__getitem__`` and ``__class_getitem__``, nor does it
explain when each is called. There is an attempt at explaining
``__class_getitem__`` in the documentation for ``GenericAlias`` objects, but
this does not give sufficient clarity into how the method works. Moreover, it
is the wrong place for that information to be found; the explanation of
``__class_getitem__`` should be in the documentation explaining the data model.

This PR has been split off from GH-29335.
2021-11-18 16:54:25 +01:00
Dong-hee Na fc4474e45e
bpo-45429: Merge whatsnew about time.sleep (GH-29589)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-11-18 01:26:59 +01:00
ch33zer abc0d754c3
[docs] Add missing word "any" in unittest -k cmdline option description (GH-29571) 2021-11-18 00:25:53 +01:00
Emmanuel Arias 15409c720b
bpo-28806: Continue work: improve the netrc library (GH-26330)
Continue with the improvement of the library netrc

Original work and report Xiang Zhang <angwerzx@126.com>

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2021-11-17 11:07:54 +02:00
Géry Ogam d7e210070f
bpo-37800: Clean up importlib documentation for some module attributes (GH-10016)
Automerge-Triggered-By: GH:brettcannon
2021-11-16 11:59:45 -08:00
Victor Stinner 9bf2cbc4c4
bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)
Remove the asyncore and asynchat modules, deprecated in Python
3.6: use the asyncio module instead.

Remove the smtpd module, deprecated in Python 3.6: the aiosmtpd
module can be used instead, it is based on asyncio.

* Remove asyncore, asynchat and smtpd documentation
* Remove test_asyncore, test_asynchat and test_smtpd
* Rename Lib/asynchat.py to Lib/test/support/_asynchat.py
* Rename Lib/asyncore.py to Lib/test/support/_asyncore.py
* Rename Lib/smtpd.py to Lib/test/support/_smtpd.py
* Remove DeprecationWarning from private _asyncore, _asynchat and
  _smtpd modules
* _smtpd: remove deprecated properties
2021-11-16 00:29:17 +01:00
Emmanuel Arias 3352834f59
bpo-43225: [DOC] Add missing value returned by methods on cookiejar (GH-24522)
* Add missing value returned by methods on cookiejar

Documentation say that return something but don't specific with what
value is return, and that can be confuse. This patch add that information.

* Update Doc/library/http.cookiejar.rst

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>

* Update Doc/library/http.cookiejar.rst

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-11-15 14:44:32 -08:00
Joannah Nanjekye c750adbe69
Save a reference for ensure_future and create_task (GH-29163)
Co-authored-by: Joannah Nanjekye <jnanjekye@python.org>
2021-11-15 14:30:28 -08:00
Erlend Egeberg Aasland 6c5a312fb6
bpo-45677: Reword first section of `sqlite3` docs (#29326)
* bpo-45677: Avoid addressing the reader as 'you' in sqlite3 docs

* Adjust wording

* Adjust wording again

* Typo

* Update Doc/library/sqlite3.rst

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>

* Address review: adjust wording

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Lib/sqlite3/__init__.py

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Lib/sqlite3/__init__.py

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Apply Alex' suggestion, and apply 80 char limit to PR

* Minor adjustment

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-15 14:22:42 -08:00
M. Mostafa Farzan b7360ae395
bpo-45752: Fix no-support examples in 'copy' docs (GH-29548) 2021-11-14 11:34:37 +02:00
Jack DeVries f8da00ef04
bpo-45799: [Doc] improve confusing sentence in __main__.rst (GH-29546)
I was reading this bit last night and thought it was a typo. In the light of day, I realized it wasn't *technically* a typo, but definitely confusing wording. This PR fixes the confusing sentence.

Automerge-Triggered-By: GH:ericvsmith
2021-11-13 12:16:05 -08:00
Hong Xu 4c792f39e6
bpo-45772: socket.socket should be a class instead of a function (GH-23960)
* bpo-45772: socket.socket should be a class instead of a function

Currently `socket.socket` is documented as a function, but it is really
a class (and thus has function-like usage to construct an object). This
correction would ensure that Python projects that are interlinking
Python's documentation can properly locate `socket.socket` as a type.
2021-11-13 08:02:04 +02:00
Brandt Bucher 8f1b71de73
bpo-45711: Re-bump the magic number and update doc (GH-29528) 2021-11-12 13:21:45 +00:00
Hynek Schlawack e501d70b34
bpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533)
Since `.. module:: contextvars` sets the module using `.. class:: contextvars.Token`, intersphinx records it as `contextvars.contextvars.Token`.
2021-11-12 11:47:55 +02:00
Brandt Bucher 9178f533ff
bpo-45636: Merge all numeric operators (GH-29482) 2021-11-10 22:56:22 -08:00
Guido van Rossum 1cbaa505d0
bpo-45696: Deep-freeze selected modules (GH-29118)
This gains 10% or more in startup time for `python -c pass` on UNIX-ish systems.

The Makefile.pre.in generating code builds on Eric's work for bpo-45020, but the .c file generator is new.

Windows version TBD.
2021-11-10 18:01:53 -08:00
Raymond Hettinger 912a4ccc3a
bpo-45701: Improve documentation for *typed* parameter (GH-29498) 2021-11-09 17:01:29 -06:00
Andre Delfino 57457a1e5c
bpo-39452: [doc] Change "must" to "can" on relative import style in `__main__` (GH-29379) 2021-11-06 19:09:23 +01:00
Ethan Furman cb755dba7a
bpo-45740: [Enum] add versionadded markers to docs (GH-29443)
[Enum] add versionadded markers to docs
2021-11-06 10:16:43 -07:00
Alex Waygood 71e8a3e76a
bpo-45762: Improve docs for ``@singledispatch``/``@singledispatchmethod`` (GH-29426) 2021-11-05 17:25:08 +01:00
Alex Waygood 87032cfa3d
Remove reference to ``Tuple`` at top of ``typing`` docs (GH-29401)
``typing.Tuple`` has been deprecated since Python 3.9, so it makes no sense to mention it so prominently in the documentation for the ``typing`` module.
2021-11-04 19:48:40 +08:00
Alex Waygood e03e50377d
bpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getitem__`` (GH-29387) 2021-11-04 12:06:34 +08:00