Commit graph

18529 commits

Author SHA1 Message Date
Victor Stinner
3bcc0170bd (Merge 3.2) 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:36:26 +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
Victor Stinner
ac6602bdc1 Issue #12333: restore the previous dir before removing the current directory
packaging.tests.support.TempdirManager: removing the current directory is not
allowed on Windows or Solaris. Store the current directory and restore it
before removing the temporary directory (which is used as the working directory
during the tests).
2011-06-17 12:20:46 +02:00
Victor Stinner
4e97abce2d Issue #12167: Fix a reafleak in packaging.tests.PyPIServer constructor
Don't modify mutable default arguments...
2011-06-15 23:58:57 +02:00
Brian Curtin
a87d586fd6 branch merge? 2011-06-13 16:10:32 -05:00
Brian Curtin
c9d6a501db branch merge 2011-06-13 16:03:01 -05:00
Brian Curtin
3e86c99f90 Merge from 3.2 for Issue #12084. 2011-06-13 16:00:35 -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
Victor Stinner
415007e30d Issue #12316: Fix sigwait() test using threads
Spawn a new process instead of using fork(). Patch written by Charles-François
Natali.
2011-06-13 16:19:06 +02:00
Éric Araujo
8d233f2cb0 Also specify encoding when reading setup.cfg (#12320) 2011-06-12 23:02:57 +02:00
Éric Araujo
043f5ae697 Specify the encoding of the setup.cfg in one packaging test (#12320) 2011-06-12 22:04:58 +02:00
Benjamin Peterson
3bbb722654 allow __dir__ to return any sequence 2011-06-11 16:12:08 -05:00
Benjamin Peterson
703f7c4bf5 merge 3.2 (#9284) 2011-06-11 15:56:46 -05: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
Éric Araujo
bc18532eee Branch merge 2011-06-11 19:56:09 +02:00
Charles-François Natali
a529308348 Issue #12287: In ossaudiodev, check that the device isn't closed in several
methods.
2011-06-11 18:58:24 +02:00
Éric Araujo
6280606a57 Adjust logging in packaging.util.spawn (related to #11599) 2011-06-11 09:46:07 +02:00
Éric Araujo
643cb7345f Allow multiple setup hooks in packaging’s setup.cfg files (#12240).
Original patch by Erik Bray.
2011-06-11 00:33:38 +02:00
Éric Araujo
8474f2901b setup.cfg: Document that description-file can contain more than one file 2011-06-11 00:21:18 +02:00
Éric Araujo
3605030c9b Fix assorted bugs in packaging.util.cfg_to_args (#11595).
Original patch by Erik Bray.
2011-06-10 23:52:26 +02:00
Éric Araujo
1c1d9a5026 Move useful function to packaging.util.
Original patch by Erik Bray as part of #11595, changed by me to improve
readability.
2011-06-10 23:26:31 +02:00
Benjamin Peterson
49aaad3c47 merge heads 2011-06-10 12:32:07 -05:00
Benjamin Peterson
ae10b3201c merge 3.2 (#12009) 2011-06-10 12:30:16 -05:00
Benjamin Peterson
9aa68e4b32 merge 3.1 (#12009) 2011-06-10 12:29:40 -05:00
Éric Araujo
df55334d52 Branch merge 2011-06-10 18:34:45 +02:00
Benjamin Peterson
1df0f214a9 fix regression in netrc comment handling (closes #12009) 2011-06-10 11:32:52 -05:00
Éric Araujo
fa6cfbc4f7 Don’t try to install something when running from uninstalled source (#12246).
Original patch by Tshepang Lekhonkhobe.
2011-06-10 18:31:40 +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
Victor Stinner
7f294d1e19 Issue #8407: skip sigwait() tests if pthread_sigmask() is missing
The new tests now requires pthread_sigmask(). Skip the test if the function is
missing, e.g. if Python is compiled without threads.
2011-06-10 14:02:10 +02:00
Victor Stinner
3a38a6db43 test_platform: ignore DeprecationWarning on popen() test 2011-06-10 13:59:59 +02:00
Victor Stinner
46591664fa Issue #8407: write error message on sigwait test failure 2011-06-10 13:53:32 +02:00
Victor Stinner
af4946020e Issue #8407: Make signal.sigwait() tests more reliable
Block the signal before calling sigwait(). Use os.fork() to ensure that we have
only one thread.

Initial patch written by Charles-François Natali.
2011-06-10 12:48:13 +02:00
Ross Lagerwall
b0ae53d8a0 Issue #9344: Add os.getgrouplist(). 2011-06-10 07:30:30 +02:00
Éric Araujo
2b612220e4 Clean up extra environment variable after packaging tests.
packaging.util.check_environ will define HOME and PLAT if they don’t exist; for
some reason, it does not define PLAT when running the tests from a checkout (so
no regrtest warning) but does when running from an installed Python.

Cleaning up the envvar in test_dist fixes the warning on my machine, but I
suspect that a test runner using a different order to run files or running them
in parallel may have PLAT defined in its environment because of another test.
Quite a lot of code ends up calling check_environ; maybe we should just clean
up PLAT in every test.  For now I’m doing this simple fix, we’ll see if we get
bug reports.
2011-06-10 04:29:43 +02:00
Éric Araujo
f53cd89006 Fix omission in test for packaging install_distinfo command.
The code does not write checksum or file length for .pyc and .pyo in the RECORD
file, in compliance with PEP 376, but the test forgot to take .pyo into
account.  This was not caught because there were no .pyo in the checkout, but
after installing there are .pyo files created by compileall, and the test picks
them up.
2011-06-10 03:53:49 +02:00
Éric Araujo
5c6684f314 Packaging: use repr to display projects name (3ebabfbf6fe3 followup) 2011-06-10 03:10:53 +02:00
Victor Stinner
10c30d6764 Issue #8407: signal.sigwait() releases the GIL
Initial patch by Charles-François Natali.
2011-06-10 01:39:53 +02:00
R David Murray
51fcb811e3 Merge #10694: zipfile now ignores garbage at the end of a zipfile. 2011-06-09 15:52:31 -04: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
0a9f16b627 merge #12283: Fixed regression in smtplib quoting of leading dots in DATA. 2011-06-09 15:21:02 -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
bf353aadf2 Merged upstream changes. 2011-06-09 18:43:11 +01:00
Vinay Sajip
ae5740f139 Made time formats in Formatter more configurable. 2011-06-09 18:42:19 +01:00
R David Murray
f97c59aaba #10424: argument names are now included in the missing argument message
Fix and initial test patch by Michele Orrù.
2011-06-09 12:34:07 -04:00
Vinay Sajip
8dd8d582e3 Merged fix for issue #12168 from 3.2. 2011-06-09 16:55:23 +01: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
d9463b233c Merge 3.2 2011-06-09 09:46:21 -05: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
e00a6703e8 Branch merge 2011-06-09 14:07:46 +02:00
Éric Araujo
0a975f957d Fix example in packaging test_config.
The example C extension used the “three.fast_taunt” name, but no “three” parent
was defined in the setup.cfg.  This did not cause a failure nor even print a
warning, we may want to change that.
2011-06-09 07:47:25 +02:00