| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
no "doc" argument given. This makes it possible to legitimately use
property() as a decorator to produce a read-only property.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
an error code, this let `self` leak. This is a disaster
on Windows, since `self` already points to a newly-opened
file object, and it was impossible for Python code to
close the thing since the only reference to it was in a
blob of leaked C memory.
test_hotshot test_bad_sys_path(): This new test provoked
the C bug above. This test passed, but left an open
"@test" file behind, which caused a massive cascade of
bogus test failures in later, unrelated tests on Windows.
Changed the test code to remove the @test file it leaves
behind, which relies on the change above to close that
file first.
|
|
|
|
|
|
| |
This was mostly written by Travis Oliphant.
I've inspected it all; Neal Norwitz and MvL have also looked at it
(in an earlier incarnation).
|
|
|
|
|
|
| |
added to gc.collect(). Updated docs, unit test, and NEWS entry.
(Also, fixed a typo in NEWS.)
|
|
|
|
|
| |
All of these (except _lsprof.c) should be backported. Particularly
the hotshot change which validates sys.path. Can someone backport?
|
|
|
|
| |
This is a alternative version of patch #1379332.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The failure definitely seems timing related. This change *seems* to work.
Since the failure isn't doesn't occur consistently, it's hard to tell.
Running these tests on Solaris in this order:
test_urllibnet test_operator test_cgi \
test_isinstance test_future test_ast test_logging
generally caused a failure (about 50% of the time) before the sleep.
I couldn't provoke the failure with the sleep.
This should really be cleaned up by using threading.Events or something
so it is not timing dependent and doesn't hang forever on failure.
|
| |
|
|
|
|
|
|
|
| |
test_codecmaps_tw test_importhooks test_socket_ssl
I don't completely understand the cause, but there's a lot of import magic
going on and this is the smallest change which fixes the problem.
|
|
|
|
| |
Add note to NEWS.
|
|
|
|
|
|
|
| |
want to wait forever if we don't receive the last message. But we also
don't want the test to fail if we shutdown too quickly. I can't reliably
reproduce this failure, so I'm kinda guessing this is the problem.
We'll see if this band-aid helps.
|
|
|
|
| |
Add it back.
|
| |
|
|
|
|
|
|
| |
The culprit was an expression-less yield -- the first apparently in
the standard library. I added a unit test for this.
Also removed the hack to force compilation of test_with.py.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
exception, it should not be propagated up. With unit tests.
|
| |
|
|
|
|
| |
specified. Hopefully this wll bring warming to Tim's Windows-loving heart.
|
|
|
|
|
|
|
|
|
| |
added message attribute compared to the previous version of Exception. It is
also a new-style class, making all exceptions now new-style. KeyboardInterrupt
and SystemExit inherit from BaseException directly. String exceptions now
raise DeprecationWarning.
Applies patch 1104669, and closes bugs 1012952 and 518846.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- New semantics for __exit__() -- it must re-raise the exception
if type is not None; the with-statement itself doesn't do this.
(See the updated PEP for motivation.)
- Added context managers to:
- file
- thread.LockType
- threading.{Lock,RLock,Condition,Semaphore,BoundedSemaphore}
- decimal.Context
- Added contextlib.py, which defines @contextmanager, nested(), closing().
- Unit tests all around; bot no docs yet.
|
| |
|
| |
|
|
|
|
| |
Neal.
|
|
|
|
| |
be system dependent (like test_gestalt).
|
| |
|
| |
|
|
|
|
| |
print the status so far and suppress printing the exception (but still exit).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- IMPORT_NAME takes an extra argument from the stack: the relativeness of
the import. Only passed to __import__ when it's not -1.
- __import__() takes an optional 5th argument for the same thing; it
__defaults to -1 (old semantics: try relative, then absolute)
- 'from . import name' imports name (be it module or regular attribute)
from the current module's *package*. Likewise, 'from .module import name'
will import name from a sibling to the current module.
- Importing from outside a package is not allowed; 'from . import sys' in a
toplevel module will not work, nor will 'from .. import sys' in a
(single-level) package.
- 'from __future__ import absolute_import' will turn on the new semantics
for import and from-import: imports will be absolute, except for
from-import with dots.
Includes tests for regular imports and importhooks, parser changes and a
NEWS item, but no compiler-package changes or documentation changes.
|
|
|
|
| |
Jeremy, please review!
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was started by Mike Bland and completed by Guido
(with help from Neal).
This still needs a __future__ statement added;
Thomas is working on Michael's patch for that aspect.
There's a small amount of code cleanup and refactoring
in ast.c, compile.c and ceval.c (I fixed the lltrace
behavior when EXT_POP is used -- however I had to make
lltrace a static global).
|
|
|
|
|
|
| |
be complete when when checking types.
Yield cannot be tested outside a function, so add a comment to that effect.
|
|
|
|
| |
the interpreter in 2.5 .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
breaks the parser module, because it adds the if/else construct as well as
two new grammar rules for backward compatibility. If no one else fixes
parsermodule, I guess I'll go ahead and fix it later this week.
The TeX code was checked with texcheck.py, but not rendered. There is
actually a slight incompatibility:
>>> (x for x in lambda:0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: iteration over non-sequence
changes into
>>> (x for x in lambda: 0)
File "<stdin>", line 1
(x for x in lambda: 0)
^
SyntaxError: invalid syntax
Since there's no way the former version can be useful, it's probably a
bugfix ;)
|
|
|
|
| |
a tree of Python objects. Expose this through compile().
|
|
|
|
|
|
|
|
| |
- The copy module now "copies" function objects (as atomic objects).
- dict.__getitem__ now looks for a __missing__ hook before raising
KeyError.
- Added a new type, defaultdict, to the collections module.
This uses the new __missing__ hook behavior added to dict (see above).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
not allowed by the specs.
|
|
|
|
|
| |
implicit assumptions that there's no difference
between text and binary modes.
|
|
|
|
|
|
| |
inside its own package. Fixes problem reported in patch #1433198.
Add codec search function for codec test codec.
|
|
|
|
| |
be used to control how files are opened.
|