[issue24288] Include/opcode.h is modified during building
Changes by Tres Seaver <tsea...@agendaless.com>: -- title: permissions -> Include/opcode.h is modified during building ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24288> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24288] permissions
Changes by Tres Seaver <tsea...@agendaless.com>: -- title: Include/opcode.h is modified during building -> permissions ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24288> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24288] Include/opcode.h is modified during building
Tres Seaver added the comment: ISTM that this issue should be re-opened, because it breaks out-of-tree building from a pristine / read-only source tree. If they are "public" headers, files like 'opcode.h' should be generated and checked in as part of the release process, rather than modified during a normal build. -- nosy: +tseaver ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24288> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10211] BufferObject doesn't support new buffer interface
Tres Seaver added the comment: Looks good to me. -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10211 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10212] struct.unpack and cStringIO.StringIO don't support new buffer
Tres Seaver added the comment: Patch looks good to me. I would call it a bugfix, not a feature. -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17296] Cannot unpickle classes derived from 'Exception'
Tres Seaver added the comment: The latest 2.7 patch does not cause the following tests (from issue 1692335) to pass: http://bugs.python.org/file17509/issue1692335-tests.patch -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17296 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15881] multiprocessing 'NoneType' object is not callable
Tres Seaver added the comment: I can reproduce the bug against the 2.7 tip. Reviewing the 2.7 patch: - The 2.7 tip has 'Misc/ACKS' instead of 'Doc/ACKS.txt'. - In 'Misc/ACKS', the line adding 'Chris McDonough' should add it in alpha order. - The remainder of the patch looks correct, and applies cleanly to the tip of the 2.7 branch. - After applying the patch to the 2.7 tip, I can no longer reproduce the bug. - After applying the patch, the full test suite ('./python -m test.testall -j3') passes all tests. -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15881 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16676] Segfault under Python 3.3 after PyType_GenericNew
New submission from Tres Seaver: A test of the 'persistent' package C extension segfaults under 3.3, but completes successfully under 3.2. The C function being tested is a wrapper around PyType_GenericNew: static PyObject * simple_new(PyObject *self, PyObject *type_object) { if (!PyType_Check(type_object)) { PyErr_SetString(PyExc_TypeError, simple_new argument must be a type object.); return NULL; } return PyType_GenericNew((PyTypeObject *)type_object, NULL, NULL); } The unit test which segfaults just iterates over basic types: def test_w_type(self): for typ in (type, list, dict, tuple, object): self.assertTrue(isinstance(self._callFUT(typ), typ)) Some digging shows that the segfault comes while deallocating the newly-made 'dict' object. #0 dict_dealloc (mp=0x73f9d248) at Objects/dictobject.c:1392 #1 0x004261cb in tupledealloc (op=0x73d90ab8) at Objects/tupleobject.c:238 #2 0x0048065d in call_function (oparg=optimized out, pp_stack=0x7fffa6e0) at Python/ceval.c:4064 #3 PyEval_EvalFrameEx (f=optimized out, throwflag=optimized out) at Python/ceval.c:2679 #4 0x00480b23 in fast_function (nk=optimized out, na=1, n=optimized out, pp_stack=0x7fffa850, func=0x742284d0) at Python/ceval.c:4150 #5 call_function (oparg=optimized out, pp_stack=0x7fffa850) at Python/ceval.c:4083 -- components: Extension Modules, Interpreter Core messages: 177441 nosy: tseaver priority: normal severity: normal status: open title: Segfault under Python 3.3 after PyType_GenericNew versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8407] expose pthread_sigmask(), pthread_kill(), sigpending() and sigwait() in the signal module
Changes by Tres Seaver tsea...@agendaless.com: -- nosy: -tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2091] file accepts 'rU+' as a mode
Changes by Tres Seaver tsea...@agendaless.com: -- nosy: -tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors
Tres Seaver tsea...@agendaless.com added the comment: georg.brandl (2010-12-03 10:20): Don't worry, it will be ported. When? Why would it *not* be merged to the 2.7 and 3.1 branches at the time the bug is closed? Delaying the port only increases the chance that the fix will fall between the cracks. In particular, I would like confirmation that the fix *will* be ported before 2.7.2 is released: this bug causes the 2.7 Zope buildbots to fail, which means they are disabled until the fix is released. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors
Tres Seaver tsea...@agendaless.com added the comment: This fix needs backporting to the 3.1 and 2.7 branches as well. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors
New submission from Tres Seaver tsea...@agendaless.com: Because application code which tests for the presence of an object in a WeakSet may not be able to ensure that the object is weak-referenceable, the set should just return False for any object passed to '__contains__' which causes 'ref' to raise a TypeError. Patch forthcoming. -- messages: 120743 nosy: tseaver priority: normal severity: normal status: open title: _weakrefset.WeakSet.__contains__ should not propagate TypeErrors versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors
Changes by Tres Seaver tsea...@agendaless.com: -- components: +Library (Lib) keywords: +patch Added file: http://bugs.python.org/file19545/issue10360.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors
Changes by Tres Seaver tsea...@agendaless.com: Removed file: http://bugs.python.org/file19545/issue10360.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors
Tres Seaver tsea...@agendaless.com added the comment: A new version of the patch, which only traps TypeErrors raises by ref(item). The test now ensures that hashing errors are propagated, for compatibility with standard sets. -- Added file: http://bugs.python.org/file19546/issue10360-redux.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors
Changes by Tres Seaver tsea...@agendaless.com: Removed file: http://bugs.python.org/file19546/issue10360-redux.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors
Tres Seaver tsea...@agendaless.com added the comment: One more time, with feeling. Sorry for the noise, the last patch was not against the 2.7 trunk. -- Added file: http://bugs.python.org/file19547/issue10360-redux.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors
Tres Seaver tsea...@agendaless.com added the comment: FTR, the patch applies cleanly to the py3k branch, too. (Michael pointed out that the original code was copied directly from there). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors
Changes by Tres Seaver tsea...@agendaless.com: -- versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors
Tres Seaver tsea...@agendaless.com added the comment: WeakKeyDictionary's __contains__: def __contains__(self, key): try: wr = ref(key) except TypeError: return 0 return wr in self.data -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1574217] isinstance swallows exceptions
Tres Seaver tsea...@agendaless.com added the comment: This bug exists in Python 2.6 and 3.1, which are still being maintained, AFAIK. -- versions: +Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1574217 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8318] Deprecation of multifile inappropriate or incomplete
Tres Seaver tsea...@agendaless.com added the comment: For the sake of completeness: the Zope2 trunk and its current stable branch now no longer use the multifile module, thanks to the following patch: http://svn.zope.org/Zope/trunk/src/OFS/tests/testRanges.py?rev=110704r1=110402r2=110704 That diff might serve as fodder for updating the docs for the deprecation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8318 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__
Tres Seaver tsea...@agendaless.com added the comment: The attached patch adds Mark's examples to test_pickle as a failing test. -- nosy: +tseaver Added file: http://bugs.python.org/file17509/issue1692335-tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1692335 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1285086] urllib.quote is too slow
Tres Seaver tsea...@agendaless.com added the comment: I can only reiterate that Zope apps can call 'urllib.quote' dozens, hundreds, even thousands of times on a single request: the reason for the original bug report was that 'urllib.quote' was showing up frequently on profiling output for such requests. Short-circuiting the case for the empty string and the case that the string being quoted actually contains only safe characters together made 'urllib.quote' disappear from the profiler output. Newer frameworks, such as 'repoze.bfg', avoid using 'urliib.quote' at all for just this reason. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1285086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3704] cookielib doesn't handle URLs with / in parameters
Tres Seaver tsea...@agendaless.com added the comment: As long as we don't care about preserving backward compatibility, we could indeed just change the behavior of 'request_path'. It isn't documented as an API of the cookielib module, but it does have a docstring which promises certain semantics. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3704 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4265] shutil.copyfile() leaks file descriptors when disk fills
Tres Seaver tsea...@agendaless.com added the comment: I would be glad to write those tests, if you could explain the strategy you have in mind more fully: since 'shutil.copyfile' performs the 'open' itself, I couldn't figure out how to stub in such a mocked up file. Does 'open' provide a hook for testing purposes that I don't know about? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4265 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4265] shutil.copyfile() leaks file descriptors when disk fills
Tres Seaver tsea...@agendaless.com added the comment: This patch adds tests for the four edge cases (opening source fails, opening dest fails, closing dest fails, closing source fails). -- Added file: http://bugs.python.org/file17229/issue4265-test_copyfile_exceptions.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4265 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8407] expose signalfd(2) and sigprocmask(2) in the signal module
Tres Seaver tsea...@agendaless.com added the comment: Trying pthread_sigmask first, and falling back, seems like the right strategy to me. -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8601] bz2.BZ2File should support with protocol per PEP 343
Tres Seaver tsea...@agendaless.com added the comment: BZ2File objects already support the context manager protocol on the trunk, as of Antoine Pitrou's fix for http://bugs.python.org/issue3860 -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8601 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue839159] iterators broken for weak dicts
Tres Seaver tsea...@agendaless.com added the comment: I can confirm that the patch applies with minimal fuzz to the release26-maint branches and the trunk, and that the added tests fail without the updated implementation in both cases. Furthermore, Jim's original demo script emits it error with my stock 2.6.5 Python, but is silent with the patched trunk / 2.6 branch. -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue839159 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Tres Seaver tsea...@agendaless.com added the comment: I'm afraid the patch no longer applies cleanly to the trunk, although at least updating the docs should be easier now that they are converted to ReStructuredText. The tests in the patch for the new feature seem sensible. -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4687] GC stats not accurate because of debug overhead
Tres Seaver tsea...@agendaless.com added the comment: The patch looks obviously correct to me. I can confirm that the patch applies cleanly both to the trunk and to the 'release26-maint' branch, and that the 'test_gc' tests pass in both cases after applying it and rebuilding. -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4687] GC stats not accurate because of debug overhead
Changes by Tres Seaver tsea...@agendaless.com: -- versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4265] shutil.copyfile() leaks file descriptors when disk fills
Tres Seaver tsea...@agendaless.com added the comment: This bug exists on Python 2.6, too. It seems to me that the right solution here is to use both opened files as context managers. See attached patch (made against the release26-maint branch). The patch also cleans up the old-style exception signature in the precondition check. -- keywords: +patch nosy: +tseaver Added file: http://bugs.python.org/file17185/issue4265_shutil_copyfile.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4265 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4265] shutil.copyfile() leaks file descriptors when disk fills
Changes by Tres Seaver tsea...@agendaless.com: -- versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4265 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4265] shutil.copyfile() leaks file descriptors when disk fills
Tres Seaver tsea...@agendaless.com added the comment: The patch doesn't apply cleanly to trunk. Attached is one which does. -- Added file: http://bugs.python.org/file17186/issue4265_shutil_copyfile-trunk.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4265 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1777134] minidom pretty xml output improvement
Tres Seaver tsea...@agendaless.com added the comment: The patch applies cleanly to the 2.6 branch, and with minimal fuzz to the trunk. Exsting tests pass in both cases, as does the new test. The added testcase seems plainly correct. The first hunk of the diff to Lib/xml/dom/minidom.py is a little messy / hard to follow: - It makes the module less PEP8 conformant (line length 80, operator spacing) - The 'onetextnode' flag is set, but never used. The second hunk is somewhat problematic: it changes 'Text.writexml' to ignore any explicit 'indent' or 'newl' argument passed, which is a backwards-incompatible behavior change. Perhaps changing the default values for those arguments to 'None', and then using the new code path in that case, would be the better course, while falling back to the old one if either is passed. I'm not sure about the justification for the third hunk at all (removing the newline at the end of the XML prologue). There *can't* be any meaningful whitespace outside of the root element, so we shouldn't have round-trip issues if we leave it. -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1777134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3704] cookielib doesn't handle URLs with / in parameters
Tres Seaver tsea...@agendaless.com added the comment: I can confirm that the patch applies cleanly to the release26-maint branch, and that the updated test fails without the updated implementation. However, the entire approach seems wrong to me: the patched method has just called 'request_path', which already cracked the URL using urlparse.urlparse and put it back together again with urlparse.urlunparse. A better fix would be either to call urlparse.urlparse directly, or else to add an argument to 'request_path' which kept it from doing the unwanted reassembly. Attaching a patch which implements the latter strategy. Greg's new test passes with this patch applied in place of the part of his patch which touches Lib/cookielib.py. -- nosy: +tseaver Added file: http://bugs.python.org/file17187/issue3704-better_request_path.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3704 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4180] warnings.simplefilter(always) does not make warnings always show up
Tres Seaver tsea...@agendaless.com added the comment: This patch tidies up the FilterWarnings tests to nomalize use of 'self.assertEquals' (matching the rest of the module) and make the 'test_always' assertions meaningful. -- Added file: http://bugs.python.org/file17144/issue4180-test_janitorial.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4180] warnings.simplefilter(always) does not make warnings always show up
Tres Seaver tsea...@agendaless.com added the comment: This patch adds tests for the 'error', 'ignore', and 'always' filters being applied *after* the default warning has been issued, and therefore the registry populated. It causes failures for the 'error' and 'always' on both the Python and C sides. -- Added file: http://bugs.python.org/file17145/issue4180-test_filter_after_default.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4180] warnings.simplefilter(always) does not make warnings always show up
Tres Seaver tsea...@agendaless.com added the comment: This patch replaces my earlier 'py_warnings' patch. It revamps the Python side to check filters before deciding not to emit the warning based on the registry. The new filter_after_default tests pass on the Python side with this patch. -- Added file: http://bugs.python.org/file17146/issue4180-py_warnings2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1285086] urllib.quote is too slow
Tres Seaver tsea...@agendaless.com added the comment: Updated patch against the trunk attached. Note that I prefer unidiff myself, but was following a bit of guidance that Guido (used to, anyway) prefer context diffs. The updated speed test run against the stdlib with this patch shows only a 12% to 16% hit against my simpler version (which didn't handle cases where the 'safe' argument was not the default /). -- Added file: http://bugs.python.org/file17148/issue1285086-updated.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1285086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2091] file accepts 'rU+' as a mode
Tres Seaver tsea...@agendaless.com added the comment: I can confirm that: - the patch applies cleanly to the release26-maint branch, with the exception of the Misc/NEWS portion:: $ hg branch release26-maint $ ./python -E -tt Lib/test/regrtest.py test_file test_file 1 test OK. $ patch -p0 /tmp/issue2091.diff patching file Objects/fileobject.c Hunk #1 succeeded at 209 (offset 54 lines). Hunk #2 succeeded at 2269 (offset 194 lines). patching file Misc/NEWS Hunk #1 FAILED at 12. 1 out of 1 hunk FAILED -- saving rejects to file Misc/NEWS.rej patching file Lib/test/test_file.py Hunk #1 succeeded at 176 (offset 55 lines). - the added test fails before rebuilding Objects/fileobject.c:: $ ./python -E -tt Lib/test/regrtest.py test_file test_file test test_file failed -- Traceback (most recent call last): File /home/tseaver/projects/hg-repo/py-2.6/Lib/test/test_file.py, line 181, in testModeStrings f = open(TESTFN, mode) IOError: [Errno 2] No such file or directory: '@test' 1 test failed: test_file - the added test passes after rebuilding Objects/fielobject.c:: $ make gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Objects/fileobject.o Objects/fileobject.c ... $ ./python -E -tt Lib/test/regrtest.py test_file test_file 1 test OK. -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1285086] urllib.quote is too slow
Tres Seaver tsea...@agendaless.com added the comment: I'm uploading a saner version of the speed test which uses timeit's support for passing a callable as a statement: it is much easier to see what the test is actually doing. On my machine, running against the release26-maint branch, my version runs anywhere from 67% to 85% faster on the cases where no quoting actually needs to be done. In production use, where urlib.quote is used as a safety check, these cases far outweigh the cases which actually require quoting. -- Added file: http://bugs.python.org/file17133/urllib_better_speed_test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1285086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue775964] fix test_grp failing on RedHat 6.2
Tres Seaver tsea...@agendaless.com added the comment: I don't have a host where I actually use netgroups in /etc/groups, and so can't provoke the bug:: $ hg branch release26-maint $ make ... $ ./python -E -tt Lib/test/regrtest.py test_grp test_grp 1 test OK. I can verify that the patch still applies to the 'release26-maint' branch:: $ patch -p0 /tmp/grp.diff patching file Modules/grpmodule.c Hunk #1 succeeded at 134 (offset 12 lines). and that the tests still pass aftewards:: $ make ... $ ./python -E -tt Lib/test/regrtest.py test_grp test_grp 1 test OK. -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue775964 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4180] warnings.simplefilter(always) does not make warnings always show up
Tres Seaver tsea...@agendaless.com added the comment: The attached patch fixes the OP's use case on the Python side by re-ordering the tests, such that always prevents the short-circuit from firing:: $ ./python Python 2.6.5+ (release26-maint, Apr 29 2010, 21:24:12) [GCC 4.3.3] on linux2 Type help, copyright, credits or license for more information. import warnings as o_warnings import sys sys.modules['_warnings'] = 0 del sys.modules['warnings'] import warnings as py_warnings def f(): ... py_warnings.warn('foo') ... f() __main__:2: UserWarning: foo f() py_warnings.simplefilter('always') f() __main__:2: UserWarning: foo f() __main__:2: UserWarning: foo -- components: +Library (Lib) -Interpreter Core nosy: +tseaver type: behavior - Added file: http://bugs.python.org/file17141/issue4180-py_warnings.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1574217] isinstance swallows exceptions
Tres Seaver tsea...@agendaless.com added the comment: I can confirm that the patch applies cleanly to the 2.6 branch, that the new test fails before rebuilding, and that the test passes afterwards: $ hg summary parent: 41597:295c02a21979 tip [svn r80597] Merged revisions 80596 via svnmerge from branch: release26-maint commit: (clean) update: (current) $ ./configure make ... $ ./python -E -tt Lib/test/regrtest.py test_isinstance test_isinstance 1 test OK. $ patch -p1 /tmp/issue1574217_dont_mask_errors.patch patching file Lib/test/test_isinstance.py patching file Objects/abstract.c Hunk #1 succeeded at 2854 (offset 619 lines). Hunk #2 succeeded at 2878 (offset 600 lines). test_isinstance test test_isinstance failed -- Traceback (most recent call last): File /home/tseaver/projects/hg-repo/issue1574217/Lib/test/test_isinstance.py, line 94, in test_isinstance_dont_mask_non_attribute_error self.assertRaises(RuntimeError, isinstance, c, bool) AssertionError: RuntimeError not raised 1 test failed: test_isinstance $ make ... $ ./python -E -tt Lib/test/regrtest.py test_isinstance test_isinstance 1 test OK. -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1574217 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1574217] isinstance swallows exceptions
Changes by Tres Seaver tsea...@agendaless.com: -- versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1574217 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7904] urlparse.urlsplit mishandles novel schemes
Tres Seaver tsea...@agendaless.com added the comment: The fix for this bug breaks any code which worked with non-standard schemes in 2.6.4 (by working around the issue). This kind of backward incompatibility should be called out prominently in NEWS.txt (assuming that such a fix is considered appropriate in a third-dot release). -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7904 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8318] Deprecation of multifile inappropriate or incomplete
New submission from Tres Seaver tsea...@agendaless.com: Import of the multifile module emits a DeprecationWarning, but the warning is either incomplete: - The documentation[1] states that the 'email' module is to be preferred, but doesn't describe what APIs should be used from that module. - In fact, the 'email' module doesn't appear to provide an equivalent API to the 'multifile' module. or perhaps inappropriate, as not all handling of 'multipart' MIME is email related (e.g., processing HTTP form POSTs which include file uploads). At a minimum, the docs for 'multifile' should include examples showing the preferred way to implement its own native examples using the'email' module's APIs. [1] http://docs.python.org/library/multifile.html -- components: Library (Lib) messages: 102390 nosy: barry, tseaver severity: normal status: open title: Deprecation of multifile inappropriate or incomplete versions: Python 2.5, Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8318 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8318] Deprecation of multifile inappropriate or incomplete
Tres Seaver tsea...@agendaless.com added the comment: [T]here [may be] things you can do with multifile that you can't (yet) do with the facilities from the email package. If so, these will most likely be considered bugs in the email package. Surely the presence of such a feature would make the deprecation premature. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8318 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8318] Deprecation of multifile inappropriate or incomplete
Tres Seaver tsea...@agendaless.com added the comment: Could you do me a favor and add that use case the set of use cases in the email wiki? Done. The code in Zope which still uses 'multifile' is in the tests for HTTP 'Range' support: http://svn.zope.org/*checkout*/Zope/trunk/src/OFS/tests/testRanges.py?content-type=text%2Fplain -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8318 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7694] DeprecationWarning from distuils.commands.build_ext needs stacklevel
New submission from Tres Seaver tsea...@agendaless.com: 2.7 has a new DeprecationWarning inside the build_ext command for code which sets the 'compiler' to anything other than a string or None. Because the warning occurs within property getter / setters, it needs to boost the stacklevel for the warning above the default value of 1. In addition, the setter is called from within '__setattr__', which means that it needs to be incremented again in that case. The attached patch does both of these things. -- assignee: tarek components: Distutils files: python-2.7-distutils_warning.patch keywords: patch messages: 97725 nosy: tarek, tseaver severity: normal status: open title: DeprecationWarning from distuils.commands.build_ext needs stacklevel versions: Python 2.7 Added file: http://bugs.python.org/file15857/python-2.7-distutils_warning.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5716] Overzealous deprecation of BaseException.message
New submission from Tres Seaver tsea...@agendaless.com: I'm working on cleaning up deprecations for Zope and related packages under Python 2.6. The irony here is that I'm receiving deprecation warnings for custom exception classes which had a 'message' attribute long before the abortive attempt to add them to the BaseException type, which hardly seems reasonable. For instance, docutils.parsers.rst defines a DirectiveError which takes two arguments, 'level' and 'message', and therefore gets hit with the deprecation (even though it never used the new signature). Likewise, ZODB.POSException defines a ConflictError type which takes 'message' as one of several arguments, all optional, and has since at least 2002. I don't think either of these classes should be subject to a deprecation warning for a feature they never used or depended on. -- components: Library (Lib) messages: 85695 nosy: tseaver severity: normal status: open title: Overzealous deprecation of BaseException.message versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
Tres Seaver tsea...@users.sourceforge.net added the comment: Sidnei da Silva had to put some straddling code in the Zope2 trunk to workaround the 2.6 changes to asyncore / asynchat: - http://svn.zope.org/Zope/?rev=91981view=rev - http://svn.zope.org/Zope/?rev=92023view=rev -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
Tres Seaver tsea...@agendaless.com added the comment: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Guido van Rossum wrote: ISTR that Zope has or had significant monkeypatches to at least one of asyncore/asynchat. The resulting coupling between Zope and asyn* has meant that the de-facto API of asyn* was much more than the documented API. IMO that's a sign of a poorly designed API (in asyn*). If Zope had had its own copy of asyn* (under a different name of course) that relied only on lower-level APIs (sockets and select), it could have evolved that copy directly without the need for monkeypatching. Zope does not monkeypatch asyncore or asynchat, and hasn't since at least Zope 2.5 (the oldest checkout I have, first released 2002-01-25). Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@agendaless.com Agendaless Consulting http://agendaless.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJ1QLqFXKVXuSL+CMRAhelAJ9yYgo1RXUhWR2cH8CjYRoXz/qsvACgg13O BFAiRoYP8AWVgQVWBhVhB+4= =wj2y -END PGP SIGNATURE- -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com