bdist_wininst depends on MBCS codec, unavailable on non-Windows,
and bdist_wininst have not worked since at least Python 3.2, possibly
never on Python 3.
Here we document that bdist_wininst is only supported on Windows,
and we mark it unsupported otherwise to skip tests.
Distributors of Python 3 can now safely drop the bdist_wininst .exe files
without the need to skip bdist_wininst related tests.
(cherry picked from commit 72cd653c4e)
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* Added documentation for textwrap.dedent behavior.
* Remove an obsolete note about pre-2.5 behavior from the docstring.
(cherry picked from commit eb97b9211e)
Co-authored-by: tmblweed <tmblweed@users.noreply.github.com>
Add a missing single quote character in the documentation for `io.TextIOWrapper.reconfigure`.
(cherry picked from commit 35068bd059)
Co-authored-by: Harmon <Harmon758@gmail.com>
For datetime.datetime.strptime(), the leading zero for some two-digit formats is optional.
This adds a footnote to the strftime/strptime documentation to reflect this fact, and adds some tests to ensure that it is true.
bpo-34903
(cherry picked from commit 6b9c204ee7)
Co-authored-by: Mike Gleen <mike.gleen@gmail.com>
The initialize options are 1) add command line options, which are appended to sys.argv as if passed on a real command line, and 2) skip the shell restart. The customization dialog is accessed by a new entry on the Run menu.
(cherry picked from commit 201bc2d18b)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
Measure required height by quickly maximizing once per screen.
A search for a better method failed.
(cherry picked from commit 5bff3c86ab)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
This PR adds missing details in the [`concurrent.futures`](https://docs.python.org/3/library/concurrent.futures.html) documentation:
* the mention that `Future.cancel` also returns `False` if the call finished running;
* the mention of the states for `Future` that did not complete: pending or running.
(cherry picked from commit 431478d5d7)
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Python 3.6 changed the size of bytecode instruction, while the documentation for `EXTENDED_ARG` was not updated accordingly.
(cherry picked from commit 405f648db7)
Co-authored-by: Yao Zuo <laike9m@users.noreply.github.com>
* Improve example on tzinfo instances
Move from GMTX to TZX when naming the classes, as GMT1 might be rather
confusing as seen in the reported issue.
In addition, move to UTC over GMT and improve the tzname implementation.
* Simplify datetime with tzinfo example
Move the example in the documentation to just use timezone.utc and a
user defined Kabul timezone rather than having two user defined
timezones with DST.
Kabul timezone is still interesting as it changes its offset but not
based on DST. This is more accurate as the previous example was missing
information about the fold attribute. Additionally, implementing the fold
attribute was rather complex and probably not relevant enough for the
section "datetime with tzinfo".
(cherry picked from commit f0b5ae4567)
Co-authored-by: Mario Corchero <mcorcherojim@bloomberg.net>
What's new now mentions SSLContext.hostname_checks_common_name instead of SSLContext.host_flags.
https://bugs.python.org/issue36868
(cherry picked from commit 47eb223406)
Co-authored-by: Christian Heimes <christian@python.org>
* bpo-19184: Update the documentation of dis module
* Explain the behavior of the number of arguments of RAISE_VARGARGS
opcode.
* bpo-19184: Update blurb.
* bpo-19184: Fix typo in the dis Documentation.
* bpo-19184: Address review comments and improve the doc
* bpo-19184: Remove news file.
(cherry picked from commit e1179a5096)
Co-authored-by: Michele Angrisano <michele.angrisano@gmail.com>
* bpo-37014: Update docstring and Documentation of fileinput.FileInput()
* Explain the behavior of fileinput.FileInput() when reading stdin.
* Update blurb.
* bpo-37014: Fix typo in the docstring and documentation.
(cherry picked from commit aca273e240)
Co-authored-by: Michele Angrisano <michele.angrisano@gmail.com>
in addition to global-statement also mention nonlocal-statement
(in the paragraph describing access to variables which are non local to a function
(cherry picked from commit e1f95e77e0)
Co-authored-by: pbhd <p-bauer-schriesheim@t-online.de>
Per ae58649, time.monotonic is always available, making the old note outdated.
(cherry picked from commit 293e9f86b8)
Co-authored-by: Brad <brad.solomon.1124@gmail.com>
Move doc entry to match menu and refactor zoom function.
A followup patch will include a blurb.
(cherry picked from commit df9b032f47)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
``_thread.interrupt_main()`` now avoids setting the Python error status if the ``SIGINT`` signal is ignored or not handled by Python.
(cherry picked from commit 608876b6b1)
Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
PyErr_WriteUnraisable() now displays the exception even if displaying
the traceback failed. Moreover, hold a strong reference to sys.stderr
while using it.
Document that an exception must be set when calling
PyErr_WriteUnraisable(), but don't add an assertion to check it at
runtime.
Cleanup: use longer names for variables and create
write_unraisable_exc_file() subfunction.
Print any argument other than None or int passed to SystemExit
or sys.exit().
(cherry picked from commit 6d965b39b7)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
The sqlite3.Connection object doesn't call its close() method when it's used
as a context manager.
(cherry picked from commit 287b84de93)
Co-authored-by: Xtreak <tir.karthi@gmail.com>
Given example does not run, loop variable is missing.
Secondly, this is bad example how to handle shutdown signal, because it would cause `RuntimeError: Event loop stopped before Future completed.`
Perhaps it would be better to cancel all tasks instead of closing loop directly?
Did not create issue, because question is quite simple.
(cherry picked from commit ceb842e155)
Co-authored-by: Alexander Vasin <hi@alvass.in>
Makes the documentation of math and cmath module
more helpful for the beginners.
(cherry picked from commit 6faad355db)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Clarify how to capture stdout and stderr combined into one stream.
(cherry picked from commit e883091abf)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
* Docs: Add bz2 usage examples
- Adds an "Examples of usage" section inspired by the one
found in the gzip docs
- Corrects the descriptions for ``compresslevel`` and ``data``:
- ``compresslevel`` must be an `int`, not any number. For
instance, passing a float will raise ``TypeError``
- Notes that `data` must be bytes-like
(cherry picked from commit be6939fb02)
Co-authored-by: Brad <brad.solomon.1124@gmail.com>
Update 'unicode' capitalization. 'Unicode' is a proper noun, and as such should be capitalized.
Changed multiple instances.
(cherry picked from commit 85225b6a58)
Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
The new markup is currently ignored by IDLE's tk doc display.
(cherry picked from commit 55d035113d)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
GH- [bpo-36651](https://bugs.python.org/issue36651): Fixed Asyncio Event Loop documentation inconsistency
In the documentation for the call_later and the call_at methods there is a note which says that the delay cannot be longer than a day, but both methods have a note saying that this limitation was removed in Python 3.8
Here I fixed this issue by removing the pre-exising note and added a versionchanged.
To test my changes I have rebuilt the documentation with ```make html```. I did not have any errors and the effected page displayed correctly on a browser.
https://bugs.python.org/issue36651
(cherry picked from commit 7e954e7de4)
Co-authored-by: Enrico Alarico Carbognani <enrico.carbognani@gmail.com>
This paragraph doesn't seem to be a part of code, but merged into previous code block.
(cherry picked from commit 9941f963fe)
Co-authored-by: cocoatomo <cocoatomo77@gmail.com>
Calling these function from a thread when the runtime is finalizing will terminate
the thread, even if the thread was not created by Python. Users can use
_Py_IsFinalizing or sys.is_finalizing to check if the interpreter is in the process of
being finalized before calling this function to avoid unwanted termination.
(cherry picked from commit fde9b33)
Since bpo-30291 it is possible to specify the architecture of Python when using the launcher
(cherry picked from commit 1e2ad6c275)
Co-authored-by: mrh1997 <mrh1997@users.noreply.github.com>
* bpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770)
Replace _PyMem_IsFreed() function with _PyMem_IsPtrFreed() inline
function. The function is now way more efficient, it became a simple
comparison on integers, rather than a short loop. It detects also
uninitialized bytes and "forbidden bytes" filled by debug hooks
on memory allocators.
Add unit tests on _PyObject_IsFreed().
(cherry picked from commit 2b00db6855)
* bpo-36389: Change PyMem_SetupDebugHooks() constants (GH-12782)
Modify CLEANBYTE, DEADDYTE and FORBIDDENBYTE constants: use 0xCD,
0xDD and 0xFD, rather than 0xCB, 0xBB and 0xFB, to use the same byte
patterns than Windows CRT debug malloc() and free().
(cherry picked from commit 4c409beb4c)
Move all documentation regarding the readinto method into either io.RawIOBase or io.BufferedIOBase.
Corresponding changes to documentation in the _pyio.py module.
(cherry picked from commit 7b97ab35b2)
Co-authored-by: Steve Palmer <steve@srpalmer.me.uk>
Remove names from the "unimplemented interfaces" list
in the minidom docs that are actually implemented.
(cherry picked from commit 2ea8099523)
Co-authored-by: Stefan Behnel <stefan_ml@behnel.de>
I have added documentation for `PyInterpreterState_Main()`.
I chose to place it under Advanced Debugger Support together with similar functions like `PyInterpreterState_Head()`, `PyInterpreterState_Next(`), and `PyInterpreterState_ThreadHead()` .
https://bugs.python.org/issue36157
(cherry picked from commit 8c61739def)
Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
* bpo-34085: Improve wording on classmethod/staticmethod
* Address comments from Éric
* Address comments from Éric
(cherry picked from commit 548cb6060a)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
Clarify capturing or suppressing stdout and stderr on the old call APIs.
Do not state that they are equivalent to run() calls when they are not implemented using run as that was misleading. Unlike run they cannot handle stdout or stderr being set to PIPE without a risk of deadlock.
(cherry picked from commit 7a2e84c348)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Clarify that the naming of protocol handler methods shouldn't be literally called "protocol" but should be named after the actual protocol.
https://bugs.python.org/issue35155
(cherry picked from commit dd7c4ceed9)
Co-authored-by: Denton Liu <liu.denton+github@gmail.com>
* Replace external recipe link with a link to the dataclasses module.
* Highlight the class definition syntax for typing.NamedTuple
and add an example for clarity.
(cherry picked from commit 9c68543f02)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Be explicit that timedelta division converts an overall duration to the interval
units given by the denominator.
(cherry picked from commit f40b4a0b62)
Co-authored-by: Yasser A <yalshalaan@gmail.com>