| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
- all classes are new-style (but ripping out classobject.[ch] isn't done)
- int/int -> float
- all exceptions must derive from BaseException
- absolute import
- 'as' and 'with' are keywords
|
|
|
|
| |
SS2 (single-shift 2) escape sequences correctly.
|
| |
|
| |
|
| |
|
|
|
|
| |
interpreter to exit.
|
|
|
|
|
| |
no "doc" argument given. This makes it possible to legitimately use
property() as a decorator to produce a read-only property.
|
| |
|
|
|
|
|
|
| |
added to gc.collect(). Updated docs, unit test, and NEWS entry.
(Also, fixed a typo in NEWS.)
|
| |
|
| |
|
|
|
|
| |
Add note to NEWS.
|
| |
|
|
|
|
| |
expression for the hell of it.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
exceptions. This was triggered when 'warnings' had a filter set to "error"
that caught the string exception deprecation warning.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
| |
PyThreadState_Delete(): if the auto-GIL-state machinery knows about
the thread state, forget it (since the thread state is being deleted,
continuing to remember it can't help, but can hurt if another thread
happens to get created with the same thread id).
I'll backport to 2.4 next.
|
| |
|
| |
|
|
|
|
| |
Cleanup Python-ast.c generation.
|
|
|
|
| |
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).
|
|
|
|
| |
INET_ADDRSTRLEN is not defined.
|
|
|
|
| |
not allowed by the specs.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
specifying the file mode input files should be opened with.
|
|
|
|
| |
current file number.
|
|
|
|
| |
translation functions other than _() in the builtin namespace.
|
| |
|
|
|
|
| |
a "command verb" to invoke on the file.
|
|
|
|
| |
two gigabytes.
|
| |
|
|
|
|
| |
return address using smtplib.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on lsprof (patch #1212837) by Brett Rosen and Ted Czotter.
With further editing by Michael Hudson and myself.
History in svn repo: http://codespeak.net/svn/user/arigo/hack/misc/lsprof
* Module/_lsprof.c is the internal C module, Lib/cProfile.py a wrapper.
* pstats.py updated to display cProfile's caller/callee timings if available.
* setup.py and NEWS updated.
* documentation updates in the profiler section:
- explain the differences between the three profilers that we have now
- profile and cProfile can use a unified documentation, like (c)Pickle
- mention that hotshot is "for specialized usage" now
- removed references to the "old profiler" that no longer exists
* test updates:
- extended test_profile to cover delicate cases like recursion
- added tests for the caller/callee displays
- added test_cProfile, performing the same tests for cProfile
* TO-DO:
- cProfile gives a nicer name to built-in, particularly built-in methods,
which could be backported to profile.
- not tested on Windows recently!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is larger than FD_SETSIZE.
This can only be acheived with ulimit -n SOME_NUMBER_BIGGER_THAN_FD_SETSIZE
which is typically only available to root. Since this wouldn't normally
be run in a test (ie, run as root), it doesn't seem too worthwhile to
add a normal test. The bug report has one version of a test. I've
written another. Not sure what the best thing to do is.
Do the check before calling internal_select() because we can't set
an error in between Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS.
This seemed the clearest solution, ie handle before calling internal_select()
rather than inside. Plus there is at least one place outside
of internal_select() that needed to be handled.
Will backport.
|