]> granicus.if.org Git - python/log
python
19 years agoPatch #1171150: add a newline to py_compile error output
Georg Brandl [Fri, 10 Jun 2005 17:15:18 +0000 (17:15 +0000)]
Patch #1171150: add a newline to py_compile error output

19 years agoThe functions audioop.lin2adpcm3() and audioop.adpcm32lin() were removed from
Armin Rigo [Fri, 10 Jun 2005 15:29:22 +0000 (15:29 +0000)]
The functions audioop.lin2adpcm3() and audioop.adpcm32lin() were removed from
this module in Jan 1994, but still documented.

19 years agoAdd untokenize() function to allow full round-trip tokenization.
Raymond Hettinger [Fri, 10 Jun 2005 11:05:19 +0000 (11:05 +0000)]
Add untokenize() function to allow full round-trip tokenization.

Should significantly enhance the utility of the module by supporting
the creation of tools that modify the token stream and writeback the
modified result.

19 years agoMinor tweaks, to allow some (out-of-tree, until successful) tinkering
Jack Jansen [Fri, 10 Jun 2005 10:46:40 +0000 (10:46 +0000)]
Minor tweaks, to allow some (out-of-tree, until successful) tinkering
with C++.

19 years ago[Bug #1200134] Fix buffer overflow by constraining size of .getstr(), .instr() to...
Andrew M. Kuchling [Thu, 9 Jun 2005 17:53:27 +0000 (17:53 +0000)]
[Bug #1200134] Fix buffer overflow by constraining size of .getstr(), .instr() to size of allocated buffer

19 years ago[Bug #1079134] Mention change to date comparisons; bump version info and release...
Andrew M. Kuchling [Thu, 9 Jun 2005 15:57:32 +0000 (15:57 +0000)]
[Bug #1079134] Mention change to date comparisons; bump version info and release date to 2.4.1

19 years ago[Patch #1002763] Allow long ints as terminator values; also, treat a terminator of...
Andrew M. Kuchling [Thu, 9 Jun 2005 14:59:45 +0000 (14:59 +0000)]
[Patch #1002763] Allow long ints as terminator values; also, treat a terminator of 0 like the empty string or None

19 years agoConvert asynchat test to unittest; exercise the client using a numeric value as the...
Andrew M. Kuchling [Thu, 9 Jun 2005 14:56:31 +0000 (14:56 +0000)]
Convert asynchat test to unittest; exercise the client using a numeric value as the terminator

19 years ago[Bug #1074261, patch #1074381] Restrict the size of chunks read from the file in...
Andrew M. Kuchling [Thu, 9 Jun 2005 14:19:32 +0000 (14:19 +0000)]
[Bug #1074261, patch #1074381] Restrict the size of chunks read from the file in order to avoid overflow or huge memory consumption.  Patch by Mark Eichin

19 years agoConvert gzip test suite to use unittest
Andrew M. Kuchling [Thu, 9 Jun 2005 14:12:36 +0000 (14:12 +0000)]
Convert gzip test suite to use unittest

19 years agofix import to work with either module name.
Gregory P. Smith [Thu, 9 Jun 2005 07:11:42 +0000 (07:11 +0000)]
fix import to work with either module name.

19 years ago[Patch #1171487, bug #1170331] Fix error in base64.b32decode when encoding a single...
Andrew M. Kuchling [Wed, 8 Jun 2005 22:51:38 +0000 (22:51 +0000)]
[Patch #1171487, bug #1170331] Fix error in base64.b32decode when encoding a single null byte; test a null byte in all encodings to be sure it works

19 years ago[Bug #1149413] 'psize' argument should be 'pgsize'
Andrew M. Kuchling [Wed, 8 Jun 2005 21:51:28 +0000 (21:51 +0000)]
[Bug #1149413] 'psize' argument should be 'pgsize'

19 years agofix broken (unexecuted) test
Anthony Baxter [Wed, 8 Jun 2005 04:55:50 +0000 (04:55 +0000)]
fix broken (unexecuted) test

19 years agoTools/scripts/reindent.py _is_ your friend
Anthony Baxter [Wed, 8 Jun 2005 04:35:50 +0000 (04:35 +0000)]
Tools/scripts/reindent.py _is_ your friend

19 years agoTweak note about using os.open to lock files if O_SHLOCK and O_EXLOCK are
Skip Montanaro [Wed, 8 Jun 2005 02:28:11 +0000 (02:28 +0000)]
Tweak note about using os.open to lock files if O_SHLOCK and O_EXLOCK are
present.

19 years ago[Bug #1172763] dumbdbm uses eval() on lines, so it chokes if there's an extra \r...
Andrew M. Kuchling [Tue, 7 Jun 2005 19:36:10 +0000 (19:36 +0000)]
[Bug #1172763] dumbdbm uses eval() on lines, so it chokes if there's an extra \r on the end of a line; fixed by stripping off trailing whitespace.

19 years agoMinor namespace clean-up.
Raymond Hettinger [Tue, 7 Jun 2005 18:52:34 +0000 (18:52 +0000)]
Minor namespace clean-up.

19 years ago[Bug #1170422] Use correct option name
Andrew M. Kuchling [Tue, 7 Jun 2005 18:51:42 +0000 (18:51 +0000)]
[Bug #1170422] Use correct option name

19 years agoAdd a decimal FAQ
Raymond Hettinger [Tue, 7 Jun 2005 18:50:56 +0000 (18:50 +0000)]
Add a decimal FAQ

19 years agofix more Errors (not Failures) when run using BerkeleyDB <= 4.0
Gregory P. Smith [Mon, 6 Jun 2005 18:12:24 +0000 (18:12 +0000)]
fix more Errors (not Failures) when run using BerkeleyDB <= 4.0

19 years agofix Errors (not Failures) in test cases when running with BerkeleyDB<4.2
Gregory P. Smith [Mon, 6 Jun 2005 17:59:00 +0000 (17:59 +0000)]
fix Errors (not Failures) in test cases when running with BerkeleyDB<4.2

19 years agochange set_bt_compare() callback comparison function to only take two
Gregory P. Smith [Mon, 6 Jun 2005 17:31:32 +0000 (17:31 +0000)]
change set_bt_compare() callback comparison function to only take two
arguments (left, right) like any sane comparison function.  no need to
pass in the db object as an argument.

19 years agomake the tests that expect uncatchable exceptions from a callback test
Gregory P. Smith [Mon, 6 Jun 2005 17:30:22 +0000 (17:30 +0000)]
make the tests that expect uncatchable exceptions from a callback test
for them in a roundabout way (catching and parsing stderr)

keeps test output clean.

19 years agoadditional sanity check. secondaryDB cannot be closed.
Gregory P. Smith [Mon, 6 Jun 2005 10:28:06 +0000 (10:28 +0000)]
additional sanity check.  secondaryDB cannot be closed.

19 years agotest case for pybsddb SF bug id 1215432
Gregory P. Smith [Mon, 6 Jun 2005 10:26:25 +0000 (10:26 +0000)]
test case for pybsddb SF bug id 1215432

19 years agofixes pybsddb SF bug id 1215432. DB.associate() would crash when a
Gregory P. Smith [Mon, 6 Jun 2005 09:55:06 +0000 (09:55 +0000)]
fixes pybsddb SF bug id 1215432.  DB.associate() would crash when a
DBError was supposed to be raised.

needs backport to 2.4.x and possibly 2.3.x.

19 years agotest DB.associate using transactions. somewhat related to SF pybsddb
Gregory P. Smith [Mon, 6 Jun 2005 09:52:10 +0000 (09:52 +0000)]
test DB.associate using transactions.  somewhat related to SF pybsddb
bug #1215432

19 years agoDocumentation clarified re. config socket listener protocol
Vinay Sajip [Sun, 5 Jun 2005 20:39:36 +0000 (20:39 +0000)]
Documentation clarified re. config socket listener protocol

19 years agoBug #1184380: extending&embedding example broken
Georg Brandl [Sun, 5 Jun 2005 10:56:59 +0000 (10:56 +0000)]
Bug #1184380: extending&embedding example broken

19 years agoFix missing assignments of marshal.load() values. Closes #1214662.
Skip Montanaro [Sat, 4 Jun 2005 12:55:32 +0000 (12:55 +0000)]
Fix missing assignments of marshal.load() values.  Closes #1214662.

19 years agoBug #1210001: typo in email doc
Georg Brandl [Sat, 4 Jun 2005 10:01:15 +0000 (10:01 +0000)]
Bug #1210001: typo in email doc

19 years agoBug #1196315: fix weakref.WeakValueDictionary constructor.
Georg Brandl [Sat, 4 Jun 2005 09:20:03 +0000 (09:20 +0000)]
Bug #1196315: fix weakref.WeakValueDictionary constructor.

19 years agoCorrect URL to the official UnicodeData 3.2.0 resource. (Reported
Hye-Shik Chang [Sat, 4 Jun 2005 07:31:48 +0000 (07:31 +0000)]
Correct URL to the official UnicodeData 3.2.0 resource. (Reported
by Darek Suchojad)

19 years agopybsddb 4.3.2:
Gregory P. Smith [Sat, 4 Jun 2005 06:46:59 +0000 (06:46 +0000)]
pybsddb 4.3.2:
 * the has_key() method was not raising a DBError when a database error
   had occurred. [SF patch id 1212590]
 * added a wrapper for the DBEnv.set_lg_regionmax method [SF patch id 1212590]
 * DBKeyEmptyError now derives from KeyError just like DBNotFoundError.
 * internally everywhere DB_NOTFOUND was checked for has been updated
   to also check for DB_KEYEMPTY.  This fixes the semantics of a couple
   operations on recno and queue databases to be more intuitive and results
   in less unexpected DBKeyEmptyError exceptions being raised.

19 years agoWhitespace normalization.
Tim Peters [Fri, 3 Jun 2005 22:40:27 +0000 (22:40 +0000)]
Whitespace normalization.

19 years agoBug #1194181: bz2.BZ2File didn't handle mode 'U' correctly.
Georg Brandl [Fri, 3 Jun 2005 19:47:00 +0000 (19:47 +0000)]
Bug #1194181: bz2.BZ2File didn't handle mode 'U' correctly.

19 years agoFix a couple of crashing-on-malformed data marshal bugs.
Michael W. Hudson [Fri, 3 Jun 2005 15:17:16 +0000 (15:17 +0000)]
Fix a couple of crashing-on-malformed data marshal bugs.

19 years ago[ 1197218 ] test_locale fix on modern linux
Anthony Baxter [Fri, 3 Jun 2005 15:04:15 +0000 (15:04 +0000)]
1197218 ] test_locale fix on modern linux

On more modern linuxes (and probably others) straight 'en_US' isn't a
valid locale. Make the code try a couple of alternates.

backport candidate

19 years agoThis is my patch:
Michael W. Hudson [Fri, 3 Jun 2005 14:41:55 +0000 (14:41 +0000)]
This is my patch:

1180995 ] binary formats for marshalling floats

Adds 2 new type codes for marshal (binary floats and binary complexes), a
new marshal version (2), updates MAGIC and fiddles the de-serializing of
code objects to be less likely to clobber the real reason for failing if
it fails.

19 years agoBug #1213894: os.path.realpath didn't resolve symlinks that were the first
Georg Brandl [Fri, 3 Jun 2005 14:28:50 +0000 (14:28 +0000)]
Bug #1213894: os.path.realpath didn't resolve symlinks that were the first
component of the path.

19 years agofix object.__divmod__.__doc__
Anthony Baxter [Fri, 3 Jun 2005 14:12:21 +0000 (14:12 +0000)]
fix object.__divmod__.__doc__

backport candidate

19 years agoM-x untabify
Michael W. Hudson [Fri, 3 Jun 2005 13:55:58 +0000 (13:55 +0000)]
M-x untabify

19 years agoUpdate permissions for Birkenfeld.
Raymond Hettinger [Fri, 3 Jun 2005 11:15:03 +0000 (11:15 +0000)]
Update permissions for Birkenfeld.

19 years agopybsddb 4.3.1, adds support for DB.set_bt_compare database btree comparison
Gregory P. Smith [Fri, 3 Jun 2005 07:03:07 +0000 (07:03 +0000)]
pybsddb 4.3.1, adds support for DB.set_bt_compare database btree comparison
functions written in python.

contributed by <frederic.gobry@epfl.ch>

19 years agoDelete some vestigial code; execution will never reach the 'if' statement if args...
Andrew M. Kuchling [Thu, 2 Jun 2005 17:07:11 +0000 (17:07 +0000)]
Delete some vestigial code; execution will never reach the 'if' statement if args is NULL

19 years ago[Bug #1209880] Describe only the True/False return values from lock.acquire()
Andrew M. Kuchling [Thu, 2 Jun 2005 16:59:18 +0000 (16:59 +0000)]
[Bug #1209880] Describe only the True/False return values from lock.acquire()

19 years ago[Bug #1193001] Make the notation section use the same productionlist env. as other...
Andrew M. Kuchling [Thu, 2 Jun 2005 13:50:19 +0000 (13:50 +0000)]
[Bug #1193001] Make the notation section use the same productionlist env. as other grammar rules

19 years ago[Bug #1177831] Exercise (?(id)yes|no) for a group other than the first one
Andrew M. Kuchling [Thu, 2 Jun 2005 13:38:45 +0000 (13:38 +0000)]
[Bug #1177831] Exercise (?(id)yes|no) for a group other than the first one

19 years ago[Bug #1177831] Fix generation of code for GROUPREF_EXISTS. Thanks to Andre Malo...
Andrew M. Kuchling [Thu, 2 Jun 2005 13:35:52 +0000 (13:35 +0000)]
[Bug #1177831] Fix generation of code for GROUPREF_EXISTS.  Thanks to Andre Malo for the fix.

19 years agoPatch #1212117: Add optional attribute st_flags to os.stat_result
Hye-Shik Chang [Thu, 2 Jun 2005 13:09:30 +0000 (13:09 +0000)]
Patch #1212117: Add optional attribute st_flags to os.stat_result
when the member is available on the platform. (Contributed by
Diego Petteno)

19 years agoFix compiler.ast.flatten function so that it works on lists.
Neil Schemenauer [Thu, 2 Jun 2005 05:55:20 +0000 (05:55 +0000)]
Fix compiler.ast.flatten function so that it works on lists.

19 years ago[Bug #1152762] Ensure _end_of_line() returns an x-coordinate that's within the text box
Andrew M. Kuchling [Thu, 2 Jun 2005 00:10:04 +0000 (00:10 +0000)]
[Bug #1152762] Ensure _end_of_line() returns an x-coordinate that's within the text box

19 years agoadded GET/SETANNOTATION methods
Piers Lauder [Wed, 1 Jun 2005 23:50:52 +0000 (23:50 +0000)]
added GET/SETANNOTATION methods

19 years ago[Bug #1105706] Use correct name for constant
Andrew M. Kuchling [Wed, 1 Jun 2005 23:31:18 +0000 (23:31 +0000)]
[Bug #1105706] Use correct name for constant

19 years ago[Bug #1123268] Fix typo
Andrew M. Kuchling [Wed, 1 Jun 2005 23:22:11 +0000 (23:22 +0000)]
[Bug #1123268] Fix typo

19 years ago[Bug #1181939] Remove incorrect text about __init__; move map discussion into a separ...
Andrew M. Kuchling [Wed, 1 Jun 2005 15:39:57 +0000 (15:39 +0000)]
[Bug #1181939] Remove incorrect text about __init__; move map discussion into a separate paragraph

19 years ago[Bug #1194249] Fix duplicate assignment in example code
Andrew M. Kuchling [Wed, 1 Jun 2005 15:26:24 +0000 (15:26 +0000)]
[Bug #1194249] Fix duplicate assignment in example code

19 years agoNEWS entry for the patch I checked in last week.
Michael W. Hudson [Wed, 1 Jun 2005 11:34:22 +0000 (11:34 +0000)]
NEWS entry for the patch I checked in last week.

19 years agoSF bug #1209411: divmod documentation shd reference // not /
Raymond Hettinger [Tue, 31 May 2005 11:04:00 +0000 (11:04 +0000)]
SF bug #1209411:  divmod documentation shd reference // not /

19 years agoSF bug #1202395: Description of string.lstrip() needs improvement
Raymond Hettinger [Tue, 31 May 2005 10:26:28 +0000 (10:26 +0000)]
SF bug #1202395:  Description of string.lstrip() needs improvement

Clarify the role of the chars argument in the strip() methods.

19 years agoAdd permissions for Reinhold Birkenfeld.
Raymond Hettinger [Sat, 28 May 2005 23:20:09 +0000 (23:20 +0000)]
Add permissions for Reinhold Birkenfeld.

19 years agoThis is my patch:
Michael W. Hudson [Fri, 27 May 2005 15:23:20 +0000 (15:23 +0000)]
This is my patch:

1181301 ] make float packing copy bytes when they can

which hasn't been reviewed, despite numerous threats to check it in
anyway if noone reviews it.  Please read the diff on the checkin list,
at least!

The basic idea is to examine the bytes of some 'probe values' to see if
the current platform is a IEEE 754-ish platform, and if so
_PyFloat_{Pack,Unpack}{4,8} just copy bytes around.

The rest is hair for testing, and tests.

19 years agoFix test_site to not call open('...', 'wU'), as that now raises an error.
Michael W. Hudson [Fri, 27 May 2005 14:58:06 +0000 (14:58 +0000)]
Fix test_site to not call open('...', 'wU'), as that now raises an error.

Is anyone running the test suite regularly at the moment?

19 years agoSF bug #1209671: dict.popitem documentation should mention empty dict case
Raymond Hettinger [Fri, 27 May 2005 10:43:55 +0000 (10:43 +0000)]
SF bug #1209671:  dict.popitem documentation should mention empty dict case

19 years agoFix:
Michael W. Hudson [Thu, 26 May 2005 07:58:22 +0000 (07:58 +0000)]
Fix:

1207501 ] Issue in grammar

We didn't define dotted_name in the pseudo-grammar in the reference
docs.  Backport candidate.

19 years agofix description of the input range of unichr()
Fred Drake [Wed, 25 May 2005 05:39:36 +0000 (05:39 +0000)]
fix description of the input range of unichr()
(closes SF bug #1120777)

19 years agoupdate documentation on what constitutes a line in a source file
Fred Drake [Wed, 25 May 2005 05:29:17 +0000 (05:29 +0000)]
update documentation on what constitutes a line in a source file
(closes SF bug #1167922)

19 years agoDisallow opening files with modes 'aU' or 'wU' as specified by PEP
Skip Montanaro [Fri, 20 May 2005 03:07:06 +0000 (03:07 +0000)]
Disallow opening files with modes 'aU' or 'wU' as specified by PEP
278. Closes bug 967182.

19 years agoPatch #1197318: Cygwin case-sensitive import patch
Jason Tishler [Fri, 20 May 2005 00:56:54 +0000 (00:56 +0000)]
Patch #1197318: Cygwin case-sensitive import patch

A problem regarding importing symlinked modules was recently reported on the
Cygwin mailing list:

    http://cygwin.com/ml/cygwin/2005-04/msg00257.html

The following test case demonstrates the problem:

$ ls -l
total 1
lrwxrwxrwx    1 jt       None            6 Apr 23 13:32 bar.py -> foo.py
-rw-r--r--    1 jt       None           24 Apr 18 20:13 foo.py

$ python -c 'import bar'
Traceback (most recent call last):
File "<string>", line 1, in ?
ImportError: No module named bar

Since Cygwin's case_ok() uses a modified version of the Windows's version, the
symlinked bar module actually resolves to file foo.py instead of bar.py. This
obviously causes the matching code to fail (regardless of case).

The patch fixes this problem by making Cygwin use the Mac OS X case_ok()
instead of a modified Window's version.

19 years agoWhitespace normalization.
Tim Peters [Wed, 18 May 2005 02:18:09 +0000 (02:18 +0000)]
Whitespace normalization.

19 years agoAdd O_SHLOCK & O_EXLOCK. Closes patch #1103951.
Skip Montanaro [Mon, 16 May 2005 02:42:22 +0000 (02:42 +0000)]
Add O_SHLOCK & O_EXLOCK.  Closes patch #1103951.

19 years agoFixed a quite misleading comment: a "not" should not have been there.
Armin Rigo [Sun, 15 May 2005 15:32:08 +0000 (15:32 +0000)]
Fixed a quite misleading comment: a "not" should not have been there.

19 years agoThis test relied on short-circuiting details of dictobject.py to avoid
Armin Rigo [Sun, 15 May 2005 13:29:26 +0000 (13:29 +0000)]
This test relied on short-circuiting details of dictobject.py to avoid
crashing, and indirectly on the fact that hash codes in
random.randrange(1000000000) were very unlikely to exhibit collisions.
To see the problem, replace this number with 500 and observe the crash on
either del target[key] or del keys[i].

The fix prevents recursive mutation, just as in the key insertion case.

19 years agoAdd better datetime support to xmlrpclib module. Closes patch #1120353.
Skip Montanaro [Sat, 14 May 2005 20:54:16 +0000 (20:54 +0000)]
Add better datetime support to xmlrpclib module.  Closes patch #1120353.

19 years agoSF patch #1200051: Small optimization for PyDict_Merge()
Raymond Hettinger [Sat, 14 May 2005 18:08:25 +0000 (18:08 +0000)]
SF patch #1200051:  Small optimization for PyDict_Merge()
(Contributed by Barry Warsaw and Matt Messier.)

19 years agoSF bug #1201807: Glossary listing bug
Raymond Hettinger [Sat, 14 May 2005 17:18:31 +0000 (17:18 +0000)]
SF bug #1201807:  Glossary listing bug

19 years agocredit source of idea for recent doc changes
Skip Montanaro [Thu, 12 May 2005 13:44:23 +0000 (13:44 +0000)]
credit source of idea for recent doc changes

19 years agoIncorporate a lightly edited version of the SocketServer module's docstring
Skip Montanaro [Thu, 12 May 2005 13:42:42 +0000 (13:42 +0000)]
Incorporate a lightly edited version of the SocketServer module's docstring
into the docs and segregate the method descriptions for the various classes
into separate sections.  Base on suggestion by Paul Rubin in c.l.py.

19 years agoImprove subprocess link error notification
Kurt B. Kaiser [Tue, 10 May 2005 03:44:24 +0000 (03:44 +0000)]
Improve subprocess link error notification
M NEWS.txt
M PyShell.py
M rpc.py

19 years agoSF bug #1193890: calendar.weekheader not found in __all__
Raymond Hettinger [Tue, 10 May 2005 03:20:12 +0000 (03:20 +0000)]
SF bug #1193890:  calendar.weekheader not found in __all__

19 years agoUse Queue's blocking feature instead of sleeping in the main
Kurt B. Kaiser [Thu, 5 May 2005 23:29:54 +0000 (23:29 +0000)]
Use Queue's blocking feature instead of sleeping in the main
loop.  Patch # 1190163 Michiel de Hoon

19 years agoDon't use 'is not' to compare strings.
Michael W. Hudson [Wed, 4 May 2005 11:59:38 +0000 (11:59 +0000)]
Don't use 'is not' to compare strings.
(spotted by reading pypy-svn :)

19 years agoUpdate Paul Prescod's permissions.
Raymond Hettinger [Sat, 30 Apr 2005 21:25:19 +0000 (21:25 +0000)]
Update Paul Prescod's permissions.

19 years agoSF patch #1191489: Simplify logic in random.py
Raymond Hettinger [Sat, 30 Apr 2005 09:02:51 +0000 (09:02 +0000)]
SF patch #1191489: Simplify logic in random.py

19 years agoFix error in a docstring where a single quote started the docstring but triple
Brett Cannon [Sat, 30 Apr 2005 05:50:19 +0000 (05:50 +0000)]
Fix error in a docstring where a single quote started the docstring but triple
quote ended it.

Closes bug #1192777.  Thanks Christopher Smith.

19 years agoFixed a typo in docstring I happened upon.
Guido van Rossum [Sat, 30 Apr 2005 00:20:35 +0000 (00:20 +0000)]
Fixed a typo in docstring I happened upon.

19 years agoSF bug #1190451: 6.9 First sentence is confusing
Raymond Hettinger [Thu, 28 Apr 2005 07:18:47 +0000 (07:18 +0000)]
SF bug #1190451:  6.9 First sentence is confusing

* Fixed incorrect wording:  expression->exception
* Noted the specific exception reported by "raise" when the is nothing
  to re-raise.
* Eliminated several instances of "e.g." as recommended in the style guide.

19 years agoFix
Michael W. Hudson [Wed, 27 Apr 2005 09:41:23 +0000 (09:41 +0000)]
Fix

[ python-Bugs-1190599 ] dir() docs show incorrect output

though not entirely how it's suggested in the bug report.

19 years agoFix typo.
Raymond Hettinger [Tue, 26 Apr 2005 05:18:53 +0000 (05:18 +0000)]
Fix typo.

19 years agoMake subclasses of int, long, complex, float, and unicode perform type
Brett Cannon [Tue, 26 Apr 2005 03:45:26 +0000 (03:45 +0000)]
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.

19 years agoMake parse_makefile fallback to environment variables if nothing is
Martin v. Löwis [Mon, 25 Apr 2005 07:14:03 +0000 (07:14 +0000)]
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.

19 years agoIntroduced EXTRA_CFLAGS as an environment variable used by the Makefile. Meant
Brett Cannon [Sun, 24 Apr 2005 22:26:38 +0000 (22:26 +0000)]
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.

19 years agoUpdate test to the current readline() behaviour.
Walter Dörwald [Thu, 21 Apr 2005 21:45:36 +0000 (21:45 +0000)]
Update test to the current readline() behaviour.

19 years agoFix comment.
Walter Dörwald [Thu, 21 Apr 2005 21:42:35 +0000 (21:42 +0000)]
Fix comment.

19 years agoIf the data read from the bytestream in readline() ends in a '\r' read one more
Walter Dörwald [Thu, 21 Apr 2005 21:32:03 +0000 (21:32 +0000)]
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.

19 years agoClarify usage of OPT by noting that if it is set the default values will be
Brett Cannon [Wed, 20 Apr 2005 20:49:39 +0000 (20:49 +0000)]
Clarify usage of OPT by noting that if it is set the default values will be
left out.

19 years agoFix tests dependent on the exception raised by non-settable descriptors.
Barry Warsaw [Wed, 20 Apr 2005 19:41:36 +0000 (19:41 +0000)]
Fix tests dependent on the exception raised by non-settable descriptors.

19 years agoWhitespace normalization.
Tim Peters [Wed, 20 Apr 2005 17:45:13 +0000 (17:45 +0000)]
Whitespace normalization.

19 years agoAs per discussion on python-dev, descriptors defined in C with a NULL setter
Barry Warsaw [Tue, 19 Apr 2005 23:43:40 +0000 (23:43 +0000)]
As per discussion on python-dev, descriptors defined in C with a NULL setter
now raise AttributeError instead of TypeError, for consistency with their
pure-Python equivalent.