Commit Graph

6301 Commits

Author SHA1 Message Date
Stefan Krah
9542cc6eb5 Issue #9265: Incorrect name passed as arg[0] when shell=True
and executable specified.
2010-07-19 14:20:53 +00:00
Ronald Oussoren
f4ebe2e8a0 This patch adds a testcase that demonstrates a problem
with the expansion of LDSHARED when accessing that value
through sysconfig.

The problem is probably caused by the 9189.

A fix will follow shortly.
2010-07-19 13:00:36 +00:00
Alexander Belopolsky
d92f04062a Issue #5180: Fixed a bug that prevented loading 2.x pickles in 3.x
python when they contain instances of old-style classes.
2010-07-17 22:50:45 +00:00
Antoine Pitrou
448acd0a3f Fix possible failure in pickling tests due to different instantiations
of the random module being around.
2010-07-16 19:10:38 +00:00
Antoine Pitrou
1f9dea0b5f Issue #9251: test_threaded_import didn't fail when run through regrtest
if the import lock was disabled.
2010-07-14 11:52:38 +00:00
Senthil Kumaran
aa69d4d00f Fix Issue5842 - Moving the tests out of urllib.parse module 2010-07-14 10:21:22 +00:00
Victor Stinner
996903120c Woops, test_sndhdr.py contains the same code twice: fix it 2010-07-13 23:08:01 +00:00
Victor Stinner
e9ebde48cf Issue #9243: Fix sndhdr module and add unit tests, contributed by James Lee. 2010-07-13 23:04:56 +00:00
Alexander Belopolsky
903396ee66 Set sys.modules[name] to None instead of 0 to block module import. 2010-07-13 14:50:16 +00:00
Mark Dickinson
94628eeb58 Yield more information on failure in test_struct boolean test. 2010-07-12 20:03:24 +00:00
Benjamin Peterson
5ef96e5fac allow byte literals 2010-07-11 23:06:06 +00:00
Mark Dickinson
68c5de6d1c assertEquals -> assertEqual 2010-07-11 19:12:10 +00:00
Mark Dickinson
b214e90e01 Issue #9137: Fix issue in MutableMapping.update, which incorrectly
treated keyword arguments called 'self' or 'other' specially.
2010-07-11 18:53:06 +00:00
Mark Dickinson
8e0c996873 Issue #9165: Add math.isfinite and cmath.isfinite. 2010-07-11 17:38:24 +00:00
Benjamin Peterson
3e7428995f test for set literals 2010-07-11 12:59:24 +00:00
Senthil Kumaran
2ef16328e8 Stricter verification for file based url scheme and reliance on ftp protocol. 2010-07-11 03:12:43 +00:00
Benjamin Peterson
0d62f5bbfe ValueError is eventually what we want to move to, I suppose 2010-07-10 15:14:45 +00:00
R. David Murray
0425a8ea72 Fix 'refleak' introduced by fnmatch cache purge tests.
This introduces a 'purge' function for the fnmatch module analogous
to the 'purge' function in the re module.
2010-07-10 13:52:13 +00:00
Georg Brandl
0310a83e7f #3071: tell how many values were expected when unpacking too many. 2010-07-10 10:32:36 +00:00
Benjamin Peterson
b669221bd1 be more robust across platforms 2010-07-09 19:37:00 +00:00
Brian Curtin
74e4561a3c Re-flow several long lines from #1578269. 2010-07-09 15:58:59 +00:00
Brian Curtin
16633fa497 Fix the breakage of Lib/tarfile.py on non-Windows platforms due to
using WindowsError in a try/except. Only add WindowsError to the list of
exceptions to catch when we are actually running on Windows.

Additionally, add a call that was left out in test_posixpath.

Thanks Amaury, Antoine, and Jason.
2010-07-09 13:54:27 +00:00
Benjamin Peterson
4b83af9576 wrap 2010-07-09 13:31:11 +00:00
Benjamin Peterson
a04a32d586 allow more exceptions 2010-07-09 13:28:42 +00:00
Benjamin Peterson
ccbcf53865 OverflowError is fine 2010-07-09 13:20:40 +00:00
R. David Murray
ea340a317a 7846: limit fnmatch pattern cache to _MAXCACHE=100 entries.
Patch by Andrew Clegg.
2010-07-09 12:23:21 +00:00
Benjamin Peterson
8b0ef21c15 use assert method 2010-07-09 01:58:26 +00:00
Benjamin Peterson
d02441ea2f fix repr of complicated structseqs #9206 2010-07-08 22:33:03 +00:00
Benjamin Peterson
8c567c540d assert tuple inheritance 2010-07-08 22:16:05 +00:00
Brian Curtin
808e1ada94 Undo inadvertant checkin. 2010-07-08 22:13:25 +00:00
Brian Curtin
d40e6f70a5 Implement #1578269. Patch by Jason R. Coombs.
Added Windows support for os.symlink when run on Windows 6.0 or greater,
aka Vista. Previous Windows versions will raise NotImplementedError
when trying to symlink.

