Brett Cannon
aa3e69e57f
Merge for issue #23936
2015-12-04 15:46:43 -08:00
Brett Cannon
ccddbb186b
Issue #23936 : Clarify what finders are.
...
Thanks to Raúl Cumplido for the bug report and Thomas Kluyver for the
patch.
2015-12-04 15:46:21 -08:00
Martin Panter
b4ce1fc31b
Issue #5319 : New Py_FinalizeEx() API to exit with status 120 on failure
2015-11-30 03:18:29 +00:00
Victor Stinner
50856d5ae7
sys.setrecursionlimit() now raises RecursionError
...
Issue #25274 : sys.setrecursionlimit() now raises a RecursionError if the new
recursion limit is too low depending at the current recursion depth. Modify
also the "lower-water mark" formula to make it monotonic. This mark is used to
decide when the overflowed flag of the thread state is reset.
2015-10-13 00:11:21 +02:00
Martin Panter
84835ab1cb
Issue #25161 : Merge full stops from 3.4 into 3.5
2015-10-10 10:44:25 +00:00
Martin Panter
d21e0b52f1
Issue #25161 : Add full stops in documentation; patch by Takase Arihiro
2015-10-10 10:36:22 +00:00
Zachary Ware
3d3aedc8ba
Fix usage of the default role.
2015-07-07 00:07:25 -05:00
Yury Selivanov
66f8828bfc
Issue #24439 : Improve PEP 492 related docs.
...
Patch by Martin Panter.
2015-06-24 11:04:15 -04:00
Yury Selivanov
5376ba9630
Issue #24400 : Introduce a distinct type for 'async def' coroutines.
...
Summary of changes:
1. Coroutines now have a distinct, separate from generators
type at the C level: PyGen_Type, and a new typedef PyCoroObject.
PyCoroObject shares the initial segment of struct layout with
PyGenObject, making it possible to reuse existing generators
machinery. The new type is exposed as 'types.CoroutineType'.
As a consequence of having a new type, CO_GENERATOR flag is
no longer applied to coroutines.
2. Having a separate type for coroutines made it possible to add
an __await__ method to the type. Although it is not used by the
interpreter (see details on that below), it makes coroutines
naturally (without using __instancecheck__) conform to
collections.abc.Coroutine and collections.abc.Awaitable ABCs.
[The __instancecheck__ is still used for generator-based
coroutines, as we don't want to add __await__ for generators.]
3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to
allow passing native coroutines to the YIELD_FROM opcode.
Before this change, 'yield from o' expression was compiled to:
(o)
GET_ITER
LOAD_CONST
YIELD_FROM
Now, we use GET_YIELD_FROM_ITER instead of GET_ITER.
The reason for adding a new opcode is that GET_ITER is used
in some contexts (such as 'for .. in' loops) where passing
a coroutine object is invalid.
4. Add two new introspection functions to the inspec module:
getcoroutinestate(c) and getcoroutinelocals(c).
5. inspect.iscoroutine(o) is updated to test if 'o' is a native
coroutine object. Before this commit it used abc.Coroutine,
and it was requested to update inspect.isgenerator(o) to use
abc.Generator; it was decided, however, that inspect functions
should really be tailored for checking for native types.
6. sys.set_coroutine_wrapper(w) API is updated to work with only
native coroutines. Since types.coroutine decorator supports
any type of callables now, it would be confusing that it does
not work for all types of coroutines.
7. Exceptions logic in generators C implementation was updated
to raise clearer messages for coroutines:
Before: TypeError("generator raised StopIteration")
After: TypeError("coroutine raised StopIteration")
2015-06-22 12:19:30 -04:00
Yury Selivanov
4180e43c12
Docs: Fix typo
2015-06-04 11:10:24 -04:00
Yury Selivanov
aab3c4a211
Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefully
2015-06-02 18:43:51 -04:00
Yury Selivanov
d4cbbebe2d
Issue 24180: Document sys.(set|get)_coroutine_wrapper
2015-05-31 17:13:08 -04: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
Antoine Pitrou
5db1bb81ff
Issue #22696 : Add function :func:`sys.is_finalizing` to know about interpreter shutdown.
2014-12-07 01:28:27 +01:00
Georg Brandl
93a56cdc37
Doc: fix default role usage (except in unittest mock docs)
2014-10-30 22:25:41 +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
Georg Brandl
6b4c847c4f
Doc: fix default role usage (except in unittest mock docs)
2014-10-30 22:26:26 +01:00
Antoine Pitrou
2d1ec06484
Issue #21364 : remove recommendation of broken pattern.
2014-05-15 22:38:56 +02:00
Georg Brandl
df48b97855
Fix a few scoping issues with versionadded/versionchanged directives.
2014-03-24 09:06:18 +01:00
R David Murray
f93d3dfc50
closes #20960
2014-03-17 11:20:29 -04:00
Larry Hastings
3732ed2414
Merge in all documentation changes since branching 3.4.0rc1.
2014-03-15 21:13:56 -07:00
Serhiy Storchaka
2a6145290b
Removed spaces before commas and periods.
2013-12-23 18:21:57 +02:00
Serhiy Storchaka
a4d170d985
Removed spaces before commas and periods.
2013-12-23 18:20:51 +02:00
Victor Stinner
5f5657ee50
(Merge 3.3) Issue #19728 : Fix sys.getfilesystemencoding() documentation
2013-12-02 12:17:29 +01:00
Victor Stinner
22d0418f71
Issue #19728 : Fix sys.getfilesystemencoding() documentation
2013-12-02 12:16:46 +01:00
Serhiy Storchaka
0e90e99188
Issue #19795 : Improved markup of True/False constants.
2013-11-29 12:19:53 +02:00
Serhiy Storchaka
fbc1c26803
Issue #19795 : Improved markup of True/False constants.
2013-11-29 12:17:13 +02:00
Christian Heimes
985ecdcfc2
ssue #19183 : Implement PEP 456 'secure and interchangeable hash algorithm'.
...
Python now uses SipHash24 on all major platforms.
2013-11-20 11:46:18 +01:00
Andrew Kuchling
c61b913078
#13226 : update references from ctypes/DLFCN modules to os module
2013-06-21 10:58:41 -04:00
Brett Cannon
c3511c1dd8
Issue #17953 : document that sys.modules shouldn't be replaced (thanks
...
to interp->modules) and that deleting essential items from the dict
can cause Python to blow up.
Thanks to Terry Reedy for coming up with initial wording and Yogesh
Chaudhari for coming up with a patch using that wording in parallel to
my own patch.
2013-05-24 08:05:07 -04:00
Brett Cannon
6489d0b380
merge fix for issue #17953
2013-05-24 17:31:37 -04: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
Georg Brandl
1bab7134a8
Merge with 3.3.
2013-03-28 13:28:55 +01:00
Georg Brandl
44ea77bd81
Closes #4159 : add LaTeX tabular column specifications to tables that otherwise are cut off or have overlapping text.
2013-03-28 13:28:44 +01:00
Brett Cannon
115309acec
Issue #17176 : Document that imp.NullImporter is no longer
...
automatically used by import.
2013-03-13 10:58:50 -07:00
Brett Cannon
2514b4871f
Issue #17176 : Document that imp.NullImporter is no longer inserted
...
into sys.path_importer_cache.
2013-03-13 10:46:22 -07:00
Nick Coghlan
90c91afd2e
Merge fix for #15465 from 3.3
2013-03-07 23:45:03 +10:00
Nick Coghlan
7d82c8621b
Close #15465 : Document C API version macros
...
Mostly moving the existing macro docs over from the standard
library docs to the C API docs where they belong.
Patch by Kushal Das.
2013-03-07 23:14:44 +10:00
Benjamin Peterson
184f01544f
merge 3.3 ( #7340 )
2013-01-15 16:49:35 -05:00
Benjamin Peterson
0ad344a832
remove warning about tb circular reference ( closes #7340 )
2013-01-15 16:49:22 -05:00
Antoine Pitrou
928405303d
Following issue #13390 , fix compilation --without-pymalloc, and make sys.getallocatedblocks() return 0 in that situation.
2012-12-17 23:05:59 +01:00
Antoine Pitrou
f9d0b1256f
Issue #13390 : New function :func:`sys.getallocatedblocks()` returns the number of memory blocks currently allocated.
...
Also, the ``-R`` option to regrtest uses this function to guard against memory allocation leaks.
2012-12-09 14:28:26 +01:00
Éric Araujo
bb7da03f6e
Merge fixes for #13614 , #13512 and #7719 from 3.3
2012-12-08 22:57:08 -05:00
Éric Araujo
3f7c0e4036
Merge fixes for #13614 , #13512 and #7719 from 3.2
2012-12-08 22:53:43 -05:00
Éric Araujo
9bc9ab5f85
Fix a few markup/grammar nits
2012-12-08 18:35:31 -05:00
Barry Warsaw
b72c10996e
- Issue #16514 : Fix regression causing a traceback when sys.path[0] is None
...
(actually, any non-string or non-bytes type).
2012-11-20 15:35:27 -05:00
Barry Warsaw
82c1c781c7
- Issue #16514 : Fix regression causing a traceback when sys.path[0] is None
...
(actually, any non-string or non-bytes type).
2012-11-20 15:22:51 -05:00
Jesus Cea
f6c2e894ae
#16135 : Removal of OS/2 support (Docs)
2012-10-05 01:11:10 +02:00
Vinay Sajip
cd9b746b37
Added cross-references to venv definition.
2012-07-09 10:37:01 +01:00
David Malcolm
49526f48fc
Issue #14785 : Add sys._debugmallocstats() to help debug low-level memory allocation issues
2012-06-22 14:55:41 -04:00
Martin v. Löwis
1e5d0ff8a0
Elaborate that sizeof only accounts for the object itself.
2012-06-17 10:40:16 +02:00
Barry Warsaw
9b10e1fbb9
A few documentation improvements, spurred on by Brett's review.
2012-06-04 11:06:45 -04:00
Barry Warsaw
409da157d7
Eric Snow's implementation of PEP 421.
...
Issue 14673: Add sys.implementation
2012-06-03 16:18:47 -04:00
Georg Brandl
039b01d015
Add missing versionadded.
2012-05-26 09:11:22 +02:00
Vinay Sajip
7ded1f0f69
Implemented PEP 405 (Python virtual environments).
2012-05-26 03:45:29 +01:00
Georg Brandl
a673eb895e
Fix invalid markup and update suspicious ignores.
2012-03-04 16:17:05 +01:00
Georg Brandl
335d628a66
merge with 3.2
2012-02-23 21:17:27 +01:00
Georg Brandl
eb25fb7af7
Fix markup errors.
2012-02-23 21:12:39 +01:00
Georg Brandl
2fb477c0f0
Merge 3.2: Issue #13703 plus some related test suite fixes.
2012-02-21 00:33:36 +01:00
Georg Brandl
09a7c72cad
Merge from 3.1: Issue #13703 : add a way to randomize the hash values of basic types (str, bytes, datetime)
...
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 21:31:46 +01:00
Georg Brandl
2daf6ae249
Issue #13703 : add a way to randomize the hash values of basic types (str, bytes, datetime)
...
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 19:54:16 +01:00
Petri Lehtinen
4b0eab62f0
Merge branch 3.2
...
Closes #13402 .
2012-02-02 21:23:15 +02:00
Petri Lehtinen
9713321f46
Document absoluteness of sys.executable
...
Closes #13402 .
2012-02-02 20:59:50 +02:00
Antoine Pitrou
a8ff01ca74
Issue #13597 : Improve documentation of standard streams.
2011-12-15 16:26:03 +01:00
Antoine Pitrou
7158e06212
Issue #13597 : Improve documentation of standard streams.
2011-12-15 16:25:34 +01:00
Mark Dickinson
895d181128
Issue #12245 merge.
2011-11-19 16:27:22 +00:00
Mark Dickinson
b1e58fe43f
Issue #12245 : Document sys.float_info.rounds better.
2011-11-19 16:26:45 +00:00
Victor Stinner
8b905bd9d4
Issue #13226 : Add RTLD_xxx constants to the os module. These constants can by
...
used with sys.setdlopenflags().
2011-10-25 13:34:04 +02:00
Éric Araujo
1079bdfde3
Merge 3.2
2011-10-05 01:52:45 +02:00
Éric Araujo
58a9153c9f
Fix markup used in the documentation of sys.prefix and sys.exec_prefix.
...
- Using the file role with {placeholders} is IMO clearer than fake
Python code.
- The fact that sys.version[:3] gives '3.2' is a CPython detail and
should not be advertised (see #9442 ), even if some stdlib modules
currently rely on that detail.
2011-10-05 01:28:24 +02:00
Éric Araujo
da27263b4a
Move doc of sys.dont_write_bytecode to make all attributes sorted again
2011-10-05 01:17:38 +02:00
Éric Araujo
525b1e9dd4
Fix minor wording issue.
...
sys.maxunicode is not called and thus does not return anything; it *is*
something. (I checked the doc quickly to see if it tells that
expression return things but found nothing.)
I also removed markup that would just generate a useless link to the
enclosing section.
2011-10-05 01:06:31 +02:00
Ezio Melotti
48a2f8fd97
#13054 : sys.maxunicode is now always 0x10FFFF.
2011-09-29 00:18:19 +03:00
Georg Brandl
fbd1e041af
Merge with 3.2.
2011-09-04 08:42:26 +02:00
Victor Stinner
795eaeb41f
Issue #12326 : update sys.platform doc for Linux
2011-08-21 12:08:11 +02:00
Georg Brandl
a47e53e42e
Update sys.platform doc for #12326 .
2011-09-03 09:26:09 +02:00
Antoine Pitrou
462d1b39a4
Move sys.subversion at the right place in alphabetical order, and informally deprecate it.
2011-07-09 16:02:19 +02:00
Antoine Pitrou
87fd76edb6
Issue #12326 : document the recommended idiom for checking sys.platform on Unix systems.
...
Also, point to the various alternatives.
2011-07-09 15:55:38 +02:00
Antoine Pitrou
a83cdaae89
Issue #12326 : document the recommended idiom for checking sys.platform on Unix systems.
...
Also, point to the various alternatives.
2011-07-09 15:54:23 +02:00
Georg Brandl
93ea851e83
Merge two minor doc changes into default.
2011-05-13 07:01:58 +02:00
Georg Brandl
5166375045
Use singular they. Thanks to Mark Summerfield.
2011-05-13 06:55:28 +02:00
R David Murray
c55a7ea2b8
Merge #11901 : post-commit review fixes per Georg Brandl
2011-04-30 16:36:37 -04:00
R David Murray
b751d6195f
Merge #11901 : post-commit review fixes per Georg Brandl
2011-04-30 16:36:08 -04:00
R David Murray
9beb34ee0d
#11901 : post-commit review fixes per Georg Brandl
2011-04-30 16:35:29 -04:00
Victor Stinner
d5c355ccc7
Issue #11223 : Replace threading._info() by sys.thread_info
2011-04-30 14:53:09 +02:00
Éric Araujo
0abb8b74d9
Merge 3.2
2011-04-27 16:32:36 +02:00
Éric Araujo
7fb624fe51
Branch merge
2011-04-27 16:28:50 +02:00
Éric Araujo
944d16c6c4
Merge 3.1
2011-04-27 16:27:38 +02:00
Éric Araujo
9a42793761
Branch merge
2011-04-27 16:23:56 +02:00
Éric Araujo
10f3d7acbd
Change markup so it generates a link
2011-04-27 16:22:32 +02:00
R David Murray
dff18b0858
Merge #11901 : add description of how bitfields are laid out to hexversion docs
...
Patch by Sijin Joseph.
2011-04-25 16:14:26 -04:00
R David Murray
0fb5b398cd
Merge #11901 : add description of how bitfields are laid out to hexversion docs
...
Patch by Sijin Joseph.
2011-04-25 16:13:54 -04:00
R David Murray
2043f9c582
#11901 : add description of how bitfields are laid out to hexversion docs
...
Patch by Sijin Joseph.
2011-04-25 16:12:26 -04:00
Éric Araujo
3e8987025f
Add versionchanged for c19752ea037f ( #10998 )
2011-04-24 04:37:00 +02:00
Benjamin Peterson
2b8ef2df57
say struct sequence rather than structseq and link to glossary
2011-04-20 18:31:22 -05:00
Éric Araujo
b3a591bf06
Branch merge
2011-03-26 02:01:33 +01:00
Éric Araujo
5c1da90f8c
Merge 3.2
2011-03-26 02:00:51 +01:00
Éric Araujo
722bec4210
Merge 3.1
2011-03-26 01:59:47 +01:00
Éric Araujo
be3bd57ba2
Remove traces of division_warning left over from Python 2 ( #10998 )
2011-03-26 01:55:15 +01:00