| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
being relative to the end of the array, just like list.insert() does.
This closes SF bug #739313.
|
|
|
|
| |
perpetrated by the time and datetime classes.
|
|
|
|
|
|
|
|
| |
one good use: a subclass adding a method to express the duration as
a number of hours (or minutes, or whatever else you want to add). The
native breakdown into days+seconds+us is often clumsy. Incidentally
moved a large chunk of object-initialization code closer to the top of
the file, to avoid worse forward-reference trickery.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
(sourceforge pybsddb bug #737970).
Also: don't allow other threads to run during calls that invalidate the
DB handle.
|
|
|
|
| |
riscospath.extsep, and use os.extsep throughout.
|
|
|
|
| |
[ 733781 ] fcntl fails to build on old RH Linux
|
| |
|
|
|
|
| |
is enabled.
|
|
|
|
| |
emulation (ie. when HAVE_GETADDRINFO isn't defined).
|
|
|
|
|
| |
access with lock on those platforms that getaddrinfo() isn't (known to be)
thread-safe. Thanks to MvL for mentoring this patch.
|
|
|
|
| |
restricted to the whichdb module
|
|
|
|
| |
be taken, and define NI_MAX{HOST|SERV} if necessary.
|
| |
|
| |
|
|
|
|
|
|
|
| |
the itertoolsmodule.
* Taught itertools.repeat(obj, n) to treat negative repeat counts as
zero. This behavior matches that for sequences and prevents
infinite loops.
|
|
|
|
| |
It is better to be explicit and just allow stop to be None.
|
|
|
|
|
| |
* itertools.islice() stop argument did not perform as documented.
* beefed-up test suite
|
|
|
|
| |
s/isofomat/isoformat/, by Steven Taschuk.
|
|
|
|
|
| |
to that of Python2.1. Such nnn.nnn.nnn.nnn addresses are just used directly,
not passed to the resolver for a pointless lookup.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
that was used to start the thread. This is useful to track down the
source of the problem when there is no traceback, as can happen when a
daemon thread gets to run after Python is finialized (a new kind of
event, somehow this is now possible due to changes in Py_Finalize()).
|
|
|
|
| |
bz2 files. Also, included a testcase for this problem.
|
|
|
|
|
|
|
|
|
|
|
|
| |
to use LASTMARK_SAVE()/LASTMARK_RESTORE(), based on the discussion
in patch #712900.
- Cleaned up LASTMARK_SAVE()/LASTMARK_RESTORE() usage, based on the
established rules.
- Moved the upper part of the just commited patch (relative to bug #725106)
to outside the for() loop of BRANCH OP. There's no need to mark_save()
in every loop iteration.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This problem is related to a wrong behavior from mark_save/restore(),
which don't restore the mark_stack_base before restoring the marks.
Greg's suggestion was to change the asserts, which happen to be
the only recursive ops that can continue the loop, but the problem would
happen to any operation with the same behavior. So, rather than
hardcoding this into asserts, I have changed mark_save/restore() to
always restore the stackbase before restoring the marks.
Both solutions should fix these two cases, presented by Greg:
>>> re.match('(a)(?:(?=(b)*)c)*', 'abb').groups()
('b', None)
>>> re.match('(a)((?!(b)*))*', 'abb').groups()
('b', None, None)
The rest of the bug and patch in #725149 must be discussed further.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
within repeats of alternatives. The only change to the original
patch was to convert the tests to the new test_re.py file.
This patch fixes cases like:
>>> re.match('((a)|b)*', 'abc').groups()
('b', '')
Which is wrong (it's impossible to match the empty string),
and incompatible with other regex systems, like the following
examples show:
% perl -e '"abc" =~ /^((a)|b)*/; print "$1 $2\n";'
b a
% echo "abc" | sed -r -e "s/^((a)|b)*/\1 \2|/"
b a|c
|
|
|
|
| |
recursion limit for certain setups of FreeBSD and OS/2.
|
|
|
|
| |
[#727759] get bzip2 to build on Solaris 8 (old bzip library)
|
|
|
|
|
|
|
|
|
| |
- The socket module now provides the functions inet_pton and inet_ntop
for converting between string and packed representation of IP addresses.
See SF patch #658327.
This still needs a bit of work in the doc area, because it is not
available on all platforms (especially not on Windows).
|
|
|
|
|
| |
Theres now a separate function for each of the format codes
b, B, H, I, k, i, l, L, K.
|
|
|
|
| |
(requested by GvR. patch contributed by Michael Stone)
|
|
|
|
| |
to the PyBSDDB project at SourceForge.
|
| |
|
|
|
|
| |
Allows use of tuples for the initializer.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(contributed by logistix; substantially reworked by rhettinger).
To create a representation of non-string arrays, array_repr() was
starting with a base Python string object and repeatedly using +=
to concatenate the representation of individual objects.
Logistix had the idea to convert to an intermediate tuple form and
then join it all at once. I took advantage of existing tools and
formed a list with array_tolist() and got its representation through
PyObject_Repr(v) which already has a fast implementation for lists.
|
|
|
|
|
|
| |
docs here are best-guess: the MS docs I could find weren't clear, and
some even claimed _commit() has no effect on Win32 systems (which is
easily shown to be false just by trying it).
|
|
|
|
| |
Adding code to handle it properly.
|
|
|
|
|
| |
management. Old code still #ifdef'd out - I may remove this in a sec,
but for now, let's get it in and things passing the tests again!
|
|
|
|
| |
accordingly to further discussions with Greg Chapman in patch #712900.
|
|
|
|
|
|
| |
* UINT_MAX -> ULONG_MAX since we are dealing with longs
* ParseTuple needs &int for 'i' and &long for 'l'
There may be a better way to do this, but this works.
|
|
|
|
| |
popen[234]() code
|
|
|
|
|
|
|
| |
string does what is expected (ie unset [BEGIN|END]LIBPATH)
- set the size of the DosQuerySysInfo buffer correctly; it was safe,
but incorrect (allowing a 1 element overrun)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've applied a modified version of Greg Chapman's patch. I've included
the fixes without introducing the reorganization mentioned, for the sake
of stability. Also, the second fix mentioned in the patch don't fix the
mentioned problem anymore, because of the change introduced by patch
#720991 (by Greg as well). The new fix wasn't complicated though, and is
included as well.
As a note. It seems that there are other places that require the
"protection" of LASTMARK_SAVE()/LASTMARK_RESTORE(), and are just waiting
for someone to find how to break them. Particularly, I belive that every
recursion of SRE_MATCH() should be protected by these macros. I won't
do that right now since I'm not completely sure about this, and we don't
have much time for testing until the next release.
|
|
|
|
|
|
| |
to be compliant with previous python versions, by backing out the changes
made in revision 2.84 which affected this. The bugfix for backtracking is
still maintained.
|
| |
|
| |
|