[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-12-03 Thread Tres Seaver
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

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-01-31 Thread Tres Seaver
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

[issue8318] Deprecation of multifile inappropriate or incomplete

2010-05-31 Thread Tres Seaver
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

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2010-05-31 Thread Tres Seaver
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

[issue1574217] isinstance swallows exceptions

2010-07-14 Thread Tres Seaver
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

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
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

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
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

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
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

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
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

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
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

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
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

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
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

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: -- versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
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

[issue7694] DeprecationWarning from distuils.commands.build_ext needs stacklevel

2010-01-13 Thread Tres Seaver
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

[issue8318] Deprecation of multifile inappropriate or incomplete

2010-04-05 Thread Tres Seaver
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

[issue8318] Deprecation of multifile inappropriate or incomplete

2010-04-05 Thread Tres Seaver
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

[issue8318] Deprecation of multifile inappropriate or incomplete

2010-04-05 Thread Tres Seaver
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

[issue7904] urlparse.urlsplit mishandles novel schemes

2010-04-26 Thread Tres Seaver
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

[issue1574217] isinstance swallows exceptions

2010-04-28 Thread Tres Seaver
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

[issue1574217] isinstance swallows exceptions

2010-04-28 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: -- versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1574217 ___ ___ Python-bugs

[issue2091] file accepts 'rU+' as a mode

2010-04-29 Thread Tres Seaver
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

[issue1285086] urllib.quote is too slow

2010-04-29 Thread Tres Seaver
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

[issue775964] fix test_grp failing on RedHat 6.2

2010-04-29 Thread Tres Seaver
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

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2010-04-29 Thread Tres Seaver
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

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2010-04-30 Thread Tres Seaver
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

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2010-04-30 Thread Tres Seaver
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

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2010-04-30 Thread Tres Seaver
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

[issue1285086] urllib.quote is too slow

2010-04-30 Thread Tres Seaver
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

[issue4687] GC stats not accurate because of debug overhead

2010-05-02 Thread Tres Seaver
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

[issue4687] GC stats not accurate because of debug overhead

2010-05-02 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: -- versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4687 ___ ___ Python-bugs

[issue4265] shutil.copyfile() leaks file descriptors when disk fills

2010-05-02 Thread Tres Seaver
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

[issue4265] shutil.copyfile() leaks file descriptors when disk fills

2010-05-02 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: -- versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4265 ___ ___ Python-bugs

[issue4265] shutil.copyfile() leaks file descriptors when disk fills

2010-05-02 Thread Tres Seaver
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

[issue1777134] minidom pretty xml output improvement

2010-05-02 Thread Tres Seaver
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

[issue3704] cookielib doesn't handle URLs with / in parameters

2010-05-02 Thread Tres Seaver
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

[issue8601] bz2.BZ2File should support with protocol per PEP 343

2010-05-03 Thread Tres Seaver
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

[issue839159] iterators broken for weak dicts

2010-05-03 Thread Tres Seaver
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

[issue1682942] ConfigParser support for alt delimiters

2010-05-03 Thread Tres Seaver
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

[issue4265] shutil.copyfile() leaks file descriptors when disk fills

2010-05-05 Thread Tres Seaver
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

[issue4265] shutil.copyfile() leaks file descriptors when disk fills

2010-05-05 Thread Tres Seaver
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

[issue8407] expose signalfd(2) and sigprocmask(2) in the signal module

2010-05-05 Thread Tres Seaver
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

[issue3704] cookielib doesn't handle URLs with / in parameters

2010-05-09 Thread Tres Seaver
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

[issue1285086] urllib.quote is too slow

2010-05-10 Thread Tres Seaver
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

[issue2091] file accepts 'rU+' as a mode

2011-05-21 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: -- nosy: -tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2091 ___ ___ Python-bugs-list

[issue16676] Segfault under Python 3.3 after PyType_GenericNew

2012-12-13 Thread Tres Seaver
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

[issue15881] multiprocessing 'NoneType' object is not callable

2013-01-20 Thread Tres Seaver
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

[issue17296] Cannot unpickle classes derived from 'Exception'

2013-03-11 Thread Tres Seaver
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

[issue10211] BufferObject doesn't support new buffer interface

2013-03-18 Thread Tres Seaver
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

[issue10212] struct.unpack and cStringIO.StringIO don't support new buffer

2013-03-18 Thread Tres Seaver
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

[issue8407] expose pthread_sigmask(), pthread_kill(), sigpending() and sigwait() in the signal module

2011-06-10 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: -- nosy: -tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8407 ___ ___ Python-bugs-list

[issue1641] asyncore delayed calls feature

2009-04-02 Thread Tres Seaver
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

[issue1641] asyncore delayed calls feature

2009-04-02 Thread Tres Seaver
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

[issue5716] Overzealous deprecation of BaseException.message

2009-04-07 Thread Tres Seaver
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

[issue24288] permissions

2016-12-27 Thread Tres Seaver
Changes by Tres Seaver <tsea...@agendaless.com>: -- title: Include/opcode.h is modified during building -> permissions ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue24288] Include/opcode.h is modified during building

2016-12-27 Thread Tres Seaver
Changes by Tres Seaver <tsea...@agendaless.com>: -- title: permissions -> Include/opcode.h is modified during building ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue24288] Include/opcode.h is modified during building

2016-12-27 Thread Tres Seaver
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 tha