Anthony Baxter
9f41f3a192
release shenanigans
2004-11-03 06:21:37 +00:00
Raymond Hettinger
5dec096e6a
Maintain peepholer's cumlc invariant by updating the running total
...
everytime a LOAD_CONSTANT is encountered, created, or overwritten.
Added two tests to cover cases affected by the patch.
2004-11-02 04:20:10 +00:00
Raymond Hettinger
f7010bed89
* Bumped up the sleep() delay to four seconds so this test will run
...
reliably on WinME with FAT32.
* Native speaker rewrite of the comment block.
* Removed unnecessary backslashes from the multi-line function defintions.
2004-11-01 22:27:14 +00:00
Walter Dörwald
bb9c739806
Add error checks for the bz2, cStringIO and operator modules.
...
Add function names to various PyArg_ParseTuple calls in bz2module.c.
2004-11-01 17:10:19 +00:00
Hye-Shik Chang
4a8d851910
Bug #1057993 : Use sleep() always instead of os.utime() possibly broken
...
in some platforms.
2004-11-01 08:26:09 +00:00
Barry Warsaw
8c72eae237
SF patch #1056967 , changes the semantics of Template.safe_substitute() to not
...
raise a ValueError for dangling delimiters (the delimiter itself is returned).
2004-11-01 03:52:43 +00:00
Tim Peters
4590c00e89
test_on_error(): Rewrite so it works on WinXP too. Unsure about 95/98/ME.
2004-11-01 02:40:52 +00:00
Johannes Gijsbers
ef5ffc4765
Bug #1048941 : shutil.rmtree error handling was always broken
...
Rewrite rmtree again, this time without os.walk(). Error handling had been
broken since Python 2.3, and the os.walk() version inherited this.
2004-10-31 12:05:31 +00:00
Tim Peters
ead8b7ab30
SF 1055820: weakref callback vs gc vs threads
...
In cyclic gc, clear weakrefs to unreachable objects before allowing any
Python code (weakref callbacks or __del__ methods) to run.
This is a critical bugfix, affecting all versions of Python since weakrefs
were introduced. I'll backport to 2.3.
2004-10-30 23:09:22 +00:00
Armin Rigo
89a39461bf
Wrote down the invariants of some common objects whose structure is
...
exposed in header files. Fixed a few comments in these headers.
As we might have expected, writing down invariants systematically exposed a
(minor) bug. In this case, function objects have a writeable func_code
attribute, which could be set to code objects with the wrong number of
free variables. Calling the resulting function segfaulted the interpreter.
Added a corresponding test.
2004-10-28 16:32:00 +00:00
Walter Dörwald
063e1e846d
Trigger a few error cases in Modules/_codecsmodule.c.
2004-10-28 13:04:26 +00:00
Brett Cannon
14adbe77b5
Fix bug of implementation of algorithm for calculating the date from year, week
...
of the year, and day of the week. Was not taking into consideration properly
the issue of when %U is used for the week of the year but the year starts on
Monday.
Closes bug #1045381 again.
2004-10-28 04:49:21 +00:00
Mark Hammond
79d9bfa28f
Fix [1055540 ] bdist_wininst broken for pure Python distributions
2004-10-27 21:54:33 +00:00
Raymond Hettinger
17931de110
SF patch #1053375 .
...
(Contributed by Facundo Batista.)
Code simplification by eliminating the unnecessary and error-prone
convolutions for the previously weird sign convention in _WorkRep().
Makes the code more understandable, more reliable, and a bit faster.
2004-10-27 06:21:46 +00:00
Hye-Shik Chang
7afa64e260
Add a comment explains why we should modify mtime here.
2004-10-27 03:12:05 +00:00
Tim Peters
1816d79bac
Removed newly redundant embedded import.
2004-10-27 02:44:10 +00:00
Tim Peters
10d59f3fa1
Whitespace normalization.
2004-10-27 02:43:25 +00:00
Tim Peters
f1af9c0896
Paper over bug 1054615 by passing sane values to os.utime().
...
The underlying bug still exists, but also existed in 2.3.4:
import.c's load_source_module() returns NULL if
PyOS_GetLastModificationTime() returns -1, but
PyOS_GetLastModificationTime() doesn't set any exception when it returns
-1, and neither does load_source_module() when it gets back -1. This
leads to "SystemError: NULL result without error in PyObject_Call"
on an import that fails in this way.
2004-10-27 02:33:15 +00:00
Greg Ward
48aa84b24d
Update optparse module and test suite to Optik 1.5a2.
2004-10-27 02:20:04 +00:00
Facundo Batista
99b5548298
Very few little improvements.
2004-10-26 23:38:46 +00:00
Just van Rossum
fc93e17598
- Added tests for the string load/dump function.
...
- Added a chunk of plist data as generated by Cocoa's NSDictionary and
verify we output the same (including formatting)
- Changed the "literal" plist code to match the raw test data
2004-10-26 11:02:08 +00:00
Just van Rossum
1f74ef0fa3
Made <data> output match Apple's exactly. To do that I had to add a custom
...
version of base64.encodestring() so I could control the line length of the
base64 output.
2004-10-26 10:30:55 +00:00
Just van Rossum
8b8decea21
also escape '>', to closer match Apple's plist output
2004-10-26 10:11:00 +00:00
Hye-Shik Chang
182ac85147
SF #737473 : Show up-to-date source code in tracebacks always.
...
And add an optional argument 'filename' to linecache.checkcache()
to enable checking caches per-file.
2004-10-26 09:16:42 +00:00
Raymond Hettinger
23109ef11e
SF bug #1053819 : Segfault in tuple_of_constants
...
Peepholer could be fooled into misidentifying a tuple_of_constants.
Added code to count consecutive occurrences of LOAD_CONST.
Use the count to weed out the misidentified cases.
Added a unittest.
2004-10-26 08:59:14 +00:00
Just van Rossum
368c0b22f8
Deprecating Dict class; going through a few hoops to get the warnings right.
2004-10-26 07:38:16 +00:00
Just van Rossum
7c9448755b
- Removed Date class. We don't really need it for b/w compatibility since
...
a) the functionality depended on PyXML before and b) hardly worked to
begin with.
- Instead, output and require upon input datetime.datetime objects.
2004-10-26 07:20:26 +00:00
Just van Rossum
c6fdd1b398
- added two more convenience functions: readPlistFromString() and
...
writePlistToString()
- use these two in the resource functions.
- Tweaked module doc string.
2004-10-26 06:50:50 +00:00
Raymond Hettinger
561fbf138d
SF bug #1054139 : serious string hashing error in 2.4b1
...
_PyString_Resize() readied strings for mutation but did not invalidate
the cached hash value.
2004-10-26 01:52:37 +00:00
Just van Rossum
15cf4f0100
Updated doc strings.
2004-10-25 16:10:53 +00:00
Just van Rossum
86ca902eed
Deprecate Plist class
2004-10-25 16:09:10 +00:00
Just van Rossum
10e52dbe28
Removed superfluous **kwargs constructor cruft: this class predates
...
the dict(**kwargs) feature.
2004-10-25 16:04:20 +00:00
Just van Rossum
95387a1895
Patch from Bob Ippolito, slighly edited:
...
[ 1052399 ] plistlib: add plst resource functionality, fix bugs
2004-10-25 15:10:42 +00:00
Tim Peters
8ceefc5a56
Whitespace normalization.
2004-10-25 03:19:41 +00:00
Tim Peters
16e3cf535b
format_paragraph_event(): Patch 961387 introduced a bug here, causing
...
the indentation of a comment block to be ignored when reformatting the
block, leading to overly long reformatted lines (too wide by an amount
equal to the indentation width). Looks like a typo in the original
patch, a 1-character repair.
2004-10-24 23:45:42 +00:00
Raymond Hettinger
2ef7e6c8f2
SF bug #1052503 : pdb runcall should accept keyword arguments
2004-10-24 00:32:24 +00:00
Raymond Hettinger
9047c8f73d
SF bug #1048870 : call arg of lambda not updating
2004-10-24 00:10:06 +00:00
Vinay Sajip
dccd4321a7
Fixed bug in handling of args in LogRecord.__init__.
2004-10-21 21:24:27 +00:00
Peter Astrand
c19ccc9f11
Removed test_close_fds, because it's too unreliable. We simply cannot
...
know that the newly-started Python process only has 3 filedescriptors
open. Fixes bug 1048808.
2004-10-21 19:28:34 +00:00
Andrew M. Kuchling
8bc462fcaf
[Patch #1043972 , for bug #1017553 ] filemode() returns an incorrect value for the mode 07111
2004-10-20 11:48:42 +00:00
Andrew M. Kuchling
d4f2552ef8
Add test case for bug #1017553
2004-10-20 11:47:01 +00:00
Fred Drake
910b282fbb
when only using half of the return value of os.path.split(), use
...
os.path.dirname() or os.path.basename() instead
2004-10-20 11:08:35 +00:00
Vinay Sajip
4ed315ae66
Changed handling of args in LogRecord.__init__.
2004-10-20 08:39:40 +00:00
Raymond Hettinger
06d9b1f30b
SF bug #902037 : relative on-disk SYSTEM id handling is incorrect
...
(Contributed by Bob Ippolito.)
backport candidate.
2004-10-20 08:21:19 +00:00
Raymond Hettinger
e54e726f0b
SF patch #1038388 : __main__ for whichdb.py
...
(Contributed by Oleg Broytmann.)
2004-10-20 07:17:16 +00:00
Raymond Hettinger
76e60d687d
SF bug #1048728 : Bug fixes and cleanup for decimal.py
...
(Contributed by Neal Norwitz. Reviewed by Facundo Bastista.)
2004-10-20 06:58:28 +00:00
Andrew M. Kuchling
8520b94750
Display helpful message; print repr() of return value so the whitespace is clearer
2004-10-19 19:36:09 +00:00
Andrew M. Kuchling
ccab001c3d
[Bug #1048816 ] Fix bug when you do Ctrl-K at the start of a line; fix from Stefan Heimann
2004-10-19 19:29:40 +00:00
Andrew M. Kuchling
a13ea5572a
Make magic coordinates more readable
2004-10-19 19:21:20 +00:00
Brett Cannon
8dc25ad6f2
Fix comments.
2004-10-18 01:47:46 +00:00