summaryrefslogtreecommitdiffstats
path: root/Doc
Commit message (Collapse)AuthorAgeFilesLines
* bpo-41376: Fix the documentation of `site.getusersitepackages()` (GH-21602)Phil Elson2020-10-081-1/+3
| | | | | | | | | | | | | | | | | | | `site.getusersitepackages()` returns the location of the user-specific site-packages directory even when the user-specific site-packages is disabled. ``` $ python -s -m site sys.path = [ '/home/user/conda/lib/python37.zip', '/home/user/conda/lib/python3.7', '/home/user/conda/lib/python3.7/lib-dynload', '/home/user/conda/lib/python3.7/site-packages', ] USER_BASE: '/home/user/.local' (exists) USER_SITE: '/home/user/.local/lib/python3.7/site-packages' (doesn't exist) ENABLE_USER_SITE: False ``` It was not practical to prevent the function from returning None if user-specific site-packages are disabled, since there are other uses of the function which are relying on this behaviour (e.g. `python -m site`).
* Revert "bpo-26680: Incorporate is_integer in all built-in and standard ↵Raymond Hettinger2020-10-073-37/+17
| | | | | library numeric types (GH-6121)" (GH-22584) This reverts commit 58a7da9e125422323f79c4ee95ac5549989d8162.
* bpo-41923: PEP 613: Add TypeAlias to typing module (#22532)Mikhail Golubev2020-10-072-2/+36
| | | | | This special marker annotation is intended to help in distinguishing proper PEP 484-compliant type aliases from regular top-level variable assignments.
* bpo-38605: Make 'from __future__ import annotations' the default (GH-20434)Batuhan Taskaya2020-10-062-7/+20
| | | | | The hard part was making all the tests pass; there are some subtle issues here, because apparently the future import wasn't tested very thoroughly in previous Python versions. For example, `inspect.signature()` returned type objects normally (except for forward references), but strings with the future import. We changed it to try and return type objects by calling `typing.get_type_hints()`, but fall back on returning strings if that function fails (which it may do if there are future references in the annotations that require passing in a specific namespace to resolve).
* bpo-41905: Add abc.update_abstractmethods() (GH-22485)Ben Avrahami2020-10-062-5/+28
| | | | This function recomputes `cls.__abstractmethods__`. Also update `@dataclass` to use it.
* bpo-41584: clarify when the reflected method of a binary arithemtic operator ↵Brett Cannon2020-10-051-7/+8
| | | | is called (#22505)
* bpo-41774: Tweak new programming FAQ entry (GH-22562)Terry Jan Reedy2020-10-051-1/+1
| | | Remove mention of space in "remove multiple items from list".
* bpo-41936. Remove macros Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION (GH-22552)Serhiy Storchaka2020-10-051-0/+5
|
* bpo-41428: Documentation for PEP 604 (gh-22517)Fidget-Spinner2020-10-054-0/+154
|
* bpo-41892: Clarify that an example in the ElementTree docs explicitly avoids ↵scoder2020-10-041-0/+6
| | | | modifying an XML tree while iterating over it. (GH-22464)
* bpo-41898: add caveat on root logger seeing all messages in assertLogs doc ↵Irit Katriel2020-10-041-1/+2
| | | | (GH-22526)
* bpo-41887: omit leading spaces/tabs on ast.literal_eval (#22469)Batuhan Taskaya2020-10-042-1/+7
| | | Also document that eval() does this (the same way).
* [doc] Use list[int] instead of List[int] (etc.) in a few more places (GH-22524)Andre Delfino2020-10-032-8/+8
| | | | | This changes a few occurrences left behind by #22340. Automerge-Triggered-By: @gvanrossum
* [doc] Fix link to abc.collections.Iterable (GH-22520)Andre Delfino2020-10-031-2/+2
| | | | | Missed this occurrence before, sorry. Also changed "the PEP" to "PEP". Automerge-Triggered-By: @gvanrossum
* bpo-40833: Clarify Path.rename doc-string regarding relative paths (GH-20554)Ram Rachum2020-10-031-0/+8
|
* [doc] Fix link to abc.collections.Iterable (GH-22502)Andre Delfino2020-10-021-1/+1
| | | Automerge-Triggered-By: @gvanrossum
* Fix is_typeddict markup (#22501)Andre Delfino2020-10-021-5/+6
|
* bpo-41802: Document 'PyDict_DelItem' can raise a 'KeyError' (GH-22291)Campbell Barton2020-10-021-4/+6
|
* bpo-41692: Deprecate PyUnicode_InternImmortal() (GH-22486)Victor Stinner2020-10-021-0/+8
| | | | The PyUnicode_InternImmortal() function is now deprecated and will be removed in Python 3.12: use PyUnicode_InternInPlace() instead.
* [doc] Update references to NumPy (GH-22458)Andre Delfino2020-10-014-8/+5
| | | Numeric(al) Python to NumPy. It seems the old name hasn't been used for some time.
* bpo-26680: Incorporate is_integer in all built-in and standard library ↵Robert Smallshire2020-10-013-17/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | numeric types (GH-6121) * bpo-26680: Adds support for int.is_integer() for compatibility with float.is_integer(). The int.is_integer() method always returns True. * bpo-26680: Adds a test to ensure that False.is_integer() and True.is_integer() are always True. * bpo-26680: Adds Real.is_integer() with a trivial implementation using conversion to int. This default implementation is intended to reduce the workload for subclass implementers. It is not robust in the presence of infinities or NaNs and may have suboptimal performance for other types. * bpo-26680: Adds Rational.is_integer which returns True if the denominator is one. This implementation assumes the Rational is represented in it's lowest form, as required by the class docstring. * bpo-26680: Adds Integral.is_integer which always returns True. * bpo-26680: Adds tests for Fraction.is_integer called as an instance method. The tests for the Rational abstract base class use an unbound method to sidestep the inability to directly instantiate Rational. These tests check that everything works correct as an instance method. * bpo-26680: Updates documentation for Real.is_integer and built-ins int and float. The call x.is_integer() is now listed in the table of operations which apply to all numeric types except complex, with a reference to the full documentation for Real.is_integer(). Mention of is_integer() has been removed from the section 'Additional Methods on Float'. The documentation for Real.is_integer() describes its purpose, and mentions that it should be overridden for performance reasons, or to handle special values like NaN. * bpo-26680: Adds Decimal.is_integer to the Python and C implementations. The C implementation of Decimal already implements and uses mpd_isinteger internally, we just expose the existing function to Python. The Python implementation uses internal conversion to integer using to_integral_value(). In both cases, the corresponding context methods are also implemented. Tests and documentation are included. * bpo-26680: Updates the ACKS file. * bpo-26680: NEWS entries for int, the numeric ABCs and Decimal. Co-authored-by: Robert Smallshire <rob@sixty-north.com>
* Fix grammar in secrets module documentation (GH-22467)Max Smolens2020-09-301-1/+1
| | | From `In particularly,` to `In particular,`
* bpo-41774: Add programming FAQ entry (GH-22402)Terry Jan Reedy2020-09-291-0/+15
| | | | | In the "Sequences (Tuples/Lists)" section, add "How do you remove multiple items from a list".
* bpo-41773: Raise exception for non-finite weights in random.choices(). ↵Ram Rachum2020-09-291-2/+2
| | | | (GH-22441)
* bpo-41842: Add codecs.unregister() function (GH-22360)Hai Shi2020-09-283-4/+25
| | | | Add codecs.unregister() and PyCodec_Unregister() functions to unregister a codec search function.
* [doc] Leverage the fact that the actual types can now be indexed for typing ↵Andre Delfino2020-09-272-30/+29
| | | | | | | | | | | (GH-22340) This shows users that they can use the actual types. Using deprecated types is confusing. This also prefers colections.abc.Sized instead of the alias typing.Sized. I guess the aliases were created to make it convenient to import all collections related types from the same place. This should be backported to 3.9. Automerge-Triggered-By: @gvanrossum
* bpo-41858: Clarify line in optparse doc (GH-22407)Emmanuel Arias2020-09-271-1/+1
| | | | The existing line is easily read as being incomplete.
* Revert "Fix all Python Cookbook links (#22205)" (GH-22424)Andre Delfino2020-09-2713-15/+15
| | | This commit reverts commit ac0333e1e117b7f61ed7ef1dbcdb6e515ada603b as the original links are working again and they provide extended features such as comments and alternative versions.
* bpo-41833: threading.Thread now uses the target name (GH-22357)Victor Stinner2020-09-231-2/+7
|
* bpo-30155: Add macros to get tzinfo from datetime instances (GH-21633)Zackery Spytz2020-09-232-0/+17
| | | | Add PyDateTime_DATE_GET_TZINFO() and PyDateTime_TIME_GET_TZINFO() macros.
* bpo-33822: Update IDLE section of What's New 3.8 (GH-22383)Terry Jan Reedy2020-09-231-0/+10
|
* bpo-41844: Add IDLE section to What's New 3.9 (GN-22382)Terry Jan Reedy2020-09-231-0/+14
|
* bpo-37779 : Add information about the overriding behavior of ↵sblondon2020-09-231-0/+24
| | | | | | | ConfigParser.read (GH-15177) Co-Authored-By: Kyle Stanley <aeros167@gmail.com> Co-Authored-By: Paul Ganssle <p.ganssle@gmail.com>
* bpo-41834: Remove _Py_CheckRecursionLimit variable (GH-22359)Victor Stinner2020-09-231-0/+4
| | | | | | | | | | Remove the global _Py_CheckRecursionLimit variable: it has been replaced by ceval.recursion_limit of the PyInterpreterState structure. There is no need to keep the variable for the stable ABI, since Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() were not usable in Python 3.8 and older: these macros accessed PyThreadState members, whereas the PyThreadState structure is opaque in the limited C API.
* bpo-41816: `StrEnum.__str__` is `str.__str__` (GH-22362)Ethan Furman2020-09-221-0/+15
| | | use `str.__str__` for `StrEnum` so that `str(StrEnum.member)` is the same as directly accessing the string value of the `StrEnum` member
* bpo-35764: Rewrite the IDLE Calltips doc section (GH-22363)Terry Jan Reedy2020-09-221-22/+25
|
* bpo-41810: Reintroduce `types.EllipsisType`, `.NoneType` & ↵Bas van Beek2020-09-223-5/+37
| | | | | `.NotImplementedType` (GH-22336) closes issue 41810
* Enum: add extended AutoNumber example (GH-22349)Ethan Furman2020-09-221-0/+26
|
* bpo-41816: add `StrEnum` (GH-22337)Ethan Furman2020-09-221-0/+38
| | | | `StrEnum` ensures that its members were already strings, or intended to be strings.
* [doc] Teach 0-args form of super in Programming FAQ (GH-22176)Andre Delfino2020-09-201-8/+7
|
* Add missing whatsnew entry for TestCase.assertNoLogs (GH-22317)Mark Dickinson2020-09-191-0/+7
|
* bpo-41756: Introduce PyGen_Send C API (GH-22196)Vladimir Matveev2020-09-192-0/+20
| | | | | | | | | | | | | The new API allows to efficiently send values into native generators and coroutines avoiding use of StopIteration exceptions to signal returns. ceval loop now uses this method instead of the old "private" _PyGen_Send C API. This translates to 1.6x increased performance of 'await' calls in micro-benchmarks. Aside from CPython core improvements, this new API will also allow Cython to generate more efficient code, benefiting high-performance IO libraries like uvloop.
* bpo-35293: Travis CI uses "make venv" for the doc (GH-22307)Victor Stinner2020-09-182-4/+11
| | | | | | | Doc/requirements.txt becomes the reference for packages and package versions needed to build the Python documentation. * Doc/Makefile now uses Doc/requirements.txt * .travis.yml now uses "make env" of Doc/Makefile
* bpo-35293: Remove RemovedInSphinx40Warning (GH-22198)Dong-hee Na2020-09-181-15/+21
| | | | | | | | | | | * bpo-35293: Remove RemovedInSphinx40Warning * Update Misc/NEWS.d/next/Documentation/2020-09-12-17-37-13.bpo-35293._cOwPD.rst Co-authored-by: Victor Stinner <vstinner@python.org> * bpo-35293: Apply Victor's review Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-41762: Fix usage of productionlist markup in the doc (GH-22281)Victor Stinner2020-09-188-69/+70
| | | | | | | Use an unique identifier for the different grammars documented using the Sphinx productionlist markup. productionlist markups of the same grammar, like "expressions" or "compound statements", use the same identifier "python-grammar".
* Remove duplicated words words (GH-22298)Serhiy Storchaka2020-09-182-3/+3
|
* bpo-41808: Add What's New 3.9 entry missing from master (#22294)Terry Jan Reedy2020-09-181-0/+5
| | | Entry was added by bpo-40939, #21012 and #21039.
* bpo-27032, bpo-37328: Document removing HTMLParser.unescape(). (GH-22288)Serhiy Storchaka2020-09-171-0/+6
|
* Enum: make `Flag` and `IntFlag` members iterable (GH-22221)Ethan Furman2020-09-161-0/+15
|
* bpo-41746: Add type information to asdl_seq objects (GH-22223)Pablo Galindo2020-09-161-1/+1
| | | | | | | | | | | | | * Add new capability to the PEG parser to type variable assignments. For instance: ``` | a[asdl_stmt_seq*]=';'.small_stmt+ [';'] NEWLINE { a } ``` * Add new sequence types from the asdl definition (automatically generated) * Make `asdl_seq` type a generic aliasing pointer type. * Create a new `asdl_generic_seq` for the generic case using `void*`. * The old `asdl_seq_GET`/`ast_seq_SET` macros now are typed. * New `asdl_seq_GET_UNTYPED`/`ast_seq_SET_UNTYPED` macros for dealing with generic sequences. * Changes all possible `asdl_seq` types to use specific versions everywhere.