Skip Montanaro
174dd2219d
Add better datetime support to xmlrpclib module. Closes patch #1120353 .
2005-05-14 20:54:16 +00:00
Kurt B. Kaiser
935ea9a0b2
Improve subprocess link error notification
...
M NEWS.txt
M PyShell.py
M rpc.py
2005-05-10 03:44:24 +00:00
Raymond Hettinger
77d08bcfc2
SF bug #1193890 : calendar.weekheader not found in __all__
2005-05-10 03:20:12 +00:00
Kurt B. Kaiser
20345fb8aa
Use Queue's blocking feature instead of sleeping in the main
...
loop. Patch # 1190163 Michiel de Hoon
2005-05-05 23:29:54 +00:00
Michael W. Hudson
abb103b17a
Don't use 'is not' to compare strings.
...
(spotted by reading pypy-svn :)
2005-05-04 11:59:38 +00:00
Raymond Hettinger
42406e6f27
SF patch #1191489 : Simplify logic in random.py
2005-04-30 09:02:51 +00:00
Brett Cannon
53e9a8b9f3
Fix error in a docstring where a single quote started the docstring but triple
...
quote ended it.
Closes bug #1192777 . Thanks Christopher Smith.
2005-04-30 05:50:19 +00:00
Guido van Rossum
ebbffd42f3
Fixed a typo in docstring I happened upon.
2005-04-30 00:20:35 +00:00
Brett Cannon
c3647ac93e
Make subclasses of int, long, complex, float, and unicode perform type
...
conversion using the proper magic slot (e.g., __int__()). Also move conversion
code out of PyNumber_*() functions in the C API into the nb_* function.
Applied patch #1109424 . Thanks Walter Doewald.
2005-04-26 03:45:26 +00:00
Martin v. Löwis
d7c795e729
Make parse_makefile fallback to environment variables if nothing is
...
defined in the makefile. Get CFLAGS from the Makefile, instead of
getting OPT, BASE_CFLAGS and EXTRA_CFLAGS individually.
2005-04-25 07:14:03 +00:00
Brett Cannon
08cd598c21
Introduced EXTRA_CFLAGS as an environment variable used by the Makefile. Meant
...
to be used for flags that change binary compatibility.
Distutils was tweaked to also use the variable if used during compilation of
the interpreter.
2005-04-24 22:26:38 +00:00
Walter Dörwald
43148c8413
Update test to the current readline() behaviour.
2005-04-21 21:45:36 +00:00
Walter Dörwald
a4eb2d56a4
Fix comment.
2005-04-21 21:42:35 +00:00
Walter Dörwald
bc8e642c1b
If the data read from the bytestream in readline() ends in a '\r' read one more
...
byte, even if the user has passed a size parameter. This extra byte shouldn't
cause a buffer overflow in the tokenizer. The original plan was to return a line
ending in '\r', which might be recognizable as a complete line and skip any '\n'
that was read afterwards. Unfortunately this didn't work, as the tokenizer only
recognizes '\n' as line ends, which in turn lead to joined lines and
SyntaxErrors, so this special treatment of a split '\r\n' has been dropped. (It
can only happen with a temporarily exhausted bytestream now anyway.)
Fixes parts of SF bugs #1163244 and #1175396 .
2005-04-21 21:32:03 +00:00
Barry Warsaw
b180c06a54
Fix tests dependent on the exception raised by non-settable descriptors.
2005-04-20 19:41:36 +00:00
Tim Peters
e890682e52
Whitespace normalization.
2005-04-20 17:45:13 +00:00
Anthony Baxter
fa7e6b46ef
typo fix, thanks Jeremy Sanders
2005-04-15 06:17:20 +00:00
Brett Cannon
f4189916e3
Flush out support for ``class B(): pass`` syntax by adding support to the
...
'parser' module and 'compiler' package.
Closes patch #1176012 . Thanks logistix.
2005-04-09 02:30:16 +00:00
Brett Cannon
4ebc7e3bd0
Add test for ``class B1(): pass``.
2005-04-09 01:27:37 +00:00
Tim Peters
f754f5fd68
test_default_encoding_issues(): Fully restore sys.setdefaultencoding.
...
test_site often failed under "regrtest.py -r", because this xmlrpc test
left sys with a setdefaultencoding attribute, but loading site.py removes
that attribute and test_site.py verifies the attribute is gone. Changed
this test to get rid of sys.setdefaultencoding if it didn't exist when
this test started.
Don't know whether this is a bugfix (backport) candidate.
2005-04-08 18:00:59 +00:00
Raymond Hettinger
c88a6c75df
SF bug #1168983 : ftplib.py string index out of range
...
* resp[:1] in '123' # after Py2.2, this allowed blank responses to pass.
* replace <> with !=
* provide a usage message for empty command line calls
Backport candidate.
2005-04-05 04:31:09 +00:00
Walter Dörwald
714f87821f
Fix typos.
2005-04-04 21:42:22 +00:00
Walter Dörwald
7a6dc139de
Fix for SF bug #1175396 : readline() will now read one more character, if
...
the last character read is "\r" (and size is None, i.e. we're allowed to
call read() multiple times), so that we can return the correct line ending
(this additional character might be a "\n").
If the stream is temporarily exhausted, we might return the wrong line ending
(if the last character read is "\r" and the next one (after the byte stream
provides more data) is "\n", but at least the atcr member ensure that we
get the correct number of lines (i.e. this "\n" will not be treated as
another line ending.)
2005-04-04 21:38:47 +00:00
Hye-Shik Chang
ac89f6ef29
Fix testcase for 64bit BSD systems: long is 8 bytes for those systems
...
so there's no need to pad after off_t members. And a small typo fix.
2005-04-04 15:21:04 +00:00
Vinay Sajip
4a70486c37
Added threadName and now using re-entrant lock
2005-03-31 20:16:55 +00:00
Walter Dörwald
a6e8a4ad12
Since PyPI only accepts UTF-8 encoded data now, make sure that the data is
...
properly encoded and include the encoding in the Content-Type header.
2005-03-31 13:57:38 +00:00
Michael W. Hudson
e2749cb264
Fix for rather inaccurately titled bug
...
[ 1165306 ] Property access with decorator makes interpreter crash
Don't allow the creation of unbound methods with NULL im_class, because
attempting to call such crashes.
Backport candidate.
2005-03-30 16:32:10 +00:00
Tim Peters
b7e99b642f
SF patch 1167316: doctest.py fails self-test if run directly.
...
Patch by Ilya Sandler.
Bugfix candidate.
2005-03-28 23:50:54 +00:00
Tim Peters
eba28bea9b
Whitespace normalization.
2005-03-28 01:08:02 +00:00
Tim Peters
700f36c752
Two lines in this file had unbalanced parentheses -- couldn't possibly
...
work (SyntaxErrors at compile time).
I slammed in what looked like the obvious fixes, but someone who
understands this file should check my work.
2005-03-28 01:05:48 +00:00
Raymond Hettinger
fdf3bd6630
SF patch #1171417 : bug fix for islice() in docs
2005-03-27 20:11:44 +00:00
Raymond Hettinger
267b868f23
* Fix decimal's handling of foreign types. Now returns NotImplemented
...
instead of raising a TypeError. Allows other types to successfully
implement __radd__() style methods.
* Remove future division import from test suite.
* Remove test suite's shadowing of __builtin__.dir().
2005-03-27 10:47:39 +00:00
Raymond Hettinger
e6c470f255
SF bug #1770766 : weakref proxy has incorrect __nonzero__ behavior.
2005-03-27 03:04:54 +00:00
Martin v. Löwis
ca5d8fea3d
Add missing socket import
2005-03-24 19:40:57 +00:00
Fred Drake
c6699b7dc4
minor cleanup
2005-03-24 07:00:05 +00:00
Martin v. Löwis
8efd90485c
Make SRPMs pyversion 'any'.
2005-03-23 22:16:22 +00:00
Martin v. Löwis
98da562600
Make dist_files a triple, with the Python target version included,
...
so that bdist_wininst can specify 'any'.
2005-03-23 18:54:36 +00:00
Martin v. Löwis
8d12158991
Make the signature detached.
2005-03-22 23:02:54 +00:00
Walter Dörwald
09a3f2cc2f
Add tests for tuple, list and UserList that initialize the object from
...
various iterables.
(Copied from test_deque.py as suggested by Jim Jewett in SF bug #1166274 )
2005-03-22 22:43:28 +00:00
Martin v. Löwis
24ff83d5f3
Fix registration of output file.
2005-03-22 22:23:29 +00:00
Martin v. Löwis
be435bf3c8
Don't set the Python version for sdist uploads.
2005-03-22 20:32:41 +00:00
Martin v. Löwis
f74b923ae5
Upload GPG signature.
2005-03-22 15:51:14 +00:00
Walter Dörwald
c448a91ee8
Fix typo.
2005-03-22 11:22:38 +00:00
Fred Drake
abc1566eab
fix Python style guide conformance
2005-03-22 05:43:18 +00:00
Walter Dörwald
7355e8133d
Add list tests that ensure that remove() removes the first occurrence.
...
(Copied from test_deque.py as suggested by Jim Jewett in SF bug #1166274 )
2005-03-21 21:31:47 +00:00
Martin v. Löwis
98858c9efd
Actually add the implementation of the command.
2005-03-21 21:00:59 +00:00
Martin v. Löwis
55f1bb8bfa
Add the upload command. Make all dist commands register their
...
outputs with the distribution object.
2005-03-21 20:56:35 +00:00
Fred Drake
227e8ffa20
- rename check_provision() to split_revision()
...
- fix indentation to conform to the Python style guide
- add more tests and documentation
2005-03-21 06:36:32 +00:00
Fred Drake
db7b0027dc
PEP 314 implementation (client side):
...
added support for the provides, requires, and obsoletes metadata fields
2005-03-20 22:19:47 +00:00
Fred Drake
54398d6afb
helper code, mostly from Andy Harrington, for PEP 314 completion
2005-03-20 22:17:02 +00:00
Raymond Hettinger
d73202c596
Apply remove's mutation test after every equality test.
2005-03-19 00:00:51 +00:00
Raymond Hettinger
4aec61e0fc
Add a remove() method to collections.deque objects.
2005-03-18 21:20:23 +00:00
Skip Montanaro
9f5f9d943d
typo
2005-03-16 03:51:56 +00:00
Fred Drake
7ce75151a4
add two more extensions:
...
- .wsdl --> Web Service Definition Language
- .xpdl --> XML Process Definition Language
2005-03-15 15:52:08 +00:00
Raymond Hettinger
bea3f6f5c7
Bug #1163325 : "special" decimals aren't hashable
2005-03-15 04:59:17 +00:00
Walter Dörwald
71fd90da87
Add default value for "whence" argument.
2005-03-14 19:25:41 +00:00
Walter Dörwald
729c31f5c3
Reset internal buffers when seek() is called. This fixes SF bug #1156259 .
2005-03-14 19:06:30 +00:00
Vinay Sajip
8e628d2342
Made traceback unconditional, to avoid lock contention problems when logging errors occur in a custom importer (SF path #1158052 ).
2005-03-13 09:57:46 +00:00
Vinay Sajip
4600f11a07
Added optional encoding argument to file handlers.
2005-03-13 09:56:36 +00:00
Vinay Sajip
b89e7c9bc9
Added optional encoding argument to file handlers. Made traceback import unconditional, to avoid lock contention problems which occur when logging from custom importers (SF patch #1158052 )
2005-03-13 09:54:31 +00:00
Tim Peters
a733bd96f1
Port bugfix from 2.4 maint.
...
Bug #1160802 : Can't build Zope on Windows w/ 2.4.1c1.
MSVCCompiler.initialize(): set self.initialized to True, as suggested
by AMK. Else we keep growing the PATH endlessly, with each new C
extension built, until putenv() complains.
No change to NEWS because the patch that created this bug is also new
for 2.5a1 (so there's no change here to any code yet released from HEAD).
2005-03-12 19:05:58 +00:00
Johannes Gijsbers
a5855d5ace
Patch #1159931/bug #1143895 : inspect.getsource failed when functions,
...
etc., had comments after the colon, and some other cases. This patch
take a simpler approach that doesn't rely on looking for a ':'. Thanks
Simon Percivall!
2005-03-12 16:37:11 +00:00
Raymond Hettinger
f77d0334f3
Revised the itertools quantifier recipes to match the performance of the
...
new builtins.
2005-03-11 22:17:30 +00:00
Raymond Hettinger
96229b1918
Add two new functions, any() and all().
2005-03-11 06:49:40 +00:00
Raymond Hettinger
26e512a04f
Test partial() with bound/unbound methods.
2005-03-11 06:48:49 +00:00
Raymond Hettinger
a1a992c0a0
Apply itemgetter() instead of lambda.
2005-03-11 06:46:45 +00:00
Brett Cannon
01668a1ab9
Fix test for socket.getfqdn() to also include the name returned by
...
socket.gethostname() in the check for a valid return.
Also clarified docs (official and docstring) that the value from gethostname()
is returned if gethostbyaddr() doesn't do the job.
2005-03-11 00:04:17 +00:00
Raymond Hettinger
984f9bb714
operator.itemgetter() and operator.attrgetter() now support extraction
...
of multiple fields. This provides direct support for sorting by
multiple keys.
2005-03-09 16:38:48 +00:00
Martin v. Löwis
e2713becd8
Build with --disable-unicode again. Fixes #1158607 .
...
Will backport to 2.4.
2005-03-08 15:03:08 +00:00
Martin v. Löwis
b60ae99601
Convert file names of posix.access according to the file system encoding.
2005-03-08 09:10:29 +00:00
Raymond Hettinger
c8b6d1bd8c
Make functional.partial() more closely match the spec by emulating
...
some useful features of regular functions:
* Made weak referencable.
* Allow attribute access so a user can set __name__, __doc__, etc.
2005-03-08 06:14:50 +00:00
Greg Ward
50682d0f78
SF #818006 : merge from release24-maint branch: add useful read-only
...
attributes to oss_audio_device object: 'closed', 'name', and 'mode'.
2005-03-07 01:41:11 +00:00
Martin v. Löwis
78be7df9e4
Patch #918101 : Add tarfile open mode r|* for auto-detection of the
...
stream compression; add, for symmetry reasons, r:* as a synonym of r.
2005-03-05 12:47:42 +00:00
Brett Cannon
653a5adcca
Tweak test_communicate_stderr so that it works when run under a pydebug build.
2005-03-05 06:40:52 +00:00
Brett Cannon
1bfd85b612
Remove some more tab usage to prevent an error when run as ``python -tt``.
2005-03-05 05:32:14 +00:00
Brett Cannon
3304a14148
Remove a tab so that whitespace usage is consistent.
2005-03-05 05:28:45 +00:00
Greg Ward
40407943b7
SF #1149508 : ensure textwrap handles hyphenated numbers correctly,
...
eg. "2004-03-04" is not broken across lines. (Merged from 2.4 branch.)
2005-03-05 02:53:17 +00:00
Martin v. Löwis
00a73e7715
Patch #1043890 : tarfile: add extractall() method.
2005-03-04 19:40:34 +00:00
Martin v. Löwis
c72dd38f30
Patch #1075887 : Don't require MSVC in distutils if there is nothing
...
to build. Will backport to 2.4
2005-03-04 13:50:17 +00:00
Martin v. Löwis
637431bf14
Patch #1103407 : Properly deal with tarfile iterators when untarring
...
symbolic links on Windows. Fixes #1100429 . Will backport to 2.4.
2005-03-03 23:12:42 +00:00
Peter Astrand
7e78ade6f9
Corrected bug in list2cmdline wrt backslashes. Fixes #1083306 .
2005-03-03 21:10:23 +00:00
Peter Astrand
f7f1bb7ff5
Only run extensive subprocess tests if -usubprocess to regrtest is specified. Fixes #1124637
2005-03-03 20:47:37 +00:00
Peter Astrand
23109f0009
Optimization for communicate(): If only one of stdin/stdout/stderr is
...
redirected, using select() or threads is unnecessary.
2005-03-03 20:28:59 +00:00
Peter Astrand
cbac93c229
Added three more testcases: Using communicate with only one of
...
stdin/stdout/stderr redirected.
2005-03-03 20:24:28 +00:00
Raymond Hettinger
b67cc80bb9
SF bug #1155938 : Missing None check for __init__().
2005-03-03 16:45:19 +00:00
Martin v. Löwis
6ce7ed23d0
Revert previous checkin on getargs 'L' code. Try to convert all
...
numbers in PyLong_AsLongLong, and update test suite accordingly.
Backported to 2.4.
2005-03-03 12:26:35 +00:00
Martin v. Löwis
a4dac4094a
Patch #645894 : Use getrusage for computing the time consumption in
...
profile.py if available.
2005-03-03 11:39:45 +00:00
Martin v. Löwis
7fe60c0a0a
Patches #749830 , #1144555 : allow UNIX mmap size to default to current
...
file size.
2005-03-03 11:22:44 +00:00
Martin v. Löwis
df37c8c1ad
Patch #1046831 : Use get_python_version where appropriate in sysconfig.py.
2005-03-03 11:08:03 +00:00
Martin v. Löwis
c5574e809b
Patch #1117454 : Remove code to special-case cookies without values
...
in LWPCookieJar. Backported to 2.4.
2005-03-03 10:57:37 +00:00
Martin v. Löwis
4ea3eade51
Patch #1117339 : Add cookielib special name tests.
...
Backported to 2.4.
2005-03-03 10:48:12 +00:00
Martin v. Löwis
e869eb1953
Patch #1112812 : Make bsddb/__init__.py more friendly for modulefinder.
...
Backported to 2.4.
2005-03-03 09:46:07 +00:00
Martin v. Löwis
ff232d7230
Clear internal call error in 'L' format. Fixes #723201 .
...
Backported to 2.4.
2005-03-03 09:24:38 +00:00
Martin v. Löwis
f2a8d63e4f
Patch #1110248 : SYNC_FLUSH the zlib buffer for GZipFile.flush.
...
Partially fixes #1110242 .
2005-03-03 08:35:22 +00:00
Martin v. Löwis
df24153f65
Patch #1107973 : tarfile.ExFileObject iterators.
2005-03-03 08:17:42 +00:00
Martin v. Löwis
8ed338ab44
Patch #1104111 : Alter setup.py --help and --help-commands.
2005-03-03 08:12:27 +00:00
Piers Lauder
8659d909d3
Fix bug in InternalDate regexp that failed to allow leading 0 in day - courtesy of Rimon Barr <rimon.barr@cornell.edu>
2005-03-02 09:13:45 +00:00
Martin v. Löwis
4afe154369
Patch #1121234 : Properly cleanup _exit and tkerror commands.
...
Will backport to 2.4.
2005-03-01 08:09:28 +00:00
Brett Cannon
e94e74a8e1
Make test__locale more fine-grained. Now test localeconv and nl_langinfo
...
individually as tests.
Also improved output when the test fails.
2005-03-01 03:15:50 +00:00
Brett Cannon
46b0802ccd
Fix small grammatical error in a docstring.
2005-03-01 03:12:26 +00:00