[issue17328] Fix reference leak in dict_setdefault() in case of resize failure
Serhiy Storchaka added the comment: LGTM. This is 3.3+ only issue as far as I understand. -- nosy: +benjamin.peterson versions: -Python 2.6, Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17328 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17345] Portable and extended type specifiers for array module
New submission from Nikita Nemkin: Currently array module only provides platform-dependent type specifiers. It would be very nice to have platform-independent specifiers in addition to that, matching the struct module. For example array('H') - an array of little-endian 2-byte integers. This issue crops up every time when I use array(). Binary data usually comes in some predefined format and a manual matching to native format has to be done (assuming I want to write portable code). A useful extra would be to support multi-element struct specifiers and present an array of tuples in this case. For example array('iff') - an array of tuples (int, float, float) with native types. -- components: Library (Lib) messages: 183425 nosy: nnemkin priority: normal severity: normal status: open title: Portable and extended type specifiers for array module type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17345 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17278] SIGSEGV in _heapqmodule.c
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- Removed message: http://bugs.python.org/msg183401 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17278 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17278] SIGSEGV in _heapqmodule.c
Raymond Hettinger added the comment: Antoine, thanks for the patch. This looks like a reasonable solution that is fast and prevents segfaults. -- assignee: rhettinger - pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17278 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15216] Support setting the encoding on a text stream after creation
Nick Coghlan added the comment: That's a fair point - I think it's acceptable to throw an error in the case of *already decoded* characters that haven't been read. There's also a discussion on python-ideas about an explicit API for clearing the internal buffers, and pushing data back into a stream. If that is added, then set_encoding() would be free to error out if there was any already buffered data - it would be up to the application to call clear_buffer() before calling set_encoding(), and deal with an such data appropriately (such as calling push_data() with the results of the clear_buffer() call) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15216 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15216] Support setting the encoding on a text stream after creation
Nick Coghlan added the comment: Oops, meant to link to my post in the thread about a buffer manipulation API: http://mail.python.org/pipermail/python-ideas/2013-March/019769.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15216 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17346] Pickle tests do not test protocols 0, 1, and 2 for bytes
New submission from Marius Gedminas: I was reading Lib/test/pickletester.py when I noticed that test_bytes loops over all the protocols but doesn't actually use the loop variable anywhere. Attached patch should fix this. -- components: Tests files: actually-test-all-protocols.diff keywords: patch messages: 183429 nosy: mgedmin priority: normal severity: normal status: open title: Pickle tests do not test protocols 0, 1, and 2 for bytes type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file29302/actually-test-all-protocols.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17346 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17346] Pickle tests do not test protocols 0, 1, and 2 for bytes
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17346 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17347] bsddb._openDBEnv() should not touch current directory
New submission from Florian Weimer: This code: def _openDBEnv(cachesize): e = db.DBEnv() if cachesize is not None: if cachesize = 20480: e.set_cachesize(0, cachesize) else: raise error, cachesize must be = 20480 e.set_lk_detect(db.DB_LOCK_DEFAULT) e.open('.', db.DB_PRIVATE | db.DB_CREATE | db.DB_THREAD | db.DB_INIT_LOCK | db.DB_INIT_MPOOL) return e causes Berkeley DB to read the DB_CONFIG file from the current directory, which may have unexpected side effects. Unfortunately, Berkeley DB still reads ./DB_CONFIG even if the first argument to DBEnv.open() is None/NULL, so the only way to suppress this behavior seems a non-existing or known-to-by-empty directory (such as /var/empty). -- components: Extension Modules messages: 183430 nosy: fweimer priority: normal severity: normal status: open title: bsddb._openDBEnv() should not touch current directory type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17348] Unicode - encoding seems to be lost for inputs of unicode chars
New submission from Pradyun Gedam: In IDLE, I have spotted a peculiar problem. I have attached an .png file which is a screen capture of 'session' on IDLE. It seems that the Unicode character that has been input, loses its encoding. My 'session' Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32 Type copyright, credits or license() for more information. c = u'€' ord(c) 128 c.encode('utf-8') '\xc2\x80' c u'\x80' print c c = u'\u20ac' ord(c) 8364 c.encode('utf-8') '\xe2\x82\xac' c u'\u20ac' print c € -- components: IDLE messages: 183431 nosy: Pradyun.Gedam priority: normal severity: normal status: open title: Unicode - encoding seems to be lost for inputs of unicode chars versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17348 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17347] bsddb._openDBEnv() should not touch current directory
Jesús Cea Avión added the comment: This is a standard Berkeley DB behavior. Can I suggest you to report this issue to Oracle forums? http://docs.oracle.com/cd/E17276_01/html/programmer_reference/env_db_config.html https://forums.oracle.com/forums/forum.jspa?forumID=271 Closing as invalid. if you disagree, please reopen. -- nosy: +jcea resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16620] Avoid using private function glob.glob1() in msi module and tools
Serhiy Storchaka added the comment: I have added some comments on Rietveld. Note that glob.glob() and glob.glob1() returns different filenames. The first returns full paths and the second returns bare filenames without a directory path. Workarounding this may require more in-depth changes to the code. Actually this is a low priority issue. It is no so bad to use private functions from other modules inside Python stdlib. But it can be a bad example for a third party code. -- components: +Windows priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16620 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13598] string.Formatter doesn't support empty curly braces {}
Phil Elson added the comment: I didn't see a test case relating to the example in his comment, namely f.format({0:{}}, 'foo', 5) Did I miss it? The example should fail, which it wouldn't have done with the patch previously proposed. I believe the case is covered by the block: with self.assertRaises(ValueError): fmt.format(foo{1}{}, bar, 6) Though there is no harm in adding another test along the lines of: with self.assertRaises(ValueError): fmt.format({0:{}}, bar, 6) If you think it is worthwhile? I'm uncertain which documentation to update since the method which has had its signature updated is private and is called solely by Formatter.vformat . Cheers, -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17299] Test cPickle with real files
Serhiy Storchaka added the comment: I have added comments on Rietveld. Perhaps it will be worth to create mixings for cStringIO.StringIO, BytesIO and file object and then mix them to other tests. Note that there is no sense to change pure Python pickle tests. Python implementation uses the same code for all streams. It's C implementation needs specialized tests (in Lib/test/test_cpickle.py). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17299] Test cPickle with real files
Serhiy Storchaka added the comment: David, yes, this is 2.7 only issue. The code was broken recently (see msg182979 in issue13555) due to insufficient testing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17349] wsgiref.simple_server.demo_app is not PEP-3333 compatible
New submission from Andrey Lebedev: Under certain circumstances, wsgiref.simple_server.demo_app may return unicode data, but that is prohibited by PEP-. This happens if environ with unicode key is passed to demo_app. Unicode keys are then written to StringIO instance, automatically making its value unicode. Type of environ keys is not strictly mandated by PEP-, however output of WSGI application is: When called by the server, the application object must return an iterable yielding zero or more bytestrings., see http://www.python.org/dev/peps/pep-/#specification-details Test case is attached. -- components: Library (Lib) files: wsgirefbug.py messages: 183437 nosy: Andrey.Lebedev priority: normal severity: normal status: open title: wsgiref.simple_server.demo_app is not PEP- compatible type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file29303/wsgirefbug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17349 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17346] Pickle tests do not test protocols 0, 1, and 2 for bytes
Serhiy Storchaka added the comment: LGTM. -- nosy: +serhiy.storchaka versions: +Python 3.2, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17346 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16851] Hint about correct ismethod and isfunction usage
Thomas Kluyver added the comment: I agree that the docs for inspect.ismethod() for Python 2 are wrong. The docs say: Return true if the object is a bound method written in Python. However, it also returns True for an unbound method: class A: ... def meth(self): ... pass ... A.meth unbound method A.meth import inspect inspect.ismethod(A.meth) True -- nosy: +takluyver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16851 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17094] sys._current_frames() reports too many/wrong stack frames
Stefan Ring added the comment: When I originally worked on this, I noticed that _PyThread_CurrentFrames also iterates over all interpreters. Because I have no experience with or use for multiple interpreters, I intentionally left it out of my patch, but shouldn't it be taken into account for a real patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1124861] subprocess fails on GetStdHandle in interactive GUI
Tomgu added the comment: Here I get one problem need help. In python 2.7.5 version I write a script test.py as below ### import subprocess fileID=file('test1.log','w') process_response = subprocess.call('netsh wlan show\ interface',stdout=fileID,shell=True) fileID.flush() fileID.close() ### It run in windows7 os MSDOS console is OK and I try to run it in STAF command C:\ STAF local PROCESS START COMMAND python C:\test.py WAIT STDERRTOSTDOUT RETURNSTDOUT Response { Return Code: 1 Key: None Files : [ { Return Code: 0 Data : Traceback (most recent call last): File C:\test.py, line 3, in module process_response = subprocess.call('netsh wlan show interface',stdout=fileID ,shell=True) File C:\Python27\lib\subprocess.py, line 493, in call return Popen(*popenargs, **kwargs).wait() File C:\Python27\lib\subprocess.py, line 672, in __init__ errread, errwrite) = self._get_handles(stdin, stdout, stderr) File C:\Python27\lib\subprocess.py, line 784, in _get_handles p2cread = self._make_inheritable(p2cread) File C:\Python27\lib\subprocess.py, line 823, in _make_inheritable _subprocess.DUPLICATE_SAME_ACCESS) WindowsError: [Error 6] The handle is invalid } ] I just start to learn python, I dont know how to resolve, need help. -- nosy: +gwtking type: - compile error versions: +Python 2.7 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1124861 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1124861] subprocess fails on GetStdHandle in interactive GUI
Tomgu added the comment: Update, the python version is '2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1124861 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16382] Better warnings exception for bad category
Phil Elson added the comment: Ok. I think I've done all of the actions from the reviews. I'm not sure if I should remove the old patches or not? Thanks, -- Added file: http://bugs.python.org/file29304/pelson_warnings_fix_4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17350] Use STAF call python script will case 1124861 issue in 2.7.2 version
New submission from Tomgu: Here I get one problem use STAF call python and need help. In python 2.7.2 version I write a script test.py as below ### import subprocess fileID=file('test1.log','w') process_response = subprocess.call('netsh wlan show\ interface',stdout=fileID,shell=True) fileID.flush() fileID.close() ### It run in windows7 os MSDOS console is OK and I try to run it in STAF command C:\ STAF local PROCESS START COMMAND python C:\test.py WAIT STDERRTOSTDOUT RETURNSTDOUT Response { Return Code: 1 Key: None Files : [ { Return Code: 0 Data : Traceback (most recent call last): File C:\test.py, line 3, in module process_response = subprocess.call('netsh wlan show interface',stdout=fileID ,shell=True) File C:\Python27\lib\subprocess.py, line 493, in call return Popen(*popenargs, **kwargs).wait() File C:\Python27\lib\subprocess.py, line 672, in __init__ errread, errwrite) = self._get_handles(stdin, stdout, stderr) File C:\Python27\lib\subprocess.py, line 784, in _get_handles p2cread = self._make_inheritable(p2cread) File C:\Python27\lib\subprocess.py, line 823, in _make_inheritable _subprocess.DUPLICATE_SAME_ACCESS) WindowsError: [Error 6] The handle is invalid } ] Like known issue 1124861. I just start to learn python, I dont know how to resolve, need help. -- messages: 183444 nosy: gwtking priority: normal severity: normal status: open title: Use STAF call python script will case 1124861 issue in 2.7.2 version type: crash versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17350 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17094] sys._current_frames() reports too many/wrong stack frames
Stefan Ring added the comment: (Regarding your test) I have also noticed in the past that joining threads after a fork has caused hangs occasionally, although that might have resulted from the messed up _current_frames. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15866] encode(..., 'xmlcharrefreplace') produces entities for surrogate pairs
Serhiy Storchaka added the comment: I prefer a little different (simpler for me) form: for (p = collstart; p collend;) { Py_UCS4 ch = *p++; if ((0xD800 = ch ch = 0xDBFF) (p collend) (0xDC00 = *p *p = 0xDFFF)) { ch = ch 0x03FF) 10) | ((Py_UCS4)*p++ 0x03FF)) + 0x1); } str += sprintf(str, #%d;, (int)ch); } And please look at the loop above (determine replacement size). It should be corrected too. It will be simpler to use a buffer with static size (``char buffer[2+29+1+1];``) as in charmap encoder. Perhaps charmap encoder should be fixed too (and common code extracted to separate function). I doubt about '\ud83d\udc9d' on wide build. Is it right to encode it as b'#128157;' and not as b'#55357;#56477;'? This will be compatible with narrow build but will break compatibility with 3.3+. What is less evil? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15866 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11787] File handle leak in TarFile lib
Serhiy Storchaka added the comment: Actually it was fixed in issue16477. ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11787 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17346] Pickle tests do not test protocols 0, 1, and 2 for bytes
Roundup Robot added the comment: New changeset a982feb29584 by Ezio Melotti in branch '3.2': #17346: make sure pickle tests are run against all protocols. Initial patch by Marius Gedminas. http://hg.python.org/cpython/rev/a982feb29584 New changeset 796de4f7df07 by Ezio Melotti in branch '3.3': #17346: merge with 3.2. http://hg.python.org/cpython/rev/796de4f7df07 New changeset 5c8a5cfe25b0 by Ezio Melotti in branch 'default': #17346: merge with 3.3. http://hg.python.org/cpython/rev/5c8a5cfe25b0 New changeset 654136546895 by Ezio Melotti in branch '2.7': #17346: make sure pickle tests are run against all protocols. http://hg.python.org/cpython/rev/654136546895 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17346 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17346] Pickle tests do not test protocols 0, 1, and 2 for bytes
Ezio Melotti added the comment: Fixed, thanks for the report and the patch! -- assignee: - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17346 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16997] subtests
Nick Coghlan added the comment: I think I have figured out what bothers me about the expectedfailure changes, and they actually relate to how expectedfailure was implemented in the first place: I had previously assumed that decorator was an *annotating* decorator - that it set an attribute on the function to indicate it was expected to fail, and the test execution machinery then took that into account when deciding how to interpret the test result. The fact that it is instead a *wrapping* decorator is what made the addition of subtest support far more complicated than I expected. However, I'm wondering if it might still be possible to avoid the need for a thread local context to handle the combination of expected failures and subtests when we have access to the test caseby adding the annotation that I expected to be there in the first place. Can't we: 1. Update the expectedfailure decorator to also set _expecting_failure = True on the wrapped test case function 2. Update unittest.TestCase.__init__ to do: self._expecting_failure = hasattr(testMethod, '__func__') and getattr(testMethod.__func__, '_expecting_failure', False) 3. Update unittest._SubTest.__init__ to do: self._expecting_failure = test_case._expecting_failure 4. Update testPartExecutor to check if test_case._expecting_failure: instead of the current check of the thread local context -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16997 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)
R. David Murray added the comment: A crazy idea that occurred to me was to create an rfc822-style-header management module, and share it between email, http, and urllib. We'd probably break too many things backward-compatibility wise if we did that, but I still think it is an interesting thought :) On the other hand, having thought about this particular issue some more: in the email package we have the constraint of needing to be able to exactly reproduce the input data, whereas in the http world that constraint does not apply. So in the http world, given that headers are *already* being transformed by the code in question (title casing), it seems reasonable that blank stripping also be done, even just from an API standpoint. Really I guess the only question is how likely this is to break existing code. I'm pretty sure it is small enough that doing this in 3.4 would be fine, but I don't know how to estimate if it is small enough to also change it in maintenance releases. Since this particular bit is a new standard, maybe we just go with 3.4? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17322 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16997] subtests
Michael Foord added the comment: Getting rid of the thread local would be an improvement, and the change to how expected failures is done sounds good too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16997 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13598] string.Formatter doesn't support empty curly braces {}
Vinay Sajip added the comment: I believe the case is covered by the block: [snip] Ah, right. I wasn't sure that was the exact same code path that was being exercised. But I didn't look very closely. If you think it is worthwhile? Only if it exercises a different code path. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16997] subtests
Antoine Pitrou added the comment: However, I'm wondering if it might still be possible to avoid the need for a thread local context to handle the combination of expected failures and subtests when we have access to the test caseby adding the annotation that I expected to be there in the first place. But that would break use cases where you use @expectedFailure on a function called by the test method, not directly on the test method itself. I don't really care about those use cases myself, but not breaking them is the reason I chose not to change the @expectedFailure implementation. I'll let Michael decide :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16997 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10590] Parameter type error for xml.sax.parseString(string, ...)
Serhiy Storchaka added the comment: Low-level part already extracted to issue17089 and committed. Issue16986 has a similar patch for cElementTree. The main part of path was moved to issue2175 which is now pre-requisite for issue16986 and for this issue. It contains additional tests and additional fixes. It is hard and little sense to split them on separated patches. Let's move the discussion to issue2175. And then the patch for this issue will be small and simple, only several lines and one test. At least this issue is less important and actually can be considered as a new feature. -- stage: patch review - needs patch type: behavior - enhancement versions: -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10590] Parameter type error for xml.sax.parseString(string, ...)
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28757/sax_parse.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8
Serhiy Storchaka added the comment: Eli, this issue no longer has open pre-requisites. Issue10590 was replaced by issue17089 which closed now. Issue17089 fixed Python interface to expat parser, but cElementTree uses C interface of expat directly and the proposed pathes fix it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10590] Parameter type error for xml.sax.parseString(string, ...)
Eli Bendersky added the comment: Serhiy, OK - I'll look at #2175 first. But yes, Christian is right, let's wait for the security issues to be resolved first. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10967] move regrtest over to using more unittest infrastructure
Changes by Zachary Ware zachary.w...@gmail.com: -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10967 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17351] Fixed python3 descriptor documentation example + removal of explicit object inheritance in docs
New submission from Phil Elson: The example at http://docs.python.org/3.4/howto/descriptor.html#properties does not run due to the old style raise AttributeError, message form. This patch fixes the problem, and also goes through the docs to remove explicit sub-classing from object. The only remaining instances of this now are: $ grep -r -E class .*\(object\)\: Doc/* Doc/howto/pyporting.rst: class UnicodeMixin(object): Doc/reference/compound_stmts.rst: class Foo(object): Doc/tools/sphinxext/pyspecific.py:class PyDecoratorMixin(object): Doc/whatsnew/2.6.rst:class C(object): Doc/whatsnew/2.2.rst: class C(object): Doc/whatsnew/2.2.rst: class C(object): Doc/whatsnew/2.2.rst: class C(object): Doc/whatsnew/2.2.rst: class C(object): Doc/whatsnew/2.2.rst:class C(object): Which are all (minus tools/sphinxext/pyspecific) referring to python2 in some context. I'm not bound to fixing the explicit object subclassing, so if it is better off not being here, that's fine. Cheers, -- assignee: docs@python components: Documentation files: pelson_doc_decorator.diff keywords: patch messages: 183458 nosy: docs@python, pelson, rhettinger priority: normal severity: normal status: open title: Fixed python3 descriptor documentation example + removal of explicit object inheritance in docs versions: Python 3.1 Added file: http://bugs.python.org/file29305/pelson_doc_decorator.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17351 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8273] move generally useful test.support functions into the unittest package
Changes by Zachary Ware zachary.w...@gmail.com: -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)
karl added the comment: R. David.: A crazy idea that occurred to me was to create an rfc822-style-header management module, and share it between email, http, and urllib. Yes it is basically what I had in mind when I said: Maybe the way forward in the future is to have a header factory shared by all HTTP libs? I'm not sure if it's easy to share in between emails and HTTP. Emails are now defined by RFC5322: https://tools.ietf.org/html/rfc5322#section-2.2 2.2. Header Fields Header fields are lines beginning with a field name, followed by a colon (:), followed by a field body, and terminated by CRLF. A field name MUST be composed of printable US-ASCII characters (i.e., characters that have values between 33 and 126, inclusive), except colon. A field body may be composed of printable US-ASCII characters as well as the space (SP, ASCII value 32) and horizontal tab (HTAB, ASCII value 9) characters (together known as the white space characters, WSP). A field body MUST NOT include CR and LF except when used in folding and unfolding, as described in section 2.2.3. All field bodies MUST conform to the syntax described in sections 3 and 4 of this specification. Maybe it's doable and worth exploring but I have the feeling we would end up with something along field-name : field-value and all the rules for field-name and field-value being different for HTTP and email, because they really are. Folding, set of characters, etc. :) Another thing which should be also the opportunity for opening another issue. HTTP headers and python dictionaries is not a very good match. :) But this is drifting off-topic. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17322 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17328] Fix reference leak in dict_setdefault() in case of resize failure
Roundup Robot added the comment: New changeset 1a589001d752 by Benjamin Peterson in branch '3.3': fix possible setdefault refleak (closes #17328) http://hg.python.org/cpython/rev/1a589001d752 New changeset fac46cf6af3f by Benjamin Peterson in branch 'default': merge 3.3 (#17328) http://hg.python.org/cpython/rev/fac46cf6af3f -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17328 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16575] ctypes: unions as arguments
Eli Bendersky added the comment: A minimal fix would be to update the documentation. A more comprehensive fix would be to tweak ctypes to reject unions and bit-fields when running on non-x86 (does this work for ARM and other non-Intel archs?) An even more comprehensive fix would be to make this work, but that would require forking libffi and should presumably be first implemented upstream. -- assignee: - docs@python components: +Documentation nosy: +docs@python, eli.bendersky stage: - needs patch versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16004] Add `make touch` to 2.7 Makefile
Ezio Melotti added the comment: Nick, is the attached patch ok? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16004 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17352] Be clear that __prepare__ must be declared as a static method
New submission from Nick Coghlan: The docs on __prepare__ don't make it clear that it should be a staticmethod, and the error message if you forget is not obvious at all. (This is particularly so, since the examples in PEP 3115 had it as an ordinary method). -- messages: 183463 nosy: ncoghlan priority: normal severity: normal status: open title: Be clear that __prepare__ must be declared as a static method ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17352 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16575] ctypes: unions as arguments
Armin Rigo added the comment: See also http://bugs.python.org/issue16576. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17341] Poor error message when compiling invalid regex
Serhiy Storchaka added the comment: See also issue14462. It will be easier to include a full group name than an invalid character. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17341 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17352] Be clear that __prepare__ must be declared as a class method
Nick Coghlan added the comment: Class method, not static method (super() breaks if you declare it as a static method) -- title: Be clear that __prepare__ must be declared as a static method - Be clear that __prepare__ must be declared as a class method ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17352 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)
R. David Murray added the comment: Aren't the folding rules are the same? The character set rules are different, I think, but the email package is going to be flexible in that regard. The email package also uses a data structure that is not a python dictionary (it is actually a list with an extra dict-like interface), and its features may well be useful for handling http headers. But you are right, we are wandering off topic :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17322 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16997] subtests
Michael Foord added the comment: That's a use case that I'm not very *interested* in supporting personally - however it may well be a use case that was designed in and that others have a need for (I didn't implement expectedFailure support). I think expectedFailure should be used sparingly and for a utility function to be *able* to turn a failure into a expectedFailure sounds actively dangerous. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16997 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16997] subtests
Nick Coghlan added the comment: The docs are fairly explicit about the intended use case: Mark the test as an expected failure. If the test fails when run, the test is not counted as a failure. (from http://docs.python.org/3/library/unittest#unittest.expectedFailure) Nothing there about being able to call some other function and have doing so incidentally mark your test as an expected failure (which I actually consider highly *un*desirable behaviour) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16997 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16997] subtests
Michael Foord added the comment: So, if it's not documented behaviour I think it's fine to lose it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16997 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12921] http.server.BaseHTTPRequestHandler.send_error and trailing newline
karl added the comment: orsenthil, I made a proper patch for it with hg diff. It is very short. See issue-12921-2.patch -- Added file: http://bugs.python.org/file29306/issue-12921-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12921 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17343] Add a version of str.split which returns an iterator
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17338] Add length_hint parameter to list, dict, set constructors to allow efficient presizing
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17338 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12921] http.server.BaseHTTPRequestHandler.send_error and trailing newline
Senthil Kumaran added the comment: Karl, Ack. The patch looks good. I shall go about with testing + committing this.. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12921 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17338] Add length_hint parameter to list, dict, set constructors to allow efficient presizing
Serhiy Storchaka added the comment: This unlikely will be useful. C code uses __length_hint__ because C code is fast enough and fill time can be comparable to resize time. But Python code will be one or two order slower and resize time is insignificant fraction of total time for any real code. You can implement your proposition and do the tests, and I doubt that they will show impressive results. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17338 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16997] subtests
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16997 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13477] tarfile module should have a command line
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13477 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17339] bytes() TypeError message is misleadingly narrow
Ezio Melotti added the comment: 'object' object cannot be converted to bytes This is not entirely accurate for the bytes(int) case though, since it's not converting the int to bytes. OTOH if we want to keep the message short we have to make compromises about accuracy and completeness. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17339 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12921] http.server.BaseHTTPRequestHandler.send_error and trailing newline
karl added the comment: orsenthil, When you have done a patch for testing I would love to see it. I could not find a proper way of doing it. I'm eager to learn. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12921 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14123] Indicate that there are no current plans to deprecate printf-style formatting
Ezio Melotti added the comment: The only issue seems about the use of the word deprecate, but I think it's fine, so I'll close this issue. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14123 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16278] os.rename documentation slightly inaccurate
Ezio Melotti added the comment: Adding more tests is good, even though there are still a few things that should be improved (see comments on rietveld). Regarding the documentation I'm not sure it's a good idea to be so detailed. On one hand, if we test the behavior we can make sure that the documentation is accurate, OTOH it might make the docs more confusing and once this behavior is documented it will be difficult to change it (and there might still be exceptions on different platforms/filesystems or if symlinks are involved). Maybe it would be better to suggest a LBYL approach rather trying to document and deal with all the different combinations. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16278 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17301] An in-place version of many bytearray methods is needed
Serhiy Storchaka added the comment: How *just and *strip can modify an argument in-place? All other methods except title (lower, swapcase, upper) are partial cases of translate. I.e. you need only in-place translate. However I doubt that difference will be more than several percents. Actually translate uses more tacts per byte than memcpy. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17332] typo in json docs - convered should be converted
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +easy stage: - needs patch versions: -Python 2.6, Python 3.1, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17332 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12768] docstrings for the threading module
moijes12 added the comment: Hi I am seen the review comments and made the changes accordingly. I am not sure if my changes apply to 3.2. How do I do that ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17344] checking size of size_t... configure: error:
Ezio Melotti added the comment: The SPARC Solaris buildbot with cc compilers run configure without problems, whereas the ones with gcc are broken because of gcc (and they don't even reach the configure step that checks for size_t). If we cannot confirm that there is a problem on a currently maintained version of Python I'm afraid I'll have to close this issue. -- nosy: +trent status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16851] Hint about correct ismethod and isfunction usage
Ezio Melotti added the comment: I checked the tests on 2.7 and found this: # contrary to spec, ismethod() is also True for unbound methods # (see #1785) self.assertIn(('f', B.f), inspect.getmembers(B, inspect.ismethod)) #1785 also has some discussion about this. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16851 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15866] encode(..., 'xmlcharrefreplace') produces entities for surrogate pairs
Ezio Melotti added the comment: I doubt about '\ud83d\udc9d' on wide build. Is it right to encode it as b'#128157;' and not as b'#55357;#56477;'? I don't think so. IIRC surrogates are invalid in UTF-32, and certainly shouldn't be recombined. This will be compatible with narrow build but will break compatibility with 3.3+. What is less evil? I think it's better to be compatible with 3.3+. This is anyway a rather obscure corner case. Do you want to propose a new patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15866 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11787] File handle leak in TarFile lib
Ezio Melotti added the comment: Closing as duplicate then. -- resolution: - duplicate stage: test needed - committed/rejected status: open - closed superseder: - tarfile fails to close file handles in case of exception ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11787 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12768] docstrings for the threading module
Ezio Melotti added the comment: 3.2$ hg imp --no-c http://bugs.python.org/file29268/12768_2.patch applying http://bugs.python.org/file29268/12768_2.patch patching file Lib/threading.py Hunk #3 FAILED at 58 Hunk #4 FAILED at 79 Hunk #5 FAILED at 92 Hunk #6 FAILED at 125 Hunk #10 FAILED at 252 Hunk #12 succeeded at 386 with fuzz 1 (offset 82 lines). Hunk #13 FAILED at 317 Hunk #17 FAILED at 405 Hunk #22 FAILED at 576 Hunk #23 FAILED at 589 Hunk #30 FAILED at 897 Hunk #33 succeeded at 1124 with fuzz 2 (offset 132 lines). 10 out of 35 hunks FAILED -- saving rejects to file Lib/threading.py.rej abort: patch failed to apply I am not sure if my changes apply to 3.2. How do I do that ? You have to switch to the 3.2 branch using hg up 3.2, and then use hg import as showed above to apply the patch. You will also need to run configure/make again to build 3.2, so you can run tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12768] docstrings for the threading module
Ezio Melotti added the comment: FWIW it applies cleanly on 3.3, but unless we decide to target 3.3+ only, the patch needs to be adapted for 2.7/3.2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17343] Add a version of str.split which returns an iterator
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17330] Stop checking for directory cache invalidation in importlib
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17330 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17025] reduce multiprocessing.Queue contention
Charles-François Natali added the comment: So, what do you think? Is the simple version offloading the serialization to queue enough, or should we go for a full-blown atomic Connection/Pipe/etc? I find the performance gain quite appreciable (basically queue didn't scale at all, now it scales with the number of cores). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17025 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17025] reduce multiprocessing.Queue contention
Antoine Pitrou added the comment: IMHO the simple version is good enough. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17025 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17278] SIGSEGV in _heapqmodule.c
Roundup Robot added the comment: New changeset 21ded74b51fa by Antoine Pitrou in branch '2.7': Issue #17278: Fix a crash in heapq.heappush() and heapq.heappop() when the list is being resized concurrently. http://hg.python.org/cpython/rev/21ded74b51fa -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17278 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14266] pyunit script as shorthand for python -m unittest
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14266 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14266] pyunit script as shorthand for python -m unittest
Barry A. Warsaw added the comment: As I mentioned on python-dev, having a `pyunit` script is nice (whatever it's called), but we need to keep the `-m invocation` which will probably be the recommendation on distros such as Debian which provide multiple versions of Python. We're not going to want to install all possible flavors of `pyunit2.6`, `pyunit2.7`, `punit2.6-dbg`, `pyunit-3.2-dbg`, etc. etc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14266 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17278] SIGSEGV in _heapqmodule.c
Roundup Robot added the comment: New changeset 905b02749c26 by Antoine Pitrou in branch '3.2': Issue #17278: Fix a crash in heapq.heappush() and heapq.heappop() when the list is being resized concurrently. http://hg.python.org/cpython/rev/905b02749c26 New changeset 451299b97b4f by Antoine Pitrou in branch '3.3': Issue #17278: Fix a crash in heapq.heappush() and heapq.heappop() when the list is being resized concurrently. http://hg.python.org/cpython/rev/451299b97b4f New changeset d57c60db94e7 by Antoine Pitrou in branch 'default': Issue #17278: Fix a crash in heapq.heappush() and heapq.heappop() when the list is being resized concurrently. http://hg.python.org/cpython/rev/d57c60db94e7 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17278 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14266] pyunit script as shorthand for python -m unittest
Antoine Pitrou added the comment: We're not going to want to install all possible flavors of `pyunit2.6`, `pyunit2.7`, `punit2.6-dbg`, `pyunit-3.2-dbg`, etc. etc. Why not? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14266 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17278] SIGSEGV in _heapqmodule.c
Antoine Pitrou added the comment: Ok, committed, thank you! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17278 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17025] reduce multiprocessing.Queue contention
Richard Oudkerk added the comment: It looks like queues_contention.diff has the line obj = pickle.dumps(obj) in both _feed() and put(). Might that be why the third set of benchmarks was slower than the second? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17025 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14266] pyunit script as shorthand for python -m unittest
Barry A. Warsaw added the comment: On Mar 04, 2013, at 07:45 PM, Antoine Pitrou wrote: Antoine Pitrou added the comment: We're not going to want to install all possible flavors of `pyunit2.6`, `pyunit2.7`, `punit2.6-dbg`, `pyunit-3.2-dbg`, etc. etc. Why not? We don't know at package build time which versions will be necessary or possible, since that depends on the user's system on which the package will be installed. So we can't add those files to the package manifest. They could be installed dynamically by a maintainer script (that gets triggered at package installation time) but that's less than ideal because then we'll need to also add machinery to properly track deletions so that when they're dependencies get removed we can remove the scripts too. This is something that's very much frowned upon in Debian, especially for /usr/bin scripts. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14266 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17025] reduce multiprocessing.Queue contention
Charles-François Natali added the comment: It looks like queues_contention.diff has the line obj = pickle.dumps(obj) in both _feed() and put(). Might that be why the third set of benchmarks was slower than the second? _feed() is a Queue method, put() its SimpleQueue() counterpart. Am I missing something? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17025 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17353] Plistlib outputs empty data tags when deeply nested
New submission from Jacques Fortier: To reproduce: import plistlib print plistlib.writePlistToString([{'test': plistlib.Data('aa')}]) Compare to: print plistlib.writePlistToString({'test': Data('aa')}) It looks like the max line length calculation in the Data class is causing the output to be empty once you get nested far enough. -- components: Library (Lib) messages: 183496 nosy: jfortier priority: normal severity: normal status: open title: Plistlib outputs empty data tags when deeply nested versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17353 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17353] Plistlib outputs empty data tags when deeply nested
Jacques Fortier added the comment: My second print should have been: print plistlib.writePlistToString({'test': plistlib.Data('aa')}) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17353 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14266] pyunit script as shorthand for python -m unittest
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14266 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17343] Add a version of str.split which returns an iterator
Gregory P. Smith added the comment: Indeed, a bytearray version would require the talked about but not implemented due to complexity (in pep3118) support for locking a buffer from other mutations. best concentrate on bytes then. Do we have a memoryview equivalent for PyUnicode? If not, we should... (a separate enhancement request) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17066] Fix test discovery for test_robotparser.py
Zachary Ware added the comment: I got to looking over my patch here again, and thought of another possible fix. I'm not sure which is uglier, though :) The problem is that most of the test cases are created using a custom subclass of unittest.TestCase which takes extra constructor arguments. Discovery doesn't expect a TestCase subclass to want extra arguments, so it fails noisily trying to 'discover' RobotTestCase. Patch version 2 just makes a couple small adjustments to version 1, which replaces the custom subclass with a base class to provide runTest, and a factory function to create the TestCase instances. Version 3 is a different approach, which provides default arguments to the extra constructor parameters, and bails out of __init__ early if the index argument is not an int (checking for None doesn't work because at some point, discovery calls 'RobotTestCase(runTest)', which makes 'index' runTest). Both approaches look kind of ugly to me, but both get the job done. -- Added file: http://bugs.python.org/file29307/test_robotparser_discovery.v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17066 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17066] Fix test discovery for test_robotparser.py
Changes by Zachary Ware zachary.w...@gmail.com: Added file: http://bugs.python.org/file29308/test_robotparser_discovery.v3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17066 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17025] reduce multiprocessing.Queue contention
Richard Oudkerk added the comment: On 04/03/2013 8:01pm, Charles-François Natali wrote: It looks like queues_contention.diff has the line obj = pickle.dumps(obj) in both _feed() and put(). Might that be why the third set of benchmarks was slower than the second? _feed() is a Queue method, put() its SimpleQueue() counterpart. Am I missing something? No. I only looked at the diff and assumed both changes were for Queue. Since you marked issue 10886 as superceded, do you intend to do the pickling in put()? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17025 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17343] Add a version of str.split which returns an iterator
Brett Cannon added the comment: There is no string view that I know of. Interesting idea, though, thanks to the immutability of strings. Would much have to be different other than boundary checking and __hash__ (and hoping extension authors are changing things in-place)? I say go ahead and open the issue for the idea. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17301] An in-place version of many bytearray methods is needed
Terry J. Reedy added the comment: Gregory, if an in-place version of .translate is all you want, only ask for that. Change the title and let us focus on the best case. Forget what others *might* want. Serhiy, what is 'tacts per byte'? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11732] Skip decorator for tests requiring manual intervention on Windows
Ezio Melotti added the comment: Attached an updated patch: - renamed the context manager from no_crash_popups to suppress_crash_popup, as suggested by Brian (I also made it singular, because there shouldn't be more than one crash/popup per call); - used the context manager on all the crashing tests (test_capi and test_faulthandler); - added documentation; I tested it on Windows 7 and Linux (where it's a no-op), and according to MSDN it should work even on Windows XP. If there aren't other comments I'll commit this soon. If test_capi is also crashing on 2.7/3.2, I will probably backport it there too. -- Added file: http://bugs.python.org/file29309/nopopup2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16848] Mac OS X: python-config --ldflags and location of Python.framework
Roundup Robot added the comment: New changeset bab708624dc4 by Ned Deily in branch '2.7': Issue #16848: python-config now returns proper --ldflags values for OS X http://hg.python.org/cpython/rev/bab708624dc4 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16848 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17301] An in-place version of many bytearray methods is needed
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16848] Mac OS X: python-config --ldflags and location of Python.framework
Ned Deily added the comment: Other than the tabs, the patch LGTM. I originally noticed the problem when addressing Issue14197, a Python 3 only issue, and fixed it there. But I did not go back and check that the python-config part was also an issue for 2.7. Now committed for release in 2.7.4. -- resolution: - fixed stage: needs patch - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16848 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16848] Mac OS X: python-config --ldflags and location of Python.framework
Changes by Ned Deily n...@acm.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16848 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3290] python-config --cflags includes irrelevant flags
Matthias Braun added the comment: I hacked up a proof-of-concept patch which filters out the most annoying flags (warnings, -Ox and -DNDEBUG flags). (Though IMO the only really robust solution would be not having code but just declarations in the public headers, so --includes is enough. In my personal project I ended up to just use --includes and manually make sure that I don't use any of the code in the headers, but just the declarations). -- keywords: +patch nosy: +Matthias.Braun Added file: http://bugs.python.org/file29310/python-config-filter-cflags.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3290 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com