- 11 Sep, 2001 9 commits
-
-
Jack Jansen authored
- Allow any file to be dropped on the interpreter (for file args).
-
Jack Jansen authored
-
Jack Jansen authored
-
Jack Jansen authored
-
Jack Jansen authored
-
Tim Peters authored
Changed unicode(i) to return a true Unicode object when i is an instance of a unicode subclass. Added PyUnicode_CheckExact macro.
-
Tim Peters authored
-
Tim Peters authored
involving embedded null bytes, since it's possible to screw that up w/o screwing up cases w/o embedded nulls.
-
Tim Peters authored
Repaired str(i) to return a genuine string when i is an instance of a str subclass. New PyString_CheckExact() macro.
-
- 10 Sep, 2001 27 commits
-
-
Tim Peters authored
-
Tim Peters authored
tuple(i) repaired to return a true tuple when i is an instance of a tuple subclass. Added PyTuple_CheckExact macro. PySequence_Tuple(): if a tuple-like object isn't exactly a tuple, it's not safe to return the object as-is -- make a new tuple of it instead.
-
Tim Peters authored
-
Jack Jansen authored
-
Jack Jansen authored
parameter for the return string (as unix pathnames are not limited by the 255 char pstring limit). Implemented the function for MachO-Python, where it returns unix pathnames.
-
Fredrik Lundh authored
xmllib (on 2.0 and later)
-
Tim Peters authored
Repair float constructor to return a true float when passed a subclass instance. New PyFloat_CheckExact macro.
-
Jack Jansen authored
-
Tim Peters authored
Given an immutable type M, and an instance I of a subclass of M, the constructor call M(I) was just returning I as-is; but it should return a new instance of M. This fixes it for M in {int, long}. Strings, floats and tuples remain to be done. Added new macros PyInt_CheckExact and PyLong_CheckExact, to more easily distinguish between "is" and "is a" (i.e., only an int passes PyInt_CheckExact, while any sublass of int passes PyInt_Check). Added private API function _PyLong_Copy.
-
Guido van Rossum authored
Subtlety on Windows: if we change test_largefile.py to use a file > 4GB, it still fails. A debug session suggests this is because fseek(fp, 0, 2) refuses to seek to the end of the file when the file is > 4GB, because it uses the SetFilePointer() in 32-bit mode. But it only fails when we seek relative to the end of the file, because in the other seek modes only calls to fgetpos() and fsetpos() are made, which use Get/SetFilePointer() in 64-bit mode. Solution: #ifdef MS_WInDOWS, replace the call to fseek(fp, ...) with a call to _lseeki64(fileno(fp), ...). Make sure to call fflush(fp) first. (XXX Could also replace the entire branch with a call to _lseeki64(). Would that be more efficient? Certainly less generated code.) (XXX This needs more testing. I can't actually test that it works for files >4GB on my Win98 machine, because the filesystem here won't let me create files >=4GB at all. Tim should test this on his Win2K machine.)
-
Fredrik Lundh authored
xmllib unless needed), merged docstring patches, added overridable Transport.getparser to simplify plugging in different parsers.
-
Guido van Rossum authored
-
Guido van Rossum authored
- use PyModule_Check() instead of PyObject_TypeCheck(), now we can. - don't assert that the __dict__ gotten out of a module is always a dictionary; check its type, and raise an exception if it's not.
-
Guido van Rossum authored
-
Andrew M. Kuchling authored
Update the patch and bug counts
-
Martin v. Löwis authored
-
Fred Drake authored
in one place.
-
Guido van Rossum authored
-
Guido van Rossum authored
"module parameters", and used in the Windows test (which crashed because size was undefined -- sigh).
-
Guido van Rossum authored
by bbrox@bbrox.org / lionel.ulmer@free.fr. This adds a configure check and if all goes well turns on the PTHREAD_SCOPE_SYSTEM thread attribute for new threads. This should remove the need to add tiny sleeps at the start of threads to allow other threads to be scheduled.
-
Guido van Rossum authored
If on Windows, we require the 'largefile' resource. If not on Windows, we use a test that actually writes a byte beyond the 2BG limit -- seeking alone is not sufficient, since on some systems (e.g. Linux with glibc 2.2) the sytem call interface supports large seek offsets but not all filesystem implementations do. Note that on Windows, we do not use the write test: on Win2K, that test can take a minute trying to zero all those blocks on disk, and on Windows our code always supports large seek offsets (but again, not all filesystems do). This may mean that on Win95, or on certain other backward filesystems, test_largefile will *fail*.
-
Jack Jansen authored
-
Andrew M. Kuchling authored
Add removal of 3-arg pow() for floats Rewrite introduction a bit
-
Guido van Rossum authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
Reported by Fredrik Lundh on python-dev. The conversimple() code that handles Unicode arguments and converts them to the default encoding now calls converterr() with the original Unicode argument instead of the NULL returned by the failed encoding attempt.
-
Tim Peters authored
-
- 09 Sep, 2001 4 commits
-
-
Guido van Rossum authored
support on Linux (and Solaris, I expect) for real. The necessary symbols are defined once and for all, under the assumption that they won't harm elsewhere.
-
Tim Peters authored
horridly inefficient hack in regrtest's Compare class, but it's about as clean as can be: regrtest has to set up the Compare instance before importing a test module, and by the time the module *is* imported it's too late to change that decision. The good news is that the more tests we convert to unittest and doctest, the less the inefficiency here matters. Even now there are few tests with large expected-output files (the new cost here is a Python-level call per .write() when there's an expected- output file).
-
Tim Peters authored
type reprs, to accomodate the way Jack runs tests on the Mac.
-
Jack Jansen authored
selftest now works.
-