Includes numerous test updates and additions to test_os, including
a symlink_support module because of the fact that privilege escalation
is required in order to run the tests to ensure that the user is able
to create symlinks. By default, accounts do not have the required
privilege, so the escalation code will have to be exposed later (or
documented on how to do so). I'll be following up with that work next.

Note that the tests use ctypes, which was agreed on during the PyCon
language summit.
2010-07-08 21:39:08 +00:00
Mark Dickinson
a123631a5c Fix a performance issue in Decimal.pow. Thanks Stefan Krah for finding this. 2010-07-08 19:03:34 +00:00
Antoine Pitrou
f48ea7c2a9 Issue #8605: Skip test_gdb if Python is compiled with optimizations. 2010-07-08 18:51:30 +00:00
Mark Dickinson
247900ce47 In test_decimal, convert heuristic for skipping tests into an explicit skiplist. 2010-07-08 17:23:40 +00:00
Benjamin Peterson
6ef08a0ebe ValueError in this case is also acceptable 2010-07-07 22:45:06 +00:00
Benjamin Peterson
de73c4587f don't ignore exceptions from PyObject_IsTrue 2010-07-07 18:54:59 +00:00
Benjamin Peterson
c937dc2ccb this needn't be in the loop 2010-07-07 18:44:05 +00:00
Mark Dickinson
be64d95169 Issue #9186: log1p(-1.0) should raise ValueError, not OverflowError. 2010-07-07 16:21:29 +00:00
Alexander Belopolsky
a11d8c03a4 Issue #9000: datetime.timezone objects now have eval-friendly repr. 2010-07-06 23:19:45 +00:00
Brett Cannon
c84dc9d018 Fix test_xmlrpc_net to no longer fail since there are no more buildbots for trunk. 2010-07-05 22:11:16 +00:00
Alexander Belopolsky
d87e932f51 Added two more test cases for datetime 2010-07-05 17:57:31 +00:00
Benjamin Peterson
97c694b90b looking up on the type is correct, so this isn't an XXX 2010-07-05 17:11:05 +00:00
Alexander Belopolsky
f34e82ef49 Added more tests for utctimetuple() 2010-07-05 15:05:33 +00:00
Benjamin Peterson
335d2c757d pydoc still has a silly encoding 2010-07-05 14:59:40 +00:00
Mark Dickinson
feb3b75818 Issue #9130: Validate ellipsis tokens in relative imports. 2010-07-04 18:38:57 +00:00
Mark Dickinson
3445b482b3 Fix symbol numbers in test_parser test. 2010-07-04 18:15:26 +00:00
Mark Dickinson
2cc8a5e490 Issue #9130: Fix validation of relative imports in parser module. 2010-07-04 18:11:51 +00:00
Mark Dickinson
2bd61a988f Issue #9128: Fix validation of class decorators in parser module. 2010-07-04 16:37:31 +00:00
Brett Cannon
61b14251d3 Make importlib.abc.SourceLoader the primary mechanism for importlib.
This required moving the class from importlib/abc.py into
importlib/_bootstrap.py and jiggering some code to work better with the class.
This included changing how the file finder worked to better meet import
semantics. This also led to fixing importlib to handle the empty string from
sys.path as import currently does (and making me wish we didn't support that
instead just required people to insert '.' instead to represent cwd).

It also required making the new set_data abstractmethod create
any needed subdirectories implicitly thanks to __pycache__ (it was either this
or grow the SourceLoader ABC to gain an 'exists' method and either a mkdir
method or have set_data with no data arg mean to create a directory).

Lastly, as an optimization the file loaders cache the file path where the
finder found something to use for loading (this is thanks to having a
sourceless loader separate from the source loader to simplify the code and
cut out stat calls).
Unfortunately test_runpy assumed a loader would always work for a module, even
if you changed from underneath it what it was expected to work with. By simply
dropping the previous loader in test_runpy so the proper loader can be returned
by the finder fixed the failure.

At this point importlib deviates from import on two points:

1. The exception raised when trying to import a file is different (import does
an explicit file check to print a special message, importlib just says the path
cannot be imported as if it was just some module name).

2. the co_filename on a code object is not being set to where bytecode was
actually loaded from instead of where the marshalled code object originally
came from (a solution for this has already been agreed upon on python-dev but has
not been implemented yet; issue8611).
2010-07-03 21:48:25 +00:00
Senthil Kumaran
df022da3d8 Fix Issue5468 - urlencode to handle bytes and other alternate encodings.
(Extensive tests provided). Patch by Dan Mahn.
2010-07-03 17:48:22 +00:00