| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
possible API improvements.
|
| |
|
|
|
|
|
|
|
|
| |
Gains a 5:1 speed-up for membership testing by
handling the most common case first (the case
where the element is hashable).
Closes SF Patch 597444.
|
| |
|
| |
|
|
|
|
|
| |
tiny amount of code duplication, but makes it possible to give BaseSet
an __init__ that raises an exception.
|
| |
|
|
|
|
|
| |
received feedback that was based in the misunderstanding that sets
were sequences.
|
|
|
|
|
|
|
| |
This patch causes CGIHTTPServer to update os.environ regardless of how
it tries to handle calls (fork, popen*, etc.).
Backport bugfix candidate.
|
|
|
|
|
|
|
|
|
|
|
|
| |
SHIFT and MASK, and widen digit. One problem is that code of the form
digit << small_integer
implicitly assumes that the result fits in an int or unsigned int
(platform-dependent, but "int sized" in any case), since digit is
promoted "just" to int or unsigned via the usual integer promotions.
But if digit is typedef'ed as unsigned int, this loses information.
The cure for this is just to cast digit to twodigits first.
|
|
|
|
|
|
| |
These were reported and fixed by Inyeol Lee in SF bug 595350. The
endswith() bug was already fixed in 2.3, but this adds some more test
cases.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
2045, section 5.2 states that if the Content-Type: header is
syntactically invalid, the default type should be text/plain.
Implement minimal sanity checking of the header -- it must have
exactly one slash in it. This closes SF patch #597593 by Skip, but in
a different way.
Note that these methods used to raise ValueError for invalid ctypes,
but now they won't.
|
|
|
|
|
|
| |
get the MIME main and sub types, instead of getting the whole ctype
and splitting it here. The two more specific methods now correctly
implement RFC 2045, section 5.2.
|
|
|
|
| |
signed vs unsigned).
|
|
|
|
| |
Closes SF bug #597177.
|
|
|
|
| |
email 2.2 but fails in email 1.0.
|
|
|
|
|
| |
(There's a link to PEP218; has PEP218 been updated to match the actual
module implementation?)
|
|
|
|
|
| |
the list is getting awfully long
Mention Karatsuba multiplication and some other items
|
| |
|
|
|
|
| |
dict.items/keys/values/iteritems/iterkeys/itervalues().
|
|
|
|
|
|
|
|
| |
interning. I modified Oren's patch significantly, but the basic idea
and most of the implementation is unchanged. Interned strings created
with PyString_InternInPlace() are now mortal, and you must keep a
reference to the resulting string around; use the new function
PyString_InternImmortal() to create immortal interned strings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in LOAD_GLOBAL. Besides saving a C function call, it saves checks
whether f_globals and f_builtins are dicts, and extracting and testing
the string object's hash code is done only once. We bail out of the
inlining if the name is not exactly a string, or when its hash is -1;
because of interning, neither should ever happen. I believe interning
guarantees that the hash code is set, and I believe that the 'names'
tuple of a code object always contains interned strings, but I'm not
assuming that -- I'm simply testing hash != -1.
On my home machine, this makes a pystone variant with new-style
classes and slots run at the same speed as classic pystone! (With
new-style classes but without slots, it is still a lot slower.)
|
|
|
|
|
|
|
| |
comments everywhere that bugged me: /* Foo is inlined */ instead of
/* Inline Foo */. Somehow the "is inlined" phrase always confused me
for half a second (thinking, "No it isn't" until I added the missing
"here"). The new phrase is hopefully unambiguous.
|
|
|
|
| |
to _PyType_Lookup().
|
|
|
|
| |
Should save 4% on slot lookups.
|
|
|
|
|
|
| |
Move some debugging checks inside Py_DEBUG.
They were causing cache misses according to cachegrind.
|
|
|
|
| |
This causes a modest speedup.
|
| |
|
|
|
|
| |
convert the doc strings to LaTeX, be my guest.)
|
| |
|
|
|
|
|
|
|
| |
expensive and overly general PyObject_IsInstance(), call
PyObject_TypeCheck() which is a macro that often avoids a call, and if
it does make a call, calls the much more efficient PyType_IsSubtype().
This saved 6% on a benchmark for slot lookups.
|
| |
|
|
|
|
| |
There's really no point in a separate list of thank-you notes.
|
|
|
|
|
|
| |
all operators having a counterpart in the operator module.
Closes SF bug #577513.
|
|
|
|
|
| |
popen2() and popen3() created text-mode pipes even when binary mode
was asked for. This was specific to Windows.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is a silly workaround for a rather serious bug in MacOSX: if you take
a long filename and convert it to an FSSpec the fsspec gets a magic
cooky (containing a #, indeed). If you then massage the extension of this
fsspec and convert back to a pathname you may end up referring to the
same file. This could destroy your sourcefile. The problem only occcurs
in MacPython-OS9, not MacPython-OSX (I think).
Closes bug #505562.
|
|
|
|
|
|
|
| |
Jeremy reported that this is not allowed by RFC 2396; however,
other tools support unescaped @'s so we should also.
Apply SF patch 596581 closing bug 581529.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- update DLL version number
- add files required for 2.3 (no changes to modules though)
- restructure build of pgen.exe
NOTE: As I don't have the VACPP compiler, these changes are untested.
Apart from slightly re-ordering some file lists, and matching file name
casing, I believe these changes are the minimum necessary to build 2.3
with VACPP.
|
| |
|
|
|
|
|
|
|
| |
- the security fixes to tempfile have lead to test_tempfile wanting
to create 100 temporary files. as the EMX default is only 40,
the number of file handles has been bumped (up to 250).
- changes to pgen have required restructuring its build support.
|
|
|
|
|
|
|
| |
Also, don't call gettempdir() in the default expression for the 'dir'
argument to various functions; use 'dir=None' for the default and
insert 'if dir is None: dir = gettemptir()' in the bodies. That way
the work done by gettempdir is postponed until needed.
|
|
|
|
|
| |
subprocess that does the right checks. This now works on Windows as
well.
|