Commit graph

48501 commits

Author SHA1 Message Date
R David Murray
24eb4bc5c9 #9921: clarify os.path.join joining algorithm
The new wording is based on the comments in the code, which
match the actual behavior.
2011-06-23 21:26:13 -04:00
Victor Stinner
66f7d66174 Issue #11223: skip also test_rlock_acquire_interruption() on FreeBSD6 2011-06-23 14:22:28 +02:00
Victor Stinner
f25ae48dfd Issue #11223: skip test_lock_acquire_interruption() on FreeBSD6
Locks are implemented using a mutex and a condition variable of the pthread
library on FreeBSD6. POSIX condition variables cannot be interrupted by signals
(see pthread_cond_wait manual page).
2011-06-23 11:57:56 +02:00
Victor Stinner
62d511809d Issue #12383: skip test_empty_env() of subprocess on Windows
Cannot test an empty environment on Windows: Windows requires at least the
SYSTEMROOT environment variable to start Python.
2011-06-23 01:02:25 +02:00
Victor Stinner
237e5cb376 Issue #12383: fix test_empty_env() of subprocess on Mac OS X
Mac OS X adds __CF_USER_TEXT_ENCODING variable to an empty environment. Fix
also the test on the Py_ENABLE_SHARED config varible: test that the variable is
present, don't check it's value.
2011-06-22 21:28:43 +02:00
Victor Stinner
372309a551 Issue #12383: skip test_empty_env() if compiled is compiled in shared mode
Try also to get more informations about the Mac OS X failure: display the keys
of the environment, instead of just the number of variables.
2011-06-21 21:59:06 +02:00
Victor Stinner
f1512a2967 Close #12383: Fix subprocess module with env={}: don't copy the environment
variables, start with an empty environment.
2011-06-21 17:18:38 +02:00
Benjamin Peterson
b7149cad04 fix indentation 2011-06-20 22:09:13 -05:00
Benjamin Peterson
66b371e000 merge heads 2011-06-20 21:40:34 -05:00
Benjamin Peterson
f63d615f8b fix indentation 2011-06-20 21:40:19 -05:00
Victor Stinner
2fae27b735 Issue #12285: multiprocessing.Pool() raises a ValueError if the number of
processes if negative or null.
2011-06-20 17:53:35 +02:00
Senthil Kumaran
4707a998e4 Fix closes Issue12359 - Removing a confusing sentence from the previous change. 2011-06-20 07:30:34 -07:00
Senthil Kumaran
656df5ec3e Fix closes issue 12360 - correcting parameter names in asyncore documentation. 2011-06-19 18:22:33 -07:00
Senthil Kumaran
150857028c minor space nit. 2011-06-19 17:41:33 -07:00
Senthil Kumaran
5c0347b398 Fix closes Issue12359 - Minor update to module import description. 2011-06-19 17:37:06 -07:00
Senthil Kumaran
fd8d7e9b0d Whitespace nit fixed using reident. 2011-06-19 16:59:41 -07:00
Senthil Kumaran
ce9b596c04 Fix closes Issue12315 - Updates to http.client documentation. 2011-06-19 16:56:49 -07:00
Benjamin Peterson
206cd1c284 fix uglyNamingConvention 2011-06-19 17:49:13 -05:00
Senthil Kumaran
a977acc0fe merge from 3.1 for issue issue12261. 2011-06-19 13:55:48 -07:00
Senthil Kumaran
fe9230aac6 Fix closes issue12261 - Minor documention changes in the urllib.parse.rst 2011-06-19 13:52:49 -07:00
R David Murray
409c32f47c #6771: fix docs: curses.wrapper is exposed as a function, not a module
Patch by July Tikhonov.
2011-06-18 19:34:12 -04:00
R David Murray
e5e366c856 #11584: make Header and make_header handle binary unknown-8bit input
Analogous to the decode_header fix, this fix makes Header.append and
make_header correctly handle the unknown-8bit charset introduced by email5.1,
when the input to them is binary strings.  Previous to this fix the
make_header(decode_header(x)) == x invariant was broken in the face of the
unknown-8bit charset.
2011-06-18 12:57:28 -04:00
R David Murray
6bdb1769dc #11584: make decode_header handle Header objects correctly
This updates b21fdfa0019c, which fixed this bug incorrectly.
2011-06-18 12:30:55 -04:00
R David Murray
c88bce1580 #11700: proxy object close methods can now be called multiple times
This makes them work like the close provided by regular file objects.
2011-06-17 22:24:05 -04:00
R David Murray
05ff990401 #11767: use context manager to close file in __getitem__ to prevent FD leak
All of the other methods in mailbox that create message objects take care to
close the file descriptors they use, so it seems to make sense to have
__getitem__ do so as well.

Patch by Filip Gruszczyński.
2011-06-17 12:54:56 -04:00
Victor Stinner
26de69dff8 posixmodule.c: fix function name in argument parsing
Fix os.fchown() and os.open()

Remove also trailing spaces and replace tabs by spaces.
2011-06-17 15:15:38 +02:00
Victor Stinner
eaca5c8b95 Issue #10883: test_urllib2net closes socket explicitly 2011-06-17 14:53:02 +02:00
Victor Stinner
a4c45d73cf Issue #12133: fix a ResourceWarning in urllib.request
AbstractHTTPHandler.do_open() of urllib.request closes the HTTP connection if
its getresponse() method fails with a socket error. Patch written by Ezio
Melotti.
2011-06-17 14:01:18 +02:00
Victor Stinner
0f83b1511c Issue #12310: finalize the old process after _run_after_forkers()
multiprocessing: Process._bootstrap() keeps a reference to the old process to
delay its finalization until after _run_after_forkers() as been executed. This
change should fix a crash on Mac OS X Tiger when a lock is released after a
fork.

Patch written by Charles-François Nataliv and Antoine Pitrou.
2011-06-17 12:31:49 +02:00
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