Commit Graph

48626 Commits

Author SHA1 Message Date
Benjamin Peterson b4cfa3ad63 merge heads 2011-06-16 18:51:24 -05:00
Benjamin Peterson a08eb73b4a update link to pycrypto (closes #12351) 2011-06-16 18:49:46 -05:00
Raymond Hettinger a63d45c825 Fix typo. 2011-06-16 22:32:10 +01:00
Éric Araujo 8ddf7c2d2b Minor wording improvement 2011-06-15 17:49:20 +02:00
Brian Curtin c8be84077b Correct completely broken os.stat behavior on Windows XP.
After 1a3e8db28d49, Windows XP could not os.stat at all due to raising
immediately when GetFinalPathNameByHandle wasn't available (pre-Vista).
The proper behavior in that situation is to just not attempt a traversal
rather than outright rejecting.

This change additionally handles a failed malloc by setting the error code
and returning false.

Patch by Hirokazu Yamamoto.
2011-06-14 09:52:50 -05:00
Brian Curtin a87d586fd6 branch merge? 2011-06-13 16:10:32 -05:00
Brian Curtin d25aef55c8 Fix #12084. os.stat on Windows wasn't working properly with relative symlinks.
Use of DeviceIoControl to obtain the symlink path via the reparse tag was
removed. The code now uses GetFinalPathNameByHandle in the case of a
symbolic link and works properly given the added test which creates a symbolic
link and calls os.stat on it from multiple locations.

Victor Stinner also noticed an issue with os.lstat following the os.stat
code path when being passed bytes. The posix_lstat function was adjusted to
properly hook up win32_lstat instead of the previous STAT macro (win32_stat).
2011-06-13 15:16:04 -05:00
Vinay Sajip cdc751720e Updated Formatter.formatTime documentation. 2011-06-12 11:44:28 +01:00
Vinay Sajip 0aaa9e1d7b Issue #12206: documentation for LogRecord constructor updated re. the level argument. 2011-06-11 23:03:37 +01:00
Benjamin Peterson 9620cc0463 allow "fake" filenames in findsource (closes #9284)
This allows findsource() to work in doctests.

A patch from Dirkjan Ochtman.
2011-06-11 15:53:11 -05:00
Benjamin Peterson acde6a0a40 onto 3.1.5 2011-06-11 11:33:01 -05:00
Benjamin Peterson f2ff3054f9 Added tag v3.1.4 for changeset c918ec9f3a76 2011-06-11 09:59:17 -05:00
Benjamin Peterson d858df20d0 bump to 3.1.4 2011-06-11 09:58:58 -05:00
Éric Araujo 9fbfe15c86 Add missing reST target to one heading in the tutorial 2011-06-11 10:34:19 +02:00
Benjamin Peterson 49e7bb9ea0 merge 3.1 2011-06-11 11:34:31 -05:00
Benjamin Peterson 98661d13d7 merge 3.1 2011-06-11 10:01:14 -05:00
Vinay Sajip 645e4589b1 Documented change for Issue #12168. 2011-06-10 18:52:50 +01:00
Benjamin Peterson 9aa68e4b32 merge 3.1 (#12009) 2011-06-10 12:29:40 -05:00
Benjamin Peterson 1df0f214a9 fix regression in netrc comment handling (closes #12009) 2011-06-10 11:32:52 -05:00
Victor Stinner a13660807e null merge 3.1 (patch already applied to 3.2) 2011-06-10 16:37:41 +02:00
Victor Stinner e6eafa2ade Issue #10801: Fix test_unicode_filenames() of test_zipfile
Just try to open files from the ZIP for reading, don't extract them to avoid
UnicodeEncodeError if the filename is not encodable to the filesystem encoding
(e.g. ASCII locale encoding).
2011-06-10 16:32:54 +02:00
R David Murray 4fbb9dbd34 #10694: zipfile now ignores garbage at the end of a zipfile.
Original fix by 'rep', final patch (with tests) by Xuanji Li.
2011-06-09 15:50:51 -04:00
R David Murray 0f663d07e6 #12283: Fixed regression in smtplib quoting of leading dots in DATA.
I unfortunately introduced the regression when I refactored the code,
and there were no tests of quoting so it wasn't caught.  Now there
is one.
2011-06-09 15:05:57 -04:00
Vinay Sajip 8168d10ea6 Issue #12168: SysLogHandler now allows NUL termination to be controlled using a new 'append_nul' attribute on the handler. 2011-06-09 16:50:49 +01:00
Brian Curtin 95d028fd18 Correction to 88e318166eaf - Issue #11583
Rather than wrapping the C _isdir function in a Python function,
just import the C _isdir function directly. Additionally, add in the
docstring which was left out.
2011-06-09 09:10:38 -05:00
Éric Araujo ebc991c0ce Branch merge 2011-06-09 13:13:24 +02:00
Brian Curtin 9c669ccc77 Fix #11583. Changed os.path.isdir to use GetFileAttributes instead of os.stat.
By changing to the Windows GetFileAttributes API in nt._isdir we can figure
out if the path is a directory without opening the file via os.stat. This has
the minor benefit of speeding up os.path.isdir by at least 2x for regular
files and 10-15x improvements were seen on symbolic links (which opened the
file multiple times during os.stat). Since os.path.isdir is used in
several places on interpreter startup, we get a minor speedup in startup time.
2011-06-08 18:17:18 -05:00
Éric Araujo d2f8cec885 Fix a few misuses of :option: I missed in r86521.
Extract of the commit message:

  Fix usage of :option: in the docs (#9312).

  :option: is used to create a link to an option of python, not to mark
  up any instance of any arbitrary command-line option.  These were
  changed to ````.
2011-06-08 05:29:39 +02:00
Éric Araujo 96deb7550e Add links from builtins module docs to built-in functions and constants docs 2011-06-08 04:53:20 +02:00
Éric Araujo b805c47138 Add examples that work on Windows to distutils docs (#1626300) 2011-06-08 01:11:36 +02:00
Éric Araujo b8f2ad0380 Remove outdated bit of advice (584f9c213a6d follow-up) 2011-06-08 00:47:49 +02:00
Łukasz Langa 41c1910bb3 #12274: use proper escaping for % in IDLE config. 2011-06-07 15:19:44 +02:00
Victor Stinner 62ec61fb6a test.support: can_symlink() removes the temporary symbolic link 2011-06-07 12:17:15 +02:00
Éric Araujo 5b52f95797 Branch merge 2011-06-06 17:11:47 +02:00
Martin v. Löwis b8c60130f1 null merge 2011-06-05 19:43:03 +02:00
Martin v. Löwis 63660ce214 merge:Do not add txt files twice 2011-06-05 19:42:21 +02:00
Martin v. Löwis 721bb33e3b Add 3.1.4 UUIDs. 2011-06-05 10:56:44 +02:00
Martin v. Löwis 4c226dac02 Do not add txt files twice. 2011-06-05 10:55:57 +02:00
Éric Araujo 70798be6f6 Remove unneeded executable bit on two distutils files 2011-06-04 20:47:26 +02:00
Éric Araujo fa088dbd0c Improve glossary entry for ABCs.
- Rename reST target name for collections ABCs to avoid collisions
- Add link to importlib ABCs (collections, numbers and io ABCs were already
  linked)
- Link to glossary entry from numbers module doc (other modules already do it)
2011-06-04 18:42:38 +02:00
Victor Stinner f5048a4075 Issue #12016: Add test_errorhandle() to TestBase_Mapping of
test_multibytecodec_support. Improve also error message of the
test_errorhandle() of TestBase.
2011-06-03 23:44:39 +02:00
Victor Stinner 5dfe3bb2d9 Issue #12016: Reindent decoders of HK and JP codecs 2011-06-03 23:34:09 +02:00
Éric Araujo 07e58c3389 Remove link that’s already present at the top of the file 2011-06-03 20:43:42 +02:00
Éric Araujo 98e68adc7e Document working dir for “make html” (#12249). Patch by Tshepang Lekhonkhobe. 2011-06-03 19:25:58 +02:00
Raymond Hettinger 3d89057ff8 Fix named tuples to work with vars(). 2011-06-02 23:40:24 -07:00
Raymond Hettinger 9028928156 Forward port doc updates for builtin functions. 2011-06-01 16:17:23 -07:00
Éric Araujo affcf2967f Branch merge 2011-06-01 19:39:27 +02:00
Victor Stinner 88701e27e9 Close #12230: Mac OS X Tiger (10.4) has a kernel bug: sometimes, the file
descriptor of a pipe closed in the parent process is valid in the child process
according to fstat(), but the mode of the file descriptor is invalid, and read
or write raise an error.

Add also requires_mac_ver() decorator to test.support.
2011-06-01 13:13:04 +02:00
Benjamin Peterson fdb2d909a4 merge 3.1 2011-05-31 21:38:49 -05:00
Benjamin Peterson 52e61449e3 return NULL on error 2011-05-31 21:38:15 -05:00