- 26 Nis, 2002 8 kayıt (commit)
-
-
Fred Drake yazdı
This closes SF patch #547162.
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c"). The argument can be an arbitrary iterable object.
-
Barry Warsaw yazdı
the `when' condition so other non-Python shell comint changes won't cause random buffers to pop.
-
Guido van Rossum yazdı
left and right type were of the same type and not classic instances. This shortcut is dangerous for proxy types, because it means that coerce(Proxy(1), Proxy(2.1)) leaves Proxy(1) unchanged rather than turning it into Proxy(1.0). In an ever-so-slight change of semantics, I now only take the shortcut when the left and right types are of the same type and don't have the CHECKTYPES feature. It so happens that classic instances have this flag, so the shortcut is still skipped in this case (i.e. nothing changes for classic instances). Proxies also have this flag set (otherwise implementing numeric operations on proxies would become nightmarish) and this means that the shortcut is also skipped there, as desired. It so happens that int, long and float also have this flag set; that means that e.g. coerce(1, 1) will now invoke int_coerce(). This is fine: int_coerce() can deal with this, and I'm not worried about the performance; int_coerce() is only invoked when the user explicitly calls coerce(), which should be rarer than rare.
-
Fred Drake yazdı
Reported by Neal Norwitz on python-dev.
-
Neil Schemenauer yazdı
test __debug__ at runtime. Closes SF patch #548833.
-
Guido van Rossum yazdı
This fixes the problem that Barry reported on python-dev: >>> 23000 .__class__ = bool crashes in the deallocator. This was because int inherited tp_free from object, which uses the default allocator. 2.2. Bugfix candidate.
-
- 25 Nis, 2002 9 kayıt (commit)
-
-
Barry Warsaw yazdı
-
Barry Warsaw yazdı
better auto-recognition of a Jython file vs. a CPython (or agnostic) file by looking at the #! line more closely, and inspecting the import statements in the first 20000 bytes (configurable). Specifically, (py-import-check-point-max): New variable, controlling how far into the buffer it will search for import statements. (py-jpython-packages): List of package names that are Jython-ish. (py-shell-alist): List of #! line programs and the modes associated with them. (jpython-mode-hook): Extra hook that runs when entering jpython-mode (what about Jython mode? <20k wink>). (py-choose-shell-by-shebang, py-choose-shell-by-import, py-choose-shell): New functions. (python-mode): Use py-choose-shell. (jpython-mode): New command. (py-execute-region): Don't use my previous hacky attempt at doing this, use the new py-choose-shell function. One other thing this file now does: it attempts to add the proper hooks to interpreter-mode-alist and auto-mode-alist if they aren't already there. Might help with Emacs users since that editor doesn't come with python-mode by default.
-
Guido van Rossum yazdı
-
Barry Warsaw yazdı
whitespace can hose the needs-if test. So just skip all blank lines at the start of the region right off the bat.
-
Thomas Heller yazdı
allows the debugger to find the source without asking the user to browse for it.
-
Thomas Heller yazdı
under NT - this allows distutils to work with the CVS version or the source distribution. Wrap a long line.
-
Thomas Heller yazdı
-
Barry Warsaw yazdı
always get to see the result of e.g. a py-execute-region. Funny, this bugged both me /and/ Guido!
-
Barry Warsaw yazdı
Allows for some customization of the underlying comint buffer. (py-shell): Call the new hook. (info-lookup-maybe-add-help): A new call suggested by Milan Zamazal to make lookups in the Info documentation easier.
-
- 24 Nis, 2002 3 kayıt (commit)
-
-
Jack Jansen yazdı
Bugfix candidate.
-
Thomas Heller yazdı
SF Patch #547813.
-
Neil Schemenauer yazdı
-
- 23 Nis, 2002 20 kayıt (commit)
-
-
Tim Peters yazdı
-
Tim Peters yazdı
On Win2K it thought 'foo' started at byte offset 0 instead of at the pagesize, and on Win98 it thought 'foo' didn't exist at all. Somehow or other this is related to the new "in memory file" gimmicks in bsddb, but the old bsddb we use on Windows sucks so bad anyway I don't want to bother digging deeper. Flushing the file in test_mmap after writing to it makes the problem go away, so good enough.
-
Barry Warsaw yazdı
build's "undetected error" problems were originally detected with extension types, but we can whitebox test the same situations with new-style classes.
-
Jack Jansen yazdı
-
Barry Warsaw yazdı
states can be for this function, and ensure that only AttributeErrors are masked. Any other exception raised via the equivalent of getattr(cls, '__bases__') should be propagated up. abstract_issubclass(): If abstract_get_bases() returns NULL, we must call PyErr_Occurred() to see if an exception is being propagated, and return -1 or 0 as appropriate. This is the specific fix for a problem whereby if getattr(derived, '__bases__') raised an exception, an "undetected error" would occur (under a debug build). This nasty situation was uncovered when writing a security proxy extension type for the Zope3 project, where the security proxy raised a Forbidden exception on getattr of __bases__. PyObject_IsInstance(), PyObject_IsSubclass(): After both calls to abstract_get_bases(), where we're setting the TypeError if the return value is NULL, we must first check to see if an exception occurred, and /not/ mask an existing exception. Neil Schemenauer should double check that these changes don't break his ExtensionClass examples (there aren't any test cases for those examples and abstract_get_bases() was added by him in response to problems with ExtensionClass). Neil, please add test cases if possible! I belive this is a bug fix candidate for Python 2.2.2.
-
Jack Jansen yazdı
-
Barry Warsaw yazdı
run_suite() instead of run_unittest(). Best practice is to plan for multiple test classes.
-
Fred Drake yazdı
variables. This closes SF bug #543148.
-
Jack Jansen yazdı
Second part of fix for #493826: regenerated suite modules so errn exists but == 0 doesn't signal an error. Bugfix candidate.
-
Jack Jansen yazdı
First part of fix for #493826: if 'errn' key exists in return value this doesn't necesarily signal an error, only if the value is non-zero it does. This does not correspond with my reading of the documentation, but the OSX Finder can return 'errn'=0, and it knows better than me:-) Bugfix candidate.
-
Jeremy Hylton yazdı
The SIGXFSZ signal is sent when the maximum file size limit is exceeded (RLIMIT_FSIZE). Apparently, it is also sent when the 2GB file limit is reached on platforms without large file support. The default action for SIGXFSZ is to terminate the process and dump core. When it is ignored, the system call that caused the limit to be exceeded returns an error and sets errno to EFBIG. Python always checks errno on I/O syscalls, so there is nothing to do with the signal.
-
Jeremy Hylton yazdı
Also add a test that Python doesn't die with SIGXFSZ if it exceeds the file rlimit. (Assuming this will also test the behavior when the 2GB limit is exceed on a platform that doesn't have large file support.)
-
Jeremy Hylton yazdı
and reflow a long line.
-
Fred Drake yazdı
-
Jeremy Hylton yazdı
The function is documented to return -1 on error. If res was < 0, it returned res. It wasn't clear that the invariant was res < 0 iff res == -1.
-
Jack Jansen yazdı
-
Jack Jansen yazdı
-
Jack Jansen yazdı
-
Barry Warsaw yazdı
-
Fred Drake yazdı
-