| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
everytime a LOAD_CONSTANT is encountered, created, or overwritten.
Added two tests to cover cases affected by the patch.
|
| |
|
|
|
|
| |
reliably on WinME with FAT32.
* Native speaker rewrite of the comment block.
* Removed unnecessary backslashes from the multi-line function defintions.
|
| |
|
|
| |
Add function names to various PyArg_ParseTuple calls in bz2module.c.
|
| |
|
|
| |
in some platforms.
|
| |
|
|
| |
raise a ValueError for dangling delimiters (the delimiter itself is returned).
|
| | |
|
| |
|
|
|
| |
Rewrite rmtree again, this time without os.walk(). Error handling had been
broken since Python 2.3, and the os.walk() version inherited this.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
| |
- 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
|
| |
|
|
|
| |
And add an optional argument 'filename' to linecache.checkcache()
to enable checking caches per-file.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
_PyString_Resize() readied strings for mutation but did not invalidate
the cached hash value.
|
| | |
|
| | |
|
| |
|
|
|
| |
know that the newly-started Python process only has 3 filedescriptors
open. Fixes bug 1048808.
|
| | |
|
| |
|
|
|
|
| |
and day of the week are specified.
Closes bug #1045381.
|
| | |
|
| | |
|
| |
|
|
| |
is not a local variable. Add a test case.
|
| |
|
|
|
| |
this test failed under the combination of passing -O to a debug-build
Python. Now all 4 of those pass ({debug, release} x {-O, no -O}).
|
| |
|
|
| |
rangeobject.c has an #ifdef that is reached only when LONG_MAX != INT_MAX
|
| |
|
|
| |
non-ascii characters.
|
| |
|
|
| |
it's rather expensive to create new processes.
|
| |
|
|
| |
"Khalid A. B." on python-dev)
|
| | |
|
| |
|
|
|
| |
debug build on Windows now. More applications of the helper may be needed
on non-Windows platforms.
|
| |
|
|
|
|
|
|
|
|
|
| |
Turns out the mysterious "expected output" file contained exactly N dots,
because test_poll() has a loop that *usually* went around N times,
printing one dot on each loop trip. But there's no guarantee of that,
because the exact value of N depended on the vagaries of scheduling
time.sleep()s across two different processes. So stopped printing dots,
and got rid of the expected output file. Add a loop counter instead,
and verify that the loop goes around at least a couple of times. Also
cut the minimum time needed for this test from 4 seconds to 1.
|
| |
|
|
|
| |
of the test. It's testing stdout in a different process, so it has to
print something, but I didn't find "banana" to be self-explanatory.
|
| |
|
|
|
|
| |
tester that a DOS box is expected to flash. Slash the sleep from 2
seconds to a quarter second (why would we want to wait 2 seconds just
to stare at a DOS box?).
|
| |
|
|
|
|
| |
what this is trying to do. If it's necessary for it to create > 1000
processes, it should be controlled by a new resource and not run by
default on Windows.
|
| |
|
|
|
|
| |
display a test's docstring as "the name" of the test. So changed most
test docstrings to comments, and removed the clearly useless ones. Now
unittest reports the actual names of the test methods.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Closes bug #1039270.
|
| | |
|
| |
|
|
| |
ConfigParser. Moved the new string-only restriction added in rev. 1.65 to the SafeConfigParser class, leaving existing ConfigParser & RawConfigParser behavior alone, and documented the conditions under which non-string values work.
|
| |
|
|
| |
them with ``ConfigParser.optionxform`` when supplied, consistent with the handling of config file entries and runtime-set options.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
deque_item(): a performance bug: the linked list of blocks was followed
from the left in most cases, because the test (i < (deque->len >> 1)) was
after "i %= BLOCKLEN".
deque_clear(): replaced a call to deque_len() with deque->len; not sure what
this call was here for, nor if all compilers under the sun would inline it.
deque_traverse(): I belive that it could be called by the GC when the deque
has leftblock==rightblock==NULL, because it is tracked before the first block
is allocated (though closely before). Still, a C extension module subclassing
deque could provide its own tp_alloc that could trigger a GC collection after
the PyObject_GC_Track()...
deque_richcompare(): rewrote to cleanly check for end-of-iterations instead of
relying on deque.__iter__().next() to succeed exactly len(deque) times -- an
assumption which can break if deques are subclassed. Added a test.
I wonder if the length should be explicitely bounded to INT_MAX, with
OverflowErrors, as in listobject.c. On 64-bit machines, adding more than
INT_MAX in the deque will result in trouble. (Note to anyone/me fixing
this: carefully check for overflows if len is close to INT_MAX in the
following functions: deque_rotate(), deque_item(), deque_ass_item())
|