| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
| |
an OverflowError instead of a TypeError to be consistent
with "%c" % 256. See SF patch #710127.
|
| |
|
|
|
|
|
|
|
|
| |
instead of raising a TypeError. (From SF patch #710127)
Add tests to verify this is fixed.
Add various tests for '%c' % int.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
platforms which have dup(2). The makefile() method is built directly on top
of the socket without duplicating the file descriptor, allowing timeouts to
work properly. Includes a new test case (urllibnet) which requires the
network resource.
Closes bug 707074.
|
| |
|
| |
|
|
|
|
| |
the foreground.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pack_float, pack_double, save_float: All the routines for creating
IEEE-format packed representations of floats and doubles simply ignored
that rounding can (in rare cases) propagate out of a long string of
1 bits. At worst, the end-off carry can (by mistake) interfere with
the exponent value, and then unpacking yields a result wrong by a factor
of 2. In less severe cases, it can end up losing more low-order bits
than intended, or fail to catch overflow *caused* by rounding.
Bugfix candidate, but I already backported this to 2.2.
In 2.3, this code remains in severe need of refactoring.
|
|
|
|
|
|
|
|
|
| |
variables to store internal data. As a result, any atempts to use the
unicode system with multiple active interpreters, or successive
interpreter executions, would fail.
Now that information is stored into members of the PyInterpreterState
structure.
|
|
|
|
|
|
| |
to more accurately describe what the function does.
Suggested by Thomas Wouters.
|
|
|
|
| |
Factors out the common case of returning self.
|
|
|
|
| |
function, if supported. (SF patch #675422, by Stuart Bishop.)
|
|
|
|
|
| |
I'm not going to have the time or energy to get this working x-platform
-- anyone who does is welcome to the code!
|
| |
|
|
|
|
| |
Contributed by Brett Cannon.
|
|
|
|
|
| |
classes defined by Python code using a class statement) is now
exported from object.h as PyHeapTypeObject. (SF patch #696193.)
|
|
|
|
| |
(contributed by Michael Stone.)
|
| |
|
|
|
|
|
| |
and not as a side effect of setlocale. Expose it as sys.getfilesystemencoding.
Adjust test case.
|
|
|
|
| |
in addition to createfilehandler and creaetetimerhandler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Implement the behavior as specified in PEP 277, meaning os.listdir()
will only return unicode strings if it is _called_ with a unicode
argument.
- And then return only unicode, don't attempt to convert to ASCII.
- Don't switch on Py_FileSystemDefaultEncoding, but simply use the
default encoding if Py_FileSystemDefaultEncoding is NULL. This means
os.listdir() can now raise UnicodeDecodeError if the default encoding
can't represent the directory entry. (This seems better than silcencing
the error and fall back to a byte string.)
- Attempted to decribe the above in Doc/lib/libos.tex.
- Reworded the Misc/NEWS items to reflect the current situation.
This checkin also fixes bug #696261, which was due to os.listdir() not
using Py_FileSystemDefaultEncoding, like all file system calls are
supposed to.
|
|
|
|
|
|
|
|
| |
[ 555817 ] Flawed fcntl.ioctl implementation.
with my patch that allows for an array to be mutated when passed
as the buffer argument to ioctl() (details complicated by
backwards compatibility considerations -- read the docs!).
|
|
|
|
|
|
|
|
|
| |
Allow mixed-type __eq__ and __ne__ for Set objects. This is messier than
I'd like because Set *also* implements __cmp__. I know of one glitch now:
cmp(s, t) returns 0 now when s and t are both Sets and s == t, despite
that Set.__cmp__ unconditionally raises TypeError (and by intent). The
rub is that __eq__ gets tried first, and the x.__eq__(y) True result
convinces Python that cmp(x, y) is 0 without even calling Set.__cmp__.
|
|
|
|
|
|
| |
rarely needed, but can sometimes be useful to release objects
referenced by the traceback held in sys.exc_info()[2]. (SF patch
#693195.) Thanks to Kevin Jacobs!
|
| |
|
|
|
|
|
| |
require -u network to run test_timeout since
it fails when not connected to a network.
|
| |
|
| |
|
|
|
|
|
| |
os.listdir() may now return unicode strings on platforms that set
Py_FileSystemDefaultEncoding.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
On a 64-bit machine, a dictionary could contain duplicate int/long keys
if the value was > 2**32.
|
|
|
|
|
| |
Subsumed times() into repeat().
Added cycle() and chain().
|
|
|
|
| |
Added an extra blank line before "What's New in Python 2.2 final?".
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
instead of a plain PyObject *. (SF patch #686601 by Ben Laurie.)
|
|
|
|
|
| |
turned into an absolute pathname, unless it is the empty string.
(SF patch #664376, by Skip Montanaro.)
|
| |
|
|
|
|
| |
now have tp_as_number. Check for nb_int or nb_float.
|