[issue7330] PyUnicode_FromFormat segfault
Ray.Allen ysj@gmail.com added the comment: You can write %20s as a argument for PyUnicode_FromFormat(), but it has no effect. The width and precision modifiers are not intended to apply to string formating(%s, %S, %R, %A), only apply to integer(%d, %u, %i, %x). Though you can write %20s, but you cannot write %20S, %20R and %20A. There can be several fixes: 1. make the presence of width and precision modifiers of %s, %S, %R, %A raise an Exception, like ValueError, instead of segment fault. 2. make the presence of width and precision modifiers of %s, %S, %R, %A have no effect, just like current %s. 3. make the presence of width and precision modifiers of %s, %S, %R, %A do have correct effect, like %r and %s in string formatting in python code. Thanks to Eric's ideas. Now I'm sure I prefer the last fix. I will work out a patch for this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8603] Create a bytes version of os.environ and getenvb()
Marc-Andre Lemburg m...@egenix.com added the comment: Ezio Melotti wrote: Ezio Melotti ezio.melo...@gmail.com added the comment: A quick search[0] also shows that environ.data is used by several projects. Changing it from str to bytes will most likely break these programs, so I'm not sure it's a good idea. Also, if I understand correctly, on Windows os.environ.data still contains str, so it's inconsistent with other systems. IMHO os.environ.data should contain str, whereas os.environb.data bytes. If they must share the same data I would prefer them to be both str. [0]: http://www.google.com/codesearch?q=lang%3Apython+environ.datahl=en Direct use of os.environ.data is not permitted as it is not a documented feature, so I wouldn't worry about this. The few uses you found are easy to fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9405] crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage
Ronald Oussoren ronaldousso...@mac.com added the comment: Interestingly enough I don't get the crash in a copy of 2.7, but do get the crash in a copy of 2.6. The former was build on 10.6, the later on 10.5. Both 3.1 and 3.2 crash reliably for me (after porting the script to py3k) /usr/bin/python doesn't crash, but that's because it doesn't get proxy information from the system. -- versions: +Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9411] configparser doesn't support specifying encoding in read()
New submission from Łukasz Langa luk...@langa.pl: By default, configparser classes simply `open()` and `read()` files specified in the list passed to `.read()`. This means these calls use the default platform-specific encoding and this is prone to breakage. An existing solution is to use `readfp()` and pass files one by one to it, handling opening them with a specific encoding manually. This is needlessly complex as it increases the amount of boilerplate needed. Please find attached a patch where I've added an `encoding=` argument to the `read()` method. By default it chooses `sys.getdefaultencoding()` so the behaviour is backwards compatible. We might consider switching that to 'UTF-8' but there are many INI files from the Windows land encoded in Windows specific codepages. Anyway, the currently proposed implementation is compatible and enables specifying an `encoding` explicitly. The patch includes a new unit test and some minor fixes for behaviour exposed by this test. -- files: cfgparser.3 messages: 111899 nosy: brian.curtin, ezio.melotti, georg.brandl, lukasz.langa, michael.foord priority: normal severity: normal status: open title: configparser doesn't support specifying encoding in read() Added file: http://bugs.python.org/file18247/cfgparser.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9411 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9411] configparser doesn't support specifying encoding in read()
Łukasz Langa luk...@langa.pl added the comment: Patch included. -- components: +Library (Lib) keywords: +patch type: - feature request versions: +Python 3.2 Added file: http://bugs.python.org/file18248/issue9411.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9411 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9412] test_smtpd leaks references
New submission from Antoine Pitrou pit...@free.fr: See http://mail.python.org/pipermail/python-checkins/2010-July/095648.html test_smtpd leaked [25, 25, 25] references, sum=75 -- assignee: richard components: Library (Lib) messages: 111901 nosy: giampaolo.rodola, pitrou, richard priority: high severity: normal status: open title: test_smtpd leaks references type: resource usage versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9412 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9172] zipfile.extractall always raises an OSError after successfully unzipping all files
Teemu Rytkönen teemu.rytko...@gmail.com added the comment: Hi! I haven't tested this in linux or with python 2.7 so can't say for sure.. However I would assume that the main issue is with the zipdate it self (So does it have those empty directories, which at least winzip creates) and then about how does the os.mkdir act with when trying to create already existing folder. Did you try it with the example_1.zip, which has those folders described in the zip centralrecord?? Should I also try it out with linux? -Teemu -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9172 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9411] configparser doesn't support specifying encoding in read()
Michael Foord mich...@voidspace.org.uk added the comment: Seems good to me (the feature - and also the patch after a cursory read through). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9411 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9410] Add Unladden Swallow's optimizations to Python 3's pickle.
Antoine Pitrou pit...@free.fr added the comment: Le jeudi 29 juillet 2010 à 06:26 +, Alexandre Vassalotti a écrit : New submission from Alexandre Vassalotti alexan...@peadrop.com: This is a big patch. Please review at http://codereview.appspot.com/1694050/show This patch adds the most interesting optimizations from Unladen Swallow to Python 3's pickle. The core of the patch already been reviewed by Antoine and me (http://codereview.appspot.com/33070/show). One of the last issue remaining the unbounded size of the internal buffer. This shouldn't be a big issue for most uses of pickle, since the size of a pickle is often several times smaller than the object hierarchy that created it. I still hope to fix this in a following patch. I still think this should be fixed in this patch, especially since it will also change benchmark numbers. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9410 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9405] crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage
Ronald Oussoren ronaldousso...@mac.com added the comment: http://developer.apple.com/mac/library/technotes/tn2005/tn2083.html#SECDAEMONVSFRAMEWORKS explains the issue that Ned mentions, I'm not sure yet if this crash is related to that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9172] zipfile.extractall always raises an OSError after successfully unzipping all files
Ray.Allen ysj@gmail.com added the comment: I found that this issue is duplicate with issue6050. And the bug has been fixed since 2.6.3. So this issue should be closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9172 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9411] configparser doesn't support specifying encoding in read()
Eric Smith e...@trueblade.com added the comment: The feature request seems reasonable to me, too. I don't recall if sys.getdefaultencoding() can change while a program is running. If so, you might want to change: def read(self, filenames, encoding=sys.getdefaultencoding()): to: def read(self, filenames, encoding=None): if encoding is None: encoding=sys.getdefaultencoding() Also, what if the files have different encodings? The patch seems to include 2 features: the encoding change and a comment parsing change. You should separate that into two patches. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9411 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9413] asyncore.close_all() should call x.handle_close() instead of x.close()
New submission from me myself me.mys...@mailinator.com: Title says it all. -- messages: 111908 nosy: me.myself priority: normal severity: normal status: open title: asyncore.close_all() should call x.handle_close() instead of x.close() type: behavior versions: Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9413 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9413] asyncore.close_all() should call x.handle_close() instead of x.close()
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +giampaolo.rodola versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9413 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9414] infinite loop with specific regexp
New submission from gnuthor ja...@internet24.de: The follow code hangs on vanilla compile python 2.7 on Ubuntu 10.04 x86_64 and all other versions of Python that I could find (i386/x86_64, 2.6.5/2.5.2/2.2): import re regex = re.compile(r'^((?:\.\d+)+|(?:\.?\w+(?:\-*\w+)+)+)\.(\d*?)$') match = regex.match('lldpLocChassisIdSubtype') infinite loop or possibly exponential time the regex is taken from file client.py of libsnmp-python ( version 5.4.2.1 ~dfsg0ubuntu1-0ubuntu2.1 in Ubuntu 10.04 ) libsnmp-python ( 5.4.1~dfsg-12 in Debian Lenny) contains a previous version of this regex which does not produce an infinite loop regex = re.compile(r'^((?:\.\d+)+|(?:\.?\w+(?:\-*\w+)+)+)\.?(.*)$') match = regex.match('lldpLocChassisIdSubtype') print match _sre.SRE_Match object at 0x7f5d2abebc68 Perl 5.10.1 can run both of the regular expressions without problems $ perl -e '$x=lldpLocChassisIdSubtype; print $1 if $x =~ m/^((?:\.\d+)+|(?:\.?\w+(?:\-*\w+)+)+)\.(\d*?)$/;' $ perl -e '$x=lldpLocChassisIdSubtype; print $1 if $x =~ m/^((?:\.\d+)+|(?:\.?\w+(?:\-*\w+)+)+)\.?(.*)$/;' lldpLocChassisIdSubtype I realise that these two regular expression might not particularly sensible and are certainly not equivalent semantically, but they are syntactically correct, as far as I can tell, and do not contain back references etc. and thus the matching process should be able to always terminate. -- components: Regular Expressions messages: 111909 nosy: gnuthor priority: normal severity: normal status: open title: infinite loop with specific regexp type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7198] Extraneous newlines with csv.writer on Windows
Skip Montanaro s...@pobox.com added the comment: If the documentation is not clear enough about requiring binary, it is a doc bug. The documentation for both csv.reader and csv.writer state (this is from the Python 2.7 version): If *csvfile* is a file object, it must be opened with the 'b' flag on platforms where that makes a difference. I suppose we could be explicit and mention Windows here, but the wording is quite clear. There is really no harm in always opening the file in binary mode, and I do that myself even though I only program on Unix or Mac platforms where it's safe to open the file in text mode. This all changed in Python 3. There, the choice of line ending is up to the programmer, so file objects for use by the csv module are opened with newline='' and when writing CSV data the writer object takes complete control of proper line termination according to the programmer's stated choice of lineterminator. Skip -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7198 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9415] SSL issues on Ubuntu i386 buildbots
New submission from Antoine Pitrou pit...@free.fr: The buildslaves i386 Ubuntu have been exhibiting some strange behaviour for some time now: == ERROR: test_protocol_sslv2 (test.test_ssl.ThreadedTests) Connecting to an SSLv2 server with various client options -- Traceback (most recent call last): File /scratch/pybot-buildarea/2.7.klose-ubuntu-i386/build/Lib/test/test_ssl.py, line 879, in test_protocol_sslv2 try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True) File /scratch/pybot-buildarea/2.7.klose-ubuntu-i386/build/Lib/test/test_ssl.py, line 751, in try_protocol_combo ciphers=ALL, chatty=False) File /scratch/pybot-buildarea/2.7.klose-ubuntu-i386/build/Lib/test/test_ssl.py, line 703, in server_params_test s.connect((HOST, server.port)) File /scratch/pybot-buildarea/2.7.klose-ubuntu-i386/build/Lib/ssl.py, line 295, in connect self.ca_certs, self.ciphers) SSLError: _ssl.c:312: Invalid SSL protocol variant specified. (http://www.python.org/dev/buildbot/builders/i386%20Ubuntu%202.7/builds/78/steps/test/logs/stdio) == ERROR: test_constructor (test.test_ssl.ContextTests) -- Traceback (most recent call last): File /scratch/pybot-buildarea/3.x.klose-ubuntu-i386/build/Lib/test/test_ssl.py, line 179, in test_constructor ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv2) File /scratch/pybot-buildarea/3.x.klose-ubuntu-i386/build/Lib/ssl.py, line 96, in __new__ return _SSLContext.__new__(cls, protocol) ssl.SSLError: failed to allocate SSL context (http://www.python.org/dev/buildbot/builders/i386%20Ubuntu%203.x/builds/1689/steps/test/logs/stdio) Matthias, can you give us more information about the system setup on these buildbots? It seems its OpenSSL library refuses to allocate any SSL context for the SSL v2 protocol. Is it some kind of patch added by the Ubuntu OpenSSL maintainers in order to disable SSLv2 entirely? -- components: Tests messages: 111911 nosy: doko, pitrou priority: normal severity: normal status: open title: SSL issues on Ubuntu i386 buildbots versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9415 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9412] test_smtpd leaks references
Richard Jones richardjo...@optushome.com.au added the comment: That's odd. I didn't run the refcount tests because I was only adding Python code. I'll look into compiling a debug build and running the tests locally with a view to tracking down the problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9412 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6538] MatchObject is not a hyperlink in the 're' module documentation
Georg Brandl ge...@python.org added the comment: Should be fixed now in r83218. I've removed the class directives, and put generic class name substitutes regex and pattern in the method descriptions, like we do for contextmanager.__enter__. I've also removed the compatibility info, and removed [] style arguments where feasible. -- assignee: brian.curtin - georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6538 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9412] test_smtpd leaks references
Antoine Pitrou pit...@free.fr added the comment: That's odd. I didn't run the refcount tests because I was only adding Python code. That's not odd. A reference leak can indicate that some objects hang in memory permanently rather than being cleaned up after the test run. Looking at the code you added, DummyServer.messages will slowly accumulate more and more Python objects as the tests get run several times. (it's not necessarily the only cause of the refleak, though) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9412 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly
Jesse Noller jnol...@gmail.com added the comment: (sorry, I thought I had replied to your comment when I hadn't!) I think we can get away with a new optional kwarg. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9205 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9411] configparser doesn't support specifying encoding in read()
Georg Brandl ge...@python.org added the comment: Applied in r83220. The **kwds change for some methods should be done separately. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9411 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9405] crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage
Ronald Oussoren ronaldousso...@mac.com added the comment: This seems to be a minimal program to reproduce the problem: import sys import os import platform platform.mac_ver() if sys.version_info[0] == 2: import urllib else: import urllib.request if os.fork() == 0: print (about to call getproxies !) if sys.version_info[0] == 2: print (urllib.getproxies()) else: print (urllib.request.getproxies()) print (getproxies has completed !) else: os.wait() The call to platform.mac_ver is essential, without that call the problem goed away. This explains why my 2.7 build doesn't crash: I've committed a patch at the EuroPython sprints that replaces the platform.mac_ver implementation by one that reads the OSX version from an XML file instead of calling low-level Apple APIs, and those lowlevel APIs somehow cause the breakage (see also issue #7895) This means that the problem should go away in the next release for all branches. mike: are you able to test if the problem goes away when you build python from source using a subversion checkout? Note that this doesn't mean that the underlying problem is gone, you'll probably still run into problems when the main program is a GUI program that using multiprocessing to start work in the background. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9392] 2.7 framework install doesn't create 2to3-2.7
Ronald Oussoren ronaldousso...@mac.com added the comment: Fixed in r83221 -- resolution: - fixed stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9392 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9412] test_smtpd leaks references
Georg Brandl ge...@python.org added the comment: The culprit was indeed DummyServer.messages. Fixed in r83222. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9412 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9414] infinite loop with specific regexp
Georg Brandl ge...@python.org added the comment: This is very probably a duplicate of #1662581. When testing both your regexes with the new engine from #2636, the match is not found/found instantaneously. -- nosy: +georg.brandl resolution: - duplicate status: open - closed superseder: - the re module can perform poorly: O(2**n) versus O(n**2) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
Georg Brandl ge...@python.org added the comment: Wishlist item: could you give the regex and match classes nicer names, so that they can be referenced as `regex.Pattern` (or `regex.Regex`) and `regex.Match`? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3874] documentation bug: HTMLParser needs to document unknown_decl
Georg Brandl ge...@python.org added the comment: Applied with some tweaks in r83223. Thanks Jeff and Terry! -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3874 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9416] complex formatting incorrectly omits a negative zero real part
New submission from Mark Dickinson dicki...@gmail.com: format(complex(-0.0, 2.0), '.10') # expected '(-0+2j)' '(+2j)' format(complex(-0.0, 2.0), '') # gives expected result '(-0+2j)' -- assignee: mark.dickinson messages: 111923 nosy: eric.smith, mark.dickinson priority: normal severity: normal stage: unit test needed status: open title: complex formatting incorrectly omits a negative zero real part type: behavior versions: Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3874] documentation bug: HTMLParser needs to document unknown_decl
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: needs patch - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3874 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9399] Provide a 'print' action for argparse
Georg Brandl ge...@python.org added the comment: Sounds like a good addition to me. -- assignee: - bethard nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9399 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue965065] document docs.python.org in PEP-101
Georg Brandl ge...@python.org added the comment: Yes, the current wording in the PEP should be sufficient. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue965065 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9416] complex formatting incorrectly omits a negative zero real part
Changes by Mark Dickinson dicki...@gmail.com: -- components: +Interpreter Core ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3964] quiet the freeze makefile
Georg Brandl ge...@python.org added the comment: Isn't the usual way to use make -s if you don't want echoed commands? -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3964 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5945] PyMapping_Check returns 1 for lists
Changes by Georg Brandl ge...@python.org: -- assignee: georg.brandl - priority: high - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5945 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8077] cgi handling of POSTed files is broken
Changes by Georg Brandl ge...@python.org: -- assignee: georg.brandl - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9172] zipfile.extractall always raises an OSError after successfully unzipping all files
Mark Lawrence breamore...@yahoo.co.uk added the comment: Closed as duplicate of issue6050. -- nosy: +BreamoreBoy resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9172 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3964] quiet the freeze makefile
Christian Höltje docw...@gerf.org added the comment: Isn't 'make -s' a GNU make-ism? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3964 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue745002] in attrs in sgmllib not handled
Georg Brandl ge...@python.org added the comment: Setting #1504333 which has a patch as superseder. -- nosy: +georg.brandl resolution: - duplicate status: open - closed superseder: - sgmllib should allow angle brackets in quoted values ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue745002 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9337] Make float.__str__ behave identically to float.__repr__
Mark Dickinson dicki...@gmail.com added the comment: Here's a patch. The floating-point part of the tutorial still needs work. -- keywords: +patch Added file: http://bugs.python.org/file18249/issue9337.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9337 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3964] quiet the freeze makefile
Georg Brandl ge...@python.org added the comment: Well, at least -s is mentioned in my POSIX make(1p) manpage, and I found it in an online version of the OpenBSD manpages. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3964 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9407] ConfigParser documentation does not mention ConfigParser.Error as base exception class for ConfigParser exceptions
Ray.Allen ysj@gmail.com added the comment: It may be useful to mention it to show the exception heirarchy as well as in the case a user may want to catch all ConfigParser errors generally. +1. I provide a patch for this. -- keywords: +patch nosy: +ysj.ray Added file: http://bugs.python.org/file18250/issue9407.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1090076] Defaults in ConfigParser.get overrides section values
Georg Brandl ge...@python.org added the comment: Committed doc patch similar to Raghuram's in r83226. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1090076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9407] ConfigParser documentation does not mention ConfigParser.Error as base exception class for ConfigParser exceptions
Changes by Ray.Allen ysj@gmail.com: -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9337] Make float.__str__ behave identically to float.__repr__
Mark Dickinson dicki...@gmail.com added the comment: A couple of notes on the patch: - the test_unicodedata failure was a result of computing a checksum involving str(numeric_value_of_character) for fraction characters like 1/6 and 2/3. I've changed the test to use '{.12g}'.format(numeric_value) instead, and updated the checksum. - the patch changes the result of format(x, ''), so that it continues to match str(x) when x is a float or complex instance. So when there's no typecode and no precision given, float formatting behaves like repr/str; when there's no typecode but a precision *is* given, float formatting behaves like 'g' formatting, but always ensures at least one digit after the point for a result in non-scientific format (as before). This change involves some slightly messy logic in formatter.h (which now needs to pass type 'r' to PyOS_double_to_string in this case); there may be a better way to write this code. Eric, if you have a chance to look at the formatter.h changes, I'd appreciate your comments. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9337 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9417] Declaring a class creates circular references
New submission from Andrea Corbellini corbellini.and...@gmail.com: Creating a class (either using the 'class' statement or using type()) creates a circular reference. I've attached a script that simply demonstrates this. The problem is caused by the fact that MyClass.__dict__['__dict__'].__objclass__ is MyClass. Although most of the times classes are never deleted when the interpreted exits, some programs (like the popular Django framework) create temporary classes. And this is a pain because you can't disable the garbage collector. -- components: Interpreter Core files: test.py messages: 111935 nosy: candrea priority: normal severity: normal status: open title: Declaring a class creates circular references type: resource usage versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file18251/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9399] Provide a 'print' action for argparse
Steven Bethard steven.beth...@gmail.com added the comment: Should this print to stdout or stderr? I wonder if the API should allow either, and instead look like: parser.add_argument('--license', action='write', message='...', file=sys.stdout) Where sys.stdout would be the default for the file= argument. The action would then just literally call file.write(message), so the behavior would be pretty easy to explain. Of course, at that point it makes me wonder if maybe it wouldn't just be better to have an easy way to have some arbitrary function called without having to subclass Action, e.g.: parser.add_argument('--license', action='call', callable=lambda: sys.stdout.write(message)) Basically this would be a shorthand for subclassing Action when you don't need any information about the command line. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9399 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9413] asyncore.close_all() should call x.handle_close() instead of x.close()
R. David Murray rdmur...@bitdance.com added the comment: No it doesn't. Why do you think this change should be made? What bug does it produce in it's current form? Can you provide a unit test demonstrating the buggy behavior? -- nosy: +r.david.murray stage: - unit test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9413 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9407] ConfigParser documentation does not mention ConfigParser.Error as base exception class for ConfigParser exceptions
Georg Brandl ge...@python.org added the comment: Applied in r83229. Thanks! -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7447] Sum() doc and behavior mismatch
Georg Brandl ge...@python.org added the comment: from_iterable() was marked up wrongly in the itertools docs; this is fixed now in r83230. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7447 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9404] IDLE won't launch on XP
Chris Leaf xcyborgni...@gmail.com added the comment: Sorry but I still cannot get it to work because the folder remains inaccessible to me and immutable. Is there any way around this problem? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9404 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9401] automatically try forward operations when reverse operations are NotImplemented
Georg Brandl ge...@python.org added the comment: This might work for (normally) commutative operations like multiplication and addition, but what about those like subtraction? If the interpreter uses the non-reversed method automatically, it has to apply semantics, but the semantics depend on the type and cannot be guessed by the interpreter. Also, even for normally commutative operations some type may want to behave non-commutative. With this in mind, this cannot be implemented without major headaches both for the implementation and backwards compatibility. -- nosy: +georg.brandl resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9401 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9404] IDLE won't launch on XP
Martin v. Löwis mar...@v.loewis.de added the comment: The hidden field is not filled in, here's a screenshot of the attributes options Ok. Remove the entire .idlerc folder, then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9404 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9397] Remove references to the missing dbm.bsd module
Georg Brandl ge...@python.org added the comment: Removed in r83231, thanks. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9397 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9388] locale documentation describes non-existing ERA_YEAR constant
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r83232. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9388 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9386] Bad indentation in urllib import fixer with multiple imports
Changes by Georg Brandl ge...@python.org: -- assignee: - benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9386 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9416] complex formatting incorrectly omits a negative zero real part
Mark Dickinson dicki...@gmail.com added the comment: Here are some tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9416] complex formatting incorrectly omits a negative zero real part
Changes by Mark Dickinson dicki...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file18252/issue9416_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9417] Declaring a class creates circular references
Antoine Pitrou pit...@free.fr added the comment: Is there a reason why you want to disable the cyclic garbage collector? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9417] Declaring a class creates circular references
Changes by Antoine Pitrou pit...@free.fr: -- versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9417] Declaring a class creates circular references
Ray.Allen ysj@gmail.com added the comment: This should not be a problem, I think. We cannot avoid such a circular reference. I believe the main reason of the circular reference is in MyClass.__mro__, this is a list and contains a reference to MyClass. You can add __slots__ = [] to MyClass's class body to avoid __dict__(the one you mentioned) and another member which contains two more references to MyClass, but the __mro__ still contains the last reference to MyClass. -- nosy: +ysj.ray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7855] Add test cases for ctypes/winreg for issues found in IronPython
Mark Lawrence breamore...@yahoo.co.uk added the comment: Gentle poke in ribs can this be committed por favor? -- nosy: +BreamoreBoy versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9418] Move _formatter_* methods from string type into _string module
New submission from Georg Brandl ge...@python.org: Currently, the string type has two single-underscore methods, _formatter_parser and _formatter_field_name_split, that expose details of the new string formatting implementation to Python, so that it can be used by the string.Formatter class. This patch removes these methods and puts them into their own _string module. -- assignee: eric.smith components: Extension Modules, Library (Lib) files: add_string_module.diff keywords: patch messages: 111948 nosy: eric.smith, georg.brandl priority: normal severity: normal stage: patch review status: open title: Move _formatter_* methods from string type into _string module type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file18253/add_string_module.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9418 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9399] Provide a 'print' action for argparse
Dennis Malcorps dennis.malco...@googlemail.com added the comment: parser.add_argument('--license', action='write', message='...', file=sys.stdout) The ability to redirect the output would be a nice addition. parser.add_argument('--license', action='call', callable=lambda: sys.stdout.write(message)) optparse already has a 'callable' action, I had the impression it was left out of argparse on purpose, even tough I couldn't imagine why... Either way is fine for me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9399 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9417] Declaring a class creates circular references
Andrea Corbellini corbellini.and...@gmail.com added the comment: Disabling the GC can increase performances (although not significantly). But this bug is the cause of other problems too: what if the metaclass contains a __del__() method? An another issue that I've found is that debugging is harder. I always try to avoid to create ref cycles in my code, also if my objects are collectable. In this way, I'm sure that I'll always be able to add a __del__ method in the future without problems. However, I can't easily check ref cycles without manually inspecting `gc.garbage`. And also, specifying DEBUG_SAVEALL will put all the deleted classes and their attributes in the garbage, which makes debugging *very* hard in case of a leaking program. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9417] Declaring a class creates circular references
Georg Brandl ge...@python.org added the comment: I couldn't imagine why a metaclass would want to have a __del__ method... -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1581182] Definition of a character is wrong
Changes by Georg Brandl ge...@python.org: -- assignee: georg.brandl - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1581182 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9319] segfault when searching modules with help()
Ron Adam ron_a...@users.sourceforge.net added the comment: The error happens when Null is passed to strlen in (unicodeobject.c, line 860) Passing NULL to a string format function is probably in the category of don't do that. Stefans solution of checking for NULL before calling PyErr_Format looks to me to be correct. As he notes, the same technique is used in another place. It might be good to add a note somewhere not to pass NULL to C string format functions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9416] complex formatting incorrectly omits a negative zero real part
Mark Dickinson dicki...@gmail.com added the comment: And here's a fix (includes the earlier tests, along with some fixes to the tests themselves). -- stage: unit test needed - patch review Added file: http://bugs.python.org/file18254/issue9416.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3173] external strftime for Python?
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Wed, Jul 28, 2010 at 11:22 PM, Guido van Rossum rep...@bugs.python.org wrote: .. What about the licensing? That look like the BSD license *with* advertising clause... I am not a lawyer and I am not intimately familiar with PSF policies, but this license does not look too dissimilar to the profile module license: # Permission to use, copy, modify, and distribute this Python software # and its associated documentation for any purpose (subject to the # restriction in the following sentence) without fee is hereby granted, # provided that the above copyright notice appears in all copies, and # that both that copyright notice and this permission notice appear in # supporting documentation, ... Actually, I wonder if pydoc profile is technically in violation of the InfoSeek license. More likely, however, is that the license text in the source file is not authoritative and PSF has a more permissive license to this code. Skip, can you clarify where the strftime code in your patch came from? In your first post you said that it came from Tcl, so it may have ActiveState copyright on at least portions of it. On the other hand, unless strftime code is already published under an acceptable license, I think rewriting this code from scratch would be easier than tracking down the owners and asking them to contribute it to python. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3173 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9417] Declaring a class creates circular references
Andrea Corbellini corbellini.and...@gmail.com added the comment: Having a __del__ inside a metaclass is strange, I know... but probably there are situations where you need to do so. Why shouldn't a developer be able to add a __del__ to a metaclass without creating uncollectable objects? I don't think this behavior is by design. Also, doing random contributions to various projects I've seen many odd things. However I don't think that the bug tracker is the right place to discuss development practices. A bug that causes problems in unusual situations is still a bug. :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6522] docs for unittest.expectedFailure do not syntactically show it's a decorator
Georg Brandl ge...@python.org added the comment: Done in r83234. Thanks for the suggestion! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6522 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9417] Declaring a class creates circular references
Georg Brandl ge...@python.org added the comment: Whether this is a bug is not clear. Sometimes it's just impossible not to create cycles, and classes may just be one instance of that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9410] Add Unladden Swallow's optimizations to Python 3's pickle.
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: For those not familiar with Unladen Swallow, can you describe what the most interesting optimizations are? Maybe there is an Unladen Swallow document you can point to. Would any of these optimizations apply to python implementation? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9410 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9417] Declaring a class creates circular references
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +krisvale ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9397] Remove references to the missing dbm.bsd module
STINNER Victor victor.stin...@haypocalc.com added the comment: Removed in r83231, thanks. I commited also r83235 to remove references in the source code. The last reference is the following comment, but I don't know how to fix it: # some dbm emulations based on Berkeley DB generate a .db file # some do not, but they should be caught by the bsd checks -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9397 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9410] Add Unladden Swallow's optimizations to Python 3's pickle.
STINNER Victor victor.stin...@haypocalc.com added the comment: I'm working on #3873 to add a read buffer (fixed size, 4096 bytes) to the unpickler. It's 6 to 8 times faster with the read buffer: but this patch is mainly to avoid the overhead introduced by the new I/O library (in Python2, unpickler was faster because it doesn't need to call Python functions to read some bytes). Is this feature included in this big patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9410 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9417] Declaring a class creates circular references
Andrea Corbellini corbellini.and...@gmail.com added the comment: This is an unwanted an unexpected behavior, so this is a bug by definition. If it's not easy to fix, it's a different matter. However here's a proposed solution: * for the __mro__: instead of using a tuple, use a new object that inherits from it. This new object should use weak reference for the first item and should return the real object (if available) only in __getitem__(). * __objclass__ can should become a property based on weak references. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6050] zipfile: Extracting a directory that already exists generates an OSError
Ezio Melotti ezio.melo...@gmail.com added the comment: #9172 has been closed as duplicate of this. -- nosy: +ezio.melotti stage: - committed/rejected type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6050 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9417] Declaring a class creates circular references
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: This was discussed in issue1545463 which was deemed not to be worth fixing. The particular bug described in issue1545463 would also be fixed by the still open issue812369. So yes, there are cases where these cycles are a problem even with gc. -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3873] Unpickling is really slow
STINNER Victor victor.stin...@haypocalc.com added the comment: Victor, have you tried using peek() instead of seek()? I mentioned this previously in msg85780. In a file encoded in protocol 0, backward seek are needed to each call to unpickler_readline... and this function is called to read a number, a boolean, etc. (to read most, or all, data values). I choosed to disable the read buffer because it's slower with it. For protocol 1 and 2, there is only *one* seek at the end (but a lot of read: file size / 4096). So I don't think that it does really matter to use peek or seek. seek() is more natural (for me) and frequent than peek(), so I prefer to keep seek(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3873 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3873] Unpickling is really slow
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3873 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue812369] module shutdown procedure based on GC
Changes by Andrea Corbellini corbellini.and...@gmail.com: -- nosy: +candrea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue812369 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9416] complex formatting incorrectly omits a negative zero real part
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I wonder if complex addition/subtraction should preserve -0.0 when it is added to a purely imaginary number. I.e., -0.0+1j (-0+1j) -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9417] Declaring a class creates circular references
Georg Brandl ge...@python.org added the comment: This is not so easy: the __mro__ tuple, as its name says, is used internally for method resolution, or finding attributes on the type's bases. __objclass__ is used whenever the descriptor is accessed. These operations are involved in every method call. If you want this to go somewhere, you will have to produce a patch and demonstrate that the slowdown does not unsuitably impact performance. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1195571] simple callback system for Py_FatalError
Georg Brandl ge...@python.org added the comment: Amaury, any interest in getting this committed for 3.2? -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1195571 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6480] code.runsource() parsing bug
Georg Brandl ge...@python.org added the comment: code.runsource() uses the single start symbol by default, which will parse only a single statement. Only your second snippet is a single statement, while the others are two statements. -- nosy: +georg.brandl resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6480 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6504] infinite recursion from calling builtins.open()
Georg Brandl ge...@python.org added the comment: Cannot reproduce with current 3.2 trunk, closing. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6504 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9419] RUNSHARED needs LDFLAGS
New submission from Peter Häring p.haer...@gmx.net: test_distutils fails with 2.7 on a shared build (at least if building outside the source tree), 2.6 versions work. The reason for this is, that the test tries to link and doesn't find libpython-2.7.so.1. A solution (or workaround) is to add LDFLAGS=-L`pwd` to the variable RUNSHARED, as I did in the attached file for SUNOS and GNU/Linux etc. Other systems probably need some similar patch. -- components: Build files: Python-2.7-RUNSHARED.patch keywords: patch messages: 111970 nosy: phaering priority: normal severity: normal status: open title: RUNSHARED needs LDFLAGS type: compile error versions: Python 2.7 Added file: http://bugs.python.org/file18255/Python-2.7-RUNSHARED.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9419 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6612] 'import site' fails when called from an unlinked directory
Georg Brandl ge...@python.org added the comment: I'm quite sure nobody will want to do anything about it... -- nosy: +georg.brandl status: open - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6612 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8603] Create a bytes version of os.environ and getenvb()
STINNER Victor victor.stin...@haypocalc.com added the comment: Le jeudi 29 juillet 2010 03:08:27, Ezio Melotti a écrit : A quick search[0] also shows that environ.data is used by several projects. _Environ is a wrapper on data: call putenv() when a value is changed and unputenv() when a value is removed. Since os.environb, it does also convert key and value types. So .data should not be used directly. It looks like a common usage of .data is to get get to a real dict (and not an user dict). I think that os.environ.data or os.environ.data.copy() can be replaced by dict(os.environ) is that case. Changing it from str to bytes will most likely break these programs, I'm not sure of that. It looks (in the search result) that os.environ.data is just stored and passed to a function, but not used as a dictionary to get a value (well, I'm not sure because it's hard to say with just 3 lines of the program). In that case, it doesn't matter if the dictionary contains byte or unicode strings. Eg. zope2instance: old_env = os.environ.data.copy() ... os.environ.data = old_env It does still work with bytes. so I'm not sure it's a good idea Yes, it's not a good idea to use .data :-) This attribute should be protected, not public (even if it is not documented). IMHO os.environ.data should contain str, whereas os.environb.data bytes. data is shared between os.environ and os.environb, because data is the solution to synchronize both dictionaries. If they must share the same data I would prefer them to be both str. No, data should use the native type: bytes on UNIX and BSD, str on Windows. -- If you still consider that the change on .data as a bug, I think that the fix is to remove .data (mark it as protected: environ.data = environ._data). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9404] IDLE won't launch on XP
Chris Leaf xcyborgni...@gmail.com added the comment: I solved the problem myself by editing the EditorWindow.py file where it sets self.recent_files_path by setting it to a different file location (I created a file in my Python31 directory named recent-files.lst and then set the recent_files_path to the absolute path to this file I made). This seems to be working so far and works like a complete work around the .idlerc folder issue. Will report if this doesn't work out later -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9404 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6630] string.Template custom pattern not working
Georg Brandl ge...@python.org added the comment: Added in r83236. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6630 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6535] optparse required field for Options
Georg Brandl ge...@python.org added the comment: I don't think optparse will get this update -- new features should go into argparse instead. -- nosy: +georg.brandl resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6535 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8603] Create a bytes version of os.environ and getenvb()
STINNER Victor victor.stin...@haypocalc.com added the comment: Le jeudi 29 juillet 2010 03:00:03, Ezio Melotti a écrit : FWIW os.environb is missing from os.__all__. Fixed by r83237 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9404] IDLE won't launch on XP
Martin v. Löwis mar...@v.loewis.de added the comment: Sorry, I'm busy with other stuff and won't be able to look into this for another week or so. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9404 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9420] gdbm with /usr/include/ndbm.h
New submission from Peter Häring p.haer...@gmx.net: There are systems out there, wich don't have ndbm, but gdbm and ndbm.h directly in the include-path (usually /usr/include), not in the subdirectory i.e. gdbm. setup.py at the moment assumes, that there is ndbm on the system, if there is ndbm.h in the include path. If it doesn't find libndbm, it continues to try to use ndbm without library, which doesn't work. BLFS (http://www.linuxfromscratch.org/blfs/view/svn/general/python.html) fills in the gdbm and gdbm-compat library, which works, but is wrong, because we really use gdbm and not ndbm. The right way is to start with the library change and then look for the header file, as it is in the proposed patch for setup.py -- components: Build files: Python-2.7-gdbm.patch keywords: patch messages: 111978 nosy: phaering priority: normal severity: normal status: open title: gdbm with /usr/include/ndbm.h versions: Python 2.7 Added file: http://bugs.python.org/file18256/Python-2.7-gdbm.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1710703] zipfile.ZipFile behavior inconsistent.
Georg Brandl ge...@python.org added the comment: Alan, I've updated the patch for current 3.2 trunk, see attached, but the new test now fails. Can you find out why? -- nosy: +georg.brandl versions: +Python 3.2 -Python 2.7 Added file: http://bugs.python.org/file18257/zipfile_empty.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1710703 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6156] Error compiling valid regex
Georg Brandl ge...@python.org added the comment: Closing in favor of #2636, which allows this regex to be compiled. -- resolution: - out of date status: open - closed superseder: - Regexp 2.7 (modifications to current re 2.2.2) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6156 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4108] robotparser.py fail when more than one User-Agent: * is present
Georg Brandl ge...@python.org added the comment: Thanks for the patch, fixed in r83238. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4108 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com