Commit graph

3847 commits

Author SHA1 Message Date
Éric Araujo
544e13d126 Fix markup 2012-06-24 13:53:48 -04:00
Éric Araujo
0a8f5f709a Fix typos 2012-06-24 13:53:41 -04:00
Georg Brandl
03b9ad05d6 Add a single versionadded for a whole section instead of repeating for every function. 2012-06-24 18:09:40 +02:00
Georg Brandl
96acb73dd5 Small whitespace fixes for shutil.rmtree() docs. 2012-06-24 17:39:05 +02:00
Georg Brandl
4a7e25f4df #444582: fix example and rewrap docs a bit. 2012-06-24 17:37:07 +02:00
Georg Brandl
dbab58fdeb Refactor the venv API docs into a real API doc style. 2012-06-24 16:37:59 +02:00
Antoine Pitrou
5f762af3bc Remove a detailed discussion of content-based short circuiting, off topic for library docs. 2012-06-24 16:23:54 +02:00
Antoine Pitrou
f61e7910ea Simplify wording. 2012-06-24 16:21:10 +02:00
Antoine Pitrou
1524d7556d Formatting 2012-06-24 16:18:48 +02:00
Hynek Schlawack
1729b8f45b Fix doc of os.fwalk: example used now non-existing os.fstatat() 2012-06-24 16:11:08 +02:00
Georg Brandl
ae64b4d8e2 Merge heads. 2012-06-24 16:11:23 +02:00
Georg Brandl
3b44d81cf9 Merge heads. 2012-06-24 16:10:47 +02:00
Georg Brandl
a1bc35f07f Improve hmac.compare_digest() docstring and documentation, courtesy of Larry H. 2012-06-24 16:07:33 +02:00
Antoine Pitrou
4f9946874b The buffer protocol doesn't exist (in the glossary anyway). 2012-06-24 16:04:38 +02:00
Antoine Pitrou
9df73dac84 Larry's suggested rewording of the compare_digest() docs. 2012-06-24 16:03:50 +02:00
Georg Brandl
6cff9ffab0 Fix use of class markup. 2012-06-24 14:05:40 +02:00
Christian Heimes
6cea65555c Issue #15061: Re-implemented hmac.compare_digest() in C 2012-06-24 13:48:32 +02:00
Larry Hastings
605a62ddb1 Issue #15118: Change return value of os.uname() and os.times() from
plain tuples to immutable iterable objects with named attributes
(structseq objects).
2012-06-24 04:33:36 -07:00
Georg Brandl
f62445ad30 Fix casing of Unix. 2012-06-24 13:31:20 +02:00
Georg Brandl
8a5555f792 Make the style of the "Availability" sections consistent. 2012-06-24 13:29:09 +02:00
Georg Brandl
a570e98e7b Actually it is just one function. 2012-06-24 13:26:22 +02:00
Georg Brandl
b2462e2b8c Minor clarification about fdopen(). 2012-06-24 13:24:56 +02:00
Georg Brandl
b8f2d29ea9 Remove attribution; this is for the whatsnew. 2012-06-24 13:06:44 +02:00
Georg Brandl
306336bcda Closes #15161: add support for giving path as a fd for truncate() and pathconf(). 2012-06-24 12:55:33 +02:00
Georg Brandl
8ccadaafe6 Restore mostly-alphabetic sorting of os functions. 2012-06-24 12:50:06 +02:00
Georg Brandl
b9df00cc00 Note that equivalents are valid for 3.3+ only. 2012-06-24 12:38:14 +02:00
Georg Brandl
b9831ab63c Move Linux-only *xattr() functions to their own subheading. 2012-06-24 11:57:07 +02:00
Georg Brandl
7ac2af78a2 Fix typo. 2012-06-24 11:56:47 +02:00
Georg Brandl
b1a1ac0b67 Small nits in os doc. 2012-06-24 11:54:07 +02:00
Georg Brandl
50c4000685 "Refactor" docs for the new dir_fd, follow_symlinks, path-as-fd APIs: document the options at a central place and link to it. 2012-06-24 11:45:20 +02:00
R David Murray
97f43c019f #15160: Extend the new email parser to handle MIME headers.
This code passes all the same tests that the existing RFC mime header
parser passes, plus a bunch of additional ones.

There are a couple of commented out tests where there are issues with the
folding.  The folding doesn't normally get invoked for headers parsed from
source, and the cases are marginal anyway (headers with invalid binary data)
so I'm not worried about them, but will fix them after the beta.

There are things that can be done to make this API even more convenient, but I
think this is a solid foundation worth having.  And the parser is a full RFC
parser, so it handles cases that the current parser doesn't.  (There are also
probably cases where it fails when the current parser doesn't, but I haven't
found them yet ;)

