Fred Drake
bc875f5a36
Allocating a new weakref object can cause existing weakref objects for
...
the same object to be collected by the cyclic GC support if they are
only referenced by a cycle. If the weakref being collected was one of
the weakrefs without callbacks, some local variables for the
constructor became invalid and have to be re-computed.
The test caused a segfault under a debug build without the fix applied.
2004-02-04 23:14:14 +00:00
Fred Drake
ea2adc9c80
- add tests that exercise fixes for the PyWeakref_NewRef() and
...
PyWeakref_NewProxy() constructors from the C API
- elaborate the getweakrefcount() and getweakrefs() tests slightly
2004-02-03 19:56:46 +00:00
Hye-Shik Chang
ff83c2bacc
Fix input() builtin function to respect compiler flags.
...
(SF patch 876178, patch by mwh, unittest by perky)
2004-02-02 13:39:01 +00:00
Raymond Hettinger
756b3f3c15
* Move collections.deque() in from the sandbox
...
* Add unittests, newsitem, and whatsnew
* Apply to Queue.py mutex.py threading.py pydoc.py and shlex.py
* Docs are forthcoming
2004-01-29 06:37:52 +00:00
Fred Drake
4e9e7a6140
don't wrap lines too late by default
...
closes SF bug #842213
2004-01-26 16:42:30 +00:00
Kurt B. Kaiser
7663729ec7
There was an error in the Tk error dialog fix at Rev 1.84 which caused starting
...
w/o the subprocess to fail. Check in a fix to IDLE and IDLEfork.
M PyShell.py
Backport candidate, combine with previous.
2004-01-21 22:10:01 +00:00
Kurt B. Kaiser
d6ab77d27d
rpc.py:SocketIO - Large modules were generating large pickles when downloaded
...
to the execution server. The return of the OK response from the subprocess
initialization was interfering and causing the sending socket to be not
ready. Add an IO ready test to fix this. Moved the polling IO ready test
into pollpacket().
M NEWS.txt
M rpc.py
Backport candidate.
2004-01-21 19:21:11 +00:00
Kurt B. Kaiser
af3eb87802
Added a Tk error dialog to run.py inform the user if the subprocess can't
...
connect to the user GUI process. Added a timeout to the GUI's listening
socket. Added Tk error dialogs to PyShell.py to announce a failure to bind
the port or connect to the subprocess. Clean up error handling during
connection initiation phase. This is an update of Python Patch 778323.
M NEWS.txt
M PyShell.py
M ScriptBinding.py
M run.py
Backport candidate.
2004-01-21 18:54:30 +00:00
Raymond Hettinger
734fb5724f
Add a Guido inspired example for groupby().
2004-01-20 20:04:40 +00:00
Marc-André Lemburg
c83dddf7fe
Let the default encodings search function lookup aliases before trying the codec import. This allows applications to install codecs which override (non-special-cased) builtin codecs.
2004-01-20 09:40:14 +00:00
Marc-André Lemburg
5c94d33077
Add some more code page aliases needed for completeness.
2004-01-20 09:38:52 +00:00
Hye-Shik Chang
b619e4b36c
Fix a typo: s/iso_3022/iso2022/
2004-01-20 09:33:30 +00:00
Hye-Shik Chang
a5e719e081
Test not the standard utf-8 codec but gb18030 which is the most complex
...
codec in multibytecodec consumers.
2004-01-20 09:11:48 +00:00
Tim Peters
1301892715
For whatever reason, these files had \r\r\n line endings on Windows,
...
meaning they must have been checked in to CVS from a Linuxish box with
Windowish \r\n line endings to begin with.
2004-01-18 21:03:23 +00:00
Tim Peters
8279170ed2
Revert another local change that snuck into a whitespace normalization
...
patch.
2004-01-18 20:39:35 +00:00
Tim Peters
58eb11cf62
Whitespace normalization.
2004-01-18 20:29:55 +00:00
Hye-Shik Chang
3e2a306920
Add CJK codecs support as discussed on python-dev. (SF #873597 )
...
Several style fixes are suggested by Martin v. Loewis and
Marc-Andre Lemburg. Thanks!
2004-01-17 14:29:29 +00:00
Gregory P. Smith
e33aef7b15
__init__.py: keep it compatible with older python (True and False == 1 and 0)
...
test_basics.py: updated for the set_get_returns_none() default of 2 change.
2004-01-13 19:59:57 +00:00
Barry Warsaw
8f799e4c3a
__all__: Remove freenet_b64encode and freenet_b64decode.
2004-01-07 22:32:12 +00:00
Raymond Hettinger
0c4102760c
SF Patch #864863 : Bisect C implementation
...
(Contributed by Dmitry Vasiliev.)
2004-01-05 10:13:35 +00:00
Hye-Shik Chang
75c00efcc7
[SF #866875 ] Add a specialized routine for one character
...
separaters on str.split() and str.rsplit().
2004-01-05 00:29:51 +00:00
Raymond Hettinger
d73ef06cd3
Exercise sorted() where possible
2004-01-04 11:14:51 +00:00
Raymond Hettinger
816ed1b0bd
SF patch #868736 : Disable GC for timeit
...
Make timings more consistent by temporarily disabling GC.
2004-01-04 03:47:51 +00:00
Barry Warsaw
4f019d3b47
More complete code coverage, including testing the new RFC 3548 support.
2004-01-04 01:13:02 +00:00
Barry Warsaw
4c904d1bf7
Added more complete RFC 3548 support for Base64, Base32, and Base16
...
encoding and decoding, including optional case folding and optional
alternative alphabets.
2004-01-04 01:12:26 +00:00
Alex Martelli
b993b067d2
The script now takes an optional command-line argument to specify how many
...
loops to run (default remains 50,000 if no argument is specified).
2004-01-02 17:11:54 +00:00
Andrew M. Kuchling
6e4f7a82da
[Bug #812325 ] tarfile.close() can write out more bytes to the output
...
than are specified by the buffer size. The patch calls .__write()
to ensure that any full blocks are written out.
2004-01-02 15:44:29 +00:00
Kurt B. Kaiser
e9802a301d
- Print correct exception even if source file changed since shell was
...
restarted. IDLEfork Patch 869012 Noam Raphael
Modified Files:
NEWS.txt run.py
2004-01-02 04:04:04 +00:00
Raymond Hettinger
74bb7f03b1
SF Patch 681780: Faster commonprefix (OS independent)
...
Improved based on discussions at:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/252177
http://groups.google.com/groups?th=fc7b54f11af6b24e&seekm=bss2so$om$00$1@news.t-online.com
2003-12-31 22:44:29 +00:00
Raymond Hettinger
6e70accaff
Strengthen the test for hash effectiveness
2003-12-31 02:01:33 +00:00
Barry Warsaw
4a44293735
Fixes to support CJKCodecs as per SF bug #852347 . Actually, this
...
patch removes dependencies on the old unsupported KoreanCodecs package
and the alternative JapaneseCodecs package. Since both of those
provide aliases for their codecs, this removal just makes the generic
codec names work.
We needed to make slight changes to __init__() as well.
This will be backported to Python 2.3 when its branch freeze is over.
2003-12-30 16:52:25 +00:00
Barry Warsaw
339270e6f5
Bump version number to 2.5.5
2003-12-30 16:49:40 +00:00
Andrew M. Kuchling
b386f6a509
As part of fixing bug #829532 , add a test case that exercises os.makedirs
2003-12-23 16:36:11 +00:00
Andrew M. Kuchling
6fccc8a9ec
[Bug #829532 ] Invoking os.makedirs() with an argument that contains a
...
directory name with a single dot fails. The patch skips creating
directories named os.curdir. (Patch by Bram Moolenaar)
2.3 bugfix candidate.
2003-12-23 16:33:28 +00:00
Hye-Shik Chang
7fc4cf57b8
Fix unicode.rsplit()'s bug that ignores separater on the end of string when
...
using specialized splitter for 1 char sep.
2003-12-23 09:10:16 +00:00
Raymond Hettinger
9014560412
Make sure the UserDict copies do not share the same underlying
...
dictionary as the original. This parallels MvL's change to
Lib/os.py 1.56.
Backport candidate.
2003-12-21 22:19:08 +00:00
Walter Dörwald
893020b59b
Remove self from the arguments for the function add_type().
...
Backport candidate.
2003-12-19 18:15:10 +00:00
Hye-Shik Chang
8d2e08dcdf
Enable some unittests on FreeBSD.
...
test__locale: add typical POSIX-style full locale names.
test_locale: use en_US.US-ASCII on FreeBSD.
2003-12-19 01:16:03 +00:00
Jeremy Hylton
e708fbd286
Remove methods that are no longer called by urllib2.
2003-12-17 20:47:28 +00:00
Raymond Hettinger
64958a15d7
Guido grants a Christmas wish:
...
sorted() becomes a regular function instead of a classmethod.
2003-12-17 20:43:33 +00:00
Jeremy Hylton
df38ea9c29
Add methods to MockHTTPClass for modern httplib interface.
...
Replace lots of assert_(x == y) with assertEqual(x, y).
2003-12-17 20:42:38 +00:00
Jeremy Hylton
023518a6a8
Rewrite AbstractHTTPHandler to use modern httplib interface.
...
The chief benefit of this change is that requests will now use
HTTP/1.1 instead of HTTP/1.0. Bump the module version number as part
of the change.
There are two possible incompatibilities that we'll need to watch out
for when we get to an alpha release. We may get a different class of
exceptions out of httplib, and the do_open() method changed its
signature. The latter is only important if anyone actually subclasses
AbstractHTTPHandler.
2003-12-17 18:52:16 +00:00
Hye-Shik Chang
eebb641f23
Add rsplit method for UserString, too.
...
(Spotted by Raymond Hettinger)
2003-12-15 19:46:09 +00:00
Hye-Shik Chang
3ae811b57d
Add rsplit method for str and unicode builtin types.
...
SF feature request #801847 .
Original patch is written by Sean Reifschneider.
2003-12-15 18:49:53 +00:00
Jeremy Hylton
dce391cb39
Remove __del__ methods to avoid creating uncollectable cyclic trash.
...
Keep close() methods for backwards compatibility.
Does any call close() explicitly?
2003-12-15 16:08:48 +00:00
Walter Dörwald
c2fcf9bb6b
Make the module docstring a raw string, so that the backslash in
...
"read until end of line ('\n') or EOF" will be treated literally.
Fixes SF bug #860155 .
2003-12-15 10:16:09 +00:00
Jeremy Hylton
c1be59f40a
SF patch 852995: add processors feature to urllib2
...
John J. Lee writes: "the patch makes it possible to implement
functionality like HTTP cookie handling, Refresh handling,
etc. etc. using handler objects. At the moment urllib2's handler
objects aren't quite up to the job, which results in a lot of
cut-n-paste and subclassing. I believe the changes are
backwards-compatible, with the exception of people who've
reimplemented build_opener()'s functionality -- those people would
need to call opener.add_handler(HTTPErrorProcessor).
The main change is allowing handlers to implement
methods like:
http_request(request)
http_response(request, response)
In addition to the usual
http_open(request)
http_error{_*}(...)
"
Note that the change isn't well documented at least in part because
handlers aren't well documented at all. Need to fix this.
Add a bunch of new tests. It appears that none of these tests
actually use the network, so they don't need to be guarded by a
resource flag.
2003-12-14 05:27:34 +00:00
Neal Norwitz
328f338196
SF #736962 , port test_future to unittest, add a bit more coverage, by Walter Dörwald
2003-12-13 22:43:34 +00:00
Walter Dörwald
b167b04a2e
Add tests to test_weakref.py to bring code coverage in _weakref.c up to 100%.
...
Port test_md5.py to PyUnit.
(Written by Neal Norwitz; from SF patch 736962)
(Backport candidate)
2003-12-11 12:34:05 +00:00
Jack Jansen
73b94da93f
Wrapper modules for _Launch and _OSA weren't added yet. Fixed.
2003-12-09 15:07:01 +00:00