summaryrefslogtreecommitdiffstats
path: root/Doc
Commit message (Collapse)AuthorAgeFilesLines
* bpo-35713: Rework Python initialization (GH-11647)Victor Stinner2019-01-221-0/+4
| | | | | | | | | | | | | | | | | | | * The PyByteArray_Init() and PyByteArray_Fini() functions have been removed. They did nothing since Python 2.7.4 and Python 3.2.0, were excluded from the limited API (stable ABI), and were not documented. * Move "_PyXXX_Init()" and "_PyXXX_Fini()" declarations from Include/cpython/pylifecycle.h to Include/internal/pycore_pylifecycle.h. Replace "PyAPI_FUNC(TYPE)" with "extern TYPE". * _PyExc_Init() now returns an error on failure rather than calling Py_FatalError(). Move macros inside _PyExc_Init() and undefine them when done. Rewrite macros to make them look more like statement: add ";" when using them, add "do { ... } while (0)". * _PyUnicode_Init() now returns a _PyInitError error rather than call Py_FatalError(). * Move stdin check from _PySys_BeginInit() to init_sys_streams(). * _Py_ReadyTypes() now returns a _PyInitError error rather than calling Py_FatalError().
* bpo-33416: Add end positions to Python AST (GH-11605)Ivan Levkivskyi2019-01-221-9/+31
| | | | | | | | | | | | | | | | | | The majority of this PR is tediously passing `end_lineno` and `end_col_offset` everywhere. Here are non-trivial points: * It is not possible to reconstruct end positions in AST "on the fly", some information is lost after an AST node is constructed, so we need two more attributes for every AST node `end_lineno` and `end_col_offset`. * I add end position information to both CST and AST. Although it may be technically possible to avoid adding end positions to CST, the code becomes more cumbersome and less efficient. * Since the end position is not known for non-leaf CST nodes while the next token is added, this requires a bit of extra care (see `_PyNode_FinalizeEndPos`). Unless I made some mistake, the algorithm should be linear. * For statements, I "trim" the end position of suites to not include the terminal newlines and dedent (this seems to be what people would expect), for example in ```python class C: pass pass ``` the end line and end column for the class definition is (2, 8). * For `end_col_offset` I use the common Python convention for indexing, for example for `pass` the `end_col_offset` is 4 (not 3), so that `[0:4]` gives one the source code that corresponds to the node. * I added a helper function `ast.get_source_segment()`, to get source text segment corresponding to a given AST node. It is also useful for testing. An (inevitable) downside of this PR is that AST now takes almost 25% more memory. I think however it is probably justified by the benefits.
* Add information about DeprecationWarning for invalid escaped characters in ↵Pablo Galindo2019-01-201-1/+4
| | | | the re module (GH-5255)
* bpo-21257: document http.client.parse_headers (GH-11443)Ashwin Ramaswami2019-01-181-0/+19
| | | Document http.client.parse_headers
* bpo-34850: Emit a warning for "is" and "is not" with a literal. (GH-9642)Serhiy Storchaka2019-01-181-0/+7
|
* bpo-23156: Remove obsolete tix install directions (GH-11595)Terry Jan Reedy2019-01-181-11/+0
| | | Tix was deprecated in 3.6 and the doc is wrong. New users should use ttk.
* bpo-35283: Add deprecation warning for Thread.isAlive (GH-11454)Dong-hee Na2019-01-171-0/+2
| | | Add a deprecated warning for the threading.Thread.isAlive() method.
* Fixes typo in asyncio.queue doc (GH-11581)Slam2019-01-171-1/+1
| | | | | | | Typo fix for method doc, I'm pretty sure coro is meant, because there's no consumer threads for thread-unsafe queue. Most probably this piece of doc was copied from `queue.Queue` There's not BPO bug for this, afaik.
* bpo-35486: Note Py3.6 import system API requirement change (GH-11540)Nick Coghlan2019-01-172-1/+13
| | | | | | | | | | While the introduction of ModuleNotFoundError was fully backwards compatible on the import API consumer side, folks providing alternative implementations of `__import__` need to make an update to be forward compatible with clients that start relying on the new subclass. https://bugs.python.org/issue35486
* Revert "bpo-35537: subprocess can now use os.posix_spawnp (GH-11579)" (GH-11582)Victor Stinner2019-01-161-1/+2
| | | This reverts commit 07858894689047c77f9c12ddc061d30681368d19.
* bpo-35537: subprocess can now use os.posix_spawnp (GH-11579)Victor Stinner2019-01-161-2/+1
| | | | The subprocess module can now use the os.posix_spawnp() function, if it is available, to locate the program in the PATH.
* bpo-35674: Add os.posix_spawnp() (GH-11554)Joannah Nanjekye2019-01-161-0/+17
| | | Add a new os.posix_spawnp() function.
* bpo-35537: subprocess uses os.posix_spawn in some cases (GH-11452)Victor Stinner2019-01-151-0/+9
| | | | | | | | | | | | The subprocess module can now use the os.posix_spawn() function in some cases for better performance. Currently, it is only used on macOS and Linux (using glibc 2.24 or newer) if all these conditions are met: * executable path contains a directory * close_fds=False * preexec_fn, pass_fds, cwd, stdin, stdout, stderr and start_new_session parameters are not set Co-authored-by: Joannah Nanjekye <nanjekyejoannah@gmail.com>
* bpo-35738: Update the example for timer.Timer.repeat(). (GH-11559)Henry Chen2019-01-151-1/+1
| | | Show correct number of repeats.
* bpo-29707: Document that os.path.ismount() is not able to reliable detect ↵Serhiy Storchaka2019-01-151-3/+4
| | | | bind mounts. (GH-11238)
* bpo-34512: Document platform-specific strftime() behavior for non-ASCII ↵Alexey Izbyshev2019-01-121-0/+6
| | | | format strings (GH-8948)
* bpo-35716: Update time.CLOCK_MONOTONIC_RAW doc (GH-11517)Joannah Nanjekye2019-01-111-2/+2
| | | | | | Document that the time.CLOCK_MONOTONIC_RAW constant is now also available on macOS 10.12. Co-authored-by: Ricardo Fraile <rfraile@rfraile.eu>
* bpo-32146: Add documentation about frozen executables on Unix (GH-5850)Bo Bayles2019-01-101-0/+7
|
* bpo-35702: Add new identifier time.CLOCK_UPTIME_RAW for macOS 10.12 (GH-11503)Joannah Nanjekye2019-01-102-0/+18
|
* Update bugs.rst (GH-9648)Andre Delfino2019-01-091-1/+1
|
* bpo-35404: Clarify how to import _structure in email.message doc (GH-10886)Charles-Axel Dein2019-01-091-1/+1
|
* Add example to the documentation for calling unittest.mock.patch with ↵Pablo Galindo2019-01-091-7/+28
| | | | create=True (GH-11056)
* bpo-35568: add 'raise_signal' function (GH-11335)Vladimir Matveev2019-01-081-0/+7
| | | | | | As in title, expose C `raise` function as `raise_function` in `signal` module. Also drop existing `raise_signal` in `_testcapi` module and replace all usages with new function. https://bugs.python.org/issue35568
* bpo-35374: Avoid trailing space in hhc file name if found on PATH. (GH-10849)chrullrich2019-01-081-1/+1
|
* bpo-35631: Improve typing docs wrt abstract/concrete collection types (GH-11396)Ville Skyttä2019-01-041-8/+17
| | | | https://bugs.python.org/issue35631
* bpo-31450: Remove documentation mentioning that subprocess's child_traceback ↵Harmandeep Singh2019-01-031-3/+1
| | | | is available with the parent process (GH-11422)
* bpo-35525: Correct the argument name for NNTP.starttls() (GH-11310)Harmandeep Singh2019-01-021-2/+2
|
* Bump copyright years to 2019. (GH-11404)Benjamin Peterson2019-01-022-2/+2
|
* Fix typo in documentation of AbstractEventLoopPolicy.set_child_watcher() ↵sth2018-12-301-1/+1
| | | | | (GH-11369) `set_child_watcher()` *sets* the watcher.
* bpo-28097: IDLE - Add Previous/Next History to Shell menu (#11325)Cheryl Sabella2018-12-281-0/+6
|
* bpo-20849: add dirs_exist_ok arg to shutil.copytree (patch by Josh Bronson)jab2018-12-282-8/+20
|
* bpo-35579: Fix typo in in asyncio-task documentation (GH-11321)Vaibhav Gupta2018-12-261-1/+1
| | | | | | https://bugs.python.org/issue35579 https://bugs.python.org/issue35579
* Redo PR 785 -- Add cross reference links (GH-11319)Raymond Hettinger2018-12-261-0/+5
|
* Minor grammar improvement in types.rst (GH-11308)Mariatta2018-12-241-1/+1
| | | | | defines utility function -> defines utility functions Reported in https://mail.python.org/pipermail/docs/2018-December/038693.html
* Fix minor grammatical mistakes in reversed(dict) doc (GH-10997)Andre Delfino2018-12-241-2/+2
|
* Tweak wording about Fraction and Decimal (GH-10904)Andre Delfino2018-12-241-2/+2
|
* bpo-35566: Add links to annotation glossary term (GH-11291)Cheryl Sabella2018-12-244-11/+11
|
* bpo-34764: improve docs example of iter() with sentinel value (GH-11222)Chris Rands2018-12-241-7/+8
|
* Add 2 missing commas (GH-10698)Boštjan Mejak2018-12-231-1/+1
|
* Document that dict.fromkeys accepts any iterable for keys (GH-10998)Andre Delfino2018-12-231-2/+2
|
* bpo-35564: add master_doc='contents' to conf.py (GH-11290)Jean-François B2018-12-221-0/+2
|
* bpo-30455: Generate all token related code and docs from Grammar/Tokens. ↵Serhiy Storchaka2018-12-222-58/+207
| | | | | | | | | | | | | | | | | | | (GH-10370) "Include/token.h", "Lib/token.py" (containing now some data moved from "Lib/tokenize.py") and new files "Parser/token.c" (containing the code moved from "Parser/tokenizer.c") and "Doc/library/token-list.inc" (included in "Doc/library/token.rst") are now generated from "Grammar/Tokens" by "Tools/scripts/generate_token.py". The script overwrites files only if needed and can be used on the read-only sources tree. "Lib/symbol.py" is now generated by "Tools/scripts/generate_symbol_py.py" instead of been executable itself. Added new make targets "regen-token" and "regen-symbol" which are now dependencies of "regen-all". The documentation contains now strings for operators and punctuation tokens.
* bpo-22703: IDLE: Improve Code Context and Zoom Height menu labels (GH-11214)Cheryl Sabella2018-12-221-8/+8
| | | | | | | | The Code Context menu label now toggles between Show/Hide Code Context. The Zoom Height menu now toggles between Zoom/Restore Height. Zoom Height has moved from the Window menu to the Options menu. https://bugs.python.org/issue22703
* bpo-33830: Fix an example in http.client docs for 404. (GH-7780)Xtreak2018-12-211-0/+1
|
* bpo-35521: Add more cross-refs to IDLE docs (#11257)Terry Jan Reedy2018-12-201-12/+19
| | | Format menu and preferences.
* bpo-18085: Update refcounts.dat. (GH-11247)Serhiy Storchaka2018-12-202-333/+1207
| | | | | Fixed some errors in refcounts.dat, remove functions removed in Python 3, and add more entries for documented functions. This will add several automatically generated notes about return values.
* bpo-35521: IDLE: Add code context section to docs (#11205)Cheryl Sabella2018-12-201-6/+35
| | | Also add some internal cross-references.
* bpo-35482: Fixes HTML escaping in CHM index and build location of NEWS file ↵Steve Dower2018-12-203-10/+29
| | | | (GH-11224)
* bpo-32077: Update refcounts.dat for Unicode object functions. (GH-11243)Mat M2018-12-191-44/+231
| | | | | | | | Makes the documentation more comprehensive in terms of indicating whether or not a function returns a new reference. Also fixes some errors and adds missing functions.
* Fix documented signatures for C API functions. (GH-11236)Serhiy Storchaka2018-12-192-5/+5
|