Oh, yeah, and there are some really ugly bits in the parser for handling some
'postel' cases that are unfortunately common.

I hope/plan to to eventually refactor a lot of the code in the parser which
should reduce the line count...but there is no escaping the fact that the
error recovery is welter of special cases.
2012-06-24 05:03:27 -04:00
Nick Coghlan
5b0eca116a Issue #4489: Rename the feature marker for the symlink resistant rmtree and store it as a function attribute 2012-06-24 16:43:06 +10:00
Éric Araujo
859aad6a36 Remove packaging from the standard library.
Distutils2 will live on on PyPI and be included in the stdlib when it
is ready.  See discussion starting at
http://mail.python.org/pipermail/python-dev/2012-June/120430.html
2012-06-24 00:07:41 -04:00
Ezio Melotti
dc44f55cc9 #11113: add a new "html5" dictionary containing the named character references defined by the HTML5 standard and the equivalent Unicode character(s) to the html.entities module. 2012-06-24 04:37:41 +02:00
Larry Hastings
b698d8e7e9 Issue #15154: Add "dir_fd" parameter to os.rmdir, remove "rmdir"
parameter from os.remove / os.unlink.
Patch written by Georg Brandl.  (I'm really looking forward to George
getting commit privileges so I don't have to keep doing checkins on his
behalf.)
2012-06-23 16:55:07 -07:00
Hynek Schlawack
2100b42317 #4489: Fix usage of fd-based functions to new api introduced earlier today
Also add an explicit test for safe implementation usage on supported platforms.

As a side effect, this commit adds a module-level attribute 'rmtree_is_safe'
which offers introspection whether the current rmtree implementation is safe
against symlink attacks.
2012-06-23 20:28:32 +02:00
Hynek Schlawack
67be92bed4 #4489: Add a shutil.rmtree that isn't suspectible to symlink attacks
It is used automatically on platforms supporting the necessary os.openat() and
os.unlinkat() functions. Main code by Martin von Löwis.
2012-06-23 17:58:42 +02:00
Ezio Melotti
3861d8b271 #15114: the strict mode of HTMLParser and the HTMLParseError exception are deprecated now that the parser is able to parse invalid markup. 2012-06-23 15:27:51 +02:00
Antoine Pitrou
463badf06c Issue #3665: \u and \U escapes are now supported in unicode regular expressions.
Patch by Serhiy Storchaka.
2012-06-23 13:29:19 +02:00
Nick Coghlan
04e2e3f231 Close #15153: Added inspect.getgeneratorlocals to simplify whitebox testing of generator state updates 2012-06-23 19:52:05 +10:00
Nick Coghlan
2f92e54507 Close #13062: Add inspect.getclosurevars to simplify testing stateful closures 2012-06-23 19:39:55 +10:00
Alexander Belopolsky
8141cc7f88 Issues #11024: Fixes and additional tests for Time2Internaldate. 2012-06-22 21:03:39 -04:00
Larry Hastings
9cf065cfdc Issue #14626: Large refactoring of functions / parameters in the os module.
Many functions now support "dir_fd" and "follow_symlinks" parameters;
some also support accepting an open file descriptor in place of of a path
string.  Added os.support_* collections as LBYL helpers.  Removed many
functions only previously seen in 3.3 alpha releases (often starting with
"f" or "l", or ending with "at").  Originally suggested by Serhiy Storchaka;
implemented by Larry Hastings.
2012-06-22 16:30:09 -07:00
Antoine Pitrou
07c24d13ed Issue #444582: shutil.which() respects relative paths. 2012-06-22 23:33:05 +02:00
Brian Curtin
c57a34577c Fix #444582. Add shutil.which function for finding programs on the system path. 2012-06-22 16:00:30 -05:00
Alexander Belopolsky
93c9cd07b6 Issue #9527: tm_gmtoff has 'correct' sign. 2012-06-22 16:04:19 -04:00
Antoine Pitrou
5f6213be2d Merge 2012-06-22 21:13:34 +02:00
Antoine Pitrou
3b36fb1f53 Issue #14837: SSL errors now have library and reason attributes describing precisely what happened and in which OpenSSL submodule.
The str() of a SSLError is also enhanced accordingly.

NOTE: this commit creates a reference leak.  The leak seems tied to the
use of PyType_FromSpec() to create the SSLError type.  The leak is on the
type object when it is instantiated:

>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
35
>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
36
>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
37
2012-06-22 21:11:52 +02: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
Jesus Cea
9436361e4c Closes #10142: Support for SEEK_HOLE/SEEK_DATA 2012-06-22 18:32:07 +02:00