Brett Cannon
86ae981da9
Fix an import from the importlib.test move.
2012-07-20 15:40:57 -04:00
Brett Cannon
d382bfc921
Move importlib.test.benchmark to Tools/importbench to make it more
...
visible and to place it with other micro-benchmarks (e.g.
stringbench).
2012-07-20 14:54:53 -04:00
Brett Cannon
45a5e3afe5
Issue #15168 : Move importlb.test to test.test_importlib.
...
This should make the Linux distros happy as it is now easier to leave
importlib's tests out of their base Python distribution.
2012-07-20 14:48:53 -04:00
Brett Cannon
6ee9695270
Issue #15091 : Call importlib.invalidate_caches() and reactivate a test
...
of importing a symlinked package.
2012-07-20 14:22:04 -04:00
Brett Cannon
ba52586f76
Running the importlib tests from test_import is redundant as there is
...
no difference anymore between __import__ and importlib.__import__.
2012-07-20 14:01:34 -04:00
Nick Coghlan
be7e49fd82
Close #15386 : There was a loophole that meant importlib.machinery and imp would sometimes reference an uninitialised copy of importlib._bootstrap
2012-07-20 23:40:09 +10:00
Hynek Schlawack
26fe37dd3f
#1492704 : Backout and wait for 3.4
2012-07-19 21:41:02 +02:00
Hynek Schlawack
77d3283370
#1492704 : Make shutil.copyfile() raise a distinct SameFileError
...
Patch by Atsuo Ishimoto.
2012-07-19 20:23:49 +02:00
Vinay Sajip
90db661b43
Closes #15307 : symlinks now work on OS X with framework Python builds. Patch by Ronald Oussoren.
2012-07-17 17:33:46 +01:00
Hynek Schlawack
11718620ef
Use posixpath.join() explicitely in posixpath.join() test
...
Used os.path.join before which has different semantics on Windows.
2012-07-17 14:29:33 +02:00
Hynek Schlawack
0b350c6b3e
Use posixpath.join() explicitely in posixpath.join() test
...
Used os.path.join before which has different semantics on Windows.
2012-07-17 14:28:44 +02:00
Nick Coghlan
9455492142
Issue #15314 : Tweak a pkgutil test to hopefully be more Windows friendly
2012-07-17 21:37:58 +10:00
Hynek Schlawack
1815191f17
#15377 : Make posixpath.join() more strict when checking for str/bytes mix
...
Based on a patch by Nick Coghlan.
2012-07-17 13:10:15 +02:00
Hynek Schlawack
c5a4566922
#15377 : Make posixpath.join() more strict when checking for str/bytes mix
...
Based on a patch by Nick Coghlan.
2012-07-17 13:05:43 +02:00
Nick Coghlan
9c3cf6b4a0
Merge Issue #15230 OS X buildbot fix from 3.2
2012-07-17 20:43:40 +10:00
Nick Coghlan
eb3e62f1c8
Issue #15230 : Attempt to make the OS X buildbots happy by resolving the tmp dir symlink in the test suite
2012-07-17 20:42:39 +10:00
Hynek Schlawack
1c4eb2c09a
Fix context manager use in posixpath.join() tests
...
The asserts were useless (and buggy).
2012-07-17 10:50:30 +02:00
Hynek Schlawack
7cdc2bdd0d
Fix context manager use in posixpath.join() tests
...
The asserts were useless (and buggy).
2012-07-17 10:48:19 +02:00
Eli Bendersky
426e248feb
Preserve the invariant tostring(elem) == b''.join(tostringlist(elem)) and add a test to make sure it keeps working
2012-07-17 05:45:11 +03:00
Gregory P. Smith
daa4c6b2e6
one more test fix for systems without select.poll. tested by deleting
...
select.poll before running. works both ways (finally). this should
fix the windows build.
2012-07-16 15:49:19 -07:00
Gregory P. Smith
954d46b2cc
one more test fix for systems without select.poll. tested by deleting
...
select.poll before running. works both ways (finally). this should fix
the windows build.
2012-07-16 15:48:30 -07:00
Gregory P. Smith
49be9ed976
Fix unchecked select.poll reference in setUp and tearDown for
...
platforms that don't have it.
2012-07-16 13:39:10 -07:00
Gregory P. Smith
ac14aa5187
Fix unchecked select.poll reference in setUp and tearDown for
...
platforms that don't have it.
2012-07-16 13:38:45 -07:00
Gregory P. Smith
2a86b25323
Fix the with_poll tests for platforms without poll. missing import.
2012-07-16 13:35:20 -07:00
Gregory P. Smith
5bcd005a0b
Fix the with_poll tests for platforms without poll. missing import.
2012-07-16 13:34:50 -07:00
Hynek Schlawack
c2d481fbcd
#15238 : Fix xattr related shutil.copystat tests
...
- Loosen up test as Fedora has implicit xattrs
- Actually test the destination for xattrs
Should make Fedora buildbot green again.
2012-07-16 17:11:10 +02:00
Gregory P. Smith
4866266bf4
Fixes Issue #14635 : telnetlib will use poll() rather than select() when possible
...
to avoid failing due to the select() file descriptor limit.
2012-07-15 23:44:49 -07:00
Gregory P. Smith
dad5711677
Fixes Issue #14635 : telnetlib will use poll() rather than select() when possible
...
to avoid failing due to the select() file descriptor limit.
2012-07-15 23:42:26 -07:00
R David Murray
6159e0956c
#4640 : Add optparse tests for '-xxx' invalid when defining options.
...
Patch by Aaron (hac.man).
2012-07-15 20:12:24 -04:00
Larry Hastings
b40380667c
Issue #15202 : Consistently use the name "follow_symlinks" for
...
new parameters in os and shutil functions. Patch by Serhiy Storchaka.
2012-07-15 10:57:38 -07:00
Vinay Sajip
509d87d4a0
Issue #15307 : Skipped test_venv:test_prefixes when run from a venv.
2012-07-15 16:12:54 +01:00
Hynek Schlawack
9ac4d8808f
#15180 : Clarify posixpath.join() error message when mixing str & bytes
2012-07-15 16:46:23 +02:00
Hynek Schlawack
4774946c3b
#15180 : Clarify posixpath.join() error message when mixing str & bytes
2012-07-15 16:21:30 +02:00
Nick Coghlan
8e6e7d39d3
Fix typo in a comment (noticed by Terry Reedy)
2012-07-15 23:13:18 +10:00
Nick Coghlan
8ecf50474c
Issue #15343 : Handle importlib.machinery.FileFinder instances in pkgutil.walk_packages (et al)
2012-07-15 21:19:18 +10:00
Nick Coghlan
3f94cbf9eb
Actually initialize __main__.__loader__ with loader instances, not the corresponding type objects
2012-07-15 19:10:39 +10:00
Nick Coghlan
37b3b90b02
Note why we can't write an automated test for the code path that brings up the REPL for a bare 'python' call
2012-07-15 18:24:42 +10:00
Nick Coghlan
85e729ec3b
Take the first step in resolving the messy pkgutil vs importlib edge cases by basing pkgutil explicitly on importlib, deprecating its internal import emulation and setting __main__.__loader__ correctly so that runpy still works (Affects #15343 , #15314 , #15357 )
2012-07-15 18:09:52 +10:00
Eli Bendersky
00f402bfcb
Close #1767933 : Badly formed XML using etree and utf-16. Patch by Serhiy Storchaka, with some minor fixes by me
2012-07-15 06:02:22 +03:00
Larry Hastings
ad5ae0456e
- Issue #15238 : shutil.copystat now copies Linux "extended attributes".
2012-07-14 17:55:11 -07:00
Nick Coghlan
2f54b98c8c
Merge fix for #15230 from 3.2
2012-07-15 00:07:43 +10:00
Nick Coghlan
761bb11374
Close #15230 : runpy.run_path now sets __package__ correctly. Also refactored the runpy tests to use a more systematic approach
2012-07-14 23:59:22 +10:00
Ned Deily
045bd5340f
Issue #15241 : Fix test_prefixes failure in test_venv due to symlink in
...
tempfile directory path (i.e. on OS X /tmp is actually /private/tmp).
2012-07-13 15:48:04 -07:00
Antoine Pitrou
26c01d7e05
Try other approach to fix issue #15334 .
2012-07-13 22:49:55 +02:00
Antoine Pitrou
2bb3021837
Try other approach to fix issue #15334 .
2012-07-13 22:46:41 +02:00
Antoine Pitrou
b9c7c8260d
Issue #15334 : skip test_dynamic_key when run in non-interactive mode.
...
Patch by Jeremy Kloth.
2012-07-13 21:10:17 +02:00
Antoine Pitrou
f0b1baf362
Issue #15334 : skip test_dynamic_key when run in non-interactive mode.
...
Patch by Jeremy Kloth.
2012-07-13 21:08:41 +02:00
Antoine Pitrou
c27ace688c
Issue #15338 : skip test_UNC_path when the current user doesn't have enough permissions to access the path.
2012-07-13 20:59:19 +02:00
Antoine Pitrou
68f4247b65
Issue #15338 : skip test_UNC_path when the current user doesn't have enough permissions to access the path.
2012-07-13 20:54:42 +02:00
Antoine Pitrou
282083d5f4
Issue #15300 : Ensure the temporary test working directories are in the same parent folder when running tests in multiprocess mode from a Python build.
...
Patch by Chris Jerdonek.
2012-07-11 19:19:14 +02:00
Eli Bendersky
8a80502d2c
Issue #15296 : Fix minidom.toxml/toprettyxml for non-unicode encodings. Patch by Serhiy Storchaka, with some minor style adjustments by me.
2012-07-13 09:52:39 +03:00
Antoine Pitrou
5df0204091
For diagnosis, try to list the directory first
2012-07-12 19:50:03 +02:00
Antoine Pitrou
f189e80f23
Small improvements to test_unc_path
2012-07-12 19:48:49 +02:00
Antoine Pitrou
021548cf4c
Try to fix or diagnose buildbot failures
2012-07-12 19:21:43 +02:00
Antoine Pitrou
673eb6a0bb
Issue #15300 : Ensure the temporary test working directories are in the same parent folder when running tests in multiprocess mode from a Python build.
...
Patch by Chris Jerdonek.
2012-07-11 19:21:31 +02:00
Antoine Pitrou
59b9a7bc61
Backport test for nested namespace packages.
2012-07-09 21:23:58 +02:00
Antoine Pitrou
b2dd880e0a
Issue #15294 : Fix a regression in pkgutil.extend_path()'s handling of nested namespace packages.
2012-07-09 21:23:58 +02:00
Brett Cannon
19a2f5961c
Issue #15056 : imp.cache_from_source() and source_from_cache() raise
...
NotimplementedError when sys.implementation.cache_tag is None.
Thanks to Pranav Ravichandran for taking an initial stab at the patch.
2012-07-09 13:58:07 -04:00
Senthil Kumaran
612a815820
revert the changes done for issue14826 - quoting witin Request is not desirable.
2012-07-08 18:00:47 -07:00
Senthil Kumaran
168456df11
revert the changes done for issue14826 - quoting witin Request is not desirable.
2012-07-08 17:47:25 -07:00
Benjamin Peterson
9ed37433c4
test AST base type garbage collection
2012-07-08 11:13:36 -07:00
Nick Coghlan
07c4e33c07
Issue 14814: The new systematic tests aren't just about error reporting any more - change names accordingly. Added and tweaked some example to ensure they were covering the intended code paths
2012-07-08 23:06:45 +10:00
Antoine Pitrou
88bf5ca63b
Merge
2012-07-08 14:00:06 +02:00
Antoine Pitrou
5d62a61b58
Fix test_inspect messing up with linecache.cache.
2012-07-08 13:48:46 +02:00
Nick Coghlan
27396a1807
Issue 14814: Remove dead function (noticed by Serhiy Storchaka)
2012-07-08 21:38:12 +10:00
Antoine Pitrou
6803855ecf
Fix test failure under Windows
2012-07-08 13:16:15 +02:00
Florent Xicluna
3f4ce635ee
Issue #11022 and #15287 : correctly remove the TESTFN file in test_builtin.
2012-07-08 12:08:45 +02:00
Antoine Pitrou
bc07a5c913
Issue #15110 : Fix the tracebacks generated by "import xxx" to not show the importlib stack frames.
2012-07-08 12:01:27 +02:00
Ross Lagerwall
8d459f0cb8
#15284 : Skip {send,recv}msg tests with disabled IPv6
...
Patch by Brian Brazil.
2012-07-08 09:53:57 +02:00
Nick Coghlan
297b143c6d
Issue 14814: Further error case testing coverage and cleanups
2012-07-08 17:11:04 +10:00
Senthil Kumaran
540715a369
Fix issue14826 - make urllib.request.Request quoted url consistent with URLOpener open method.
...
Patch contributed by Stephen Thorne.
2012-07-07 17:15:52 -07:00
Senthil Kumaran
b7451cecad
Fix issue14826 - make urllib.request.Request quoted url consistent with URLOpener open method.
...
Patch contributed by Stephen Thorne.
2012-07-07 17:11:44 -07:00
Senthil Kumaran
a5e0eaf2e1
Fix 5931 - Python runtime hardcoded in wsgiref.simple_server - Now it specifies an implementation specific term.
2012-07-07 14:29:58 -07:00
Łukasz Langa
31196dd7d0
Merge remote
2012-07-07 18:58:44 +02:00
Łukasz Langa
cba243215e
Fixes #14590 : ConfigParser doesn't strip inline comment when delimiter occurs
...
earlier without preceding space.
2012-07-07 18:54:08 +02:00
Ross Lagerwall
5aa4354297
Merge with remote.
2012-07-07 18:42:57 +02:00
Ross Lagerwall
121d59ffa9
#15277 : Fix a resource leak in support.py when IPv6 is disabled.
...
The leak occurred by setting:
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
before running test_support.
Patch by Brian Brazil.
2012-07-07 18:40:32 +02:00
Florent Xicluna
1917ea964e
Add tests to marshall double with xmlrpc.client.
2012-07-07 17:03:25 +02:00
Florent Xicluna
109d57358e
Issue #13248 : io: Remove obsolete argument "max_buffer_size" of BufferedWriter and BufferedRWPair.
2012-07-07 17:03:22 +02:00
Florent Xicluna
af1adbeedd
Issue #13248 : argparse: Remove obsolete argument "version" of ArgumentParser.
2012-07-07 17:02:22 +02:00
Nick Coghlan
3008ec070f
Issue 14814: Ensure ordering semantics across all 3 entity types in ipaddress are consistent and well-defined
2012-07-08 00:45:33 +10:00
Nick Coghlan
9a9c28ce7a
Issue 14814: Correctly return NotImplemented from ipaddress._BaseNetwork.__eq__
2012-07-07 23:05:59 +10:00
Jesus Cea
d46f7d209b
Cope with OSs lying - #10142 : Support for SEEK_HOLE/SEEK_DATA
2012-07-07 14:56:04 +02:00
Nick Coghlan
b582ecc562
Issue 14814: Explain how to get more error detail in the ipaddress tutorial, and tweak the display for octet errors in IPv4 (noticed the formatting problem when adding to the docs)
2012-07-07 22:15:22 +10:00
Florent Xicluna
fed2c51eea
Merge branch
2012-07-07 12:26:56 +02:00
Florent Xicluna
11f0b41e9d
Issue #14990 : tokenize: correctly fail with SyntaxError on invalid encoding declaration.
2012-07-07 12:13:35 +02:00
Nick Coghlan
36f8dcde06
Issue 14814: Provide more informative error messages in ipaddress, and ensure that errors are caught as expected
2012-07-07 19:23:53 +10:00
Antoine Pitrou
7d7f40c613
Issue #15247 : FileIO now raises an error when given a file descriptor pointing to a directory.
2012-07-06 18:52:58 +02:00
Antoine Pitrou
9235b254dc
Issue #15247 : FileIO now raises an error when given a file descriptor pointing to a directory.
2012-07-06 18:48:24 +02:00
Nick Coghlan
5cf896fea8
Issue 14814: Eliminate bytes warnings from ipaddress by correctly throwing an exception early when given bytes data of the wrong length. Also removes 2.x backwards compatibility code from associated tests.
2012-07-07 01:43:31 +10:00
Nick Coghlan
3c2570caf2
Issue 14814: Better handling of cases where octet/hextet parsing fails, including ensuring that tracebacks are still clean even when calling class constructors directly
2012-07-07 01:13:55 +10:00
Richard Oudkerk
2240ac1eae
Issue #15261 : Stop os.stat(fd) crashing on Windows when fd not open.
2012-07-06 12:05:32 +01:00
Senthil Kumaran
f28fbabc7f
Fix issue # 15033 - Return the proper exitcode for failure when modules are invoked using -m switch. Patch contributed by Jeff Knupp
2012-07-04 19:33:45 -07:00
Senthil Kumaran
f01a337950
Fix issue # 15033 - Return the proper exitcode for failure when modules are invoked using -m switch. Patch contributed by Jeff Knupp
2012-07-04 19:28:16 -07:00
Vinay Sajip
ed1f7c834f
Closes #14902 : Fixed timezone conversion of a date/time in the past. Thanks to Yuriy Syrovetskiy for the report and Juancarlo Añez for the patch on which this fix is based.
2012-07-03 21:36:36 +01:00
Vinay Sajip
3874e547b4
Issue #15241 : Added test for venv prefixes.
2012-07-03 16:56:40 +01:00
Antoine Pitrou
f87289bb58
Issue #15229 : An OSError subclass whose __init__ doesn't call back
...
OSError.__init__ could produce incomplete instances, leading to crashes
when calling str() on them.
2012-06-30 23:37:47 +02:00
Antoine Pitrou
f93b705bd0
Issue #9239 : add tests for modifying zipfile comments in append mode.
2012-06-30 17:32:41 +02:00
Antoine Pitrou
c399185fcc
Issue #9239 : add tests for modifying zipfile comments in append mode.
2012-06-30 17:31:37 +02:00
Antoine Pitrou
24ef3e967f
Issue #15225 : improve error message when hmac is passed a wrong key type.
...
Patch by Marc Abramowitz.
2012-06-30 17:27:56 +02:00
Antoine Pitrou
a9effcd802
Better diagnose test failure
2012-06-29 19:40:54 +02:00
Antoine Pitrou
b8b6a68baa
Better diagnose test failure
2012-06-29 19:40:35 +02:00
Petri Lehtinen
25652884b4
#5346 : Preserve permissions of mbox, MMDF and Babyl mailbox files on flush()
2012-06-29 15:12:54 +03:00
Petri Lehtinen
5b5619f717
#5346 : Preserve permissions of mbox, MMDF and Babyl mailbox files on flush()
2012-06-29 15:10:41 +03:00
Hynek Schlawack
d0f6e0a6e6
Check for all used fd-based functions in shutil.rmdir, closes #15218
2012-06-29 08:28:20 +02:00
Amaury Forgeot d'Arc
3a3dc17fc9
Port tests from Issue #15219 , and verify we don't have a reference leak.
2012-06-29 01:53:13 +02:00
Petri Lehtinen
dde8cb0899
#9559 : Append data to single-file mailbox files if messages are only added
...
If messages were only added, a new file is no longer created and
renamed over the old file when flush() is called on an mbox, MMDF or
Babyl mailbox.
2012-06-28 13:56:14 +03:00
Petri Lehtinen
f29435f9f0
#9559 : Append data to single-file mailbox files if messages are only added
...
If messages were only added, a new file is no longer created and
renamed over the old file when flush() is called on an mbox, MMDF or
Babyl mailbox.
2012-06-28 13:53:23 +03:00
Hynek Schlawack
a75cd1ce73
#4489 : Don't follow ever symlinks in rmtree
...
Also added several regression tests.
2012-06-28 12:07:29 +02:00
Antoine Pitrou
8afc243a76
Avoid using scrdir, it's broken.
2012-06-28 01:20:26 +02:00
Neil Schemenauer
76b931b133
Fix bug in test_tools that prevented building is separate directory.
...
Use 'srcdir' from sysconfig instead of 'projectbase' to build a
path to the Tools directory. 'projectbase' is the path of the build
directory, not the source directory.
2012-06-27 15:58:37 -06:00
David Malcolm
8d37ffa563
Issue #12605 : Show information on more C frames within gdb backtraces
...
The gdb hooks for debugging CPython (within Tools/gdb) have
been enhanced to show information on more C frames relevant to CPython within
the "py-bt" and "py-bt-full" commands:
* C frames that are waiting on the GIL
* C frames that are garbage-collecting
* C frames that are due to the invocation of a PyCFunction
2012-06-27 14:15:34 -04:00
Antoine Pitrou
67a7b06008
Flush stdout and stderr when running tests in parallel
...
(helps getting results in real-time when stdio is transmitted over a pipe or socket)
2012-06-27 17:41:33 +02:00
Antoine Pitrou
8237258e09
Flush stdout and stderr when running tests in parallel
...
(helps getting results in real-time when stdio is transmitted over a pipe or socket)
2012-06-27 17:41:07 +02:00
Antoine Pitrou
9facaf4f65
Issue #15079 : make a test applicable to both C and Python versions of the pickle module.
...
Patch by Stefan Mihaila.
2012-06-26 23:05:27 +02:00
Antoine Pitrou
79035bd71f
Issue #15079 : make a test applicable to both C and Python versions of the pickle module.
...
Patch by Stefan Mihaila.
2012-06-26 23:04:48 +02:00
Georg Brandl
969288e488
Use ValueError, not RuntimeError for a utime flag combination illegal on some systems.
2012-06-26 09:25:44 +02:00
Larry Hastings
5b2f9c0aff
Issue #15817 : Bugfix: remove temporary directories test_shutil was leaving
...
behind.
2012-06-25 23:50:01 -07:00
Antoine Pitrou
1dd75a64aa
Backport test_nntplib fixes from default.
2012-06-25 18:08:54 +02:00
Larry Hastings
c48fe98a7c
Issue #15177 : Added dir_fd parameter to os.fwalk().
2012-06-25 04:49:05 -07:00
Jesus Cea
2a193a818a
Skip test in freebsd entirely - Kernel bug in freebsd7/8/9 - #10142 : Support for SEEK_HOLE/SEEK_DATA
2012-06-25 13:45:38 +02:00
Larry Hastings
fdaea06d3c
Issue #15176 : Clarified behavior, documentation, and implementation
...
of os.listdir().
2012-06-25 04:42:23 -07:00
Hynek Schlawack
3b52778c74
#4489 Make fd based rmtree work on bytes
2012-06-25 13:27:31 +02:00
Gregory P. Smith
875c1bc522
Backout change e8f44ebacda7052267318cecf5b6f128d35add17. Reverting the test
...
to using signal.alarm(1) instead of signal.setitimer(signal.ITIMER_REAL, 0.1).
This is an attempt to see if this change is what caused the ubuntu arm buildbot
to hang in test_io's test_interrupted_write_retry_text.
Discussion in Issue #12268 .
2012-06-25 01:15:14 -07:00
Gregory P. Smith
b5ba203709
Backout change e8f44ebacda7052267318cecf5b6f128d35add17. Reverting the test
...
to using signal.alarm(1) instead of signal.setitimer(signal.ITIMER_REAL, 0.1).
This is an attempt to see if this change is what caused the ubuntu arm buildbot
to hang in test_io's test_interrupted_write_retry_text.
Discussion in Issue #12268 .
2012-06-25 01:13:32 -07:00
Eric V. Smith
714370fad1
Give test directory a more reasonable name.
2012-06-24 19:55:18 -04:00
Vinay Sajip
2895244653
Closes #15173 : Tidied up copyright statements and removed pythonv references.
2012-06-25 00:47:46 +01:00
Eric V. Smith
e51a36922f
Fixes issue 15039: namespace packages are no longer imported in preference to modules of the same name.
2012-06-24 19:13:55 -04:00
Larry Hastings
68386bc0b8
Issue #15164 : Change return value of platform.uname() from a
...
plain tuple to a collections.namedtuple.
2012-06-24 14:30:41 -07:00
Ezio Melotti
46495182d0
#15156 : HTMLParser now uses the new "html.entities.html5" dictionary.
2012-06-24 22:02:56 +02:00
Georg Brandl
87903c14bc
Merge with 3.2.
2012-06-24 20:07:40 +02:00
Georg Brandl
26af3b223f
Refer test_xmlrpc_net to the new buildbot URL at buildbot.python.org.
2012-06-24 20:06:54 +02:00
Éric Araujo
56261cff16
Branch merge
2012-06-24 13:54:22 -04:00
Éric Araujo
aa789ace66
Restore test that was using pysetup and can now ( #15157 ) use pydoc
2012-06-24 13:51:22 -04:00
Georg Brandl
19c4e5bb39
Fix test__locale on Mac; platform.uname() does not have a structseq-type interface (yet).
2012-06-24 19:29:49 +02:00
Antoine Pitrou
1f5d2a087c
Fix test to really run behind a NNTP virus checker
2012-06-24 16:28:18 +02:00
Hynek Schlawack
cf343532a2
Remove debug output from test_shutil
2012-06-24 16:21:22 +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
306336bcda
Closes #15161 : add support for giving path as a fd for truncate() and pathconf().
2012-06-24 12:55:33 +02:00
Mark Dickinson
95aeae01e2
In random's test_seedargs: Make sure to include at least one seed object with a negative hash.
2012-06-24 11:05:30 +01: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
Hynek Schlawack
f841e42a98
Fix whitespace
2012-06-24 09:51:46 +02:00
Éric Araujo
ec177c14d3
Packaging removal: also revert introduction of sysconfig.cfg.
...
We need a discussion to define what should be customized how; this new
config file is premature. It was added to serve the needs of the
resources system in install_data / packaging.database, so it can be
removed alongside packaging for 3.3.
2012-06-24 03:27:43 -04:00
Gregory P. Smith
853ef47522
merge heads
2012-06-24 00:24:31 -07:00
Gregory P. Smith
990a5feba7
Fixes issue #12268 : File readline, readlines and read() or readall() methods
...
no longer lose data when an underlying read system call is interrupted.
IOError is no longer raised due to a read system call returning EINTR
from within these methods.
2012-06-24 00:23:47 -07:00
Gregory P. Smith
5135992164
Fixes issue #12268 : File readline, readlines and read() or readall() methods
...
no longer lose data when an underlying read system call is interrupted.
IOError is no longer raised due to a read system call returning EINTR
from within these methods.
2012-06-23 23:55:39 -07:00
Gregory P. Smith
8150492f11
Speed up test_io by >2x by reducing the sleep time using setitimer instead of
...
alarm for the signal tests.
2012-06-23 23:46:37 -07: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
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
Antoine Pitrou
b7eb563a2a
Errors in "client" methods in test_socket were ignored because of a bogus except clause.
...
(this could reveal test failures!)
2012-06-24 01:34:13 +02:00
Antoine Pitrou
110ee34e41
Lower test-skipping threshold in test_reprlib
2012-06-23 22:55:58 +02:00
Antoine Pitrou
4f6e3f74fc
Avoid depending on directory iteration order in test_shutil
2012-06-23 22:05:11 +02:00
Antoine Pitrou
f3a166d799
Add debug output to test_shutil
2012-06-23 21:32:36 +02:00
Antoine Pitrou
2f8a75c7a7
Proper cleanup in test_shutil, even in case of error.
2012-06-23 21:28:15 +02: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
Nick Coghlan
6c6e2545cb
Properly test the various builtins lookup cases in inspect.getclosurevars
2012-06-23 20:07:39 +10: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
Antoine Pitrou
46cb1ef457
Use non-deprecated speling.
2012-06-23 18:11:59 +02:00
Antoine Pitrou
d4daa87129
Properly cleanup pep3147 modules in test_import
2012-06-23 18:09:55 +02:00
Antoine Pitrou
06e37587ff
Try to further debug occasional buildbot failure
2012-06-23 17:27:56 +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
Mark Dickinson
be4fb69201
Issue #14742 : test_unparse now only checks a limited number of files unless the 'cpu' resource is specified.
2012-06-23 09:27:47 +01:00
Alexander Belopolsky
648921371e
fixed whitespace
2012-06-22 21:10:50 -04:00
Alexander Belopolsky
8141cc7f88
Issues #11024 : Fixes and additional tests for Time2Internaldate.
2012-06-22 21:03:39 -04:00
Jesus Cea
60c13ddd9b
Skip the test only if neccesary - Kernel bug in freebsd9 - #10142 : Support for SEEK_HOLE/SEEK_DATA
2012-06-23 02:58:14 +02:00
Jesus Cea
9d874866f7
Kernel bug in freebsd9 - #10142 : Support for SEEK_HOLE/SEEK_DATA
2012-06-23 02:55:36 +02:00
Larry Hastings
90867a5aba
Issue #14626 : Fix buildbot issues on FreeBSD (AMD64). (Fingers crossed.)
2012-06-22 17:01:41 -07: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
f0f4742b49
Fix silly mistake in debugging code
2012-06-23 00:49:44 +02:00
Larry Hastings
7c7cbfc00f
Issue #15008 : Implement PEP 362 "Signature Objects".
...
Patch by Yury Selivanov.
2012-06-22 15:19:35 -07:00
Antoine Pitrou
541b7c89ff
Add debug output for temporary buildbot failures
2012-06-23 00:07:38 +02: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
7e3e496abb
merge
2012-06-22 16:09:42 -04:00
Alexander Belopolsky
93c9cd07b6
Issue #9527 : tm_gmtoff has 'correct' sign.
2012-06-22 16:04:19 -04:00
Larry Hastings
48ed36026b
Issue #14769 : Incorporated mildly pedantic feedback from python-dev.
...
Mostly documentation changes; the code changes are clarifications,
not semantic changes.
2012-06-22 12:58:36 -07: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
Alexander Belopolsky
ff493c9c46
Issue #9527 : datetime.astimezone() method will now supply a class
...
timezone instance corresponding to the system local timezone when
called with no arguments.
2012-06-22 12:25:57 -04:00
Alexander Belopolsky
fdc860f310
Issue #9527 : datetime.astimezone() method will now supply a class
...
timezone instance corresponding to the system local timezone when
called with no arguments.
2012-06-22 12:23:23 -04:00
Larry Hastings
8f904daee9
Issue #14769 : test_capi now has SkipitemTest, which cleverly checks
...
for "parity" between PyArg_ParseTuple() and the Python/getargs.c static
function skipitem() for all possible "format units".
2012-06-22 03:56:29 -07:00
Alexander Belopolsky
76935b9c8c
Issue #14653 : email.utils.mktime_tz() no longer relies on system
...
mktime() when timezone offest is supplied.
2012-06-21 20:48:23 -04:00
Nadeem Vawda
cf5e1d82e3
Tidy up comments from dd4f7d5c51c7 (zlib compression dictionary support).
2012-06-22 00:35:57 +02:00
Nadeem Vawda
a425c3d5a2
Make lzma.{encode,decode}_filter_properties private.
...
These functions were originally added to support LZMA compression in the zipfile
module, and are not of interest for the majority of users.
They can be made public in 3.4 if there is user interest, but in the meanwhile,
I've opted to present a smaller, simpler API for the module's initial release.
2012-06-21 23:36:48 +02:00
Hynek Schlawack
69168354c2
#10053 : Don't close FDs when FileIO.__init__ fails
...
Loosely based on the work by Hirokazu Yamamoto.
2012-06-21 20:58:31 +02:00
Hynek Schlawack
9ed8b4e4ca
#10053 : Don't close FDs when FileIO.__init__ fails
...
Loosely based on the work by Hirokazu Yamamoto.
2012-06-21 20:20:25 +02:00
Nadeem Vawda
fd8a838d58
Issue #14684 : Add support for predefined compression dictionaries to the zlib module.
...
Original patch by Sam Rushing.
2012-06-21 02:13:12 +02:00
Jason R. Coombs
42c9b04278
Prefer assertEqual to simply assert per recommendation in issue6727.
...
Clarified comment on disabled code to reference issue15093.
2012-06-20 10:24:24 -04:00
Christian Heimes
0b3847de6d
Issue #15096 : Drop support for the ur string prefix
2012-06-20 11:17:58 +02:00
Nadeem Vawda
10c8791978
Fix GzipFile's handling of filenames given as bytes objects.
...
Add relevant tests for GzipFile, and also for BZ2File and LZMAFile.
2012-06-20 01:48:50 +02:00
Nadeem Vawda
103e8113e4
Fix GzipFile's handling of filenames given as bytes objects.
2012-06-20 01:35:22 +02:00
Brian Curtin
0d0a1dedbc
Fix #14772 : Return the destination from some shutil functions.
2012-06-18 18:41:07 -05:00
Richard Oudkerk
ac38571f00
Issue #15064 : Make BaseManager.__enter__() start server if necessary.
2012-06-18 21:29:30 +01:00
Richard Oudkerk
d69cfe88ea
Issue #15064 : Implement context manager protocol for multiprocessing types
2012-06-18 17:47:52 +01:00