Commit Graph

129 Commits

Author SHA1 Message Date
Barry Warsaw 36c1d1f1e5 PEP 553 built-in breakpoint() function (bpo-31353) (#3355)
Implement PEP 553, built-in breakpoint() with support from sys.breakpointhook(), along with documentation and tests.  Closes bpo-31353
2017-10-05 12:11:18 -04:00
Serhiy Storchaka 77732be801 bpo-30404: The -u option now makes the stdout and stderr streams totally unbuffered. (#1667) 2017-10-04 20:25:40 +03:00
INADA Naoki 1a87de7fcf bpo-31415: Add `-X importtime` option (GH-3490)
It shows show import time of each module.
It's useful for optimizing startup time.

Typical usage: python -X importtime -c 'import requests'
2017-10-03 19:46:34 +09:00
Nick Coghlan eb81795d7d bpo-30565: Add PYTHONCOERCECLOCALE=warn runtime flag (GH-2260)
- removes PY_WARN_ON_C_LOCALE build time flag
- locale coercion and compatibility warnings are now always compiled
  in, but are off by default
- adds PYTHONCOERCECLOCALE=warn runtime option to aid in
  debugging potentially locale related compatibility problems

Due to not-yet-resolved test failures on *BSD systems (including
Mac OS X), this also temporarily disables UTF-8 as a locale coercion
target, and skips testing the interpreter's behavior in the POSIX locale.
2017-06-18 12:29:42 +10:00
Nick Coghlan 6ea4186de3 bpo-28180: Implementation for PEP 538 (#659)
- new PYTHONCOERCECLOCALE config setting
- coerces legacy C locale to C.UTF-8, C.utf8 or UTF-8 by default
- always uses C.UTF-8 on Android
- uses `surrogateescape` on stdin and stdout in the coercion
  target locales
- configure option to disable locale coercion at build time
- configure option to disable C locale warning at build time
2017-06-11 13:16:15 +10:00
Berker Peksag 87fa8a780e bpo-29898: Fix incorrect env variable name (GH-1576)
It should read PYTHONLEGACYWINDOWSSTDIO as stated
in section "Add legacy mode" in PEP 528.
2017-05-16 12:36:45 +03:00
Xiang Zhang 0710d75425 bpo-29770: remove outdated PYO related info (GH-590) 2017-03-11 13:02:52 +08:00
Benjamin Peterson 35a1f7f62d massage English for -X descriptions a bit 2017-02-09 22:31:17 -08:00
INADA Naoki f576343179 Issue #28532: Add what's new entry for python -VV option 2016-11-24 17:20:40 +09:00
INADA Naoki 0e175a6e76 Issue #28532: Show sys.version when -V option is supplied twice 2016-11-21 20:57:14 +09:00
Martin Panter 9440787867 Issue #26638: Merge option warning fixes from 3.5 into 3.6 2016-10-30 04:21:23 +00:00
Martin Panter b8c5f54248 Issue #26638: Work around more CLI options that can’t be linked
* Cannot seem to link directly to main options from the “unittest” module,
  because that module has its own set of options
* Mask out linking for options that no longer exist in Python 3
2016-10-30 04:20:23 +00:00
Martin Panter 5c67933940 Issue #26638: Mask undefined CLI options to defeat new Sphinx warnings 2016-10-30 04:20:17 +00:00
Steve Dower 3929499914 Issue #1602: Windows console doesn't input or print Unicode (PEP 528)
Closes #17602: Adds a readline implementation for the Windows console
2016-08-30 21:22:36 -07:00
Steve Dower cc16be85c0 Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529) 2016-09-08 10:35:16 -07:00
Berker Peksag 09808e7530 Issue #12982: Merge from 3.5 2016-08-20 11:12:20 +03:00
Berker Peksag f43bc98c48 Issue #12982: Thanks to PEP 488, Python no longer creates .pyo files 2016-08-20 11:11:52 +03:00
Serhiy Storchaka 7e160ce356 Issue #23034: The output of a special Python build with defined COUNT_ALLOCS,
SHOW_ALLOC_COUNT or SHOW_TRACK_COUNT macros is now off by  default.  It can
be re-enabled using the "-X showalloccount" option.  It now outputs to stderr
instead of stdout.
2016-07-03 21:03:53 +03:00
Victor Stinner f5c4b99034 PyMem_Malloc() now uses the fast pymalloc allocator
Issue #26249: PyMem_Malloc() allocator family now uses the pymalloc allocator
rather than system malloc(). Applications calling PyMem_Malloc() without
holding the GIL can now crash: use PYTHONMALLOC=debug environment variable to
validate the usage of memory allocators in your application.
2016-04-22 16:26:23 +02:00
Victor Stinner d1700a9360 Fix typo in doc: avoid the french "& cie" :-) 2016-03-23 16:57:51 +01:00
Victor Stinner 9b46a57302 Doc: fix typos, patch written by Stefan Behnel 2016-03-18 15:10:43 +01:00
Victor Stinner c2fc56836f Enhance documentation on malloc debug hooks
Issue #26564, #26516, #26563.
2016-03-18 11:04:31 +01:00
Victor Stinner 34be807ca4 Add PYTHONMALLOC env var
Issue #26516:

* Add PYTHONMALLOC environment variable to set the Python memory
  allocators and/or install debug hooks.
* PyMem_SetupDebugHooks() can now also be used on Python compiled in release
  mode.
* The PYTHONMALLOCSTATS environment variable can now also be used on Python
  compiled in release mode. It now has no effect if set to an empty string.
* In debug mode, debug hooks are now also installed on Python memory allocators
  when Python is configured without pymalloc.
2016-03-14 12:04:26 +01:00
Georg Brandl 8c16cb9f65 Closes #26435: fix syntax in directives. Thanks to Jakub Stasiak. 2016-02-25 20:17:45 +01:00
Martin Panter c04fb56e36 Issue #26304: Change "allows to <verb>" to "allows <verb>ing" or similar
The original form is incorrect grammar and feels awkward, even though the
meaning is clear.
2016-02-10 05:44:01 +00:00
Martin Panter 7dda421bff Issue #14285: Do not catch exceptions initializing any ancestor package
The previous fix only handled the case of the parent package of __main__
failing to initialize.

Also make the "Error while finding spec" formatting slightly more appealing,
and document and test that the module name must be absolute.
2015-12-10 06:47:06 +00:00
Serhiy Storchaka 153627c111 Marked keystrokes with the :kbd: role.
Fixed the case of the "Ctrl-" prefixes.
2015-09-12 17:46:20 +03:00
Serhiy Storchaka 0424eaf753 Marked keystrokes with the :kbd: role.
Fixed the case of the "Ctrl-" prefixes.
2015-09-12 17:45:25 +03:00
Larry Hastings 770ce204ee Regenerated pydoc-topics and fixed bad/suspicious doc markup for Python 3.5.0a4. 2015-04-19 13:50:12 -07:00
Brett Cannon f299abdafa Issue #23731: Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
2015-04-13 14:21:02 -04:00
Serhiy Storchaka 1dd49824df Issue #23681: The -b option now affects comparisons of bytes with int. 2015-03-20 16:54:57 +02:00
Berker Peksag 8b1cbd2b7c Issue #12602: Add missing cross-references to runpy and using/cmdline docs.
Patch by Éric Araujo.
2014-12-10 01:47:02 +02:00
Georg Brandl 525d355984 Fixing broken links in doc, part 3: the rest 2014-10-29 10:26:56 +01:00
Georg Brandl 75f7490843 PYTHONY2K is long gone. Remove traces from the docs and manpage. 2014-10-28 17:15:10 +01:00
Berker Peksag 9c1dba2758 Revert #22251 2014-09-28 00:00:58 +03:00
Berker Peksag 3749404ba5 Issue #22251: Fix ReST markup to avoid errors building docs. 2014-09-27 23:21:35 +03:00
Victor Stinner 62511fd6d6 asyncio: document the debug mode 2014-06-23 00:36:11 +02:00
Victor Stinner 0f3e6bca1b asyncio, Tulip issue #136: Add get/set_debug() methods to BaseEventLoopTests.
Add also a PYTHONASYNCIODEBUG environment variable to debug coroutines since
Python startup, to be able to debug coroutines defined directly in the asyncio
module.
2014-02-19 23:15:02 +01:00
R David Murray 5147e00c81 whatsnew: -m <namespace package>, plus 'using' doc updates. 2014-02-02 12:19:57 -05:00
Victor Stinner 3728d6ced0 Issue #18874: Remove tracemalloc.set_traceback_limit()
tracemalloc.start() now has an option nframe parameter
2013-11-23 12:37:20 +01:00
Victor Stinner ed3b0bca3e Issue #18874: Implement the PEP 454 (tracemalloc) 2013-11-23 12:27:24 +01:00
Serhiy Storchaka bf28d2dcad Issue #18818: The "encodingname" part of PYTHONIOENCODING is now optional. 2013-09-13 11:46:24 +03:00
Victor Stinner 8898350076 Close #18957: The PYTHONFAULTHANDLER environment variable now only enables the
faulthandler module if the variable is non-empty. Same behaviour than other
variables like PYTHONDONTWRITEBYTECODE.
2013-09-08 11:36:23 +02:00
Christian Heimes ad73a9cf97 Issue #16400: Add command line option for isolated mode.
-I

    Run Python in isolated mode. This also implies -E and -s. In isolated mode
    sys.path contains neither the script’s directory nor the user’s
    site-packages directory. All PYTHON* environment variables are ignored,
    too. Further restrictions may be imposed to prevent the user from
    injecting malicious code.
2013-08-10 16:36:18 +02:00
Victor Stinner b6738df111 (Merge 3.3) doc of PYTHONFAULTHANDLER env var: add missing "versionadded" tag 2013-07-28 02:57:02 +02:00
Victor Stinner ae6d05bcb9 doc of PYTHONFAULTHANDLER env var: add missing "versionadded" tag 2013-07-28 02:56:50 +02:00
Ezio Melotti 3e1e97a99a #16937: merge with 3.3. 2013-07-25 05:04:50 +02:00
Ezio Melotti 61b0c672b5 #16937: document that stdin is always buffered, even when -u is used. Patch by Elena Oat. 2013-07-25 05:04:02 +02:00
Antoine Pitrou 1a6cb30a34 Issue #5845: Enable tab-completion in the interactive interpreter by default, thanks to a new sys.__interactivehook__.
(original patch by Éric Araujo)
2013-05-04 20:08:35 +02:00
Ezio Melotti 711c37076a Merge versionadded addition and typo fix from 3.3. 2013-03-26 02:38:40 +02:00