From report at bugs.python.org Sun Mar 1 01:52:47 2009 From: report at bugs.python.org (Cherniavsky Beni) Date: Sun, 01 Mar 2009 00:52:47 +0000 Subject: [issue5067] Error msg from using wrong quotes in JSON is unhelpful In-Reply-To: <1232951073.6.0.548540602901.issue5067@psf.upfronthosting.co.za> Message-ID: <1235868767.71.0.612792823648.issue5067@psf.upfronthosting.co.za> Cherniavsky Beni added the comment: Perhaps it should not be an error at all? The default should probably stay strict to the spec, but IMHO the module should provide an optional lenient parsing mode that also accepts single quotes. Why support single quotes and not any other imaginable deviation from the spec? Because single quotes are the only way (AFAIK) in which Python's repr() produces invalid JSON (from JSONable combinations of types). ---------- nosy: +cben _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 02:42:49 2009 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 01 Mar 2009 01:42:49 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1235871769.82.0.676835613841.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-features-5.diff includes: Bugfixes Added \G anchor (from Perl). \G is the anchor at the start of a search, so re.search(r'\G(\w)') is the same as re.match(r'(\w)'). re.findall normally performs a series of searches, each starting where the previous one finished, but if the pattern starts with \G then it's like a series of matches: >>> re.findall(r'\w', 'abc def') ['a', 'b', 'c', 'd', 'e', 'f'] >>> re.findall(r'\G\w', 'abc def') ['a', 'b', 'c'] Notice how it failed to match at the space, so no more results. Added file: http://bugs.python.org/file13216/issue2636-features-5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 02:48:18 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Mar 2009 01:48:18 +0000 Subject: [issue5067] Error msg from using wrong quotes in JSON is unhelpful In-Reply-To: <1232951073.6.0.548540602901.issue5067@psf.upfronthosting.co.za> Message-ID: <1235872098.8.0.0981404295275.issue5067@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 on Steven's request for a better error message. +1 on Beni's request for looser input requirements for better interoperability with Python's repr. OTOH, I've never found it hard to write: s.replace("'", '"'). ---------- assignee: -> bob.ippolito nosy: +bob.ippolito, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 03:22:10 2009 From: report at bugs.python.org (Mads Kiilerich) Date: Sun, 01 Mar 2009 02:22:10 +0000 Subject: [issue1533164] Installed but not listed *.pyo break bdist_rpm Message-ID: <1235874130.32.0.189339231406.issue1533164@psf.upfronthosting.co.za> Mads Kiilerich added the comment: Martin, What is the goal of bdist_rpm? I haven't seen that stated explicitly anywhere, but I assume the goal is to make a fair attempt to easily create usable RPMs for some software already using distutil, acknowledging that it might not work in all cases (because some projects do strange (buggy?) things) and that the RPMs probably can't be used in distributions directly (because they probably have their own rules and requirements). The applied patch makes it possible for bdist_rpm to work in _some_ situations on Fedora. IMHO that is +1. Yes, this patch might not be enough to make it work with *.py "__main__" files. IMHO that is a less critical issue. Personally I have never seen bdist_rpm fail for this reason. (But "often" for other reasons.) An advantage of this patch is that it just fixes the existing approach to work in more situations. Disabling _unpackaged_files_terminate_build would IMHO be a bad solution. That would cause "successful" RPM builds which doesn't include all the files distutil installed. And FWIW I don't understand how __os_install_post could solve the problem. If you want another approach: Why use a filelist at all? Yes, it is needed if the RPM is built "in place", but these days (at least on Fedora) RPMs are always built in an empty RPM_BUILD_ROOT. So everything found in RPM_BUILD_ROOT has been installed by distutils, and that includes all the files and directories the RPM should contain. For 2.5 a simplified patch for this is: # files section spec_file.extend([ '', - '%files -f INSTALLED_FILES', + '%files', '%defattr(-,root,root)', + '/', ]) That will also make the RPM own all directories in the path to its files. That is bad in a distribution but might be OK for bdist_rpm. To avoid that we could continue to use "-f INSTALLED_FILES" but generate the file list with a simple "find" command in the %install section and remove well-known paths such as /usr/lib/python*/site-packages, /usr/bin, /etc and whatever we could come up with from the list. This approach might work for almost all (sufficiently wellformed) packages using distutil and will redefine bdist_rpm to "put all files in a an RPM instead of installing them directly, so that they can be removed by uninstalling the RPM". For example it works for logilab.astng and logilab.pylint which didn't work before. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 06:20:41 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 01 Mar 2009 05:20:41 +0000 Subject: [issue4843] make distutils use shutil In-Reply-To: <1231156704.22.0.372262791608.issue4843@psf.upfronthosting.co.za> Message-ID: <1235884841.42.0.778835238002.issue4843@psf.upfronthosting.co.za> Akira Kitada added the comment: 'ignore' was introduced in Python 2.6 but distutils has to keep Python 2.3 compatible. See: http://bugs.python.org/issue5052 So I guess you have to wait some more years before dropping distutils.dir_util and distutils.file_util. ---------- nosy: +akitada _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 06:32:38 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 01 Mar 2009 05:32:38 +0000 Subject: [issue1355826] shutil.move() does not preserve ownership Message-ID: <1235885558.59.0.564944357507.issue1355826@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- type: -> feature request versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 07:12:52 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 01 Mar 2009 06:12:52 +0000 Subject: [issue1533164] Installed but not listed *.pyo break bdist_rpm In-Reply-To: <1235874130.32.0.189339231406.issue1533164@psf.upfronthosting.co.za> Message-ID: <49AA2755.9040101@v.loewis.de> Martin v. L?wis added the comment: > What is the goal of bdist_rpm? I haven't seen that stated explicitly > anywhere, but I assume the goal is to make a fair attempt to easily > create usable RPMs for some software already using distutil, > acknowledging that it might not work in all cases (because some projects > do strange (buggy?) things) and that the RPMs probably can't be used in > distributions directly (because they probably have their own rules and > requirements). Correct. > The applied patch makes it possible for bdist_rpm to work in _some_ > situations on Fedora. IMHO that is +1. I agree. I had another complaint about that patch, though, which is the addition of an option for not including .pyo files. I still like to see addition of this option reverted. > Disabling _unpackaged_files_terminate_build would IMHO be a bad > solution. That would cause "successful" RPM builds which doesn't include > all the files distutil installed. And FWIW I don't understand how > __os_install_post could solve the problem. IIUC, setting %define __os_install_post %{___build_post} should prevent invocation of brp-python-bytecompile. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 11:30:26 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Mar 2009 10:30:26 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> New submission from Raymond Hettinger : Here is a working patch implementing PEP372 ordered dictionaries. ---------- components: Library (Lib) files: od.diff keywords: patch messages: 82955 nosy: rhettinger severity: normal stage: patch review status: open title: PEP 372: OrderedDict versions: Python 3.1 Added file: http://bugs.python.org/file13217/od.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 12:29:34 2009 From: report at bugs.python.org (Retro) Date: Sun, 01 Mar 2009 11:29:34 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1235906974.24.0.828881920556.issue5390@psf.upfronthosting.co.za> Retro added the comment: Strange thing. I presume you are running Windows XP. There the Python icons are shown in the Add/Remove Programs list for the Python interpreters. I must inform you, though, that the Python icons are not shown in the Add/Remove Programs list under Widnows Vista. I don't know why but it is an issue we ought to look at and solve. If anyone has knowledge how to fix this, please provide information on how to fix this bug. Thank you in advance. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 13:25:55 2009 From: report at bugs.python.org (John5342) Date: Sun, 01 Mar 2009 12:25:55 +0000 Subject: [issue4459] bdist_rpm assumes python In-Reply-To: <1227969751.28.0.990351219395.issue4459@psf.upfronthosting.co.za> Message-ID: <1235910355.23.0.29496208706.issue4459@psf.upfronthosting.co.za> John5342 added the comment: Thanks. i had noticed those options since i filed this report but considering the spec file is generated and then built immediately wouldn't it make more sense to effectively enable --fix-python by default (perhaps with a --no-fix-python option if people do in fact want to do something odd). The rpm would then automatically be built using the same version of python used for development which is in my experience almost always what is intended. I do at least have a workable workaround. Thanks again. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 13:40:02 2009 From: report at bugs.python.org (t.steinruecken) Date: Sun, 01 Mar 2009 12:40:02 +0000 Subject: [issue5398] strftime("%B") returns a String unusable with unicode In-Reply-To: <1235911202.21.0.141647308098.issue5398@psf.upfronthosting.co.za> Message-ID: <1235911202.21.0.141647308098.issue5398@psf.upfronthosting.co.za> New submission from t.steinruecken : import locale import datetime locale.setlocale(locale.LC_ALL, ('de_DE', 'UTF8')) print u""+datetime.datetime( 2009, 3, 1 ).strftime("%B") -------------------------------------- Traceback (most recent call last): print u""+datetime.datetime( 2009, 3, 1 ).strftime("%B") UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128) ---------- messages: 82958 nosy: t.steinruecken severity: normal status: open title: strftime("%B") returns a String unusable with unicode type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 13:48:28 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 01 Mar 2009 12:48:28 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235911708.01.0.090442503792.issue5397@psf.upfronthosting.co.za> Georg Brandl added the comment: Doc nits: * "items are returned in the order they were first added": it should be made clear that it matters when the *key* was first added * "An *OrderedDict* remembers order that entries were inserted": misses a word somewhere? * "OrderDict" should be "OrderedDict" * "compare their ordered :attr:`items` list": ... lists? Implementation nits: * "raise TypeError('expected at 1 argument, got %d', len(args))" should read "at most" and use "%" instead of "," * "raise KeyError" in popitem(): should it get a message? * eval()ing the repr() will not construct the dict in the same order ---------- nosy: +aronacher, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 14:00:48 2009 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 01 Mar 2009 13:00:48 +0000 Subject: [issue5398] strftime("%B") returns a String unusable with unicode In-Reply-To: <1235911202.21.0.141647308098.issue5398@psf.upfronthosting.co.za> Message-ID: <1235912448.02.0.210374864832.issue5398@psf.upfronthosting.co.za> Ezio Melotti added the comment: I don't have the de_DE locale to reproduce that, but the cause is most likely this: 1) datetime( 2009, 3, 1 ).strftime("%B") should return m?rz as a UTF-8 encoded string, i.e. 'm\xc3\xa4rz' 2) when you mix Unicode and encoded strings, the encoded strings are automagically decoded to Unicode using the default codec, i.e. ASCII (on Py2) 3) The ASCII codec is not able to decode '\xc3' (its value is 195, and 195 > 127) and a UnicodeDecodeError is raised. The solution is to decode the string explicitly using UTF-8: >>> month = 'm\xc3\xa4rz' >>> u'' + month Traceback (most recent call last): File "", line 1, in UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128) >>> u'' + month.decode('utf-8') u'm\xe4rz' >>> ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 14:04:20 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Mar 2009 13:04:20 +0000 Subject: [issue4474] PyUnicode_FromWideChar incorrect for characters outside the BMP (unix only) In-Reply-To: <1228071248.49.0.10094276273.issue4474@psf.upfronthosting.co.za> Message-ID: <1235912660.82.0.237181962365.issue4474@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file13167/unicode_fromwidechar_surrogate-6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 14:58:18 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 01 Mar 2009 13:58:18 +0000 Subject: [issue5398] strftime("%B") returns a String unusable with unicode In-Reply-To: <1235911202.21.0.141647308098.issue5398@psf.upfronthosting.co.za> Message-ID: <1235915898.44.0.522717275321.issue5398@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Ezio is correct: in general a string cannot be added to a unicode. Except for the simplest case (only 7bit ascii characters), you have to decode the string: u"" + datetime.datetime( 2009, 3, 1 ).strftime("%B").decode('utf-8') ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 15:57:15 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Mar 2009 14:57:15 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235919435.79.0.262006036786.issue5397@psf.upfronthosting.co.za> Antoine Pitrou added the comment: In SubclassMappingTests, MyOrderedDict should subclass OrderedDict rather than dict, shouldn't it? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 16:05:29 2009 From: report at bugs.python.org (Mads Kiilerich) Date: Sun, 01 Mar 2009 15:05:29 +0000 Subject: [issue1533164] Installed but not listed *.pyo break bdist_rpm Message-ID: <1235919929.09.0.301896084227.issue1533164@psf.upfronthosting.co.za> Mads Kiilerich added the comment: > IIUC, setting > > %define __os_install_post %{___build_post} > > should prevent invocation of brp-python-bytecompile. Ok. But preventing invocation of brp-python-bytecompile is IMHO not a solution. brp-python-bytecompile is needed for the reasons mentioned in http://fedoraproject.org/wiki/Packaging/Python#Including_pyos . _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 16:10:16 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Sun, 01 Mar 2009 15:10:16 +0000 Subject: [issue5370] unpickling vs. __getattr__ In-Reply-To: <1235597176.48.0.557535954175.issue5370@psf.upfronthosting.co.za> Message-ID: <1235920216.12.0.951653494639.issue5370@psf.upfronthosting.co.za> Gabriel Genellina added the comment: Perhaps this should be made more clear in the documentation for the pickle module. Probably here: http://docs.python.org/library/pickle.html#the-pickle- protocol Could you come with some enhancements? (Note that it already states that __init__ is not called when unpickling) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 16:26:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sun, 01 Mar 2009 15:26:43 +0000 Subject: [issue5399] wer In-Reply-To: <1235921203.6.0.529176853043.issue5399@psf.upfronthosting.co.za> Message-ID: <1235921203.6.0.529176853043.issue5399@psf.upfronthosting.co.za> New submission from Daniel Diniz : 234 ---------- messages: 82965 nosy: ajaksu2 severity: normal status: open title: wer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 16:27:37 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sun, 01 Mar 2009 15:27:37 +0000 Subject: [issue5399] wer In-Reply-To: <1235921203.6.0.529176853043.issue5399@psf.upfronthosting.co.za> Message-ID: <1235921257.06.0.784586599575.issue5399@psf.upfronthosting.co.za> Daniel Diniz added the comment: Gah, script running amok, sorry! ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 16:58:10 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Sun, 01 Mar 2009 15:58:10 +0000 Subject: [issue5392] stack overflow after hitting recursion limit twice In-Reply-To: <1235820404.86.0.303625232795.issue5392@psf.upfronthosting.co.za> Message-ID: <1235923090.91.0.217155273732.issue5392@psf.upfronthosting.co.za> Gabriel Genellina added the comment: It is an artificial value, I don't require a recursion limit so low in any application. I found it when looking into #5370. If there is a lower limit to sys.setrecursionlimit, maybe it should be enforced. But since it fails only the second time, it looks like a bug somewhere. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 17:44:24 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Mar 2009 16:44:24 +0000 Subject: [issue5392] stack overflow after hitting recursion limit twice In-Reply-To: <1235923090.91.0.217155273732.issue5392@psf.upfronthosting.co.za> Message-ID: <1235925919.13427.3.camel@fsol> Antoine Pitrou added the comment: The fact it fails only the second time is by design, although I'm not sure the design is useful, and it's probably not documented anywhere. The error message says it : "Cannot *recover* from stack overflow", which means there was a first stack overflow, and Python thinks it has failed recovering from it since a second stack overflow occurred afterwards. We could probably make the recovery detection smarter. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 17:59:25 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Mar 2009 16:59:25 +0000 Subject: [issue5392] stack overflow after hitting recursion limit twice In-Reply-To: <1235820404.86.0.303625232795.issue5392@psf.upfronthosting.co.za> Message-ID: <1235926765.28.0.72023479306.issue5392@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> pitrou priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 18:18:24 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Mar 2009 17:18:24 +0000 Subject: [issue5392] stack overflow after hitting recursion limit twice In-Reply-To: <1235820404.86.0.303625232795.issue5392@psf.upfronthosting.co.za> Message-ID: <1235927904.34.0.659907072494.issue5392@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch. I've put the tests in test_sys.py, I haven't found a better place for them. ---------- keywords: +patch Added file: http://bugs.python.org/file13218/issue5392.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 19:00:58 2009 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 01 Mar 2009 18:00:58 +0000 Subject: [issue5067] Error msg from using wrong quotes in JSON is unhelpful In-Reply-To: <1232951073.6.0.548540602901.issue5067@psf.upfronthosting.co.za> Message-ID: <1235930458.99.0.0469914252199.issue5067@psf.upfronthosting.co.za> Bob Ippolito added the comment: I don't really want to see looser input requirements, making a JSON parser that is compatible with a subset of Python repr output isn't a design goal of mine. This is absolutely false: "Because single quotes are the only way (AFAIK) in which Python's repr() produces invalid JSON (from JSONable combinations of types)." >>> repr(object) "" If you don't know JSON, I'm not sure throwing random input at the JSON parser is going to help you. Is that how you learned XML? There's plenty of info in the JSON documentation and a link to json.org if you need help. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 19:04:01 2009 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 01 Mar 2009 18:04:01 +0000 Subject: [issue5067] Error msg from using wrong quotes in JSON is unhelpful In-Reply-To: <1232951073.6.0.548540602901.issue5067@psf.upfronthosting.co.za> Message-ID: <1235930641.92.0.499308132043.issue5067@psf.upfronthosting.co.za> Bob Ippolito added the comment: Er, sorry, missed "(from JSONable combinations of types)". It's early. Anyway, I can change the error message, but I will not make it special- case single quotes for its own error message. I will have to think about what the message could say instead. Note that the same sort of person who throws random input at parsers might even expect {test: 'test'} to work since that is valid JavaScript but not valid JSON. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 19:21:46 2009 From: report at bugs.python.org (Armin Ronacher) Date: Sun, 01 Mar 2009 18:21:46 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235931706.0.0.688277982272.issue5397@psf.upfronthosting.co.za> Armin Ronacher added the comment: @Georg > * eval()ing the repr() will not construct the dict in the same order The alternative would be a list of dicts inside the constructor call, but that feels ugly. defaultdict from the same module is not evaluable at all, so I guess it wouldn't be that much of a problem. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 19:30:42 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Mar 2009 18:30:42 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235932242.72.0.71095914181.issue5397@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for the review comments guys. An updated patch is attached. Added file: http://bugs.python.org/file13219/od2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 19:33:03 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 01 Mar 2009 18:33:03 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235932383.09.0.911196789014.issue5397@psf.upfronthosting.co.za> Georg Brandl added the comment: I still see an "OrderDict" in the docs, and the TypeError in __init__ still needs to use "%" instead of ",". _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 19:49:02 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Mar 2009 18:49:02 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235933342.29.0.623682635646.issue5397@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed. Added file: http://bugs.python.org/file13220/od3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 19:49:10 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Mar 2009 18:49:10 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235933350.57.0.641768659963.issue5397@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file13219/od2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 19:49:17 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Mar 2009 18:49:17 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235933357.12.0.87616479737.issue5397@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file13217/od.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 20:08:06 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Mar 2009 19:08:06 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235934486.11.0.359127066766.issue5397@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Added a few more tests. Added file: http://bugs.python.org/file13221/od4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 20:08:12 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Mar 2009 19:08:12 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235934492.87.0.0624894127977.issue5397@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file13220/od3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 20:40:35 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 01 Mar 2009 19:40:35 +0000 Subject: [issue1533164] Installed but not listed *.pyo break bdist_rpm In-Reply-To: <1235919929.09.0.301896084227.issue1533164@psf.upfronthosting.co.za> Message-ID: <49AAE4B0.8090903@v.loewis.de> Martin v. L?wis added the comment: > Ok. But preventing invocation of brp-python-bytecompile is IMHO not a > solution. brp-python-bytecompile is needed for the reasons mentioned in > http://fedoraproject.org/wiki/Packaging/Python#Including_pyos . What reason specifically are you referring to? That it creates and packages .pyo files? bdist_rpm already does that (now), so that reason won't apply to bdist_rpm. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 20:47:36 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 01 Mar 2009 19:47:36 +0000 Subject: [issue5392] stack overflow after hitting recursion limit twice In-Reply-To: <1235925919.13427.3.camel@fsol> Message-ID: <49AAE653.8070007@v.loewis.de> Martin v. L?wis added the comment: > The fact it fails only the second time is by design, although I'm not > sure the design is useful, and it's probably not documented anywhere. It helped me debug a number of interpreter crashes in 3.0. When a stack overflow occurred, in certain cases, the interpreter would catch the exception, and consider it as failure in the callback it tried to invoke (e.g. when invoking __eq__ during dictionary lookups). Rather than letting the stack unwind, it would continue to let the stack overflow, and eventually managed to crash the entire process. The recovery check is there to detect that, after a stack overflow, it really unwound a sufficient number of stack frames, rather than overflowing again and again. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 21:13:35 2009 From: report at bugs.python.org (Bill Janssen) Date: Sun, 01 Mar 2009 20:13:35 +0000 Subject: [issue5238] ssl makefile never closes socket In-Reply-To: <1234485278.29.0.554185864263.issue5238@psf.upfronthosting.co.za> Message-ID: <1235938415.02.0.84343251631.issue5238@psf.upfronthosting.co.za> Bill Janssen added the comment: I'd recommend running the whole suite of tests here. The issue is mainly with httplib, as I recall it, which "closes" the socket before it finishes reading from it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 21:18:59 2009 From: report at bugs.python.org (Bill Janssen) Date: Sun, 01 Mar 2009 20:18:59 +0000 Subject: [issue2437] Distutils runtime_library_dirs broken on Windows In-Reply-To: <1206044595.46.0.100105317073.issue2437@psf.upfronthosting.co.za> Message-ID: <1235938739.02.0.220889356504.issue2437@psf.upfronthosting.co.za> Bill Janssen added the comment: No, Tarek, I don't have a MinGW machine right now. But it should be easy to reproduce; just invoke that call I originally reported. The distutils code is just making assumptions that it shouldn't be making. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 21:22:06 2009 From: report at bugs.python.org (Bill Janssen) Date: Sun, 01 Mar 2009 20:22:06 +0000 Subject: [issue2437] Distutils runtime_library_dirs broken on Windows In-Reply-To: <1206044595.46.0.100105317073.issue2437@psf.upfronthosting.co.za> Message-ID: <1235938926.16.0.3670900346.issue2437@psf.upfronthosting.co.za> Bill Janssen added the comment: Tarek writes: > Laurent, right. but we need to figure out how to get the CC name in > MinGW/Cygwin environment. > I am not familiar with them. Since this bug is specifically about that environment, shouldn't it be handled by someone who is familiar with them? Not objecting, here, but it seems unlikely to result in a rapid fix. And MinGW and Cygwin are pretty different, IMHO; don't mix them together here. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 21:25:04 2009 From: report at bugs.python.org (Mads Kiilerich) Date: Sun, 01 Mar 2009 20:25:04 +0000 Subject: [issue1533164] Installed but not listed *.pyo break bdist_rpm Message-ID: <1235939104.86.0.472331848341.issue1533164@psf.upfronthosting.co.za> Mads Kiilerich added the comment: Ok, if you will keep bdist_rpm's new .pyo creation then you are right. FWIW I think it is a bit of an ugly hack and would prefer another solution. BTW: The "brp-python-bytecompile creates usr/bin/*.pyo" issue has been resolved, https://bugzilla.redhat.com/show_bug.cgi?id=182498#c8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 21:26:51 2009 From: report at bugs.python.org (Bill Janssen) Date: Sun, 01 Mar 2009 20:26:51 +0000 Subject: [issue4471] IMAP4 missing support for starttls In-Reply-To: <1228062796.45.0.215183772699.issue4471@psf.upfronthosting.co.za> Message-ID: <1235939211.06.0.234506857295.issue4471@psf.upfronthosting.co.za> Bill Janssen added the comment: Why can't we use python.org for tests? Do we need IMAP/POP servers running? Let's send some mail to pydotorg to get that set up. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 21:38:56 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 01 Mar 2009 20:38:56 +0000 Subject: [issue1533164] Installed but not listed *.pyo break bdist_rpm In-Reply-To: <1235939104.86.0.472331848341.issue1533164@psf.upfronthosting.co.za> Message-ID: <49AAF25D.7000308@v.loewis.de> Martin v. L?wis added the comment: > BTW: The "brp-python-bytecompile creates usr/bin/*.pyo" issue has been > resolved, https://bugzilla.redhat.com/show_bug.cgi?id=182498#c8 Ok. Perhaps it isn't needed to exclude it, then. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 21:46:08 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 01 Mar 2009 20:46:08 +0000 Subject: [issue1533164] Installed but not listed *.pyo break bdist_rpm Message-ID: <1235940368.04.0.387032126855.issue1533164@psf.upfronthosting.co.za> Tarek Ziad? added the comment: > I agree. I had another complaint about that patch, though, which > is the addition of an option for not including .pyo files. > I still like to see addition of this option reverted. I'll remove this option then, and make -O1 hardcoded ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 21:50:48 2009 From: report at bugs.python.org (Jeffrey Yasskin) Date: Sun, 01 Mar 2009 20:50:48 +0000 Subject: [issue4715] optimize bytecode for conditional branches In-Reply-To: <1229900285.73.0.345956521758.issue4715@psf.upfronthosting.co.za> Message-ID: <1235940648.49.0.624135106211.issue4715@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: Backported as r70071. I also fixed a couple things I missed in the py3k branch in r70076. Thanks all! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 21:53:25 2009 From: report at bugs.python.org (Retro) Date: Sun, 01 Mar 2009 20:53:25 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1235940805.61.0.158765817857.issue5390@psf.upfronthosting.co.za> Retro added the comment: Please see the attached screenshot where there are no icons in the Add/Remove Programs list of the Python intepreters on my Windows Vista machine. Added file: http://bugs.python.org/file13223/my_arpvista.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 22:21:36 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 01 Mar 2009 21:21:36 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1235942496.38.0.465848121023.issue5390@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Using regedit, find out which of the keys HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9cc89170-000b-457d-91f1-53691f85b224} HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{de2f2d9c-53e2-40ee-8209-74da63cb060f} HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{9cc89170-000b-457d-91f1-53691f85b223} HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{de2f2d9c-53e2-40ee-8209-74da63cb060e} are present on your system. For each key, report the values of the properties DisplayName DisplayIcon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 22:32:12 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 01 Mar 2009 21:32:12 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1235943132.2.0.910813006903.issue5135@psf.upfronthosting.co.za> Nick Coghlan added the comment: Unassigning - the lack of support for ABC registration still bothers me, but a) I don't have a good answer for it, and b) I'm going to be busy for a while working on some proposed changes to the with statement. ---------- assignee: ncoghlan -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 1 23:07:20 2009 From: report at bugs.python.org (Piotr Meyer) Date: Sun, 01 Mar 2009 22:07:20 +0000 Subject: [issue5400] patches for multiprocessing module on NetBSD In-Reply-To: <1235945240.08.0.454455099363.issue5400@psf.upfronthosting.co.za> Message-ID: <1235945240.08.0.454455099363.issue5400@psf.upfronthosting.co.za> New submission from Piotr Meyer : Multiprocessing module needs some patches to succesfully builing and running on NetBSD. I made this patch and test on NetBSD 5rc2 (upcoming release). 1. we need working socket module (Modules/socketmodule.c) 2. mremap under NetBSD has different semantics: (Modules/mmapmodule.c) 3. finally, we need settings for netbsd in setup.py: (setup.py) After patching and building: netbsd5# ./python -bb -E Lib/test/regrtest.py test_multiprocessing test_multiprocessing 1 test OK. ---------- components: Build files: py-netbsd-multiprocessing.diff keywords: patch messages: 82991 nosy: aniou severity: normal status: open title: patches for multiprocessing module on NetBSD type: compile error versions: Python 3.0 Added file: http://bugs.python.org/file13224/py-netbsd-multiprocessing.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 00:41:00 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 01 Mar 2009 23:41:00 +0000 Subject: [issue4480] bdist_msi and bdist_wininst are missing an uninstaller icon In-Reply-To: <1228122344.22.0.401809698411.issue4480@psf.upfronthosting.co.za> Message-ID: <1235950860.13.0.21171441071.issue4480@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- assignee: -> tarek components: +Windows nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 00:41:59 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 01 Mar 2009 23:41:59 +0000 Subject: [issue4918] Windows installer created with Python 2.5 does not work with Python 2.6.1 In-Reply-To: <1231738106.14.0.212121765754.issue4918@psf.upfronthosting.co.za> Message-ID: <1235950919.53.0.165537831859.issue4918@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- assignee: -> tarek components: +Windows nosy: +tarek type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 00:44:03 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 01 Mar 2009 23:44:03 +0000 Subject: [issue5235] distutils seems to only work with VC++ 2008 (9.0) In-Reply-To: <1234478580.55.0.077455747153.issue5235@psf.upfronthosting.co.za> Message-ID: <1235951043.55.0.480525678846.issue5235@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- components: +Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 00:48:02 2009 From: report at bugs.python.org (Armin Ronacher) Date: Sun, 01 Mar 2009 23:48:02 +0000 Subject: [issue5401] mimetypes.MAGIC_FUNCTION implementation clusterfuck In-Reply-To: <1235951282.21.0.0432661498186.issue5401@psf.upfronthosting.co.za> Message-ID: <1235951282.21.0.0432661498186.issue5401@psf.upfronthosting.co.za> New submission from Armin Ronacher : Sorry for the harsh words, but when I found that code I nearly freaked out. For all those years I was using "from mimetypes import guess_type" until today I found out that this has horrendous performance problems due to the fact that the mimetype database is re-parsed on each call. The reason for this is that mimetypes.guess_type is implemented like this: def guess_type(...): global guess_type init() guess_type = new_guess_type return guess_type(...) Obviously if the function was imported from the module and not looked up via standard attribute lookup before each call (by calling it like mimetypes.guess_type(...)) init() would be called over and over again. What's the performance impact? In a small WSGI middleware that serves static files the *total* performance impact (including HTTP header parsing, file serving etc.) was 1000%. Just for guess_type() versus mimetypes.guess_type() which was called just once per request. I attached a workaround for that problem that tries to avoid init() calls after the thing was initialized. If this is intended behaviour it should be documented but I doubt that this is a good idea as people don't read documentation it stuff seems to work. And google tells me I'm not the first one who invoked guess_type that way: http://google.com/codesearch?q="from+mimetypes+import+guess_type" ---------- components: Library (Lib) files: mimetypes-speedup.diff keywords: easy, needs review, patch, patch messages: 82992 nosy: aronacher priority: critical severity: normal stage: patch review status: open title: mimetypes.MAGIC_FUNCTION implementation clusterfuck versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13225/mimetypes-speedup.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 00:51:14 2009 From: report at bugs.python.org (Armin Ronacher) Date: Sun, 01 Mar 2009 23:51:14 +0000 Subject: [issue5401] mimetypes.MAGIC_FUNCTION performance problems In-Reply-To: <1235951282.21.0.0432661498186.issue5401@psf.upfronthosting.co.za> Message-ID: <1235951474.41.0.392773506866.issue5401@psf.upfronthosting.co.za> Changes by Armin Ronacher : ---------- title: mimetypes.MAGIC_FUNCTION implementation clusterfuck -> mimetypes.MAGIC_FUNCTION performance problems _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 00:53:13 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 01 Mar 2009 23:53:13 +0000 Subject: [issue5401] mimetypes.MAGIC_FUNCTION performance problems In-Reply-To: <1235951282.21.0.0432661498186.issue5401@psf.upfronthosting.co.za> Message-ID: <1235951593.53.0.942646688628.issue5401@psf.upfronthosting.co.za> Georg Brandl added the comment: Wah, that's really a horrible way to implement this caching. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 01:00:16 2009 From: report at bugs.python.org (Noam Raphael) Date: Mon, 02 Mar 2009 00:00:16 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1235952016.38.0.813284328824.issue1580@psf.upfronthosting.co.za> Noam Raphael added the comment: I'm sorry, but it seems to me that the conclusion of the discussion in 2008 is that the algorithm should simply use the system's binary-to-decimal routine, and if the result is like 123.456, round it to 15 digits after the 0, check if the result evaluates to the original value, and if so, return the rounded result. This would satisfy most people, and has no need for complex rounding algorithms. Am I mistaken? If I implement this, will anybody be interested? Noam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 01:15:53 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 02 Mar 2009 00:15:53 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1235952953.07.0.283430616985.issue1580@psf.upfronthosting.co.za> Guido van Rossum added the comment: I tried that, and it was more subtle than that in corner cases. Another argument against it is that on Windows the system input routine doesn't correctly round unless 17 digits of precision are given. One of Tim Peters's responses should have evidence of that (or perhaps it was on a python-dev thread). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 03:01:53 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 02 Mar 2009 02:01:53 +0000 Subject: [issue5400] patches for multiprocessing module on NetBSD In-Reply-To: <1235945240.08.0.454455099363.issue5400@psf.upfronthosting.co.za> Message-ID: <1235959313.56.0.288122601669.issue5400@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 03:43:41 2009 From: report at bugs.python.org (Jim Jewett) Date: Mon, 02 Mar 2009 02:43:41 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235961821.41.0.314273225305.issue5397@psf.upfronthosting.co.za> Jim Jewett added the comment: I would try to make it more explicit that updates do not reset the order, but deleting a item and re-inserting it *does*. (So it isn't the first insertion of the key, it is the first that hasn't yet been followed by a deletion.) Maybe change: """ When iterating over an ordered dictionary, the items are returned in the order their keys were first added. """ to [removed "first", added longer explanation] """ When iterating over an ordered dictionary, the items are returned in the order their keys were added. (This implies that updating an item to a new value does not reset the order, but deleting the item and re-inserting it moves the item to the end.) """ ---------- nosy: +jimjjewett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 04:35:44 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 02 Mar 2009 03:35:44 +0000 Subject: [issue5401] mimetypes.MAGIC_FUNCTION performance problems In-Reply-To: <1235951282.21.0.0432661498186.issue5401@psf.upfronthosting.co.za> Message-ID: <1235964944.49.0.302999420768.issue5401@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Well, that was embarrassing! Fixed in r70086. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 04:45:16 2009 From: report at bugs.python.org (Jim Jewett) Date: Mon, 02 Mar 2009 03:45:16 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235965516.4.0.864438370474.issue5397@psf.upfronthosting.co.za> Jim Jewett added the comment: I would also recommend strengthening some of the tests with regard to ordering stability across update vs delete-and-reinsert. TestOrderedDict.test_update does verify that updated items are not moved to the end, but the comment suggests it is only checking that the previous contents had not been cleared entirely. test_iterators, test_popitem, and test_pop check only single insertions; I think the tests would be stronger if you updated the dict with reversed(pairs) before iterating, so that it would be obvious the ordering was based on the original insertion, rather than the latest access. test_setdefault should also verify that x is the final key, and that the a key hasn't changed position. I didn't see any tests for insert a, insert b, delete a, re-insert a, verify that a is now later than b. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 05:10:55 2009 From: report at bugs.python.org (Jim Jewett) Date: Mon, 02 Mar 2009 04:10:55 +0000 Subject: [issue5402] MutableMapping code smell (see OrderedDict) In-Reply-To: <1235967055.01.0.234624648736.issue5402@psf.upfronthosting.co.za> Message-ID: <1235967055.01.0.234624648736.issue5402@psf.upfronthosting.co.za> New submission from Jim Jewett : Copy of issue 5397 In python 3, UserDict (and DictMixin) are gone; presumably they should be replaced by either a dict subclass or the ABC MutableMapping. Unfortunately, there doesn't seem to be a clean way to inherit from both. In python 2.x, you could write class MyDict(DictMixin, dict): ... but with class MyDict(MutableMapping, dict): ... MutableMapping explicitly overrides __getitem__, __setitem__, and __delitem__ to raise a KeyError. The OrderedDict implementation in issue 5397 puts the concrete class first, and then handles composite methods manually, by either rewriting them (repr, copy) or explicitly delegating past dict and straight to MutableMapping (setdefault, update, etc.) Both solutions seem fragile. Unfortunately, the closest I come to a solution is to split the ABC into a Mixin portion and an ABC enforcer. # The concrete methods of the current ABC class MapMixin: # The abstract methods that get checked class MutableMapping(MapMixin): # Trust that dict will always implement # all required concrete methods for us class MyDict(MapMixin, dict): ---------- components: Library (Lib) messages: 82999 nosy: aronacher, georg.brandl, jimjjewett, pitrou, rhettinger severity: normal status: open title: MutableMapping code smell (see OrderedDict) versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 06:19:59 2009 From: report at bugs.python.org (David Christian) Date: Mon, 02 Mar 2009 05:19:59 +0000 Subject: [issue5238] ssl makefile never closes socket In-Reply-To: <1234485278.29.0.554185864263.issue5238@psf.upfronthosting.co.za> Message-ID: <1235971199.81.0.406224569022.issue5238@psf.upfronthosting.co.za> David Christian added the comment: I actually discovered this issue when using httplib over ssl. Closing the httplib connection was not closing the socket - the socket would only be closed after garbage collection, due to this bug. That's what caused me to investigate and find this flaw. I ran the regression tests and didn't run into any issues. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 06:42:20 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 02 Mar 2009 05:42:20 +0000 Subject: [issue1533164] Installed but not listed *.pyo break bdist_rpm Message-ID: <1235972540.2.0.987996298162.issue1533164@psf.upfronthosting.co.za> Tarek Ziad? added the comment: done in r70094 and r70096 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 06:46:08 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 02 Mar 2009 05:46:08 +0000 Subject: [issue5403] test_md5 segfault In-Reply-To: <1235972768.83.0.536109179608.issue5403@psf.upfronthosting.co.za> Message-ID: <1235972768.83.0.536109179608.issue5403@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : I noticed test_md5 and test_multiprocessing crashed on trunk. I hope attached patch will fix this issue. (Maybe the patch can be simplified with goto) ---------- components: Extension Modules files: fix_md5_without_goto.patch keywords: patch messages: 83002 nosy: ocean-city priority: release blocker severity: normal status: open title: test_md5 segfault type: crash versions: Python 2.7 Added file: http://bugs.python.org/file13226/fix_md5_without_goto.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 07:11:52 2009 From: report at bugs.python.org (Jeffrey Yasskin) Date: Mon, 02 Mar 2009 06:11:52 +0000 Subject: [issue2459] speedup for / while / if with better bytecode In-Reply-To: <1206224909.42.0.227263347483.issue2459@psf.upfronthosting.co.za> Message-ID: <1235974312.83.0.64430046722.issue2459@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: I've updated for_iter.patch to the latest trunk, merging in issue 4715. I also changed tracing a bit so that the first line of a loop doesn't get traced twice in the first iteration, and added to test_dis to check that decreasing line numbers work there. Review at http://codereview.appspot.com/20103 if you like. Performance: 32-bit gcc-4.3 Intel Core2: 2to3: 25.09 -> 24.63: 1.87% faster Django: Min: 0.614 -> 0.609: 0.86% faster Avg: 0.616 -> 0.635: 3.09% slower Pickle: (cPickle) Min: 1.647 -> 1.651: 0.21% slower Avg: 1.650 -> 1.656: 0.39% slower PyBench: Min: 5341 -> 5273: 1.29% faster Avg: 5450 -> 5397: 0.98% faster SlowPickle: (pickle) Min: 1.384 -> 1.341: 3.13% faster Avg: 1.385 -> 1.343: 3.08% faster Spitfire: Min: 0.773 -> 0.690: 11.97% faster Avg: 0.776 -> 0.695: 11.62% faster Spitfire re-run: Min: 0.740 -> 0.693: 6.81% faster Avg: 0.744 -> 0.695: 6.93% faster SlowUnpickle: (pickle) Min: 0.645 -> 0.668: 3.37% slower Avg: 0.646 -> 0.670: 3.59% slower SlowUnpickle re-run: Min: 0.645 -> 0.660: 2.31% slower Avg: 0.645 -> 0.661: 2.32% slower Unpickle: (cPickle) Min: 1.015 -> 1.006: 0.89% faster Avg: 1.021 -> 1.009: 1.16% faster 64-bit gcc-4.3 Intel Core2 2to3: 22.31 -> 21.97: 1.57% faster Django: Min: 0.577 -> 0.564: 2.29% faster Avg: 0.579 -> 0.566: 2.20% faster Pickle: Min: 1.162 -> 1.178: 1.35% slower Avg: 1.166 -> 1.183: 1.37% slower PyBench: Min: 4498 -> 4193: 7.27% faster Avg: 4586 -> 4276: 7.25% faster SlowPickle: Min: 1.212 -> 1.133: 6.92% faster Avg: 1.213 -> 1.135: 6.92% faster Spitfire: Min: 0.631 -> 0.617: 2.32% faster Avg: 0.632 -> 0.621: 1.75% faster SlowUnpickle: Min: 0.575 -> 0.551: 4.31% faster Avg: 0.576 -> 0.553: 4.14% faster Unpickle: Min: 0.708 -> 0.722: 1.88% slower Avg: 0.745 -> 0.736: 1.20% faster ---------- assignee: -> pitrou Added file: http://bugs.python.org/file13227/trunk-opt-loop.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 07:15:03 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Mar 2009 06:15:03 +0000 Subject: [issue1533164] Installed but not listed *.pyo break bdist_rpm In-Reply-To: <1235972540.2.0.987996298162.issue1533164@psf.upfronthosting.co.za> Message-ID: <49AB7963.3080209@v.loewis.de> Martin v. L?wis added the comment: > done in r70094 and r70096 Thanks! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 07:44:18 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Mar 2009 06:44:18 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1235976258.57.0.614577589963.issue5397@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Jim, I updated the docs to talk cover delete-reinsert. Also, added a few more tests as suggested but am leaving test_iterators, test_popitem, and test_pop unchanged. It is enough to test delete-reinsertion once or twice and know that we've separately tested the component operations (setting new keys, setting existing keys, and deleting existing keys). Added file: http://bugs.python.org/file13228/od5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 08:10:04 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Mar 2009 07:10:04 +0000 Subject: [issue5402] MutableMapping code smell (see OrderedDict) In-Reply-To: <1235967055.01.0.234624648736.issue5402@psf.upfronthosting.co.za> Message-ID: <1235977804.5.0.113920441516.issue5402@psf.upfronthosting.co.za> Raymond Hettinger added the comment: UserDict is not gone. DictMixin is now mutable mapping. ---------- assignee: -> rhettinger priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 10:00:59 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 02 Mar 2009 09:00:59 +0000 Subject: [issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful() In-Reply-To: <1235772794.07.0.300454209619.issue5389@psf.upfronthosting.co.za> Message-ID: <1235984459.4.0.361216234235.issue5389@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: The UTF-7 codec implementation has a few problems (one of them is that it is hardly being used, so bugs only get detected very slowly). issue4426 has a patch with cleaned up and more standards compliant implementation. Perhaps that also fixes the problem with uninitialized variables. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 10:03:49 2009 From: report at bugs.python.org (Joshua Kinard) Date: Mon, 02 Mar 2009 09:03:49 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> New submission from Joshua Kinard : I'm attempting to get Python to cross-compile, and I'm not sure if this is an actual flaw in the build system or not, but thought I'd detail what I can here and seek comment from those in the know. What happens is under a cross-environment setup on a Gentoo installation (using our sys-devel/crossdev and sys-devel/crossdev-wrappers package), when cross-compiling from x86_64-pc-linux-gnu to mipsel-unknown-linux-gnu, the Python build process fails to build several modules/extensions. I believe that part of the problem with building the extensions is on our end, and is a separate item I'll track down myself. But there is one module in particular that looks tied to Python's core that's getting a cross-compile error: _socket. What happens is, somehow, the configure script (or setup.py) is defining HAVE_SYS_PARAM_H, which pulls in sys/param.h -- I think this is normal, but for socketmodule.c, that particular call by the Makefile passes in -I/usr/include along with the other -I calls defining the cross-include directories. The mipsel cross-compiler then references x86_64-specific assembler code within the sys/param.h copy in /usr/include, and fails. Generally, our crossdev-wrappers package sets up the buil environment and overrides a lot of the common variables to use the cross-toolchain. So far, it looks like only socketmodule.c is affected with the rogue -I/usr/include getting pulled in. I haven't had much luck trying to track down just how Python's build system is tied into autotools to see where it's picking up /usr/include from. Already tried patching setup.py some, as well as passing --oldincludedir to configure, but neither approach worked. I'm hoping that this is either a minor bug in the build system, or we're missing a specific variable to be passed to the make process so that -I/usr/include doesn't get defined. Not sure which, so if there's any other ideas to try, I'm all ears! ---------- components: Build messages: 83008 nosy: kumba severity: normal status: open title: Cross-compiling Python type: compile error versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 10:39:12 2009 From: report at bugs.python.org (Kevin Teague) Date: Mon, 02 Mar 2009 09:39:12 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1235986752.93.0.989322587594.issue5135@psf.upfronthosting.co.za> Kevin Teague added the comment: The problem with generic functions supporting ABCs is it's a bug with the way ABCs work and not a problem with the generic function implementation. The register() method of an ABC only fakes out isinstance checks, it doesn't actually make the abstract base class a base class of the class. It doesn't make any sense for a class to say it is an instance of an ABC, but not have that ABC in it's MRO. It's not a base class if it's not in the MRO! The documentation for lack of ABC support should read something like: + Note that generic functions do not work with classes which have + been declared as an abstract base class using the + abc.ABCMeta.register() method because this method doesn't make + that abstract base class a base class of the class - it only fakes + out instance checks. Perhaps a bug should be opened for the abc.ABCMeta.register() method. However, I'd say that just because virtual abstract base classes are wonky doesn't mean that a solid generic function implementation shouldn't be added to standard library. ---------- nosy: +kteague _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 10:41:36 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Mar 2009 09:41:36 +0000 Subject: [issue5402] MutableMapping code smell (see OrderedDict) In-Reply-To: <1235967055.01.0.234624648736.issue5402@psf.upfronthosting.co.za> Message-ID: <1235986896.96.0.951245450895.issue5402@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, I'm happy with Guido's design of MutableMapping. It parallels all the other ABCs in its design and it succeeds completely at its primary role as a defining an interface. Its secondary role is to provide some mixin capability. It does well in this role when used as documented (just filling-in the abstract methods as letting the mixin do the rest). The case with OrderedDict is not a typical use of mixins because the primary class (dict) already provides all of methods demanded by the interface. I explicitly overwrite some of dict's methods because that is part of the behavior that OrderedDict wants to define differently than dict. It is appropriate that the primary class gets first dibs on defining a method and that intentional overrides are done explicitly (as they are in the OrderedDict example). With OrderedDict, the only reason we subclassed from dict was to provide interoperability with third-party tools that may have been hardwired to work only with dicts. In general, the preferred approach is to not subclass both dict and OrderedDict and to let the MutableMapping interface do its job. The proposed splitting of MutableMapping looks unhealthy and overly complex to me. It makes ABCs harder to use in the general case just to make one special case look a little prettier and do more of its magic implicitly. If this *really* bugs you, OrderedDict doesn't have to inherit from MutableMapping at all. We can throw code reuse out the window and just duplicate the relevant code fragments. To my eyes, either way is an explicit override of the dict's methods which is the intended effect. FWIW, the UserDict class in Py3.x was relocated to the collections module. It isn't gone. We made an effort to kill it but found that there were compelling use cases that were not a cleanly solved by any other approach. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 10:41:51 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Mar 2009 09:41:51 +0000 Subject: [issue5402] MutableMapping code smell (see OrderedDict) In-Reply-To: <1235967055.01.0.234624648736.issue5402@psf.upfronthosting.co.za> Message-ID: <1235986911.62.0.429081551912.issue5402@psf.upfronthosting.co.za> Changes by Raymond Hettinger : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 11:37:02 2009 From: report at bugs.python.org (Paul Moore) Date: Mon, 02 Mar 2009 10:37:02 +0000 Subject: [issue5405] There is no way of determining which ABCs a class is registered against In-Reply-To: <1235990222.31.0.178922023306.issue5405@psf.upfronthosting.co.za> Message-ID: <1235990222.31.0.178922023306.issue5405@psf.upfronthosting.co.za> New submission from Paul Moore : There is no way to determine the list of classes for which issubclass(C, x) is true. The MRO of the class is fine for normal inheritance, but for ABCs it is possible to register classes which don't inherit from the ABC, so that you have a situation where issubclass (C, MyABC) can be true without MyABC being in C.__mro__: >>> import abc >>> class MyABC(object): ... __metaclass__ = abc.ABCMeta ... >>> class C(object): ... pass ... >>> MyABC.register(C) >>> issubclass(C, MyABC) True >>> C.__mro__ (, ) >>> This means that ABCs do not play well with the type of introspection required to implement such features as generic functions - namely enumeration of the (logical) superclasses of a class. ---------- components: Interpreter Core messages: 83011 nosy: pmoore priority: normal severity: normal status: open title: There is no way of determining which ABCs a class is registered against type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 12:52:53 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 02 Mar 2009 11:52:53 +0000 Subject: [issue2459] speedup for / while / if with better bytecode In-Reply-To: <1235974312.83.0.64430046722.issue2459@psf.upfronthosting.co.za> Message-ID: <1235994820.7107.1.camel@fsol> Antoine Pitrou added the comment: > I've updated for_iter.patch to the latest trunk, merging in issue 4715. > I also changed tracing a bit so that the first line of a loop doesn't > get traced twice in the first iteration, and added to test_dis to check > that decreasing line numbers work there. Thanks a lot! By the way, why do you bench cPickle? Does your test call Python code significantly? Overall, the results look positive although not overwhelming. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 13:11:41 2009 From: report at bugs.python.org (Henrik Olsson) Date: Mon, 02 Mar 2009 12:11:41 +0000 Subject: [issue3924] cookielib chokes on non-integer cookie version, should ignore it instead In-Reply-To: <1222021824.75.0.209543556591.issue3924@psf.upfronthosting.co.za> Message-ID: <1235995901.66.0.751451758988.issue3924@psf.upfronthosting.co.za> Henrik Olsson added the comment: The cookiejar workaround in the first comment did not work for me. The cookies didn't stick in it. I guess version needs to be set.. this worked for me: class ForgivingCookieJar(cookielib.CookieJar): def _cookie_from_cookie_tuple(self, tup, request): name, value, standard, rest = tup version = standard.get("version", None) if version is not None: # Some servers add " around the version number, this module expects a pure int. standard["version"] = version.strip('"') return cookielib.CookieJar._cookie_from_cookie_tuple(self, tup, request) ---------- nosy: +henriko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 14:20:46 2009 From: report at bugs.python.org (Paul Moore) Date: Mon, 02 Mar 2009 13:20:46 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1236000046.41.0.584344256292.issue5135@psf.upfronthosting.co.za> Paul Moore added the comment: I raised issue 5405. Armin Roachner commented over there that it's not even possible in principle to enumerate the ABCs a class implements because ABCs can do semantic checks (e.g., checking for the existence of a special method). So documenting the limitation is all we can manage, I guess. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 14:21:10 2009 From: report at bugs.python.org (Paul Moore) Date: Mon, 02 Mar 2009 13:21:10 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1236000070.24.0.585676896884.issue5135@psf.upfronthosting.co.za> Changes by Paul Moore : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 14:27:27 2009 From: report at bugs.python.org (Armin Ronacher) Date: Mon, 02 Mar 2009 13:27:27 +0000 Subject: [issue1355826] shutil.move() does not preserve ownership Message-ID: <1236000447.59.0.060947208569.issue1355826@psf.upfronthosting.co.za> Armin Ronacher added the comment: While this is surprising, this is documented behavior: "If the destination is on the current filesystem, then simply use rename. Otherwise, copy src (with copy2()) to the dst and then remove src." And copy2() uses copystat() and does not copy "contents, owner, and group". ---------- nosy: +aronacher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 14:11:36 2009 From: report at bugs.python.org (Armin Ronacher) Date: Mon, 02 Mar 2009 13:11:36 +0000 Subject: [issue5405] There is no way of determining which ABCs a class is registered against In-Reply-To: <1235990222.31.0.178922023306.issue5405@psf.upfronthosting.co.za> Message-ID: <1235999496.63.0.227918208466.issue5405@psf.upfronthosting.co.za> Armin Ronacher added the comment: I don't think this can be solved. Not only do registered classes not show up (which could be fixed by providing something like inspect.getfakemro) but ABCs can also perform duck-type checks. For example a class with an __iter__ method is an instance of collections.Iterable or how it's called thanks to the __subclasscheck__ magic method. ---------- nosy: +aronacher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 14:25:05 2009 From: report at bugs.python.org (Armin Ronacher) Date: Mon, 02 Mar 2009 13:25:05 +0000 Subject: [issue5405] There is no way of determining which ABCs a class is registered against In-Reply-To: <1235990222.31.0.178922023306.issue5405@psf.upfronthosting.co.za> Message-ID: <1236000305.24.0.420432135751.issue5405@psf.upfronthosting.co.za> Armin Ronacher added the comment: I suppose it would be a good idea to fix part of that problem in Sphinx (and probably also in pydoc) by adding something like ":implements: MutableMapping" in the docstring. So that this is explicitly added to the docstring and conforming tools can use this documentation hints. Similar things are currently implemented in Sphinx for ":param:" ":return:" etc. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 14:21:28 2009 From: report at bugs.python.org (Paul Moore) Date: Mon, 02 Mar 2009 13:21:28 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1236000088.39.0.0581802246208.issue5135@psf.upfronthosting.co.za> Paul Moore added the comment: I raised issue 5405. Armin Ronacher commented over there that it's not even possible in principle to enumerate the ABCs a class implements because ABCs can do semantic checks (e.g., checking for the existence of a special method). So documenting the limitation is all we can manage, I guess. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 14:14:27 2009 From: report at bugs.python.org (Paul Moore) Date: Mon, 02 Mar 2009 13:14:27 +0000 Subject: [issue5405] There is no way of determining which ABCs a class is registered against In-Reply-To: <1235990222.31.0.178922023306.issue5405@psf.upfronthosting.co.za> Message-ID: <1235999667.7.0.968472233052.issue5405@psf.upfronthosting.co.za> Paul Moore added the comment: Good point! So a documentation patch, to the effect that there is no way of determining which ABCs a given class is an instance of, would be an appropriate resolution, I guess. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 16:40:46 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Mar 2009 15:40:46 +0000 Subject: [issue5235] distutils seems to only work with VC++ 2008 (9.0) In-Reply-To: <1234478580.55.0.077455747153.issue5235@psf.upfronthosting.co.za> Message-ID: <1236008446.05.0.259924935392.issue5235@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Whether VC++ 2008 is required very much depends on what precisely you do in your extension. If you use a different compiler (in particular, a different CRT), chances are fair that the resulting extension crashes the interpreter. Users using a different compiler must understand the issues, and understand why it is safe to use a different CRT. Hence, I'm not sure that simplifying switching to a different compiler is a good thing - it will likely lead to more frustration because the resulting binaries fail in strange ways. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 16:44:15 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Mar 2009 15:44:15 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1236008655.19.0.666337276903.issue5404@psf.upfronthosting.co.za> Martin v. L?wis added the comment: In short: cross-compilation is not supported at all, and it will be very very difficult to implement. Search this tracker for proposed solutions, and comment in each proposed solution whether it would help in your case. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 17:24:43 2009 From: report at bugs.python.org (Jeffrey Yasskin) Date: Mon, 02 Mar 2009 16:24:43 +0000 Subject: [issue2459] speedup for / while / if with better bytecode In-Reply-To: <1206224909.42.0.227263347483.issue2459@psf.upfronthosting.co.za> Message-ID: <1236011083.84.0.120106524329.issue2459@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: No particular reason for cPickle. It sometimes shows when we've caused problems by increasing the code size, and shows the size of any random effects that the compiler causes by moving code around. Could you double-check the patch to see if I did anything dumb? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 17:34:56 2009 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 02 Mar 2009 16:34:56 +0000 Subject: [issue4308] repr of httplib.IncompleteRead is stupid In-Reply-To: <1226508081.14.0.590007271511.issue4308@psf.upfronthosting.co.za> Message-ID: <1236011696.64.0.795651458268.issue4308@psf.upfronthosting.co.za> Skip Montanaro added the comment: Can't be applied to 2.5 at this point. I agree it's dumb to report the entire partial read and that reporting just the number of bytes read is a much better solution. Your patch looks fine to me as well, except you call resp.close() twice in test_incomplete_read(). Assigning to Benjamin for application. (He's going to get the merge stuff right. I almost certainly will not.) ---------- assignee: -> benjamin.peterson nosy: +skip.montanaro versions: +Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 17:36:17 2009 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 02 Mar 2009 16:36:17 +0000 Subject: [issue4308] repr of httplib.IncompleteRead is stupid In-Reply-To: <1226508081.14.0.590007271511.issue4308@psf.upfronthosting.co.za> Message-ID: <1236011777.77.0.918579766238.issue4308@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 17:52:14 2009 From: report at bugs.python.org (Roumen Petrov) Date: Mon, 02 Mar 2009 16:52:14 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1236012734.97.0.884528088215.issue5404@psf.upfronthosting.co.za> Changes by Roumen Petrov : ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 17:53:50 2009 From: report at bugs.python.org (Roumen Petrov) Date: Mon, 02 Mar 2009 16:53:50 +0000 Subject: [issue5235] distutils seems to only work with VC++ 2008 (9.0) In-Reply-To: <1234478580.55.0.077455747153.issue5235@psf.upfronthosting.co.za> Message-ID: <1236012830.26.0.112049404187.issue5235@psf.upfronthosting.co.za> Changes by Roumen Petrov : ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 17:54:44 2009 From: report at bugs.python.org (Chris Withers) Date: Mon, 02 Mar 2009 16:54:44 +0000 Subject: [issue4308] repr of httplib.IncompleteRead is stupid In-Reply-To: <1226508081.14.0.590007271511.issue4308@psf.upfronthosting.co.za> Message-ID: <1236012884.95.0.616535097367.issue4308@psf.upfronthosting.co.za> Chris Withers added the comment: Why can't it be applied to 2.5? No problem with the 2nd resp.close() being removed... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 18:46:24 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Mar 2009 17:46:24 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236015984.96.0.653779969214.issue5397@psf.upfronthosting.co.za> Raymond Hettinger added the comment: At Antoine's request, strengthened the tests in test_copying. ---------- assignee: -> rhettinger Added file: http://bugs.python.org/file13229/od6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 18:53:13 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Mar 2009 17:53:13 +0000 Subject: [issue4308] repr of httplib.IncompleteRead is stupid In-Reply-To: <1226508081.14.0.590007271511.issue4308@psf.upfronthosting.co.za> Message-ID: <1236016393.78.0.206092513654.issue4308@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The Python 2.5 branch is closed for bug fixes; no further bug fix releases of Python 2.5 will be made. Only security fixes can be accepted on the 2.5 branch. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 18:54:08 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 02 Mar 2009 17:54:08 +0000 Subject: [issue5385] mmap can crash after resize failure (windows) In-Reply-To: <1235756024.86.0.438154708422.issue5385@psf.upfronthosting.co.za> Message-ID: <1236016448.31.0.158067830748.issue5385@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Or, use NULL as invalid handle value for map handle instead of INVALID_HANDLE_VALUE. Maybe this is simpler. ---------- keywords: +patch Added file: http://bugs.python.org/file13230/fix_mmap_resize_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 19:22:30 2009 From: report at bugs.python.org (Joshua Kinard) Date: Mon, 02 Mar 2009 18:22:30 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1236018150.78.0.201473768566.issue5404@psf.upfronthosting.co.za> Joshua Kinard added the comment: Gotcha, I'll poke around and see what I can find. Are you guys open to patches for 2.5.x still if we find something that needs patching (versus passing lots of variables to the make process)? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 19:25:23 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Mar 2009 18:25:23 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1236018150.78.0.201473768566.issue5404@psf.upfronthosting.co.za> Message-ID: <49AC248F.7010007@v.loewis.de> Martin v. L?wis added the comment: > Gotcha, I'll poke around and see what I can find. Are you guys open to > patches for 2.5.x still if we find something that needs patching (versus > passing lots of variables to the make process)? No. The Python 2.5 branch is closed; the 2.6 branch doesn't accept new features. So any cross-compiling support can only go into the trunk (i.e. 2.7). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 19:34:46 2009 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 02 Mar 2009 18:34:46 +0000 Subject: [issue4308] repr of httplib.IncompleteRead is stupid In-Reply-To: <1236012884.95.0.616535097367.issue4308@psf.upfronthosting.co.za> Message-ID: <18860.9921.736722.35416@montanaro.dyndns.org> Skip Montanaro added the comment: Chris> Why can't it be applied to 2.5? Benjamin can correct me if I'm wrong, but I thought the last 2.5 release was the last full release planned. Certainly if another full 2.5 release is in the cards then the patch should go there as well. Skip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 19:37:09 2009 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 02 Mar 2009 18:37:09 +0000 Subject: [issue4308] repr of httplib.IncompleteRead is stupid In-Reply-To: <1236016393.78.0.206092513654.issue4308@psf.upfronthosting.co.za> Message-ID: <18860.10065.714997.311403@montanaro.dyndns.org> Skip Montanaro added the comment: Martin> The Python 2.5 branch is closed for bug fixes; no further bug Martin> fix releases of Python 2.5 will be made. Only security fixes can Martin> be accepted on the 2.5 branch. So all Chris has to do to get this applied to 2.5 is craft an exploit based on the current behavior, right? ;-) S _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 19:44:57 2009 From: report at bugs.python.org (Joshua Kinard) Date: Mon, 02 Mar 2009 18:44:57 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1236019497.24.0.591218858913.issue5404@psf.upfronthosting.co.za> Joshua Kinard added the comment: Gotcha. Not sure how far off Gentoo is from supporting 2.6 -- our primary package manager relies on it, so the updates tend to be slow. for moving to new versions. Do you guys maintain any kind of an "internals" guide to the build system anywhere? Like an outline or such of what happens from start to finish when you run setup.py (I think that's the start, anyways)? I see there's quite a bit of autotools components plugged in, but it's intermixed with some of the python code itself. Looking at some of the other bugs, there definitely seems to be some cross-compiling capability that's made it in -- as evidenced by a good chunk of the core build cross-compiling fine (the _Socket extension is the one glaring error I'm after at the moment). So it looks like it just needs some better touch up....on 2.5 at least. Currently, we're using the patch from Issue #1115, and I'm going to take a stab at adapting the 2.5.1 patch in Issue #1597850 to see if it takes me any farther. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 19:46:29 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 02 Mar 2009 18:46:29 +0000 Subject: [issue5406] asyncore doc issue In-Reply-To: <1236019589.34.0.225430476333.issue5406@psf.upfronthosting.co.za> Message-ID: <1236019589.34.0.225430476333.issue5406@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : About asyncore.loop()'s count parameter: > The count parameter defaults to None, resulting in the loop > terminating only when all channels have been closed This is incorrect and it's not what count parameter actually does. I'd come up with a patch but I'm sure a native English speaker can do a lot better than me. ---------- messages: 83033 nosy: giampaolo.rodola, josiah.carlson, josiahcarlson severity: normal status: open title: asyncore doc issue versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 20:53:54 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Mar 2009 19:53:54 +0000 Subject: [issue4308] repr of httplib.IncompleteRead is stupid In-Reply-To: <18860.10065.714997.311403@montanaro.dyndns.org> Message-ID: <49AC394E.2000903@v.loewis.de> Martin v. L?wis added the comment: > So all Chris has to do to get this applied to 2.5 is craft an exploit based > on the current behavior, right? ;-) Right :-) Of course, security patches should see a much more careful review than regular bug fixes. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 20:55:29 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Mar 2009 19:55:29 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1236019497.24.0.591218858913.issue5404@psf.upfronthosting.co.za> Message-ID: <49AC39AD.3020102@v.loewis.de> Martin v. L?wis added the comment: > Do you guys maintain any kind of an "internals" guide to the build > system anywhere? Like an outline or such of what happens from start to > finish when you run setup.py (I think that's the start, anyways)? Besides the code, and besides the very high-level "configure;make;make install" instructions? No - use the source, Luke. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 21:39:31 2009 From: report at bugs.python.org (Greg Bakker) Date: Mon, 02 Mar 2009 20:39:31 +0000 Subject: [issue5403] test_md5 segfault In-Reply-To: <1235972768.83.0.536109179608.issue5403@psf.upfronthosting.co.za> Message-ID: <1236026371.94.0.956856281225.issue5403@psf.upfronthosting.co.za> Changes by Greg Bakker : ---------- nosy: +gregb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 21:53:37 2009 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 02 Mar 2009 20:53:37 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1236027217.99.0.563721691504.issue5135@psf.upfronthosting.co.za> Nick Coghlan added the comment: Given the point Armin raised, I once again agree that documenting the limitation is a reasonable approach. Longer-term, being able to subcribe to ABCs (and exposing the registration list if it isn't already visible) is likely to be the ultimate solution. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 22:01:20 2009 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 02 Mar 2009 21:01:20 +0000 Subject: [issue5405] There is no way of determining which ABCs a class is registered against In-Reply-To: <1235990222.31.0.178922023306.issue5405@psf.upfronthosting.co.za> Message-ID: <1236027680.0.0.114135650113.issue5405@psf.upfronthosting.co.za> Nick Coghlan added the comment: While a complete solution isn't possible, at least supporting querying of explicit registrations would be an improvement over the status quo (since an implicit registration can always be turned into an explicit one, but a registration can't always be turned into inheritance). For this to work in practice, I believe a PEP would be needed to add a "subscribe" method to ABCMeta instances - this method would accept two callbacks, one that was called whenever register() was invoked, and a second when unregister() was invoked. Generic functions which add ABCs registered could then subscribe to them and update their type caches appropriately. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 22:22:55 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Mar 2009 21:22:55 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236028975.58.0.509509508348.issue5397@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Attaching update reflecting Guido's change to __eq__(). Added file: http://bugs.python.org/file13231/od7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 22:30:28 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Mar 2009 21:30:28 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236029428.26.0.271915949739.issue5397@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Checked-in r70101 and r70102 ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 22:30:53 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Mar 2009 21:30:53 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236029453.22.0.464609435715.issue5397@psf.upfronthosting.co.za> Changes by Raymond Hettinger : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 22:38:07 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Mar 2009 21:38:07 +0000 Subject: [issue1533164] Installed but not listed *.pyo break bdist_rpm Message-ID: <1236029887.29.0.613076227197.issue1533164@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 22:41:12 2009 From: report at bugs.python.org (Armin Ronacher) Date: Mon, 02 Mar 2009 21:41:12 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236030072.15.0.247790959202.issue5397@psf.upfronthosting.co.za> Armin Ronacher added the comment: Maybe premature optimization but maybe it would make sense to implement __eq__ like this: def __eq__(self, other): if isinstance(other, OrderedDict): if not dict.__eq__(self, other): return False return all(p == q for p, q in _zip_longest(self.items(), other.items())) return dict.__eq__(self, other) For the most likely case (that dicts are different) this should give a speedup. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 22:56:04 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 02 Mar 2009 21:56:04 +0000 Subject: [issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful() In-Reply-To: <1235772794.07.0.300454209619.issue5389@psf.upfronthosting.co.za> Message-ID: <1236030964.96.0.551202349264.issue5389@psf.upfronthosting.co.za> Guido van Rossum added the comment: It looks like it was fixed in 2.6 by adding an assignment to startinpos to this block: else if (SPECIAL(ch,0,0)) { startinpos = s-starts; /* <---------- This was added */ errmsg = "unexpected special character"; s++; goto utf7Error; } Are we going to release another 2.5, ever? ---------- versions: -Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 23:08:24 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Mar 2009 22:08:24 +0000 Subject: [issue5407] Broken Py3.1 release build in Visual Studio 2005 In-Reply-To: <1236031704.37.0.216105327736.issue5407@psf.upfronthosting.co.za> Message-ID: <1236031704.37.0.216105327736.issue5407@psf.upfronthosting.co.za> New submission from Raymond Hettinger : The build crashes and it seems related to io.py. This started about two weeks ago. Before that, it built fine. ------ Build started: Project: _ssl, Configuration: Release Win32 ------ Performing Pre-Build Event... Traceback (most recent call last): File "C:\py31\lib\io.py", line 222, in open File "C:\py31\lib\io.py", line 619, in __init__ OSError: [Errno 9] Bad file descriptor This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Fatal Python error: Py_Initialize: can't initialize sys standard streams Project : error PRJ0019: A tool returned an error code from "Performing Pre-Build Event..." Build log was saved at "file://C:\py31\PC\VS8.0\Win32-temp-Release\_ssl\BuildLog.htm" _ssl - 1 error(s), 0 warning(s) ------ Skipped Build: Project: bdist_wininst, Configuration: Release Win32 ------ Project not selected to build for this solution configuration ------ Build started: Project: _hashlib, Configuration: Release Win32 ------ Performing Pre-Build Event... Traceback (most recent call last): File "C:\py31\lib\io.py", line 222, in open File "C:\py31\lib\io.py", line 619, in __init__ OSError: [Errno 9] Bad file descriptor This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Fatal Python error: Py_Initialize: can't initialize sys standard streams Project : error PRJ0019: A tool returned an error code from "Performing Pre-Build Event..." Build log was saved at "file://C:\py31\PC\VS8.0\Win32-temp-Release\_hashlib\BuildLog.htm" _hashlib - 1 error(s), 0 warning(s) ---------- assignee: pitrou components: Library (Lib) messages: 83042 nosy: pitrou, rhettinger severity: normal status: open title: Broken Py3.1 release build in Visual Studio 2005 type: compile error versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 23:42:01 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 02 Mar 2009 22:42:01 +0000 Subject: [issue4308] repr of httplib.IncompleteRead is stupid In-Reply-To: <1226508081.14.0.590007271511.issue4308@psf.upfronthosting.co.za> Message-ID: <1236033721.73.0.139370249758.issue4308@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Applied with a few tweaks in r70107. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 23:49:02 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 02 Mar 2009 22:49:02 +0000 Subject: [issue5407] Broken Py3.1 release build in Visual Studio 2005 In-Reply-To: <1236031704.37.0.216105327736.issue5407@psf.upfronthosting.co.za> Message-ID: <1236034142.24.0.311936720889.issue5407@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I can't reproduce under Visual Studio Express 2008, release mode. I suspect it may be due to r69560/r69793 (introduction of a Windows-specific function named _PyVerify_fd()). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 23:54:18 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 02 Mar 2009 22:54:18 +0000 Subject: [issue5407] Broken Py3.1 release build in Visual Studio 2005 In-Reply-To: <1236031704.37.0.216105327736.issue5407@psf.upfronthosting.co.za> Message-ID: <1236034458.52.0.0539557037598.issue5407@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +krisvale _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 2 23:54:51 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 02 Mar 2009 22:54:51 +0000 Subject: [issue5407] Broken Py3.1 release build in Visual Studio 2005 In-Reply-To: <1236031704.37.0.216105327736.issue5407@psf.upfronthosting.co.za> Message-ID: <1236034491.91.0.0788392686152.issue5407@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 00:00:52 2009 From: report at bugs.python.org (Forest Wilkinson) Date: Mon, 02 Mar 2009 23:00:52 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1236034852.66.0.634000936892.issue1641@psf.upfronthosting.co.za> Forest Wilkinson added the comment: I'm looking forward to having this functionality in asyncore. It would help me remove some unwanted hackery from my own code. Giampaolo, I'm concerned that your patch uses a global 'tasks' list which cannot be overriden. Shouldn't loop() accept an optional task list argument, as it already does with the socket map? That would keep with the spirit of asyncore and make things easier for those of us who use multiple event loops in multiple threads. Josiah, is your updated sched module the one described in this blog post? Is there an issue in the bug tracker about it? http://chouyu-31.livejournal.com/316112.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 00:10:23 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 02 Mar 2009 23:10:23 +0000 Subject: [issue5407] Broken Py3.1 release build in Visual Studio 2005 In-Reply-To: <1236031704.37.0.216105327736.issue5407@psf.upfronthosting.co.za> Message-ID: <1236035423.96.0.506453252851.issue5407@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: pitrou -> krisvale _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 00:17:07 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 02 Mar 2009 23:17:07 +0000 Subject: [issue5408] test_osx_env failing In-Reply-To: <1236035826.81.0.76995170361.issue5408@psf.upfronthosting.co.za> Message-ID: <1236035826.81.0.76995170361.issue5408@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Mac OS 10.4 PPC debug build test_osx_env [31492 refs] Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: Py_Initialize: can't initialize sys standard streams ImportError: No module named encodings.utf_8 test test_osx_env failed -- Traceback (most recent call last): File "/temp/python/py3k/Lib/test/test_osx_env.py", line 27, in test_pythonexecutable_sets_sys_executable self._check_sys('PYTHONEXECUTABLE', '==', 'sys.executable') File "/temp/python/py3k/Lib/test/test_osx_env.py", line 24, in _check_sys self.assertEqual(rc, 2, "expected %s %s %s" % (ev, cond, sv)) AssertionError: expected PYTHONEXECUTABLE == sys.executable ---------- assignee: ronaldoussoren components: Tests messages: 83046 nosy: benjamin.peterson, ronaldoussoren severity: normal status: open title: test_osx_env failing versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 00:32:35 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 02 Mar 2009 23:32:35 +0000 Subject: [issue4626] compile() doesn't ignore the source encoding when a string is passed in In-Reply-To: <1228976357.63.0.133847904092.issue4626@psf.upfronthosting.co.za> Message-ID: <1236036755.1.0.436443939865.issue4626@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70112. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 00:32:48 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 02 Mar 2009 23:32:48 +0000 Subject: [issue4626] compile() doesn't ignore the source encoding when a string is passed in In-Reply-To: <1228976357.63.0.133847904092.issue4626@psf.upfronthosting.co.za> Message-ID: <1236036768.24.0.411379880207.issue4626@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Should this be backported? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 00:52:25 2009 From: report at bugs.python.org (Ned Deily) Date: Mon, 02 Mar 2009 23:52:25 +0000 Subject: [issue5408] test_osx_env failing In-Reply-To: <1236035826.81.0.76995170361.issue5408@psf.upfronthosting.co.za> Message-ID: <1236037945.25.0.089786124547.issue5408@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +nad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 00:53:39 2009 From: report at bugs.python.org (Noam Raphael) Date: Mon, 02 Mar 2009 23:53:39 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1236038019.58.0.837227501001.issue1580@psf.upfronthosting.co.za> Noam Raphael added the comment: Do you mean msg58966? I'm sorry, I still don't understand what's the problem with returning f_15(x) if eval(f_15(x)) == x and otherwise returning f_17(x). You said (msg69232) that you don't care if float(repr(x)) == x isn't cross-platform. Obviously, the simple method will preserve eval(repr(x)) == x, no matter what rounding bugs are present on the platform. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 00:56:47 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 02 Mar 2009 23:56:47 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1236038207.74.0.859021593583.issue1580@psf.upfronthosting.co.za> Guido van Rossum added the comment: I changed my mind on the cross-platform requirement. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 01:24:25 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 03 Mar 2009 00:24:25 +0000 Subject: [issue4565] Rewrite the IO stack in C In-Reply-To: <1228576260.5.0.752040739396.issue4565@psf.upfronthosting.co.za> Message-ID: <0016e6440280eebd6c04642bf4bf@google.com> Antoine Pitrou added the comment: Reviewers: , Description: The diff between the py3k and io-c branches, for whoever wants to review it. Please review this at http://codereview.appspot.com/22061 Affected files: Doc/library/io.rst Lib/_pyio.py Lib/importlib/__init__.py Lib/importlib/_bootstrap.py Lib/io.py Lib/test/test_bufio.py Lib/test/test_descr.py Lib/test/test_file.py Lib/test/test_fileio.py Lib/test/test_io.py Lib/test/test_largefile.py Lib/test/test_memoryio.py Lib/test/test_univnewlines.py Lib/test/test_uu.py Makefile.pre.in Modules/Setup.dist Modules/_bufferedio.c Modules/_bytesio.c Modules/_fileio.c Modules/_iobase.c Modules/_iomodule.h Modules/_stringio.c Modules/_textio.c Modules/io.c PC/VC6/pythoncore.dsp PC/config.c PCbuild/pythoncore.vcproj Python/pythonrun.c setup.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 01:58:51 2009 From: report at bugs.python.org (Joshua Kinard) Date: Tue, 03 Mar 2009 00:58:51 +0000 Subject: [issue1597850] Cross compiling patches for MINGW Message-ID: <1236041931.58.0.761638139209.issue1597850@psf.upfronthosting.co.za> Joshua Kinard added the comment: Anyone gotten farther on getting Python-2.5.x to cross-compile? I'm trying to get x86_64-pc-linux-gnu --> mipsel-unknown-linux-gnu, and after some hacking at the last updated cross-2.5.1.patch, plus a fix for the %zd printf bugaboo, plus adding in config.sub/config.guess files, I'm able to get it moving a little. But I'm running into the same failure as described in Message #56846 and I'm not quite sure how to properly work around that. Can't "hack" around it -- the entire build is automated from a Gentoo ebuild, so I need to be able to tweak something in Makefile.pre.in or configure.in to fix this...somehow. Ran some quick checks, and even with passing -I/usr/include to CPPFLAGS_FOR_BUILD, and running the host compiler directly on the command line, It's picking up wrong values for LONG_BIT and SIZEOF_LONG (I think). LONG_BIT = 64 SIZEOF_LONG = 4 So the test LONG_BIT != (SIZEOF_LONG * 8) succeeds and hits the #error in pyport.h Can't use a newer Python, including 2.6, 2.7-trunk, or even 3.0. Gentoo's primary package manager, portage, is currently dependent on 2.5.x (we're using 2.5.4 specifically right now). So Roumen's patch doesn't work at all (I've already tried backporting). Ideas perhaps? ---------- nosy: +kumba _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 03:07:41 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 03 Mar 2009 02:07:41 +0000 Subject: [issue5407] Broken Py3.1 release build in Visual Studio 2005 In-Reply-To: <1236031704.37.0.216105327736.issue5407@psf.upfronthosting.co.za> Message-ID: <1236046061.35.0.314229789598.issue5407@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I didn't know that VS2005 was supported. We jumped from 2003 to 2008, didn't we? Anyway, I'll fix this, we can't have things crashing. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 05:57:16 2009 From: report at bugs.python.org (Keith Fahlgren) Date: Tue, 03 Mar 2009 04:57:16 +0000 Subject: [issue5364] documentation in epub format In-Reply-To: <1235557178.12.0.454366670328.issue5364@psf.upfronthosting.co.za> Message-ID: <1236056236.28.0.267056796571.issue5364@psf.upfronthosting.co.za> Keith Fahlgren added the comment: > I got the same impression: xhtml + extra markup for mobile readers. ePub is indeed based heavily on XHTML 1.1 and CSS and uses a fairly simple ZIP container. Having written DocBook->ePub tools, I'm happy to help anyone interested in doing rst2epub. ---------- nosy: +abdelazer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 06:37:14 2009 From: report at bugs.python.org (Sylvain Rabot) Date: Tue, 03 Mar 2009 05:37:14 +0000 Subject: [issue5409] ConfigParser get methods broken In-Reply-To: <1236058633.76.0.532067455493.issue5409@psf.upfronthosting.co.za> Message-ID: <1236058633.76.0.532067455493.issue5409@psf.upfronthosting.co.za> New submission from Sylvain Rabot : Python 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. **************************************************************** Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. **************************************************************** IDLE 3.0 >>> from configparser import ConfigParser >>> config = ConfigParser() >>> config.add_section("popo") >>> config.set("popo", "int", 123) >>> config.getint("popo", "int") Traceback (most recent call last): File "", line 1, in config.getint("popo", "int") File "c:\Python30\lib\configparser.py", line 340, in getint return self._get(section, int, option) File "c:\Python30\lib\configparser.py", line 337, in _get return conv(self.get(section, option)) File "c:\Python30\lib\configparser.py", line 545, in get return self._interpolate(section, option, value, d) File "c:\Python30\lib\configparser.py", line 585, in _interpolate if "%(" in value: TypeError: argument of type 'int' is not iterable >>> config.set("popo", "bool", True) >>> config.getboolean("popo", "bool") Traceback (most recent call last): File "", line 1, in config.getboolean("popo", "bool") File "c:\Python30\lib\configparser.py", line 349, in getboolean v = self.get(section, option) File "c:\Python30\lib\configparser.py", line 545, in get return self._interpolate(section, option, value, d) File "c:\Python30\lib\configparser.py", line 585, in _interpolate if "%(" in value: TypeError: argument of type 'bool' is not iterable >>> config.set("popo", "float", 3.21) >>> config.getfloat("popo", "float") Traceback (most recent call last): File "", line 1, in config.getfloat("popo", "float") File "c:\Python30\lib\configparser.py", line 343, in getfloat return self._get(section, float, option) File "c:\Python30\lib\configparser.py", line 337, in _get return conv(self.get(section, option)) File "c:\Python30\lib\configparser.py", line 545, in get return self._interpolate(section, option, value, d) File "c:\Python30\lib\configparser.py", line 585, in _interpolate if "%(" in value: TypeError: argument of type 'float' is not iterable Same things with python 2.6 ---------- components: Library (Lib) messages: 83055 nosy: Absynthe severity: normal status: open title: ConfigParser get methods broken type: crash versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 07:13:50 2009 From: report at bugs.python.org (Sylvain Rabot) Date: Tue, 03 Mar 2009 06:13:50 +0000 Subject: [issue5409] ConfigParser get methods broken In-Reply-To: <1236058633.76.0.532067455493.issue5409@psf.upfronthosting.co.za> Message-ID: <1236060830.39.0.914531855479.issue5409@psf.upfronthosting.co.za> Sylvain Rabot added the comment: My bad, ConfigParser.set() needs string values apparently. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 07:53:11 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 03 Mar 2009 06:53:11 +0000 Subject: [issue5408] test_osx_env failing In-Reply-To: <1236035826.81.0.76995170361.issue5408@psf.upfronthosting.co.za> Message-ID: <1236063191.41.0.917369313884.issue5408@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Is this a standard unix build or a framework build? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 07:56:53 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 03 Mar 2009 06:56:53 +0000 Subject: [issue5407] Broken Py3.1 release build in Visual Studio 2005 In-Reply-To: <1236031704.37.0.216105327736.issue5407@psf.upfronthosting.co.za> Message-ID: <1236063413.65.0.0770571244539.issue5407@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Okay, I have submitted revision 70119 that fixes this. This is most weird, though. It is as though the non-_DEBUG crt doesn't match the headers supplied with the CRT sources that come with visual studio 2005. One possible reason is that there is some extra data in VC8.0 SP1 that isn't reflected in the headers. We need to test this with a compile by vanilla VC8.0, one without the service packs. ---------- resolution: -> fixed stage: -> test needed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 08:06:11 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 03 Mar 2009 07:06:11 +0000 Subject: [issue5408] test_osx_env failing In-Reply-To: <1236035826.81.0.76995170361.issue5408@psf.upfronthosting.co.za> Message-ID: <1236063971.8.0.50457774749.issue5408@psf.upfronthosting.co.za> Ned Deily added the comment: It appears the test doesn't work correctly for non-framework builds, something I didn't test. A patch is forthcoming. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 08:14:31 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Mar 2009 07:14:31 +0000 Subject: [issue5407] Broken Py3.1 release build in Visual Studio 2005 In-Reply-To: <1236031704.37.0.216105327736.issue5407@psf.upfronthosting.co.za> Message-ID: <1236064471.63.0.395254267998.issue5407@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The fix works for me. It all builds once again :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 08:22:35 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 03 Mar 2009 07:22:35 +0000 Subject: [issue5407] Broken Py3.1 release build in Visual Studio 2005 In-Reply-To: <1236031704.37.0.216105327736.issue5407@psf.upfronthosting.co.za> Message-ID: <1236064955.32.0.169762361015.issue5407@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Sorry for interruption. Maybe is this CRT internal hack needed for debug build only? I believe _ASSERTE is only enabled for debug build. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 08:42:49 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Mar 2009 07:42:49 +0000 Subject: [issue5407] Broken Py3.1 release build in Visual Studio 2005 In-Reply-To: <1236031704.37.0.216105327736.issue5407@psf.upfronthosting.co.za> Message-ID: <1236066168.5.0.217432740705.issue5407@psf.upfronthosting.co.za> Raymond Hettinger added the comment: For me, it was the release builds that were failing. With the fix just added, all is well now. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 08:45:50 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 03 Mar 2009 07:45:50 +0000 Subject: [issue5403] test_md5 segfault In-Reply-To: <1235972768.83.0.536109179608.issue5403@psf.upfronthosting.co.za> Message-ID: <1236066350.36.0.678043908569.issue5403@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: This one was fixed in r70119. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 08:46:50 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 03 Mar 2009 07:46:50 +0000 Subject: [issue5407] Broken Py3.1 release build in Visual Studio 2005 In-Reply-To: <1236031704.37.0.216105327736.issue5407@psf.upfronthosting.co.za> Message-ID: <1236066410.27.0.711759811793.issue5407@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: no, r69560/r69793 also removed the call to _set_invalid_parameter_handler(). The default parameter handling is now left alone in the crt which will throw up a dialogue box both in the release and debug versions. Anyway, the issue (strange block layout) was only present in Release builds. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 08:51:19 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Mar 2009 07:51:19 +0000 Subject: [issue5336] collections.namedtuple generates code causing PyChecker warnings In-Reply-To: <1235208293.75.0.0186544029799.issue5336@psf.upfronthosting.co.za> Message-ID: <1236066679.67.0.32093414103.issue5336@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed in r70106 and r70121 as part of converting _asdict() to return an OrderedDictionary. Leaving 2.6 and 3.0 as-is. ---------- resolution: -> fixed status: open -> closed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 08:53:49 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 03 Mar 2009 07:53:49 +0000 Subject: [issue5407] Broken Py3.1 release build in Visual Studio 2005 In-Reply-To: <1236031704.37.0.216105327736.issue5407@psf.upfronthosting.co.za> Message-ID: <1236066829.25.0.149640799399.issue5407@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: OK, sorry for interruption. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 08:55:55 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 03 Mar 2009 07:55:55 +0000 Subject: [issue5408] test_osx_env failing In-Reply-To: <1236035826.81.0.76995170361.issue5408@psf.upfronthosting.co.za> Message-ID: <1236066955.07.0.841718871612.issue5408@psf.upfronthosting.co.za> Ned Deily added the comment: ANALYSIS In a non-framework build, when PYTHONEXECUTABLE is set to a invalid value, getpath.c is unable to determine appropriate values for sys.prefix and sys.path so the interpreter fails in initialization. SOLUTION Simplify the test and supply appropriate values so the test works for both framework and non-framework builds. APPLIES py3k, 3.0 Added file: http://bugs.python.org/file13232/patch-nad0021-py3k-30.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 09:28:01 2009 From: report at bugs.python.org (Joshua Kinard) Date: Tue, 03 Mar 2009 08:28:01 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1236068880.89.0.275651738585.issue5404@psf.upfronthosting.co.za> Joshua Kinard added the comment: Making progress! Adapted the cross-2.5.1.patch from Issue #1597850, integrated the %zd printf fixup patch, and added another cross-compiler check for the libffi configure bits in setup.py (it'd pass libffi's configure no --host options, so libffi would compile for the build system, and that's not good). Now I'm just trying to figure out why for each extension module, why CFLAGS gets passed, as far as I can tell, to both the CC and the LD tools? I see in the code that distutils doesn't allow one to separate CC and CXX. Is the same for CC and LD? binutils' ld doesn't understand the same range of flags that gcc does, so for a mips cross-compile case, you may have the -mabi flag passed. Gcc understands this, but -m on ld is to select the output binary, of which 'abi' isn't (obviously) a valid output type. Is this to me a distutils limitation I'm hitting? I've already dug through the generated Makefile at Python's root and can't pin down precisely where it invokes ld for each extension, so I'm assuming setup.py handles this. However, I don't read python 100%, and some of the tricks you can do with classes and def's seems weird to me. PyBuildExt seems like some of its internal functions call themselves in a recursive fashion -- right? I'm also not sure which function is the actual function call that executes the compiler or the linker. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 09:47:22 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Mar 2009 08:47:22 +0000 Subject: [issue4626] compile() doesn't ignore the source encoding when a string is passed in In-Reply-To: <1228976357.63.0.133847904092.issue4626@psf.upfronthosting.co.za> Message-ID: <1236070042.36.0.403720199462.issue4626@psf.upfronthosting.co.za> STINNER Victor added the comment: > Should this be backported? It's the r70113 (not the 70112). I see that pitrou backported the fix to 3.0.x. I think that it's enough, 2.x doesn't require the fix. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 12:32:21 2009 From: report at bugs.python.org (Retro) Date: Tue, 03 Mar 2009 11:32:21 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1236079941.78.0.233355583256.issue5390@psf.upfronthosting.co.za> Retro added the comment: In my Windows Vista registry I only have the second two keys present 1) HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{9cc89170-000b-457d-91f1-53691f85b223} 2) HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{de2f2d9c-53e2-40ee-8209-74da63cb060e} for which the value of the property DisplayName is 1) DisplayName Python 2.6.1 2) DisplayName Python 3.0.1 I don't have the property DisplayIcon for any of those two keys. I did a complete removal and a reinstall of both the interpreters now, but I have the same issue and the registry contains the very same two keys and each of the keys contain only the property DisplayName as before. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 12:46:53 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 03 Mar 2009 11:46:53 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1236080813.91.0.938820209932.issue5404@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 12:48:27 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 03 Mar 2009 11:48:27 +0000 Subject: [issue5396] os.read not handling O_DIRECT flag In-Reply-To: <1235847751.77.0.558509867366.issue5396@psf.upfronthosting.co.za> Message-ID: <1236080907.04.0.739011568353.issue5396@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: -> normal type: behavior -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 12:56:15 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 03 Mar 2009 11:56:15 +0000 Subject: [issue5410] msvcrt bytes cleanup In-Reply-To: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> Message-ID: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : I came from issue5391. Here is quote of Victor's message. >* msvcrt.putch(char), msvcrt.ungetch(char): msvcrt has also: > - msvcrt.getch()->byte string of 1 byte > - msvcrt.getwch()->unicode string of 1 character > - msvcrt.putwch(unicode string of 1 character) > - msvcrt_ungetwch(unicode string of 1 character) > Hum, putch(), ungetch(), getch() use inconsistent types >(unicode/bytes) and should be fixed. Another issue should be open for >that. > >Notes: msvcrt.putwch() accepts string of length > 1 and >msvcrt.ungetwch() doesn't check string length (and so may crash with >length=0 or length > 1?). And msvcrt.ungetwch() calls _ungetch not _ungetwch. Here is the patch hopefully fixing these issue. (I cannot test wide version of functions because VC6 don't have them) ---------- components: Extension Modules, Windows files: py3k_fix_msvcrt.patch keywords: patch messages: 83071 nosy: ocean-city severity: normal status: open title: msvcrt bytes cleanup versions: Python 3.1 Added file: http://bugs.python.org/file13233/py3k_fix_msvcrt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 12:56:26 2009 From: report at bugs.python.org (=?utf-8?q?Per_=C3=98yvind_Karlsen?=) Date: Tue, 03 Mar 2009 11:56:26 +0000 Subject: [issue5411] add xz compression support to distutils In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> New submission from Per ?yvind Karlsen : Here's a patch that adds support for xz compression: http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/python/current/SOURCES/Python-2.6.1-distutils-xz-support.patch?view=log ---------- assignee: tarek components: Distutils messages: 83072 nosy: proyvind, tarek severity: normal status: open title: add xz compression support to distutils type: feature request versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 13:33:52 2009 From: report at bugs.python.org (andrej) Date: Tue, 03 Mar 2009 12:33:52 +0000 Subject: [issue1978] Python(2.5.1) will be crashed when i use _ssl module in multi-threads environment in linux. In-Reply-To: <1201733914.21.0.052632860787.issue1978@psf.upfronthosting.co.za> Message-ID: <1236083632.73.0.0729528149005.issue1978@psf.upfronthosting.co.za> andrej added the comment: Is there a reason why this patch has not been implemented in the official release (2.5.4)? I am having plenty of troubles using it in a similar program. ---------- nosy: +andrej _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 14:36:52 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 03 Mar 2009 13:36:52 +0000 Subject: [issue4459] bdist_rpm should enable --fix-python by default In-Reply-To: <1227969751.28.0.990351219395.issue4459@psf.upfronthosting.co.za> Message-ID: <1236087412.81.0.963155288981.issue4459@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- title: bdist_rpm assumes python -> bdist_rpm should enable --fix-python by default _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 15:23:41 2009 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 03 Mar 2009 14:23:41 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1236090221.37.0.481915669107.issue5404@psf.upfronthosting.co.za> Roumen Petrov added the comment: Joshua, may be you need patch from Issue4010 to pass LDFLAGS to distutils. Another issue4305 - it is for mipsel. About cross compilation - yes it is Python flaw. For past ten years the progress is near to zero. About you problem - #error "LONG_BIT definition appears wrong for platform ..." ( posted in another issue ) - please attach you config.log . Also Python 2.5 branch is closed (I guess even for security patches) and for 2.6 I guess new features are not acceptable. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 16:06:29 2009 From: report at bugs.python.org (Raghuram Devarakonda) Date: Tue, 03 Mar 2009 15:06:29 +0000 Subject: [issue5409] ConfigParser get methods broken In-Reply-To: <1236058633.76.0.532067455493.issue5409@psf.upfronthosting.co.za> Message-ID: <1236092789.6.0.309709657626.issue5409@psf.upfronthosting.co.za> Changes by Raghuram Devarakonda : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 16:14:36 2009 From: report at bugs.python.org (Jeff Kaufman) Date: Tue, 03 Mar 2009 15:14:36 +0000 Subject: [issue5412] extend configparser to support [] syntax In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> New submission from Jeff Kaufman : This is a patch against the configparser in the cvs version of 3.1 to support [] notation: >>> import configparser_patched >>> config = configparser_patched.SafeConfigParser() >>> config.add_section("spam") >>> config["spam", "eggs"] = "yummy" >>> config["spam", "eggs"] 'yummy' >>> del config["spam", "eggs"] >>> The functions are just syntactic sugar for the simple forms of "get", "set", and "remove_option". ---------- components: Library (Lib) files: configparser.patch keywords: patch messages: 83075 nosy: jkaufman severity: normal status: open title: extend configparser to support [] syntax type: feature request versions: Python 3.1 Added file: http://bugs.python.org/file13234/configparser.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 17:17:33 2009 From: report at bugs.python.org (jan matejek) Date: Tue, 03 Mar 2009 16:17:33 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. Message-ID: <1236097053.53.0.310380229512.issue1294959@psf.upfronthosting.co.za> Changes by jan matejek : ---------- nosy: +matejcik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 17:20:49 2009 From: report at bugs.python.org (jan matejek) Date: Tue, 03 Mar 2009 16:20:49 +0000 Subject: [issue858809] Use directories from configure rather than hardcoded Message-ID: <1236097249.05.0.317531298051.issue858809@psf.upfronthosting.co.za> Changes by jan matejek : ---------- nosy: +matejcik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 18:34:06 2009 From: report at bugs.python.org (jan matejek) Date: Tue, 03 Mar 2009 17:34:06 +0000 Subject: [issue858809] Use directories from configure rather than hardcoded Message-ID: <1236101646.11.0.409828850752.issue858809@psf.upfronthosting.co.za> jan matejek added the comment: well, seeing as redesign of distutils probably won't happen anytime soon... why don't we fix the obvious bug (broken configure) now and redesign distutils later? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 18:36:03 2009 From: report at bugs.python.org (jan matejek) Date: Tue, 03 Mar 2009 17:36:03 +0000 Subject: [issue858809] Use directories from configure rather than hardcoded Message-ID: <1236101763.65.0.285438721495.issue858809@psf.upfronthosting.co.za> jan matejek added the comment: ...the patch is absolutely trivial, doesn't have any deep consequences and applies cleanly to head and all branches i know of. ...i wonder if the patch-fasttracking offer still applies... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 19:04:35 2009 From: report at bugs.python.org (Bill Janssen) Date: Tue, 03 Mar 2009 18:04:35 +0000 Subject: [issue1978] Python(2.5.1) will be crashed when i use _ssl module in multi-threads environment in linux. In-Reply-To: <1201733914.21.0.052632860787.issue1978@psf.upfronthosting.co.za> Message-ID: <1236103475.09.0.0107668469301.issue1978@psf.upfronthosting.co.za> Bill Janssen added the comment: Yes, the reason is that the supplied patch doesn't provide enough test cases. This is a big patch; 2.5.x is a bug-fix release; a newer version of the SSL code is available from PyPI as a work-around; I don't have time right now to write more tests myself. All of which means that I won't look at it more till the patch (or another patch) includes more test cases. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 19:15:20 2009 From: report at bugs.python.org (Bill Janssen) Date: Tue, 03 Mar 2009 18:15:20 +0000 Subject: [issue4471] IMAP4 missing support for starttls In-Reply-To: <1228062796.45.0.215183772699.issue4471@psf.upfronthosting.co.za> Message-ID: <1236104120.18.0.159525330689.issue4471@psf.upfronthosting.co.za> Bill Janssen added the comment: I brought this up on pydotorg, and Barry suggests that someone put together a Twisted environment which could be downloaded and run locally on the test machine. It would provide IMAP and POP servers, perhaps NNTP and others as well. Now, all we need is someone to make that happen :-). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 19:17:37 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 03 Mar 2009 18:17:37 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1236104257.0.0.250234116141.issue1641@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > Giampaolo, I'm concerned that your patch uses a global 'tasks' list > which cannot be overriden. Shouldn't loop() accept an optional task > list argument, as it already does with the socket map? That would keep > with the spirit of asyncore and make things easier for those of us who > use multiple event loops in multiple threads. Personally I can't think of any use case in which that would come helpful, but perhaps it's because I've never mixed asyncore and threads. Can't you do that by simply overriding the global list? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 19:44:28 2009 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 03 Mar 2009 18:44:28 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1236105868.9.0.755689026045.issue1641@psf.upfronthosting.co.za> Guido van Rossum added the comment: The idea is to be able (whether you see a use case or not) to use different tasks lists simultaneously. Messing with globals is the worst possible API for that. All you need is to add a tasks=None argument to the loop() signature, rename the global tasks list to (e.g.) default_tasks, and add this to the top of loop: if tasks is None: tasks = default_tasks similar to what it does for map. You'd also have to pass the tasks list to the scheduler() call and the call_later() constructor. Defaulting to a global is fine. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 20:10:22 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 03 Mar 2009 19:10:22 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1236107422.19.0.969260168179.issue1641@psf.upfronthosting.co.za> Josiah Carlson added the comment: Forest: To answer your question, yes, that blog post discusses a better variant of sched.py , but no, there isn't a bug. I should probably post it some time soon for 2.7/3.1 inclusion. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 20:24:00 2009 From: report at bugs.python.org (Forest Wilkinson) Date: Tue, 03 Mar 2009 19:24:00 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236108240.86.0.635834498858.issue5397@psf.upfronthosting.co.za> Forest Wilkinson added the comment: I was just reading the PEP, and caught this bit: "Does OrderedDict.popitem() return a particular key/value pair? Yes. It pops-off the most recently inserted new key and its corresponding value." Okay, but I'd also like a convenient and fast way to find the oldest key, which I think I'd need for an LRU cache. I didn't notice one in the patch. Perhaps I simply missed something. Shouldn't popitem() allow the caller to choose which end from which to pop? ---------- nosy: +forest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 20:26:34 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 Mar 2009 19:26:34 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236108394.55.0.440458604629.issue5397@psf.upfronthosting.co.za> Georg Brandl added the comment: I wonder if, instead of all kinds of new APIs, the _keys list could just be made public (under a different name of course). Of course, that makes further optimization or a rewrite in C harder. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 20:32:47 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Mar 2009 19:32:47 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236108767.62.0.954779691288.issue5397@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The internal data structure *must* remain private so that we can build a C replacement or switch to one of the other possible algorithms. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 20:45:31 2009 From: report at bugs.python.org (Jeffrey Yasskin) Date: Tue, 03 Mar 2009 19:45:31 +0000 Subject: [issue2459] speedup for / while / if with better bytecode In-Reply-To: <1206224909.42.0.227263347483.issue2459@psf.upfronthosting.co.za> Message-ID: <1236109531.44.0.153460170479.issue2459@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: Hold off on reviewing this. There's one bug around the peepholer not turning itself off when line numbers skip by more than 127, and another around the traceback generator still assuming line numbers are unsigned. I'll post another patch when those are fixed and tested. I may not get to it for a day or two, so someone else is welcome to update the patch instead. :) ---------- assignee: pitrou -> jyasskin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 20:48:42 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 Mar 2009 19:48:42 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236109722.5.0.96855798567.issue5397@psf.upfronthosting.co.za> Georg Brandl added the comment: > The internal data structure *must* remain private so that we can build a > C replacement or switch to one of the other possible algorithms. Even then the keys list could be offered as a property. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 21:00:45 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Mar 2009 20:00:45 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236110445.86.0.648310735885.issue5397@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Forest, I've taken another look at what's involved and am inclined to accept the idea. It can be done without mucking-up the regular dict API and without precluding any of the other possible underlying algorithms. I like that it supports an entire new categoy of use cases with only a trivial, easily-understood API extension. Patch is attached. Added file: http://bugs.python.org/file13235/popoldest.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 20:36:31 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Mar 2009 19:36:31 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236108991.71.0.322340404136.issue5397@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Forest, for your use case I recommend copying the code to a new class and replacing the _keys list with a deque so that you can efficiently pop from the other end. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 20:39:44 2009 From: report at bugs.python.org (Forest Wilkinson) Date: Tue, 03 Mar 2009 19:39:44 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236109184.42.0.605542561472.issue5397@psf.upfronthosting.co.za> Forest Wilkinson added the comment: > Shouldn't popitem() allow the caller to choose which end from > which to pop? Thinking it through a bit more, and LRU cache would actually need to access the oldest item without necessarily removing it. Besides, popitem() should probably retain the signature of dict.popitem(). I think I'll take this matter to python-dev. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 21:06:49 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Mar 2009 20:06:49 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236110809.41.0.70088610596.issue5397@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file13221/od4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 21:06:53 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Mar 2009 20:06:53 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236110813.71.0.286739718653.issue5397@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file13228/od5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 21:06:57 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Mar 2009 20:06:57 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236110817.64.0.7984679014.issue5397@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file13229/od6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 21:07:54 2009 From: report at bugs.python.org (Armin Ronacher) Date: Tue, 03 Mar 2009 20:07:54 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236110874.75.0.963225669801.issue5397@psf.upfronthosting.co.za> Armin Ronacher added the comment: Please no. We just decided to *not* extend the API. The PEP originally had a well designed list of dict API extensions that already provided exactly that. If we really want to provide access to that, we can roll back to where we came from. I don't think implementing an LRUCache on an ordered dict is a good idea. Especially because LRU caches are a shared resource and should be thread safe because of that. Which the ordered dict is not. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 21:08:07 2009 From: report at bugs.python.org (Armin Ronacher) Date: Tue, 03 Mar 2009 20:08:07 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236110887.49.0.288765442653.issue5397@psf.upfronthosting.co.za> Armin Ronacher added the comment: Please no. We just decided to *not* extend the API. The PEP originally had a well designed list of dict API extensions that already provided exactly that. If we really want to provide access to that, we can roll back to where we came from. I don't think implementing an LRUCache on an ordered dict is a good idea. Especially because LRU caches are a shared resource and should be thread safe because of that. Which the ordered dict is not. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 21:08:18 2009 From: report at bugs.python.org (Armin Ronacher) Date: Tue, 03 Mar 2009 20:08:18 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236110898.65.0.828578026017.issue5397@psf.upfronthosting.co.za> Changes by Armin Ronacher : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 21:10:25 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 03 Mar 2009 20:10:25 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1236111025.22.0.272508182755.issue1641@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > You'd also have to pass the tasks list to the scheduler() call and the > call_later() constructor. Defaulting to a global is fine. Unless I change the current API I can't add a new optional arguments to call_later constructor because it already uses *args **kwargs: def __init__(self, seconds, target, *args, **kwargs): _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 21:12:58 2009 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 03 Mar 2009 20:12:58 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1236111178.83.0.672107305803.issue1641@psf.upfronthosting.co.za> Guido van Rossum added the comment: You could solve this with a "reserved" keyword argument _tasks. Or you could have two different factory methods, call_later_with_tasks() and call_later(). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 21:13:46 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 Mar 2009 20:13:46 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236111226.57.0.101412371807.issue5397@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, disregard my suggestions, it's better not to have a property that does almost exactly the same as keys(). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 21:56:38 2009 From: report at bugs.python.org (Forest Wilkinson) Date: Tue, 03 Mar 2009 20:56:38 +0000 Subject: [issue5397] PEP 372: OrderedDict In-Reply-To: <1235903426.27.0.376128912816.issue5397@psf.upfronthosting.co.za> Message-ID: <1236113798.68.0.757997950666.issue5397@psf.upfronthosting.co.za> Forest Wilkinson added the comment: Agreed here. Thanks, gents. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 22:04:28 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 03 Mar 2009 21:04:28 +0000 Subject: [issue5179] subprocess leaves open fds on construction error In-Reply-To: <1234037080.37.0.0531724857804.issue5179@psf.upfronthosting.co.za> Message-ID: <1236114268.91.0.3473201469.issue5179@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: This issue is not fixed on windows yet. (test_leaking_fds_on_error fails) I think attached patch will fix this. ====================================================================== ERROR: test_writes_before_communicate (__main__.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_subprocess.py", line 398, in test_writes_before_communicate File "e:\python-dev\py3k\lib\subprocess.py", line 632, in __init__ File "e:\python-dev\py3k\lib\subprocess.py", line 746, in _get_handles IOError: [Errno 24] Too many open files ---------- keywords: +patch nosy: +ocean-city priority: high -> release blocker resolution: fixed -> status: closed -> open versions: +Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13236/fix_subprocess_leak_on_failure_on_windows.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 22:04:42 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Mar 2009 21:04:42 +0000 Subject: [issue4712] Document pickle behavior for subclasses of dicts/lists In-Reply-To: <1229880245.44.0.0654065239479.issue4712@psf.upfronthosting.co.za> Message-ID: <1236114282.35.0.00983721043654.issue4712@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The behavior is a PITA. It means that dict subclasses the redefine __setitem__ have unpleasant pickling challenges. The __setitem__ insertions are called before the subclass can initialize. The workaround involves a funky dance using __reduce__. See collections.OrderedDict::__reduce__() for an example. ---------- nosy: +rhettinger priority: low -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 22:05:41 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 Mar 2009 21:05:41 +0000 Subject: [issue5179] subprocess leaves open fds on construction error In-Reply-To: <1234037080.37.0.0531724857804.issue5179@psf.upfronthosting.co.za> Message-ID: <1236114341.76.0.516781191142.issue5179@psf.upfronthosting.co.za> Georg Brandl added the comment: Since I can't test on Windows, I'll leave that in your hands :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 22:09:36 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 03 Mar 2009 21:09:36 +0000 Subject: [issue4565] Rewrite the IO stack in C In-Reply-To: <1228576260.5.0.752040739396.issue4565@psf.upfronthosting.co.za> Message-ID: <0016361649e7059a0f04643d5acd@google.com> Daniel Diniz added the comment: A couple of typos in the Python implementation. http://codereview.appspot.com/22061/diff/1/11 File Lib/_pyio.py (right): http://codereview.appspot.com/22061/diff/1/11#newcode266 Line 266: fp is closed after the suite of the with statment is complete: statment -> statement http://codereview.appspot.com/22061/diff/1/11#newcode844 Line 844: self._reset_read_buf() Setting "_read_buf" and "_read_pos" directly on __init__ may help introspection tools. http://codereview.appspot.com/22061/diff/1/11#newcode963 Line 963: DEAFULT_BUFFER_SIZE. If max_buffer_size is omitted, it defaults to DEAFULT_BUFFER_SIZE -> DEFAULT_BUFFER_SIZE http://codereview.appspot.com/22061/diff/1/11#newcode1728 Line 1728: decoder = self._decoder or self._get_decoder() 'decoder' isn't used in this method, is this here for an useful side-effect? http://codereview.appspot.com/22061/diff/1/11#newcode1784 Line 1784: more_line = '' This seems unused. http://codereview.appspot.com/22061 ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 22:15:03 2009 From: report at bugs.python.org (David W. Lambert) Date: Tue, 03 Mar 2009 21:15:03 +0000 Subject: [issue1175686] add "reload" function to IDLE Message-ID: <1236114903.69.0.693222178306.issue1175686@psf.upfronthosting.co.za> David W. Lambert added the comment: 0->kbk I avoid idle altogether and run python in emacs shell buffer. Switching windows usually involves mice. Mice are evil. emacs has gazillions of features. artist mode (oops, mice!) rectangular regions, registers, 25 (hundreds with C-{digit}) reasonable places to move the cursor with a couple keystrokes. calc, modes, keyboard macros, mail, directory editing, buffer shared on multiple x-servers ... ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 22:26:17 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 03 Mar 2009 21:26:17 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1236115577.91.0.16654090332.issue1641@psf.upfronthosting.co.za> Josiah Carlson added the comment: I've just attached a patch to sched.py and asyncore.py to offer a richer set of features for sched.py, with a call_later() function and minimal related classes for asyncore.py to handle most reasonable use-cases. There is no documentation or tests, but I can add those based on Giampaolo's tests and docs if we like this approach better. Added file: http://bugs.python.org/file13237/scheduler_partial.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 22:28:30 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 03 Mar 2009 21:28:30 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1236115710.46.0.232443459394.issue1641@psf.upfronthosting.co.za> Changes by Josiah Carlson : Removed file: http://bugs.python.org/file13237/scheduler_partial.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 22:29:17 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 03 Mar 2009 21:29:17 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1236115757.16.0.180928958903.issue1641@psf.upfronthosting.co.za> Josiah Carlson added the comment: Here's a better patch without tabs. Added file: http://bugs.python.org/file13238/scheduler_partial.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 22:35:41 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 03 Mar 2009 21:35:41 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1236116141.55.0.000286663909278.issue5390@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Ok. Now run the installation (of, say, 2.6) with msiexec /i python-xy.msi /l*v python26.log and compress and attach the resulting log file. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 22:36:08 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 03 Mar 2009 21:36:08 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1236116168.56.0.126261141515.issue5390@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Also, what version of Vista *precisely* are you using? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 22:47:44 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 03 Mar 2009 21:47:44 +0000 Subject: [issue4565] Rewrite the IO stack in C In-Reply-To: <0016361649e7059a0f04643d5acd@google.com> Message-ID: <1afaf6160903031347y4c6d410fr6666927453be791f@mail.gmail.com> Benjamin Peterson added the comment: 2009/3/3 Daniel Diniz : > A couple of typos in the Python implementation. Thanks for taking a look! Fixed these things in r70135. > http://codereview.appspot.com/22061/diff/1/11#newcode844 > Line 844: self._reset_read_buf() > Setting "_read_buf" and "_read_pos" directly on __init__ may help > introspection tools. Perhaps, but I think it duplicates too much of _reset_read_buf(). And it wouldn't damage introspection, just static analysis. > http://codereview.appspot.com/22061/diff/1/11#newcode1728 > Line 1728: decoder = self._decoder or self._get_decoder() > 'decoder' isn't used in this method, is this here for an useful > side-effect? Yes, it's for side affect, but it needn't be in a variable. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 22:57:52 2009 From: report at bugs.python.org (Adam Olsen) Date: Tue, 03 Mar 2009 21:57:52 +0000 Subject: [issue1975] signals not always delivered to main thread, since other threads have the signal unmasked In-Reply-To: <1201711085.9.0.419365608938.issue1975@psf.upfronthosting.co.za> Message-ID: <1236117472.88.0.87123470508.issue1975@psf.upfronthosting.co.za> Adam Olsen added the comment: issue 960406 broke this as part of a fix for readline. I believe that was motivated by fixing ctrl-C in the main thread, but non-main threads were thrown in as a "why not" measure. msg 46078 is the mention of this. You can go into readlingsigs7.patch and search for SET_THREAD_SIGMASK. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 3 23:56:41 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 03 Mar 2009 22:56:41 +0000 Subject: [issue5179] subprocess leaves open fds on construction error In-Reply-To: <1234037080.37.0.0531724857804.issue5179@psf.upfronthosting.co.za> Message-ID: <1236121001.39.0.915263121092.issue5179@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Thanks, fixed in r70137(trunk), r70142(py3k), r70146(release30-maint), r70147(release26-maint) ---------- priority: release blocker -> high resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 00:10:52 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 03 Mar 2009 23:10:52 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1236121852.63.0.683674633963.issue1641@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: A new patch is in attachment. Changes from the previous one (Sep 2008): - renamed "deafult_tasks" global list to "scheduled_tasks" - loop(), scheduler() and close_all() have a new "tasks" keyword argument defaulting to None - close_all() other than iterating over all existing dispatcher instances and closing them, also iterate over any unfired scheduled call found in "tasks" list, cancel() it and finally clears the list. - call_later constructor accepts a reserved _tasks argument - call_later overrides __lt__ instead of __le__ Tests and documentation are also included. Added file: http://bugs.python.org/file13239/asyncore.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 00:16:28 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 03 Mar 2009 23:16:28 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1236122188.23.0.798037749437.issue1641@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : Removed file: http://bugs.python.org/file8976/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 00:21:49 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 03 Mar 2009 23:21:49 +0000 Subject: [issue5273] 3.0.1 crashes in unicode path In-Reply-To: <1234697173.89.0.607307713692.issue5273@psf.upfronthosting.co.za> Message-ID: <1236122509.54.0.494972917308.issue5273@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 00:26:28 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 03 Mar 2009 23:26:28 +0000 Subject: [issue5334] array.fromfile() fails to insert values when EOFError is raised In-Reply-To: <1235189293.4.0.0829880938906.issue5334@psf.upfronthosting.co.za> Message-ID: <1236122788.12.0.0420190128219.issue5334@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- priority: -> release blocker versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 00:53:05 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 03 Mar 2009 23:53:05 +0000 Subject: [issue5273] 3.0.1 crashes in unicode path In-Reply-To: <1234697173.89.0.607307713692.issue5273@psf.upfronthosting.co.za> Message-ID: <1236124385.94.0.637818314288.issue5273@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I cannot say anything except that the patch looks ok. If it doesn't make anything worse and solves the present problem, I guess you can commit it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 00:55:45 2009 From: report at bugs.python.org (Attila Soki) Date: Tue, 03 Mar 2009 23:55:45 +0000 Subject: [issue5413] urllib ctypes error on Mac OS X Server 10.5 In-Reply-To: <1236124544.96.0.577290884621.issue5413@psf.upfronthosting.co.za> Message-ID: <1236124544.96.0.577290884621.issue5413@psf.upfronthosting.co.za> New submission from Attila Soki : i trying to compile Python 2.6.1 from scratch on Mac OS X Server (ppc). After configure/make/make install i test the compiled python with the followig file (t.py) (example from http://docs.python.org/library/urllib.html): Contents of /tmp/t.py: ------------- import urllib params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0}) f = urllib.urlopen("http://www.musi-cal.com/cgi-bin/query", params) print f.read() ------------- and i get this error: python /tmp/t.py Traceback (most recent call last): File "/tmp/t.py", line 3, in f = urllib.urlopen("http://www.musi-cal.com/cgi-bin/query", params) File "/usr/local/test/python/lib/python2.6/urllib.py", line 82, in urlopen opener = FancyURLopener() File "/usr/local/test/python/lib/python2.6/urllib.py", line 611, in __init__ URLopener.__init__(self, *args, **kwargs) File "/usr/local/test/python/lib/python2.6/urllib.py", line 129, in __init__ proxies = getproxies() File "/usr/local/test/python/lib/python2.6/urllib.py", line 1555, in getproxies return getproxies_environment() or getproxies_macosx_sysconf() File "/usr/local/test/python/lib/python2.6/urllib.py", line 1449, in getproxies_macosx_sysconf _CFSetup(sc) File "/usr/local/test/python/lib/python2.6/urllib.py", line 1330, in _CFSetup sc.CFStringCreateWithCString.argtypes = [ c_void_p, c_char_p, c_int32 ] File "/usr/local/test/python/lib/python2.6/ctypes/__init__.py", line 366, in __getattr__ func = self.__getitem__(name) File "/usr/local/test/python/lib/python2.6/ctypes/__init__.py", line 371, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: dlsym(RTLD_DEFAULT, CFStringCreateWithCString): symbol not found Exception AttributeError: "FancyURLopener instance has no attribute 'tempcache'" in > ignored than tested it whit this code (Thanks to Ned Deily) See the mailinglist thread at: http://mail.python.org/pipermail/python-list/2009-March/703067.html Contents of /tmp/tt.py: ----------------------- from ctypes import cdll from ctypes.util import find_library sc = cdll.LoadLibrary(find_library("SystemConfiguration")) x = sc.CFStringCreateWithCString(0, "HTTPEnable", 0) ----------------------- /usr/local/test/python/bin/python2.6 /tmp/tt.py Traceback (most recent call last): File "/tmp/tt.py", line 4, in x = sc.CFStringCreateWithCString(0, "HTTPEnable", 0) File "/usr/local/test/python/lib/python2.6/ctypes/__init__.py", line 366, in __getattr__ func = self.__getitem__(name) File "/usr/local/test/python/lib/python2.6/ctypes/__init__.py", line 371, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: dlsym(RTLD_DEFAULT, CFStringCreateWithCString): symbol not found Both test fails on my PPC Mac and runs without error on my Intel MacBook Some detailed info about the macs: ppc: Model Name: Xserve G5 Model Identifier: RackMac3,1 Processor Name: PowerPC G5 (3.1) Processor Speed: 2.3 GHz Number Of CPUs: 2 L2 Cache (per CPU): 512 KB Boot ROM Version: 5.1.7f2 System Version: Mac OS X Server 10.5.6 (9G55) Kernel Version: Darwin 9.6.0 intel: Model Name: MacBook Pro Model Identifier: MacBookPro3,1 Processor Name: Intel Core 2 Duo Processor Speed: 2.4 GHz Number Of Processors: 1 Total Number Of Cores: 2 L2 Cache: 4 MB Bus Speed: 800 MHz Boot ROM Version: MBP31.0070.B07 SSC Version: 1.16f8 System Version: Mac OS X 10.5.6 (9G55) Kernel Version: Darwin 9.6.0 I recompiled Python-2.6.1 with MACOSX_DEPLOYMENT_TARGET=10.3, but no change.. I updated developertools to xcode312_2621, no change.. Btw.. Python-2.5.4 compiled from scratch works fine. I dig a bit deeper with otool and discover some differences: Intel MacOS.so: Carbon, libSystem.B.dylib, CoreServices, ApplicationServices PPC MacOS.so: Carbon, libmx.A.dylib, libSystem.B.dylib Intel _ctypes.so: libSystem.B.dylib PPC _ctypes.so: libmx.A.dylib, libSystem.B.dylib ----------- Intel with deploymant target 10.3, xcode312: ----------- sh-3.2# otool -L /usr/local/test/python/lib/python2.6/lib-dynload/MacOS.so /usr/local/test/python/lib/python2.6/lib-dynload/MacOS.so: /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 136.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.3) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 32.0.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices (compatibility version 1.0.0, current version 34.0.0) ------- sh-3.2# otool -L /usr/local/test/python/lib/python2.6/lib-dynload/_ctypes.so /usr/local/test/python/lib/python2.6/lib-dynload/_ctypes.so: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.3) ---------- PPC with deployment_target 10.3, xcode312_2621 ---------- otool -L /usr/local/test/python/lib/python2.6/lib-dynload/MacOS.so /usr/local/test/python/lib/python2.6/lib-dynload/MacOS.so: /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 136.0.0) /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 47.1.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.3) ------- otool -L /usr/local/test/python/lib/python2.6/lib-dynload/_ctypes.so /usr/local/test/python/lib/python2.6/lib-dynload/_ctypes.so: /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 47.1.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.3) How i compiled it: export MACOSX_DEPLOYMENT_TARGET=10.5 configure --prefix=/usr/local/test/python make make install How i test: export PYTHONPATH=/usr/local/test/python:/usr/local/test/python/lib/python2.6/site-packages /usr/local/test/python/bin/ is in the PATH python /tmp/t.py ---------- assignee: theller components: Macintosh, ctypes messages: 83111 nosy: atiware at gmx.net, theller severity: normal status: open title: urllib ctypes error on Mac OS X Server 10.5 type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 01:32:21 2009 From: report at bugs.python.org (Ned Deily) Date: Wed, 04 Mar 2009 00:32:21 +0000 Subject: [issue5413] urllib ctypes error on Mac OS X Server 10.5 In-Reply-To: <1236124544.96.0.577290884621.issue5413@psf.upfronthosting.co.za> Message-ID: <1236126741.28.0.920252709245.issue5413@psf.upfronthosting.co.za> Ned Deily added the comment: For more info, see discussion starting here: I suspect a difference in the proxy configuration available between OS X and OS X Server, although I don't have a OS X Server configuration at hand to test it. (For 2.6, the OS X proxy configuration code was rewritten to use ctypes instead of the deprecated mac Carbon wrappers.) ---------- nosy: +nad, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 02:58:46 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 04 Mar 2009 01:58:46 +0000 Subject: [issue5273] 3.0.1 crashes in unicode path In-Reply-To: <1234697173.89.0.607307713692.issue5273@psf.upfronthosting.co.za> Message-ID: <1236131926.53.0.539230864435.issue5273@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Thanks, fixed in r70157(py3k) and r70158(release30-maint) ---------- priority: release blocker -> resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 06:16:49 2009 From: report at bugs.python.org (David Majnemer) Date: Wed, 04 Mar 2009 05:16:49 +0000 Subject: [issue5414] asciibin.a2b_uu returns unexpected values on non ascii data In-Reply-To: <1236143809.26.0.796935135561.issue5414@psf.upfronthosting.co.za> Message-ID: <1236143809.26.0.796935135561.issue5414@psf.upfronthosting.co.za> New submission from David Majnemer : Note that binascii.a2b_uu("\0") returns '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'. This appears to be the same as binascii.a2b_uu() which is most likely not the intention. Also, binascii.a2b_uu("\0\0") returns an exception, "Illegal char", which makes sense. ---------- components: Library (Lib) messages: 83114 nosy: dmajnemer severity: normal status: open title: asciibin.a2b_uu returns unexpected values on non ascii data type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 06:18:59 2009 From: report at bugs.python.org (David Majnemer) Date: Wed, 04 Mar 2009 05:18:59 +0000 Subject: [issue5414] asciibin.a2b_uu returns unexpected values on non ascii data In-Reply-To: <1236143809.26.0.796935135561.issue5414@psf.upfronthosting.co.za> Message-ID: <1236143939.04.0.863134701249.issue5414@psf.upfronthosting.co.za> David Majnemer added the comment: Added version number of python. ---------- versions: +Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 07:32:37 2009 From: report at bugs.python.org (Joshua Kinard) Date: Wed, 04 Mar 2009 06:32:37 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1236148357.29.0.660459749492.issue5404@psf.upfronthosting.co.za> Joshua Kinard added the comment: Roumen, I took a look at 4010, and tried your patch (as well as attempted to apply the latter patch, but they changes are too great). Neither one helped resolve my issue, but I should probably explain the angle I'm attacking this from so you have an idea of what I'm doing. Currently, in Gentoo, we have a package file (called an ebuild) for 2.5.4, and this is what our primary package manager, Portage, links up against, so that's why I'm working on getting 2.5.4 to cross-compile properly. I have no idea when we will move towards using 2.6.0. I'm trying to help our embedded team get cross-compiling working in some packages so we can cross-compile a "base system" from a fast host. This all started after I decided to resurrect an old Cobalt RaQ2 from the grave. That machine is extremely limited -- ~144MB of RAM and a 250MHz RM5231 MIPS Processor with no L2 Cache and a small L1 cache. Compiling is very, very slow, so the ability to cross-compile about ~83 base packages in about 2 hours versus an entire day is a very desirable thing. It has a CHOST tuple of mipsel-unknown-linux-gnu. Right now, the three most difficult packages to cross-compile are Perl, gettext, and Python, in that order. Perl is probably beyond all hope. I don't even know if I'll tackle it. Gettext is just a nightmare, even for a GNU package. We bypass this by disabling NLS support for the cross-build. Python, I feel, is doable. It's got some autotools links, so it's got the capability. Python code is also easy to read for me (unlike Perl, but I digress), so I can sort of follow the logic in some spots in setup.py. We have two packages that assist in cross-compiling. The first is our 'crossdev' package. It is akin to what you'll find in Debian or via Dan Kegel's crosstools setup. It takes care of installing cross-toolchains of varying degrees (C-Only, Glibc/Uclibc-based, etc..) on a Gentoo system. Next, is 'crossdev-wrappers', which is a set of wrapper scripts for the 'emerge' command, Gentoo's main package manager tool in Portage. This helps to pass a lot of the basic environment variables so that common configure scripts can correctly identify the build system and target/host system types, or allow simple, Makefile-only packages build using cross-compile toolchains. So what happens on a cross-compile of Python, is first, the _socket module fails to cross-compile because for that very specific compiler invocation, it passes -I/usr/include, and _socket references the sys/param.h include. Which it finds in my host system's /usr/include (an amd64 machine currently, so x86_64-pc-linux-gnu is the CHOST tuple). This will pull in x86 assembler language, which is misunderstood by a mipsel-based toolchain. I dug around, and found some patches that re-ordered how configure and setup.py do things, and after utilizing a tool in our ebuild system to create config.sub/config.guess files, this helps to get Python's core to compile for the most part (I also applied a fix for the printf %zd issue). However, the default compiling logic for python uses gcc to both compile the *.o files AND link into the final *.so modules. One of the patches I dug up (and merged) converts this logic to explicitly calling $CC for compiling the *.o files, and then $LD to link them into *.so modules. This is where part of my problem lies, because the patch doesn't address the fact that $CFLAGS gets passed to the $CC call (which is fine) AND to the $LD call (which is not fine, because 'ld' takes a different set of arguments) -- via (I think) the $OPT variable. The other problem was libffi, under the _ctypes/ folder. The setup.py script explicitly clears configure arguments out via 'config_args = []' code, and then invokes libffi's configure. Without a --host=${CHOST} value passed to it, libffi's configure incorrectly assumes it's running on an x86_64-pc-linux-gnu system, not in a cross-compile environment for mipsel-unknown-linux-gnu. Thus, the configure script will go on to build for that system, BUT call the mipsel-unknown-linux-gnu-gcc compiler to compile its internal test code. This fails, and Python's default behavior is to ignore build failures and continue on. So, after addressing those two problems, I've been trying to figure out how to pass $LD a minimal set of LDFLAGS -- mostly -L commands, although I'd like to just send it nothing but the *.o files and see how it handles those by itself. The logic in the makefile is really quite weird, though, and it's not helped by the patches I'm mixing in, some of which are a mix of several patches from this bug tracker. If you want to take a look at the two main patches, I've uploaded them to an external host, because I didn't want to litter the bug tracker with incomplete patches that don't fully address the core problem, especially since they're for older versions. This one addresses or hacks around: - LONG_BIT detection (hack) - Printf %zd (merged another patch) - Cross-compiling _socket (merged another patch) http://dev.gentoo.org/~kumba/tmp/python-2.5.4-cross-compile-alpha5.patch This one is a patch I wrote which gets libffi to compile. It also includes a small snippet of code to dump a variable out to a text file -- that's debug code. Ignore that. http://dev.gentoo.org/~kumba/tmp/python-2.5.4-cross-compile-libffi-configure.patch If you have tips or anything on how to better attack this, I'm all ears! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 08:08:11 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 07:08:11 +0000 Subject: [issue5413] urllib ctypes error on Mac OS X Server 10.5 In-Reply-To: <1236124544.96.0.577290884621.issue5413@psf.upfronthosting.co.za> Message-ID: <1236150491.38.0.941682657573.issue5413@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't have time to investigate this right now, I do have access to a 10.5 server box though. With some luck I'll be able to create a patch later today. Looking at the code in urllib I found the most likely reason for the problem: the Python script tries to resolve "CFStringCreateWithCString" through the SystemConfiguration framework. It may well be that this doesn't work on PPC systems and that this symbol should explicitly be loaded from the CoreFoundation framework. BTW. This probably also affects 3.x. ---------- versions: +Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 08:29:00 2009 From: report at bugs.python.org (=?utf-8?q?Ren=C3=A9_Puls?=) Date: Wed, 04 Mar 2009 07:29:00 +0000 Subject: [issue5415] uuid module generates incorrect values for uuid3 (and possibly uuid5) In-Reply-To: <1236151740.35.0.183499583743.issue5415@psf.upfronthosting.co.za> Message-ID: <1236151740.35.0.183499583743.issue5415@psf.upfronthosting.co.za> New submission from Ren? Puls : I am trying to recreate the sample output from appendix B of RFC 4122. http://www.ietf.org/rfc/rfc4122.txt In that document, a version 3 UUID is created using the DNS namespace (6ba7b810-9dad-11d1-80b4-00c04fd430c8, same as uuid.NAMESPACE_DNS in Python) and the name 'www.widgets.com'. The result according to the RFC should be: e902893a-9d22-3c7e-a7b8-d6e313b71d9f Here is the output from the Python uuid module: >>> import uuid >>> uuid.NAMESPACE_DNS UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8') >>> uuid.uuid3(uuid.NAMESPACE_DNS, 'www.widgets.com') UUID('3d813cbb-47fb-32ba-91df-831e1593ac29') I couldn't find any test cases for the Python module. Did I use it incorrectly, or is the calculation really off? ---------- components: Library (Lib) messages: 83118 nosy: pwr severity: normal status: open title: uuid module generates incorrect values for uuid3 (and possibly uuid5) type: behavior versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 11:52:11 2009 From: report at bugs.python.org (David Majnemer) Date: Wed, 04 Mar 2009 10:52:11 +0000 Subject: [issue5416] str.replace does strange things when given a negative count In-Reply-To: <1236163931.77.0.818123555808.issue5416@psf.upfronthosting.co.za> Message-ID: <1236163931.77.0.818123555808.issue5416@psf.upfronthosting.co.za> New submission from David Majnemer : str.replace("", "", "asdf", -1) returns "asdf", I believe this is not correct and strictly speaking not up to the documentation posted. I am of the opinion that it should function like str.replace("", "", "asdf", 0) which returns "" ---------- components: Interpreter Core messages: 83119 nosy: dmajnemer severity: normal status: open title: str.replace does strange things when given a negative count versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 13:04:59 2009 From: report at bugs.python.org (Retro) Date: Wed, 04 Mar 2009 12:04:59 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1236168299.45.0.273065758208.issue5390@psf.upfronthosting.co.za> Retro added the comment: A strange thing now happened. Now the Python 2.6.1 interpreter has an icon in the Add/Remove Programs list. I completely removed Python 2.6.1 and reinstalled it with the command msiexec /i python-2.6.1.msi /l*v python26.log and it now has an icon in the Add/Remove Programs list. Please see the attached screenshot. My Windows Vista is Business Edition, Service Pack 1. I got it by buying my laptop and then upgraded it to the Service Pack 1 version and I have the very latest updates installed on it, too. I don't know what do you mean by specific version. I hope I answered your question. Added file: http://bugs.python.org/file13240/arpvista_surprise.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 13:08:41 2009 From: report at bugs.python.org (Retro) Date: Wed, 04 Mar 2009 12:08:41 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1236168521.53.0.113710036285.issue5390@psf.upfronthosting.co.za> Retro added the comment: And now I'm attaching the installing log of Python 2.6.1 for you. I hope you have enough information to work on the solution. If you need more information, just ask. Added file: http://bugs.python.org/file13241/python26.rar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 15:56:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 04 Mar 2009 14:56:10 +0000 Subject: [issue5416] str.replace does strange things when given a negative count In-Reply-To: <1236163931.77.0.818123555808.issue5416@psf.upfronthosting.co.za> Message-ID: <1236178570.82.0.0125442604814.issue5416@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed in trunk and py3k. Changing to RFE, set it to behavior if you disagree. Python 2.4 does return "" for str.replace("", "", "asdf", -1), the change happened in rev46226, with the effbot adding this snippet (by Andrew Dalke?): if (maxcount < 0) { maxcount = PY_SSIZE_T_MAX; } else if (maxcount == 0 || PyString_GET_SIZE(self) == 0) { /* nothing to do; return the original string */ return return_self(self); } I'm not sure the current behavior can be considered better than what David proposes, but I also wonder whether it matters at all. ---------- nosy: +ajaksu2 stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 16:04:58 2009 From: report at bugs.python.org (Senthil) Date: Wed, 04 Mar 2009 15:04:58 +0000 Subject: [issue5416] str.replace does strange things when given a negative count In-Reply-To: <1236178570.82.0.0125442604814.issue5416@psf.upfronthosting.co.za> Message-ID: <7c42eba10903040704m2a8fa46arc0f967814b9e20a5@mail.gmail.com> Senthil added the comment: And also look at the help on string.replace which sets -1 as the default value for maxsplit optional argument and which again defaults to replace-all. Clearly, maxsplit= -1 is not equal to maxsplit = 0. replace(s, old, new, maxsplit=-1) replace (str, old, new[, maxsplit]) -> string Return a copy of string str with all occurrences of substring old replaced by new. If the optional argument maxsplit is given, only the first maxsplit occurrences are replaced. - Daniel, thanks for digging this out from Py2.4, unless we get an rationale behind this change, my only though on this issue was - document the maxsplit argument saying that -1 defaults to replace all. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 16:13:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 04 Mar 2009 15:13:32 +0000 Subject: [issue993580] inspect.findsource does not call linecache.checkcache Message-ID: <1236179612.13.0.195656520973.issue993580@psf.upfronthosting.co.za> Daniel Diniz added the comment: Issue 1218234 has a patch. ---------- dependencies: +inspect.getsource doesn't update when a module is reloaded nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 16:16:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 04 Mar 2009 15:16:34 +0000 Subject: [issue1201569] allow running multiple instances of IDLE Message-ID: <1236179794.1.0.520213782887.issue1201569@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 16:16:37 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 04 Mar 2009 15:16:37 +0000 Subject: [issue1207589] Right Click Context Menu Message-ID: <1236179797.55.0.744433580097.issue1207589@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 16:17:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 04 Mar 2009 15:17:56 +0000 Subject: [issue1244208] expat binding for XML_ParserReset (Bug #1208730) Message-ID: <1236179876.83.0.092145338461.issue1244208@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +expat binding for XML_ParserReset stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 16:21:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 04 Mar 2009 15:21:39 +0000 Subject: [issue1194222] parsedate and Y2K Message-ID: <1236180099.58.0.00478467974156.issue1194222@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed in trunk and py3k. ---------- keywords: +easy, patch nosy: +ajaksu2 stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 17:49:42 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 04 Mar 2009 16:49:42 +0000 Subject: [issue2054] add ftp-tls support to ftplib - RFC 4217 In-Reply-To: <1202523366.93.0.605901116561.issue2054@psf.upfronthosting.co.za> Message-ID: <1236185382.33.0.0450126985937.issue2054@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I released that the attached patch had some indentation issues. The one in attachment fixes them. Added file: http://bugs.python.org/file13242/ftplib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 17:49:52 2009 From: report at bugs.python.org (David W. Lambert) Date: Wed, 04 Mar 2009 16:49:52 +0000 Subject: [issue5416] str.replace does strange things when given a negative count In-Reply-To: <1236163931.77.0.818123555808.issue5416@psf.upfronthosting.co.za> Message-ID: <1236185392.83.0.799477744754.issue5416@psf.upfronthosting.co.za> David W. Lambert added the comment: I completely agree that this is a documentation issue. Also, or perhaps for foolish completeness, in http://docs.python.org/3.0/library/stdtypes.html we would point out that the following group of string methods also work for bytes and bytearrays. Of these, only str type has format method. "String Methods String objects support the methods listed below. Note that none of these methods take keyword arguments. In addition, Python?s strings support the sequence type methods described in the Sequence Types ? str, bytes, bytearray, list, tuple, range section. To output formatted strings, see the String Formatting section. Also, see the re module for string functions based on regular expressions." ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 17:50:30 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 04 Mar 2009 16:50:30 +0000 Subject: [issue2054] add ftp-tls support to ftplib - RFC 4217 In-Reply-To: <1202523366.93.0.605901116561.issue2054@psf.upfronthosting.co.za> Message-ID: <1236185430.16.0.320514932245.issue2054@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I realized that the attached patch had some indentation issues. The one in attachment fixes them. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 17:50:41 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 04 Mar 2009 16:50:41 +0000 Subject: [issue2054] add ftp-tls support to ftplib - RFC 4217 In-Reply-To: <1202523366.93.0.605901116561.issue2054@psf.upfronthosting.co.za> Message-ID: <1236185441.72.0.668729505394.issue2054@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : Removed file: http://bugs.python.org/file13156/ftplib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 20:05:25 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 04 Mar 2009 19:05:25 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1236193525.16.0.607639827148.issue5390@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'm closing this as "works for me". The error is not reproducible. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 20:48:11 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 04 Mar 2009 19:48:11 +0000 Subject: [issue4192] Subprocess error with I/O redirection to Pipes In-Reply-To: <1224861800.81.0.399738040895.issue4192@psf.upfronthosting.co.za> Message-ID: <1236196091.99.0.170318712232.issue4192@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Probably this happens because receiever.py doesn't wait for flooder.py termination, and pipe end is closed when recieiver.py terminates. Does this code work for you? p = subprocess.Popen("python flooder.py",stdin=subprocess.PIPE,stdout=subprocess.PIPE) p.wait() ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 21:01:29 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 20:01:29 +0000 Subject: [issue1201569] allow running multiple instances of IDLE Message-ID: <1236196889.52.0.067757196645.issue1201569@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- nosy: -ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 21:19:26 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 04 Mar 2009 20:19:26 +0000 Subject: [issue4192] Subprocess error with I/O redirection to Pipes In-Reply-To: <1224861800.81.0.399738040895.issue4192@psf.upfronthosting.co.za> Message-ID: <1236197966.38.0.942324135985.issue4192@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: This happens because when flooder.py terminates, its stdout will be closed, but another pipe end in receirver.py process is already closed, so Python\sysmodule.c(1098): _check_and_flush (FILE *stream) In this function, fflush() fails. The reason why error message is not helpful is probably this close function is called in interpreter termination process, other modules/objects to do so are already destroyed. Maybe this error message can be improved in some way, but I'm not sure. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:10:45 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 21:10:45 +0000 Subject: [issue5224] OS X installer: "Update Shell Profile" script is not updated In-Reply-To: <1234440069.85.0.865907357783.issue5224@psf.upfronthosting.co.za> Message-ID: <1236201045.36.0.523955305065.issue5224@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This is now also fixed for the trunk and 2.6 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:13:28 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 21:13:28 +0000 Subject: [issue5226] OS X installer: Welcome and Readme files are out-of-date In-Reply-To: <1234440578.91.0.615393071826.issue5226@psf.upfronthosting.co.za> Message-ID: <1236201208.9.0.731701742401.issue5226@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Fixed for the trunk and 2.6 as well. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:21:59 2009 From: report at bugs.python.org (Ruth Aydt) Date: Wed, 04 Mar 2009 21:21:59 +0000 Subject: [issue5417] Reference to missing(?) function in Extending & Embedding Document In-Reply-To: <1236201719.81.0.524909062224.issue5417@psf.upfronthosting.co.za> Message-ID: <1236201719.81.0.524909062224.issue5417@psf.upfronthosting.co.za> New submission from Ruth Aydt : Section 1.6 "Calling Python Functions from C" in the Extending and Embedding Python, 2.6.1 guide talks about "PyEval_CallObject". But, I can't find it anywhere else in the 2.6 doc set. I did see in PEP 3100 that the function is to be removed in 3.0. I suspect section 1.6 in doc needs to be updated to use a different function in the example & text. ---------- assignee: georg.brandl components: Documentation messages: 83134 nosy: aydt, georg.brandl severity: normal status: open title: Reference to missing(?) function in Extending & Embedding Document versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:29:10 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Mar 2009 21:29:10 +0000 Subject: [issue4565] Rewrite the IO stack in C In-Reply-To: <1228576260.5.0.752040739396.issue4565@psf.upfronthosting.co.za> Message-ID: <1236202150.06.0.5586754897.issue4565@psf.upfronthosting.co.za> Benjamin Peterson added the comment: And the io-c branch has been merged in r70152. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:30:37 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Mar 2009 21:30:37 +0000 Subject: [issue3618] possible deadlock in python IO implementation In-Reply-To: <1219230050.91.0.189582586712.issue3618@psf.upfronthosting.co.za> Message-ID: <1236202237.52.0.158567990612.issue3618@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Since io-c has been merging, I'm lowering priority. ---------- priority: critical -> low title: possible deadlock in IO library (Lib/io.py) -> possible deadlock in python IO implementation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:30:46 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Mar 2009 21:30:46 +0000 Subject: [issue4565] Rewrite the IO stack in C In-Reply-To: <1228576260.5.0.752040739396.issue4565@psf.upfronthosting.co.za> Message-ID: <1236202246.11.0.415280694583.issue4565@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- dependencies: -possible deadlock in python IO implementation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:31:13 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Mar 2009 21:31:13 +0000 Subject: [issue4263] BufferedWriter non-blocking overage In-Reply-To: <1225909409.69.0.679575967126.issue4263@psf.upfronthosting.co.za> Message-ID: <1236202273.81.0.28085573939.issue4263@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This has been fixed in io-c branch. (r70152) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:32:08 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Mar 2009 21:32:08 +0000 Subject: [issue4996] io.TextIOWrapper calls buffer.read1() In-Reply-To: <1232359796.19.0.280451086656.issue4996@psf.upfronthosting.co.za> Message-ID: <1236202328.63.0.940033595667.issue4996@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This has been fixed in io-c branch merge. (r70152) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:35:53 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 21:35:53 +0000 Subject: [issue3883] Bottom buttons of IDLE Preferences Pane on Mac not wide enough for their text. In-Reply-To: <1221598645.05.0.789748104063.issue3883@psf.upfronthosting.co.za> Message-ID: <1236202553.68.0.745840831532.issue3883@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Fixed for the trunk and 2.6 as well. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:36:06 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 21:36:06 +0000 Subject: [issue5194] OS X IDLE.app and bin/idle: missing/extra menu options In-Reply-To: <1234234507.58.0.689231089961.issue5194@psf.upfronthosting.co.za> Message-ID: <1236202566.71.0.779680960523.issue5194@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've applied a cleaned up version of patch-nad0014-trunk-26.txt to the trunk and 2.6 branch. This completely fixes this issue. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:36:58 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Mar 2009 21:36:58 +0000 Subject: [issue4862] utf-16 BOM is not skipped after seek(0) In-Reply-To: <1231287677.41.0.817743984337.issue4862@psf.upfronthosting.co.za> Message-ID: <1236202618.46.0.917524710623.issue4862@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This has been fixed by the io-c branch merge. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:38:46 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Mar 2009 21:38:46 +0000 Subject: [issue5266] StringIO.read(n) does not enforce requested size in newline mode In-Reply-To: <1234651808.93.0.485366406394.issue5266@psf.upfronthosting.co.za> Message-ID: <1236202726.23.0.889599653774.issue5266@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is fixed by the io-c branch merge. (r70152) ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:38:50 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Mar 2009 21:38:50 +0000 Subject: [issue5265] StringIO can duplicate newlines in universal newlines mode In-Reply-To: <1234650978.85.0.656093494146.issue5265@psf.upfronthosting.co.za> Message-ID: <1236202730.72.0.604121936415.issue5265@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is fixed by the io-c branch merge. (r70152) ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:38:59 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Mar 2009 21:38:59 +0000 Subject: [issue5264] StringIO failure when reading a chunk of text without newlines In-Reply-To: <1234650711.9.0.239815315496.issue5264@psf.upfronthosting.co.za> Message-ID: <1236202739.11.0.10611787468.issue5264@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is fixed by the io-c branch merge. (r70152) ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 22:45:58 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 21:45:58 +0000 Subject: [issue881824] Add ResolveFinderAliases to macostools module Message-ID: <1236203158.24.0.722807134569.issue881824@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm closing this issue as rejected because the macostools module is deprecated. We'll therefore not apply any more feature enhancements. ---------- nosy: +ronaldoussoren resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:01:23 2009 From: report at bugs.python.org (Jim Blandy) Date: Wed, 04 Mar 2009 22:01:23 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1236204083.42.0.408273257211.issue5117@psf.upfronthosting.co.za> Jim Blandy added the comment: In case the behavior requested here is controversial, here's an example of where it would be nice to have relpath(x, '/') return a path for x that is relative to the root directory: The 'oprofile' system profiler for Linux profiles everything running on the system at once. Its profile count database takes the form of a directory tree of counter files that mirrors the whole filesystem: /var/lib/oprofile/samples/current/{root}/bin/ls holds the samples for /bin/ls, and so on. Also, the 'opannotate' command annotates source trees with profile counts: if /bin/ls were built from /src/ls.c, then 'opannotate -o ~/ann-tree' would put a count-annotated copy of ls's source '~/ann-tree/src/ls.c'. At the moment, I wish I could simply say: src=path to source file real_src = os.path.realpath(src) rel_real_src = os.path.relpath(real_src, '/') annotated_source = os.path.join(annotation_dir, rel_real_src) but this bug gets in the way. ---------- nosy: +jimb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:06:08 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:06:08 +0000 Subject: [issue5408] test_osx_env failing In-Reply-To: <1236035826.81.0.76995170361.issue5408@psf.upfronthosting.co.za> Message-ID: <1236204368.99.0.158030073431.issue5408@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Ned: IMHO your patch is not correct. test_osx_env tests behaviour that's only valid for a framework build, and should therefore only run when testing a framework build. The easiest way to accomplish that is to change the test in test_osx_env.main to: if sys.platform == 'darwin' and sysconfig.get_config_var('WITH_NEXT_FRAMEWORK'): (with an "from distutils import sysconfig" statement just above the test). I will commit this fix when I've actually tested it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:07:45 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:07:45 +0000 Subject: [issue2740] Cmd module doesn't support readline completion on OSX Leopard In-Reply-To: <1209751540.52.0.644222816573.issue2740@psf.upfronthosting.co.za> Message-ID: <1236204465.77.0.97134934852.issue2740@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I intend to close this as won't fix. The issue is caused by Apple's build of Python, the generic Python.org build won't even compile when using libedit. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:18:50 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:18:50 +0000 Subject: [issue4834] Trouble configuring with icc on Mac OS X 10.5 In-Reply-To: <18784.64250.252843.484595@montanaro.dyndns.org> Message-ID: <1236205130.32.0.51766052552.issue4834@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Skip: could you please explain which bit of Xcode you didn't install? The compile should work regardless of installing 10.3 SDK support. The code you mention in your report sets MACOSX_DEPLOYMENT_TARGET to 10.3 on 10.3 systems or later, unless you explictly set it to another version yourself. This matches the default compiler settings on at least 10.4 systems. I just noticed that the default on 10.5 systems to compile for the current OS release. The intention of the code is to allow the resulting binaries to run on as many platforms as possible. Note that you can easily work around this issue by explicitly setting MACOSX_DEPLOYMENT_TARGET to 10.5. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:28:28 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:28:28 +0000 Subject: [issue5154] OSX broken poll testing doesn't work In-Reply-To: <1233786742.9.0.12404457396.issue5154@psf.upfronthosting.co.za> Message-ID: <1236205708.25.0.280647081696.issue5154@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:30:07 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:30:07 +0000 Subject: [issue5269] OS X Installer: add options to specify universal build type and deployment target In-Reply-To: <1234687874.34.0.561795974463.issue5269@psf.upfronthosting.co.za> Message-ID: <1236205807.29.0.450198270106.issue5269@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm +1 on this feature, I haven't looked at the patch yet. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:30:44 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:30:44 +0000 Subject: [issue5269] OS X Installer: add options to specify universal build type and deployment target In-Reply-To: <1234687874.34.0.561795974463.issue5269@psf.upfronthosting.co.za> Message-ID: <1236205844.89.0.0196770743974.issue5269@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: -> ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:34:59 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:34:59 +0000 Subject: [issue734115] Packaging without disturbing an existing installation Message-ID: <1236206099.75.0.326229913439.issue734115@psf.upfronthosting.co.za> Ronald Oussoren added the comment: AFAIK this patch is no longer necessary, at least no on OSX. The current binary installer is already build using a separate DESTDIR without having to patch Makefiles. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:36:34 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:36:34 +0000 Subject: [issue763708] Failures in test_macostools for --enable-unicode=ucs4 Message-ID: <1236206194.2.0.669506861135.issue763708@psf.upfronthosting.co.za> Ronald Oussoren added the comment: IMHO fixing this is not worth the trouble, we should just document that the Carbon extensions aren't supported in a UCS4 build (or even explictly detect a UCS4 build in setup.py and not compile the Carbon extensions). ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:42:04 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:42:04 +0000 Subject: [issue4848] MacPython build script uses Carbon and MacOS modules slated for removal In-Reply-To: <1231175758.14.0.180038218422.issue4848@psf.upfronthosting.co.za> Message-ID: <1236206524.92.0.315167207855.issue4848@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Usage of PyObjC in the build-script should be avoided, as should eating exceptions like you propose. The rationale for not silencing exceptions is that the build script is supposed to enable reproducable builds. I'll probably add a small Cocoa ObjC program to the BuildScript directory that uses the API's you mention. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:42:17 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:42:17 +0000 Subject: [issue4848] MacPython build script uses Carbon and MacOS modules slated for removal In-Reply-To: <1231175758.14.0.180038218422.issue4848@psf.upfronthosting.co.za> Message-ID: <1236206537.7.0.965325148079.issue4848@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: -> ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:44:45 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:44:45 +0000 Subject: [issue900502] bundlebuilder: some way to add non-py files in packages Message-ID: <1236206685.36.0.794774672366.issue900502@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I intend to close this issue as it is an enhancement proposal for a deprecated module. Py2app (the modern replacement for bundlebuilder) also doesn't support this scenario, although it should be fairly easy to add such support to that codebase. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:50:30 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:50:30 +0000 Subject: [issue1113328] OSATerminology still semi-broken Message-ID: <1236207030.64.0.403379212234.issue1113328@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Fixed in the trunk in revision r70178. hhas: it is save to backport this to python 2.6? ---------- assignee: jackjansen -> ronaldoussoren nosy: +ronaldoussoren resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:54:18 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:54:18 +0000 Subject: [issue5154] OSX broken poll testing doesn't work In-Reply-To: <1233786742.9.0.12404457396.issue5154@psf.upfronthosting.co.za> Message-ID: <1236207258.7.0.0394891889326.issue5154@psf.upfronthosting.co.za> Ronald Oussoren added the comment: poll(3) doesn't work for all types of filedescriptors on OSX. Specifically: BUGS The poll() system call currently does not support devices. (That's from the manpage of poll). This is why Apple doesn't expose select.poll in their build of Python. I haven't used select.poll myself and therefore don't know if the issues with the poll system call are serious enough to warrant hiding select.poll on OSX. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:55:36 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Mar 2009 22:55:36 +0000 Subject: [issue763708] Failures in test_macostools for --enable-unicode=ucs4 Message-ID: <1236207336.4.0.853566452368.issue763708@psf.upfronthosting.co.za> Brett Cannon added the comment: The code solution is probably the most useful since people are more likely to just compile Python without reading some text file that will mention UCS4 builds will not create the Carbon extensions. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 4 23:59:36 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 22:59:36 +0000 Subject: [issue5408] test_osx_env failing In-Reply-To: <1236035826.81.0.76995170361.issue5408@psf.upfronthosting.co.za> Message-ID: <1236207576.42.0.427831573224.issue5408@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Committed my fix as r70179 (3.x) and r70180 (30-maint). Benjamin: can you confirm this actually fixes the issue with a non- framework build, I don't know if I'll be able to test that before the first 3.1a release. ---------- resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 00:01:28 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 23:01:28 +0000 Subject: [issue4165] Failure building 64-bit Python on Leopard In-Reply-To: <1224621107.94.0.119625965208.issue4165@psf.upfronthosting.co.za> Message-ID: <1236207688.36.0.647686549878.issue4165@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 00:01:56 2009 From: report at bugs.python.org (Ilya Sandler) Date: Wed, 04 Mar 2009 23:01:56 +0000 Subject: [issue5198] Strange DeprecationWarning behaviour in module struct In-Reply-To: <1234250088.94.0.680929615779.issue5198@psf.upfronthosting.co.za> Message-ID: <1236207716.8.0.737356957984.issue5198@psf.upfronthosting.co.za> Ilya Sandler added the comment: Here is another case, which I think is even worse. Range checks are done inconsistently as well: .../trunk> ./python -c 'import struct; struct.pack("B", 257) 'Traceback (most recent call last): File "", line 1, in struct.error: ubyte format requires 0 <= number <= 255 .../trunk> ./python -c 'import struct; struct.pack(">B", 257)' sys:1: DeprecationWarning: 'B' format requires 0 <= number <= 255 ---------- nosy: +isandler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 00:05:49 2009 From: report at bugs.python.org (Ned Deily) Date: Wed, 04 Mar 2009 23:05:49 +0000 Subject: [issue5408] test_osx_env failing In-Reply-To: <1236035826.81.0.76995170361.issue5408@psf.upfronthosting.co.za> Message-ID: <1236207949.54.0.569138995266.issue5408@psf.upfronthosting.co.za> Ned Deily added the comment: I don't have strong feelings about it one way or the other. As far as I can tell from the code and testing and the documented behavior, the effect on sys.executable is independent of whether it is a framework build or not. But I'm fine with narrowing the scope of the test. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 00:09:31 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 23:09:31 +0000 Subject: [issue4848] MacPython build script uses Carbon and MacOS modules slated for removal In-Reply-To: <1231175758.14.0.180038218422.issue4848@psf.upfronthosting.co.za> Message-ID: <1236208171.91.0.0384232726341.issue4848@psf.upfronthosting.co.za> Changes by Ronald Oussoren : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 00:10:55 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 23:10:55 +0000 Subject: [issue4848] MacPython build script uses Carbon and MacOS modules slated for removal In-Reply-To: <1231175758.14.0.180038218422.issue4848@psf.upfronthosting.co.za> Message-ID: <1236208255.11.0.595921135332.issue4848@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The attached patch shows what I intent do commit after testing. This adds a small ObjC command-line tool that sets the icon. I still have to build the installer to check if the patch actually works. ---------- resolution: -> accepted Added file: http://bugs.python.org/file13243/patch-seticon.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 00:12:59 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Mar 2009 23:12:59 +0000 Subject: [issue5408] test_osx_env failing In-Reply-To: <1236035826.81.0.76995170361.issue5408@psf.upfronthosting.co.za> Message-ID: <1236208379.79.0.128110076534.issue5408@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The effect on sys.executable is always present, the test is only valid for a framework build because that's the only build that can find sys.prefix without looking at sys.executable. Setting PYTHONEXECUTABLE with a non- framework build is only valid if the value of the variable point's to a python executable in the right location within the installation tree. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 00:24:18 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Mar 2009 23:24:18 +0000 Subject: [issue5408] test_osx_env failing In-Reply-To: <1236035826.81.0.76995170361.issue5408@psf.upfronthosting.co.za> Message-ID: <1236209058.43.0.0634981673596.issue5408@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thumbs up here! Thanks. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 00:28:01 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 04 Mar 2009 23:28:01 +0000 Subject: [issue5154] OSX broken poll testing doesn't work In-Reply-To: <1233786742.9.0.12404457396.issue5154@psf.upfronthosting.co.za> Message-ID: <1236209281.56.0.915684862348.issue5154@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 00:28:45 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Mar 2009 23:28:45 +0000 Subject: [issue5408] test_osx_env failing In-Reply-To: <1236035826.81.0.76995170361.issue5408@psf.upfronthosting.co.za> Message-ID: <1236209325.4.0.924550712482.issue5408@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 00:39:58 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 04 Mar 2009 23:39:58 +0000 Subject: [issue5381] json need object_pairs_hook In-Reply-To: <1235723876.26.0.796036500228.issue5381@psf.upfronthosting.co.za> Message-ID: <1236209998.39.0.539791057491.issue5381@psf.upfronthosting.co.za> Raymond Hettinger added the comment: After enhancing namedtuple and ConfigParser, I found a simpler approach that doesn't involve extending the API. The simple way is to use ordered dictionaries directly. With a small tweak to OD's repr, it is fully substitutable for a dict without changing any client code or doctests (the OD loses its own eval/repr order-preserving roundtrip but what json already gives now). See attached patch. Added file: http://bugs.python.org/file13244/json_ordered.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 00:46:21 2009 From: report at bugs.python.org (Bob Ippolito) Date: Wed, 04 Mar 2009 23:46:21 +0000 Subject: [issue5381] json need object_pairs_hook In-Reply-To: <1235723876.26.0.796036500228.issue5381@psf.upfronthosting.co.za> Message-ID: <1236210381.61.0.447804281846.issue5381@psf.upfronthosting.co.za> Bob Ippolito added the comment: Unfortunately this is a patch for the old json lib... the new one has a C API and an entirely different method of parsing documents (for performance reasons). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 01:15:08 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Mar 2009 00:15:08 +0000 Subject: [issue5381] json need object_pairs_hook In-Reply-To: <1235723876.26.0.796036500228.issue5381@psf.upfronthosting.co.za> Message-ID: <1236212108.75.0.226586551595.issue5381@psf.upfronthosting.co.za> Raymond Hettinger added the comment: When do you expect the new C version to go in? I'm looking forward to it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 01:24:47 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Mar 2009 00:24:47 +0000 Subject: [issue4862] utf-16 BOM is not skipped after seek(0) In-Reply-To: <1231287677.41.0.817743984337.issue4862@psf.upfronthosting.co.za> Message-ID: <1236212687.78.0.477996948532.issue4862@psf.upfronthosting.co.za> STINNER Victor added the comment: > This has been fixed by the io-c branch merge. Can you at least include the patch to test_io.py from amaury's patch? And why not fixing the Python version of the io module (i'm not sure of the new name: _pyio?) since we have a working patch? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 01:25:50 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Mar 2009 00:25:50 +0000 Subject: [issue4996] io.TextIOWrapper calls buffer.read1() In-Reply-To: <1232359796.19.0.280451086656.issue4996@psf.upfronthosting.co.za> Message-ID: <1236212750.07.0.580545147736.issue4996@psf.upfronthosting.co.za> STINNER Victor added the comment: > This has been fixed in io-c branch merge. r70152 Amazing, io-c is faster but also fixes many bugs! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 01:28:25 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Mar 2009 00:28:25 +0000 Subject: [issue3618] possible deadlock in python IO implementation In-Reply-To: <1236202237.52.0.158567990612.issue3618@psf.upfronthosting.co.za> Message-ID: <200903050127.58362.victor.stinner@haypocalc.com> STINNER Victor added the comment: > Since io-c has been merging, I'm lowering priority. Why not fixing this issue? The issue is rare (only occurs when using profiling with a callback writting to stdout) and you closed the issue #4862 which is more common (read an UTF-16 file). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 01:29:23 2009 From: report at bugs.python.org (Bob Ippolito) Date: Thu, 05 Mar 2009 00:29:23 +0000 Subject: [issue5381] json need object_pairs_hook In-Reply-To: <1235723876.26.0.796036500228.issue5381@psf.upfronthosting.co.za> Message-ID: <1236212963.61.0.0774524655162.issue5381@psf.upfronthosting.co.za> Bob Ippolito added the comment: Whenever someone applies the patch for http://bugs.python.org/issue4136 -- I don't know when that will happen. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 01:30:48 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Mar 2009 00:30:48 +0000 Subject: [issue3618] possible deadlock in python IO implementation In-Reply-To: <200903050127.58362.victor.stinner@haypocalc.com> Message-ID: <1afaf6160903041630v636df17wed08c6f3ab6c2a91@mail.gmail.com> Benjamin Peterson added the comment: 2009/3/4 STINNER Victor : > > STINNER Victor added the comment: > >> Since io-c has been merging, I'm lowering priority. > > Why not fixing this issue? The issue is rare (only occurs when using profiling > with a callback writting to stdout) and you closed the issue #4862 which is > more common (read an UTF-16 file). See msg82934. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 01:36:02 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Mar 2009 00:36:02 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1236213362.76.0.802911812844.issue4136@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Martin, is this patch good-to-go? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 01:42:46 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Mar 2009 00:42:46 +0000 Subject: [issue4862] utf-16 BOM is not skipped after seek(0) In-Reply-To: <1231287677.41.0.817743984337.issue4862@psf.upfronthosting.co.za> Message-ID: <1236213766.32.0.918858550585.issue4862@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Ah, I forgot this wasn't applied to the Python implementation. Fixed in r70184. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 01:58:42 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 05 Mar 2009 00:58:42 +0000 Subject: [issue5418] urllib.response.addinfourl does not support __exit__ In-Reply-To: <1236214720.46.0.00736247638438.issue5418@psf.upfronthosting.co.za> Message-ID: <1236214720.46.0.00736247638438.issue5418@psf.upfronthosting.co.za> New submission from Mitchell Model : response = urllib.request.open(someURL) page = response.read() close() be called on response after the read(), right? Experimentation shows that I can repeatedly read from response until I close it, getting back empty bytes objects. Thinking that anything with a close() should support the with statement, I tried putting the code inside one but got AttributeError: 'addinfourl' object has no attribute '__exit__' so I can see that it doesn't support with. It seems like it should. ---------- components: Library (Lib) messages: 83174 nosy: MLModel severity: normal status: open title: urllib.response.addinfourl does not support __exit__ type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 02:00:04 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Mar 2009 01:00:04 +0000 Subject: [issue3618] possible deadlock in python IO implementation In-Reply-To: <1219230050.91.0.189582586712.issue3618@psf.upfronthosting.co.za> Message-ID: <1236214804.35.0.162865703186.issue3618@psf.upfronthosting.co.za> STINNER Victor added the comment: Ooops, I wanted to write: "Why not *closing* this issue?", sorry. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 02:00:54 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Mar 2009 01:00:54 +0000 Subject: [issue4862] utf-16 BOM is not skipped after seek(0) In-Reply-To: <1231287677.41.0.817743984337.issue4862@psf.upfronthosting.co.za> Message-ID: <1236214854.57.0.293605045383.issue4862@psf.upfronthosting.co.za> STINNER Victor added the comment: @benjamin: ok, great. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 02:02:21 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Mar 2009 01:02:21 +0000 Subject: [issue3618] possible deadlock in python IO implementation In-Reply-To: <1219230050.91.0.189582586712.issue3618@psf.upfronthosting.co.za> Message-ID: <1236214941.1.0.543552342028.issue3618@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I suppose we might as well. If anyone wants to fix the Python implementation later, they can go ahead and reopen this. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 02:19:27 2009 From: report at bugs.python.org (Bill Janssen) Date: Thu, 05 Mar 2009 01:19:27 +0000 Subject: [issue4848] MacPython build script uses Carbon and MacOS modules slated for removal In-Reply-To: <1231175758.14.0.180038218422.issue4848@psf.upfronthosting.co.za> Message-ID: <1236215967.2.0.990821568257.issue4848@psf.upfronthosting.co.za> Bill Janssen added the comment: Looks good. The contrast is stark. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 02:21:26 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 05 Mar 2009 01:21:26 +0000 Subject: [issue5419] urllib.request.open(someURL).read() returns a bytes object so writing it requires binary mode In-Reply-To: <1236216086.62.0.687528545638.issue5419@psf.upfronthosting.co.za> Message-ID: <1236216086.62.0.687528545638.issue5419@psf.upfronthosting.co.za> New submission from Mitchell Model : There needs to be something somewhere in the documentation that makes the simple point that data coming in from the web is bytes not strings, which is a big change from Python 2, and that it needs to be manipulated as such, including writing in binary mode. I am not sure what documentation should be changed, but I do think something is missing, because I just ran around in circles on this one for quite some time. Perhaps the Unicode HOWTO needs more information; possibly urllib.request does; maybe a combination of things have to be added to several documentation files. Here's what happened: I wanted to read from a web page, make some string replacements, and save to a file, so I wrote code that boils down to something like: with open('url.html', 'w') as fil: fil.write(urllib.request.open(aURL).read()).replace(str1, str2) The first thing that happened was an error telling me that I can't write bytes to a text stream, so I realized that read() was returning a bytes object, which makes sense. So I converted it to a string, but that put a b' at the beginning of the file and a ' at the end! Bad. Instead of str(thebytes) I did the proper thing: thebytes.decode(), and wrote that to the file. But then I found that Non-ASCII characters created problems -- they were saved in the file as \xNN\xNN or even three \x's, then displayed as garbage when the page was opened in a browser. So I tried decoding using different codecs but couldn't find one that worked for the ? and the emdash that were in the response. Finally I realized that the whole thing was a delusion: obviously urlopen responses have to return bytes objects, and adding 'b' to the 'w' when opening the output file fixed everything. (I also had to change my replacement strings to bytes.) I went back to the relevant documentation multiple times, including after I figured everything out, and I can't convince myself that it makes the connection anywhere between bytes coming in, manipulating the bytes as bytes, and writing out in binary. Yes, in retrospect this all makes sense and perhaps even should have been obvious, but I am quite sure I won't be the only experienced Python 2 programmer to trip over this when making the transition to Python 3. I apologize in advance if the requested documentation exists and I didn't find it, in which case I would appreciate a pointer to where it is lies. ---------- assignee: georg.brandl components: Documentation messages: 83179 nosy: MLModel, georg.brandl severity: normal status: open title: urllib.request.open(someURL).read() returns a bytes object so writing it requires binary mode versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 03:02:37 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Thu, 05 Mar 2009 02:02:37 +0000 Subject: [issue5420] Queue deprecation warning patch In-Reply-To: <1236218557.32.0.700265695834.issue5420@psf.upfronthosting.co.za> Message-ID: <1236218557.32.0.700265695834.issue5420@psf.upfronthosting.co.za> New submission from Tennessee Leeuwenburg : A very tiny patch which places a DeprecationWarning inside Queue.empty and Queue.full ---------- components: Library (Lib) files: queue_patch.txt messages: 83180 nosy: tleeuwenburg at gmail.com severity: normal status: open title: Queue deprecation warning patch type: feature request versions: Python 3.1 Added file: http://bugs.python.org/file13245/queue_patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 03:08:51 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Thu, 05 Mar 2009 02:08:51 +0000 Subject: [issue5420] Queue deprecation warning patch In-Reply-To: <1236218557.32.0.700265695834.issue5420@psf.upfronthosting.co.za> Message-ID: <1236218931.2.0.418690142526.issue5420@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: Add comment to NEWS as documented... Added file: http://bugs.python.org/file13246/NEWS_patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 04:55:31 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Mar 2009 03:55:31 +0000 Subject: [issue5420] Queue deprecation warning patch In-Reply-To: <1236218557.32.0.700265695834.issue5420@psf.upfronthosting.co.za> Message-ID: <1236225331.29.0.844992289588.issue5420@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Can you make a single patch for Lib/queue.py and Misc/NEWS and remove any uses of emtpy/full in the standard library including multiprocessing. Also, for deprecations, it's always nice to have the message suggest an alternative, something like: "The empty() method is deprecated and scheduled to be removed in Py3.2. Instead, use qsize() or catch a queue.Empty exception." ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 04:59:59 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Thu, 05 Mar 2009 03:59:59 +0000 Subject: [issue5420] Queue deprecation warning patch In-Reply-To: <1236218557.32.0.700265695834.issue5420@psf.upfronthosting.co.za> Message-ID: <1236225599.71.0.227510370469.issue5420@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Unit tests are a great thing as well. Also, the deprecation warnings you've added are the really annoying kind. They refer to users to the source of the deprecated methods themselves! A vastly preferable use of the warnings system is to refer users to the *callers* of the deprecated methods. Try passing different values for the stacklevel parameter of the warnings.warn function until you get a warning that is more helpful. ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 05:06:04 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Mar 2009 04:06:04 +0000 Subject: [issue5381] json needs object_pairs_hook In-Reply-To: <1235723876.26.0.796036500228.issue5381@psf.upfronthosting.co.za> Message-ID: <1236225964.65.0.185912561395.issue5381@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- title: json need object_pairs_hook -> json needs object_pairs_hook _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 05:31:49 2009 From: report at bugs.python.org (David W. Lambert) Date: Thu, 05 Mar 2009 04:31:49 +0000 Subject: [issue5420] Queue deprecation warning patch In-Reply-To: <1236218557.32.0.700265695834.issue5420@psf.upfronthosting.co.za> Message-ID: <1236227509.09.0.517560816994.issue5420@psf.upfronthosting.co.za> Changes by David W. Lambert : ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 10:00:36 2009 From: report at bugs.python.org (Gustavo De Nardin (spuk)) Date: Thu, 05 Mar 2009 09:00:36 +0000 Subject: [issue1176504] locale._build_localename treatment for utf8 Message-ID: <1236243636.31.0.292293530119.issue1176504@psf.upfronthosting.co.za> Gustavo De Nardin (spuk) added the comment: We hit this problem with system-config-printer in Mandriva Linux (). Fixed it with this patch http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/python/current/SOURCES/python-2.5.2-fix_UTF-8_name.patch?view=log The "UTF8" name was introduced here (4 years and 2 months ago), to account for libc expectations, which seem to have changed again currently. This also seems related or the same as . ---------- nosy: +spuk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 10:11:06 2009 From: report at bugs.python.org (=?utf-8?q?Sever_B=C4=83ne=C8=99iu?=) Date: Thu, 05 Mar 2009 09:11:06 +0000 Subject: [issue4263] BufferedWriter non-blocking overage In-Reply-To: <1225909409.69.0.679575967126.issue4263@psf.upfronthosting.co.za> Message-ID: <1236244266.9.0.0541584297881.issue4263@psf.upfronthosting.co.za> Sever B?ne?iu added the comment: Looks like the test covering the pre-flush condition is missing. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 10:28:53 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Mar 2009 09:28:53 +0000 Subject: [issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful() In-Reply-To: <1235772794.07.0.300454209619.issue5389@psf.upfronthosting.co.za> Message-ID: <1236245333.0.0.611959223719.issue5389@psf.upfronthosting.co.za> Georg Brandl added the comment: Only with security fixes IIRC. Letting Martin decide. ---------- assignee: pitrou -> loewis nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 11:15:04 2009 From: report at bugs.python.org (Manuel Hermann) Date: Thu, 05 Mar 2009 10:15:04 +0000 Subject: [issue5421] Irritating error message by socket's sendto method In-Reply-To: <1236248103.61.0.911918415156.issue5421@psf.upfronthosting.co.za> Message-ID: <1236248103.61.0.911918415156.issue5421@psf.upfronthosting.co.za> New submission from Manuel Hermann : When sending unexpected data via a socket's sentdo method, a TypeError is raised with the fallowing message: "sendto() takes exactly 3 arguments (2 given)". But two arguments are sufficient. Examples for Python 2.x: import socket my_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # this will succeed my_socket.sendto("Foobar", ("localhost", 514)) # these will fail with above error message my_socket.sendto(u"Umlaut ?", ("localhost", 514)) my_socket.sendto(1, ("localhost", 514)) Examples for Python 3: import socket my_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # this will succeed my_socket.sendto("No Umlaut".encode("ascii"), ("localhost", 514)) # these will fail with above error message my_socket.sendto("No Umlaut", ("localhost", 514)) my_socket.sendto(1, ("localhost", 514)) ---------- components: Library (Lib) messages: 83187 nosy: helduel severity: normal status: open title: Irritating error message by socket's sendto method versions: Python 2.4, Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 11:55:13 2009 From: report at bugs.python.org (Retro) Date: Thu, 05 Mar 2009 10:55:13 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1236250513.3.0.4624585291.issue5390@psf.upfronthosting.co.za> Retro added the comment: I figured out why the installer didn't create an icon for the Python interpreters in the Add/Remove Programs list. If I deselect the option 'Register Extensions' at installation time, I don't get an icon in the Add/Remove Programs list. But if I leave the option 'Register Extensions' be selected, I get an icon in the Add/Remove Programs list. Please make the icon be registered in the registry even if the option 'Register Extensions' isn't selected at installation time. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 12:49:33 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 05 Mar 2009 11:49:33 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1236253773.61.0.563706194464.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: Would it be acceptable to use shorter float repr only on big-endian and little-endian IEEE 754 platforms, and use the full 17-digit repr on other platforms? This would greatly simplify the adaptation and testing of Gay's code. Notable platforms that would still have long repr under this scheme, in order of decreasing significance: - IBM zSeries mainframes when using their hexadecimal FPU (recent models also have IEEE 754 floating-point, and Linux on zSeries uses that in preference to the hex floating-point). - ARM, Old ABI (uses a mixed-endian IEEE 754 format; a newer set of ABIs appeared recently that use big or little-endian IEEE 754) - Cray SV1 (introduced 1998) and earlier Cray machines. Gay's code doesn't support the Cray floating-point format anyway. I believe that newer Crays (e.g., the X1, introduced in 2003) use IEEE floating-point. - VAX machines, using VAX D and G floating-point formats. More recent Alpha machines support IEEE 754 floats as well. - many ancient machines with weird and wonderful floating-point schemes As far as I can determine, apart from the IBM machines described above all new platforms nowadays use an IEEE 754 double format. Sometimes IEEE arithmetic is only emulated in software; often there are shortcuts taken with respect to NaNs and underflow, but in all cases the underlying format is still IEEE 754, so Gay's code should work. Gay's careful to avoid problems with machines that flush underflow to zero, for example. Gay's code only actually supports 3 floating-point formats: IEEE 754 (big and little-endian), IBM hex format and VAX D floating-point format. There are actually (at least?) two variants of D floating-point: the version used on VAX, which has a 56-bit mantissa and an 8-bit exponent, and the Alpha version, which only has a 53-bit mantissa (but still only an 8-bit exponent); Gay's code only supports the former. I'm quite convinced that the VAX stuff in Gay's code is not worth much to us, so really the only question is whether it's worth keeping the code to support IBM hexadecimal floating-point. Given the difficulty of testing this code and the (significant but not overwhelming) extra complexity it adds, I'd like to remove it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 13:14:38 2009 From: report at bugs.python.org (=?utf-8?q?=E5=BE=90=E6=B4=B2?=) Date: Thu, 05 Mar 2009 12:14:38 +0000 Subject: [issue5422] load pyc file with mbcs file system in update_compiled_module In-Reply-To: <1236255278.63.0.0210000378211.issue5422@psf.upfronthosting.co.za> Message-ID: <1236255278.63.0.0210000378211.issue5422@psf.upfronthosting.co.za> New submission from ?? : py3k 3.01 static int update_compiled_module(PyCodeObject *co, char *pathname) { PyObject *oldname, *newname; if (!PyUnicode_CompareWithASCIIString(co->co_filename, pathname)) return 0; /* string pathname related with FILE SYSTEM !!! * old code is : * newname = PyUnicode_FromString(pathname); */ newname = PyUnicode_DecodeFSDefault(pathname); if (newname == NULL) return -1; oldname = co->co_filename; Py_INCREF(oldname); update_code_filenames(co, oldname, newname); Py_DECREF(oldname); Py_DECREF(newname); return 1; } ---------- components: Windows messages: 83190 nosy: joexo severity: normal status: open title: load pyc file with mbcs file system in update_compiled_module type: compile error versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 13:22:50 2009 From: report at bugs.python.org (=?utf-8?q?=E5=BE=90=E6=B4=B2?=) Date: Thu, 05 Mar 2009 12:22:50 +0000 Subject: [issue5422] load pyc file with mbcs file system in update_compiled_module In-Reply-To: <1236255278.63.0.0210000378211.issue5422@psf.upfronthosting.co.za> Message-ID: <1236255770.34.0.110082818538.issue5422@psf.upfronthosting.co.za> ?? added the comment: if directory have chinese word under windows system load .py is passed load .pyc get the utf-8 codec error... i modified this code wish this is helpful... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 13:42:54 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 05 Mar 2009 12:42:54 +0000 Subject: [issue5422] load pyc file with mbcs file system in update_compiled_module In-Reply-To: <1236255278.63.0.0210000378211.issue5422@psf.upfronthosting.co.za> Message-ID: <1236256974.28.0.00476493644837.issue5422@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I believe this issue is duplicate of issue5273, and fixed yesterday. Can you try latest svn checkout? ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 14:01:13 2009 From: report at bugs.python.org (Chris Withers) Date: Thu, 05 Mar 2009 13:01:13 +0000 Subject: [issue5423] Exception raised when attempting to call set_charset on an email.mime.multipart once sub-parts have been attached In-Reply-To: <1236258073.44.0.224242973923.issue5423@psf.upfronthosting.co.za> Message-ID: <1236258073.44.0.224242973923.issue5423@psf.upfronthosting.co.za> New submission from Chris Withers : Hi All, I'm splitting this out from [Issue1823] as it's a separate issue. Here's a minimal case to reproduce: >>> from email.MIMEMultipart import MIMEMultipart >>> from email.MIMEText import MIMEText >>> msg = MIMEMultipart() >>> msg.attach(MIMEText('foo','plain')) >>> msg.set_charset('utf-8') Traceback (most recent call last): File "", line 1, in ? File "C:\python24\lib\email\Message.py", line 260, in set_charset self._payload = charset.body_encode(self._payload) File "C:\python24\lib\email\Charset.py", line 366, in body_encode return email.base64MIME.body_encode(s) File "C:\python24\lib\email\base64MIME.py", line 136, in encode enc = b2a_base64(s[i:i + max_unencoded]) TypeError: b2a_base64() argument 1 must be string or read-only buffer, not list NB: The exception raised can vary depending on the character set used: >>> msg.set_charset('iso-8859-15') Traceback (most recent call last): File "", line 1, in ? File "C:\python24\lib\email\Message.py", line 260, in set_charset self._payload = charset.body_encode(self._payload) File "C:\python24\lib\email\Charset.py", line 368, in body_encode return email.quopriMIME.body_encode(s) File "C:\python24\lib\email\quopriMIME.py", line 180, in encode body = fix_eols(body) File "C:\python24\lib\email\Utils.py", line 62, in fix_eols s = re.sub(r'(? _______________________________________ From report at bugs.python.org Thu Mar 5 14:06:55 2009 From: report at bugs.python.org (Chris Withers) Date: Thu, 05 Mar 2009 13:06:55 +0000 Subject: [issue1823] Possible to set invalid Content-Transfer-Encoding on email.mime.multipart.MIMEMultipart In-Reply-To: <1200309434.22.0.561367082724.issue1823@psf.upfronthosting.co.za> Message-ID: <1236258415.63.0.7175813637.issue1823@psf.upfronthosting.co.za> Chris Withers added the comment: Okay, splitting this out a little. I've moved the exception when setting character set after adding parts out to [Issue5423]. Here's a simpler example of the problem with setting character sets on multiparts: >>> from email.MIMEMultipart import MIMEMultipart >>> msg = MIMEMultipart() >>> msg.set_charset('iso-8859-15') >>> print msg.as_string() MIME-Version: 1.0 Content-Type: multipart/mixed; charset="iso-8859-15"; boundary="===============1300027372==" Content-Transfer-Encoding: quoted-printable As a programmer, I don't think I've done anything wrong, but that mail is not valid and causes some fussy MTAs to barf and show the message as blank. That said, when would you ever need or want to set the character set on a MIMEMultipart? I have this in my code, but I suspect I was just sheep/paranoia programming. When would just making set_charset on a MIMEMultipart raise an exception cause problems? ---------- nosy: +cjw296 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 14:37:18 2009 From: report at bugs.python.org (Philipp Hagemeister) Date: Thu, 05 Mar 2009 13:37:18 +0000 Subject: [issue5424] Packed IPaddr conversion tests should be extended In-Reply-To: <1236260237.37.0.149966249724.issue5424@psf.upfronthosting.co.za> Message-ID: <1236260237.37.0.149966249724.issue5424@psf.upfronthosting.co.za> New submission from Philipp Hagemeister : Currently, the testStringToIPv6 and testIPv6ToStrings tests in Lib/test/test_socket.py only check for variants 1 and 2 (but not 3) from RFC 4291 2.2. Furthermore, there are no assertions that check wrong inputs are appropriately refused in any of the packed IP conversion tests. The attached patch adds a number of assertions covering those. ---------- components: Tests files: extend-packed-ip-tests-trunk2.x.diff keywords: patch messages: 83195 nosy: phihag severity: normal status: open title: Packed IPaddr conversion tests should be extended type: feature request versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13247/extend-packed-ip-tests-trunk2.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 14:42:20 2009 From: report at bugs.python.org (=?utf-8?q?=E5=BE=90=E6=B4=B2?=) Date: Thu, 05 Mar 2009 13:42:20 +0000 Subject: [issue5422] load pyc file with mbcs file system in update_compiled_module In-Reply-To: <1236255278.63.0.0210000378211.issue5422@psf.upfronthosting.co.za> Message-ID: <1236260540.46.0.461751339564.issue5422@psf.upfronthosting.co.za> ?? added the comment: Oh... yes this is fixed thx a lot for u check out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 14:46:30 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 05 Mar 2009 13:46:30 +0000 Subject: [issue5422] load pyc file with mbcs file system in update_compiled_module In-Reply-To: <1236255278.63.0.0210000378211.issue5422@psf.upfronthosting.co.za> Message-ID: <1236260790.33.0.103274142913.issue5422@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- dependencies: +3.0.1 crashes in unicode path resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 14:47:12 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 05 Mar 2009 13:47:12 +0000 Subject: [issue5422] load pyc file with mbcs file system in update_compiled_module In-Reply-To: <1236255278.63.0.0210000378211.issue5422@psf.upfronthosting.co.za> Message-ID: <1236260832.45.0.0505782103637.issue5422@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- dependencies: -3.0.1 crashes in unicode path superseder: -> 3.0.1 crashes in unicode path _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 15:21:37 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 05 Mar 2009 14:21:37 +0000 Subject: [issue5385] mmap can crash after resize failure (windows) In-Reply-To: <1235756024.86.0.438154708422.issue5385@psf.upfronthosting.co.za> Message-ID: <1236262897.83.0.301299752079.issue5385@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Fixed in r70189. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 15:48:51 2009 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Thu, 05 Mar 2009 14:48:51 +0000 Subject: [issue5425] 2to3 wrong for types.StringTypes In-Reply-To: <1236264531.78.0.371254009899.issue5425@psf.upfronthosting.co.za> Message-ID: <1236264531.78.0.371254009899.issue5425@psf.upfronthosting.co.za> New submission from Hagen F?rstenau : In Python 2.6 we have >>> types.StringTypes (, ) but 2to3 translates "types.StringTypes" into "str", which is obviously wrong. The attached patch changes it into "(str, bytes)". ---------- components: 2to3 (2.x to 3.0 conversion tool) files: 2to3_StringTypes.patch keywords: patch messages: 83198 nosy: hagen severity: normal status: open title: 2to3 wrong for types.StringTypes type: behavior versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file13248/2to3_StringTypes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 16:10:27 2009 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 05 Mar 2009 15:10:27 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1236265827.48.0.965734112778.issue1580@psf.upfronthosting.co.za> Guido van Rossum added the comment: Sounds good to me. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 16:17:57 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Mar 2009 15:17:57 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1236266277.3.0.113565921919.issue1580@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 on the fallback strategy for platforms we don't know how to handle. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 16:27:07 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 05 Mar 2009 15:27:07 +0000 Subject: [issue2733] mmap resize fails on anonymous memory (Windows) In-Reply-To: <1209661457.64.0.989081565875.issue2733@psf.upfronthosting.co.za> Message-ID: <1236266827.62.0.707434858821.issue2733@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: More two cents which I noticed. (After the patch was applied) 1. On windows, resize for anonymous map can clear its contents. >>> import mmap >>> m = mmap.mmap(-1, 10) >>> m[:] = "0123456789" >>> m[:] '0123456789' >>> m.resize(20) >>> m[:] '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0 0' 2. Anonymous map on unix also has similar problem. ftruncate() fails for fd == -1 Sorry for having clear solution for this. But I cannot say "This is what mmap.resize should behave!". _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 16:27:53 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 05 Mar 2009 15:27:53 +0000 Subject: [issue2733] mmap resize fails on anonymous memory (Windows) In-Reply-To: <1209661457.64.0.989081565875.issue2733@psf.upfronthosting.co.za> Message-ID: <1236266873.65.0.839945345634.issue2733@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: - Sorry for having clear solution for this. + Sorry for having no clear solution for this. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 17:44:30 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 05 Mar 2009 16:44:30 +0000 Subject: [issue5426] README slight error re OSX In-Reply-To: <1236271470.07.0.217969645755.issue5426@psf.upfronthosting.co.za> Message-ID: <1236271470.07.0.217969645755.issue5426@psf.upfronthosting.co.za> New submission from Mitchell Model : Line 136 of the 3.0 README and line 179 of the 3.1 README state that the executable on OSX is called python.exe. It's not. ---------- assignee: georg.brandl components: Documentation messages: 83203 nosy: MLModel, georg.brandl severity: normal status: open title: README slight error re OSX versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 17:57:50 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Mar 2009 16:57:50 +0000 Subject: [issue5426] README slight error re OSX In-Reply-To: <1236271470.07.0.217969645755.issue5426@psf.upfronthosting.co.za> Message-ID: <1236272270.62.0.202231540624.issue5426@psf.upfronthosting.co.za> Georg Brandl added the comment: So it is just called "python"? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 18:17:55 2009 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 05 Mar 2009 17:17:55 +0000 Subject: [issue5426] README slight error re OSX In-Reply-To: <1236271470.07.0.217969645755.issue5426@psf.upfronthosting.co.za> Message-ID: <1236273475.91.0.661658518698.issue5426@psf.upfronthosting.co.za> Guido van Rossum added the comment: What makes you think it is not called python.exe? Maybe you're confused by the Finder's auto-hiding of externsions? ---------- nosy: +gvanrossum resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 18:29:13 2009 From: report at bugs.python.org (Ilya Sandler) Date: Thu, 05 Mar 2009 17:29:13 +0000 Subject: [issue5198] Strange DeprecationWarning behaviour in module struct In-Reply-To: <1234250088.94.0.680929615779.issue5198@psf.upfronthosting.co.za> Message-ID: <1236274153.23.0.669841104446.issue5198@psf.upfronthosting.co.za> Ilya Sandler added the comment: It appears that the different behavior results from trying to preserve backward compatibility with earlier version of Python see: http://bugs.python.org/issue1229380 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 18:34:17 2009 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 05 Mar 2009 17:34:17 +0000 Subject: [issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful() In-Reply-To: <1235772794.07.0.300454209619.issue5389@psf.upfronthosting.co.za> Message-ID: <1236274457.61.0.430081555745.issue5389@psf.upfronthosting.co.za> Guido van Rossum added the comment: Well, this one is technically a security fix, though I have no idea how it could be exploited unless you offer your users a facility to execute arbitrary Python code. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 18:57:51 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 05 Mar 2009 17:57:51 +0000 Subject: [issue5426] README slight error re OSX In-Reply-To: <1236273475.91.0.661658518698.issue5426@psf.upfronthosting.co.za> Message-ID: Mitchell Model added the comment: Nothing on OSX is ever named .exe. On OSX building and installing Python with "configure --enable-framework" installs an executable just called 'python' in /Library/Frameworks/Python.framework/Versions/3.1/bin (using 3.1 as an example). It also creates double-clickable applications whose real name is Python.app and IDLE.app. Whether to see the .app extensions on "packages" that are applications is a Finder preference, so most users won't see the .app. If the build was configured without frameworks, then an executable named in the Unix style -- just python -- is installed in /usr/local/bin (by default) or wherever else was specified with the configure --prefix option. -- -- --- Mitchell Added file: http://bugs.python.org/file13249/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Thu Mar 5 19:21:48 2009 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 05 Mar 2009 18:21:48 +0000 Subject: [issue5426] README slight error re OSX In-Reply-To: <1236271470.07.0.217969645755.issue5426@psf.upfronthosting.co.za> Message-ID: <1236277308.68.0.317348000227.issue5426@psf.upfronthosting.co.za> Guido van Rossum added the comment: That sentence however does not refer to the name of the installed Python binary, but the binary as it is built in the source tree (or a build directory). And there we chose to call it "python.exe" because we couldn't call it "python" because there is already a directory named "Python", which (on the default case-insensitive filesystem) conflicts with the executable name. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 19:34:27 2009 From: report at bugs.python.org (DSM) Date: Thu, 05 Mar 2009 18:34:27 +0000 Subject: [issue3320] various doc typos In-Reply-To: <1215523884.32.0.11626417694.issue3320@psf.upfronthosting.co.za> Message-ID: <1236278067.67.0.208192756714.issue3320@psf.upfronthosting.co.za> DSM added the comment: Commenting only to draw attention to the trivial typo in mp_distributing.py, because jnoller's post on the mailing list reminded me about it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 19:36:18 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 05 Mar 2009 18:36:18 +0000 Subject: [issue5427] OSX framework make error: ld: duplicate symbol _PyExc_BlockingIOError in libpython3.1.a(_iobase.o) and libpython3.1.a(io.o) In-Reply-To: <1236278178.06.0.131400949439.issue5427@psf.upfronthosting.co.za> Message-ID: <1236278178.06.0.131400949439.issue5427@psf.upfronthosting.co.za> New submission from Mitchell Model : Trying to build 3.1 in recent 'svn update's on OSX 10.5 after make clean configure --enable-framework I get the following error near the end of the build: ld: duplicate symbol _PyExc_BlockingIOError in libpython3.1.a(_iobase.o) and libpython3.1.a(io.o) I even tried deleting all the files and checking them out again, but I got the same error. ---------- components: Build messages: 83211 nosy: MLModel severity: normal status: open title: OSX framework make error: ld: duplicate symbol _PyExc_BlockingIOError in libpython3.1.a(_iobase.o) and libpython3.1.a(io.o) versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 19:36:48 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 05 Mar 2009 18:36:48 +0000 Subject: [issue3320] various doc typos In-Reply-To: <1215523884.32.0.11626417694.issue3320@psf.upfronthosting.co.za> Message-ID: <1236278208.61.0.645613357801.issue3320@psf.upfronthosting.co.za> Jesse Noller added the comment: Totally missed this issue, thanks for commenting. Will get on this soonish _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 19:37:06 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 05 Mar 2009 18:37:06 +0000 Subject: [issue3320] various doc typos In-Reply-To: <1215523884.32.0.11626417694.issue3320@psf.upfronthosting.co.za> Message-ID: <1236278226.88.0.703946667905.issue3320@psf.upfronthosting.co.za> Jesse Noller added the comment: Assigning to me to resolve final issue ---------- assignee: georg.brandl -> jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 19:41:41 2009 From: report at bugs.python.org (hhas) Date: Thu, 05 Mar 2009 18:41:41 +0000 Subject: [issue1113328] OSATerminology still semi-broken Message-ID: <1236278501.38.0.654299283026.issue1113328@psf.upfronthosting.co.za> hhas added the comment: No idea, be honest. The original patch was created for 2.3, and I've no free time to look into it myself now. BTW, note that nobody uses this module any more; it's deprecated in 2.6, absent in 3.0, and OSAGetAppTerminology() is deprecated in OS X 10.5 as well. I've already recommended that this and other bugs related to now- deprecated MacPython-only APIs be closed as "won't fix". _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 21:16:29 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Mar 2009 20:16:29 +0000 Subject: [issue5425] 2to3 wrong for types.StringTypes In-Reply-To: <1236264531.78.0.371254009899.issue5425@psf.upfronthosting.co.za> Message-ID: <1236284189.66.0.0575495975114.issue5425@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It's hard to guess the intention of types.StringTypes since it may mean "text" strings or "text and byte" strings. I'm tempted to just remove the transformation at all and issue a warning. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 21:21:05 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 05 Mar 2009 20:21:05 +0000 Subject: [issue5426] README slight error re OSX In-Reply-To: <1236277308.68.0.317348000227.issue5426@psf.upfronthosting.co.za> Message-ID: Mitchell Model added the comment: Whoops! It didn't say "the executable that gets built is called python.exe", but it is in the build section, so taking things literally, yes, the executable is called python.exe and I maybe should have taken it at its word. There's a subtle problem in the wording since "the executable" almost always suggests "the program you run". It's a little weird -- though I see your point about why it's done that way -- to build an executable that gets installed as a different name. (Well, maybe installed with version number as part of the name.) So even if the README is literally correct I do think it lays a subtle trap for the reader that could be avoided with a slight rewording. Not important -- I'm just trying to help by pointing out documentation problems as I come across them. Most of them have been real. -- -- --- Mitchell Added file: http://bugs.python.org/file13250/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Thu Mar 5 21:23:40 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Mar 2009 20:23:40 +0000 Subject: [issue1717] Get rid of more references to __cmp__ In-Reply-To: <1199205565.64.0.0495465164968.issue1717@psf.upfronthosting.co.za> Message-ID: <1236284620.59.0.150383163846.issue1717@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 21:23:48 2009 From: report at bugs.python.org (Christophe Simonis) Date: Thu, 05 Mar 2009 20:23:48 +0000 Subject: [issue4331] Can't use _functools.partial() created function as method In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1236284628.72.0.304878109719.issue4331@psf.upfronthosting.co.za> Changes by Christophe Simonis : ---------- nosy: +Christophe Simonis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 22:23:04 2009 From: report at bugs.python.org (Pascal Chambon) Date: Thu, 05 Mar 2009 21:23:04 +0000 Subject: [issue4192] Subprocess error with I/O redirection to Pipes In-Reply-To: <1224861800.81.0.399738040895.issue4192@psf.upfronthosting.co.za> Message-ID: <1236288184.48.0.698516141742.issue4192@psf.upfronthosting.co.za> Pascal Chambon added the comment: Thansk a lot for reviewing the problem Indeed, "p.wait()" seems to do the trick in this case. Is there any global way to avoid such pipe problems ? I mean, in any case, one end of each pipe has to be closed before the other end, so such errors might occur with the child process' stdin (in case the child dies first and the parent flushes then its pipe toward the child's stdin) or with its stdout (if the parent dies first and the child flushes then its stdout). Or are we sure that there won't be errors as long as children die before the parent process ? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 22:24:43 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Mar 2009 21:24:43 +0000 Subject: [issue5334] array.fromfile() fails to insert values when EOFError is raised In-Reply-To: <1235189293.4.0.0829880938906.issue5334@psf.upfronthosting.co.za> Message-ID: <1236288283.92.0.41959571913.issue5334@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Patch looks good. Please apply. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 22:31:16 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Mar 2009 21:31:16 +0000 Subject: [issue5421] Irritating error message by socket's sendto method In-Reply-To: <1236248103.61.0.911918415156.issue5421@psf.upfronthosting.co.za> Message-ID: <1236288676.9.0.380273586896.issue5421@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 22:33:33 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 05 Mar 2009 21:33:33 +0000 Subject: [issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful() In-Reply-To: <1235772794.07.0.300454209619.issue5389@psf.upfronthosting.co.za> Message-ID: <1236288813.48.0.986573333944.issue5389@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I agree it is technically a security fix, so somebody please feel free to commit it. I will make another 2.5 release when enough of these have accumulated, or something urgent happens, or somebody wants to see a release really badly :-) ---------- assignee: loewis -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 22:34:33 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 05 Mar 2009 21:34:33 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1236288873.19.0.259041894217.issue5390@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: works for me -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 22:35:11 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 05 Mar 2009 21:35:11 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1236288911.91.0.88465882467.issue5390@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I give this low priority, i.e. might not work on it for several months (or ever). Contributions are welcome. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 22:47:29 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 05 Mar 2009 21:47:29 +0000 Subject: [issue5425] 2to3 wrong for types.StringTypes In-Reply-To: <1236264531.78.0.371254009899.issue5425@psf.upfronthosting.co.za> Message-ID: <1236289649.35.0.917675033089.issue5425@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I agree with Benjamin. Translation into (str, bytes) is incorrect. I don't agree that it is obvious that the translation into str is incorrect. Recommend closing as reject. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 22:47:50 2009 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 05 Mar 2009 21:47:50 +0000 Subject: [issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful() In-Reply-To: <1235772794.07.0.300454209619.issue5389@psf.upfronthosting.co.za> Message-ID: <1236289670.65.0.921237998018.issue5389@psf.upfronthosting.co.za> Guido van Rossum added the comment: OK, submitted. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 22:50:25 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Mar 2009 21:50:25 +0000 Subject: [issue5425] 2to3 wrong for types.StringTypes In-Reply-To: <1236264531.78.0.371254009899.issue5425@psf.upfronthosting.co.za> Message-ID: <1236289825.37.0.771789608149.issue5425@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 23:05:07 2009 From: report at bugs.python.org (Michel Weinachter) Date: Thu, 05 Mar 2009 22:05:07 +0000 Subject: [issue5428] Pyshell history management error In-Reply-To: <1236290707.1.0.232132211255.issue5428@psf.upfronthosting.co.za> Message-ID: <1236290707.1.0.232132211255.issue5428@psf.upfronthosting.co.za> New submission from Michel Weinachter : I have created a variable named "liste_de_courses" when I use Alt-P to gather a previous command and modify it I have the following error: ------------ >>> liste_de_courses.append(?b') SyntaxError: invalid character in identifier (, line 1) ------------ There is no issue in the command line. ---------- components: IDLE messages: 83223 nosy: datamoc severity: normal status: open title: Pyshell history management error type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 23:32:06 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Mar 2009 22:32:06 +0000 Subject: [issue4263] BufferedWriter non-blocking overage In-Reply-To: <1236244266.9.0.0541584297881.issue4263@psf.upfronthosting.co.za> Message-ID: <1afaf6160903051432j1a02002fg20523ec35876ba0b@mail.gmail.com> Benjamin Peterson added the comment: 2009/3/5 Sever B?ne?iu : > > Sever B?ne?iu added the comment: > > Looks like the test covering the pre-flush condition is missing. That test is no longer applicable because max_buffer_size is deprecated and unused. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 23:37:04 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Mar 2009 22:37:04 +0000 Subject: [issue5428] Pyshell history management error In-Reply-To: <1236290707.1.0.232132211255.issue5428@psf.upfronthosting.co.za> Message-ID: <1236292624.96.0.0314806770428.issue5428@psf.upfronthosting.co.za> Georg Brandl added the comment: The code you pasted contains a non-ASCII quote (?). ---------- nosy: +georg.brandl resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 5 23:59:18 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Mar 2009 22:59:18 +0000 Subject: [issue5427] OSX framework make error: ld: duplicate symbol _PyExc_BlockingIOError in libpython3.1.a(_iobase.o) and libpython3.1.a(io.o) In-Reply-To: <1236278178.06.0.131400949439.issue5427@psf.upfronthosting.co.za> Message-ID: <1236293958.54.0.971812730445.issue5427@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This should be fixed as of r70198. Make sure to run "make clean." ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 00:53:14 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 05 Mar 2009 23:53:14 +0000 Subject: [issue5429] Core dumps on the Solaris buildbot In-Reply-To: <1236297194.7.0.256831518198.issue5429@psf.upfronthosting.co.za> Message-ID: <1236297194.7.0.256831518198.issue5429@psf.upfronthosting.co.za> New submission from Antoine Pitrou : It has been happening for a few days now... may be related to the IO-C merge. http://www.python.org/dev/buildbot/3.x.stable/ ---------- components: Tests messages: 83227 nosy: benjamin.peterson, pitrou priority: high severity: normal status: open title: Core dumps on the Solaris buildbot type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 01:01:51 2009 From: report at bugs.python.org (Luk Knapen) Date: Fri, 06 Mar 2009 00:01:51 +0000 Subject: [issue5421] Irritating error message by socket's sendto method In-Reply-To: <1236248103.61.0.911918415156.issue5421@psf.upfronthosting.co.za> Message-ID: <1236297711.22.0.770537651003.issue5421@psf.upfronthosting.co.za> Luk Knapen added the comment: File $python/lib/python3.0/logging/handlers.py Line 782 : a bytes object is required instead of a string. As a consequence, encoding shall be specified : but which one ? Is : self.socket.sendto(msg, self.address) Should look like : self.socket.sendto(bytes(msg,'ascii'), self.address) ---------- nosy: +lukknapen versions: +Python 3.1 -Python 2.4, Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 01:22:59 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Fri, 06 Mar 2009 00:22:59 +0000 Subject: [issue5420] Queue deprecation warning patch In-Reply-To: <1236218557.32.0.700265695834.issue5420@psf.upfronthosting.co.za> Message-ID: <1236298979.33.0.692730392234.issue5420@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: Patch covering all files in a single patch. * Updated warning message * Updated multiprocessing tests to avoid calls to empty and full * Placed deprecation warning in multiprocessing methods * Update wsgui to avoid deprecated calls Issues: * Noticed no warnings raised as a result of changes to multiprocessing: ergo multiprocessing.queue empty() and full() methods are not currently getting test coverage * No obvious test rig for wsgui, so code is completely untested (!), but I figured someone closer to wsgui could at least have my code for reference, so included in the patch Added file: http://bugs.python.org/file13251/queue_patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 01:25:35 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Fri, 06 Mar 2009 00:25:35 +0000 Subject: [issue5420] Queue deprecation warning patch In-Reply-To: <1236225599.71.0.227510370469.issue5420@psf.upfronthosting.co.za> Message-ID: <43c8685c0903051625p623fedb6ud8a26535b2df4207@mail.gmail.com> Tennessee Leeuwenburg added the comment: Hi JP, I experimented with stacklevel but to be honest nothing I saw appeared greatly more useful than the default for the tests in question. What form would the unit tests take? Trying to assert that empty() and full() raised a deprecation warning? I'm not sure how I would go about that, but I'll see what I can do. Thanks, -Tennessee On Thu, Mar 5, 2009 at 3:00 PM, Jean-Paul Calderone wrote: > > Jean-Paul Calderone added the comment: > > Unit tests are a great thing as well. Also, the deprecation warnings > you've added are the really annoying kind. They refer to users to the > source of the deprecated methods themselves! A vastly preferable use of > the warnings system is to refer users to the *callers* of the deprecated > methods. Try passing different values for the stacklevel parameter of > the warnings.warn function until you get a warning that is more helpful. > > ---------- > nosy: +exarkun > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file13252/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Fri Mar 6 01:33:38 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 06 Mar 2009 00:33:38 +0000 Subject: [issue5420] Queue deprecation warning patch In-Reply-To: <1236218557.32.0.700265695834.issue5420@psf.upfronthosting.co.za> Message-ID: <1236299618.12.0.797038492222.issue5420@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 01:41:19 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Fri, 06 Mar 2009 00:41:19 +0000 Subject: [issue5420] Queue deprecation warning patch In-Reply-To: <1236218557.32.0.700265695834.issue5420@psf.upfronthosting.co.za> Message-ID: <1236300079.65.0.283009976477.issue5420@psf.upfronthosting.co.za> Changes by Tennessee Leeuwenburg : Removed file: http://bugs.python.org/file13252/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 01:42:03 2009 From: report at bugs.python.org (Jesse Noller) Date: Fri, 06 Mar 2009 00:42:03 +0000 Subject: [issue5420] Queue deprecation warning patch In-Reply-To: <1236218557.32.0.700265695834.issue5420@psf.upfronthosting.co.za> Message-ID: <1236300123.8.0.85217300528.issue5420@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 01:45:18 2009 From: report at bugs.python.org (Jesse Noller) Date: Fri, 06 Mar 2009 00:45:18 +0000 Subject: [issue5420] Queue deprecation warning patch In-Reply-To: <1236218557.32.0.700265695834.issue5420@psf.upfronthosting.co.za> Message-ID: <1236300318.7.0.58903167216.issue5420@psf.upfronthosting.co.za> Jesse Noller added the comment: Quote: Issues: * Noticed no warnings raised as a result of changes to multiprocessing: ergo multiprocessing.queue empty() and full() methods are not currently getting test coverage ? I need to check this. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 02:24:08 2009 From: report at bugs.python.org (R. David Murray) Date: Fri, 06 Mar 2009 01:24:08 +0000 Subject: [issue5323] document expected/required behavior of 3.x io subsystem with respect to buffering In-Reply-To: <1235079370.71.0.9273857922.issue5323@psf.upfronthosting.co.za> Message-ID: <1236302648.47.0.351790408247.issue5323@psf.upfronthosting.co.za> R. David Murray added the comment: I have now had time to test this. My use case (reading text from a pipe and wanting the most recent complete line returned immediatly as it is avaialable) is satisified by both the io.py code and the io c code from the py3k branch. I haven't been able to figure out how to write an automated test, though :(. I also had a fun time (I mean that literally) wandering through the code and docs convincing myself that the 3.1a0 docs cover all the issues I raised in this ticket. I played around with a test case that helped convince me the implementations match the 3.1a0 docs for the issues I was concerned about. So, IMO this ticket can be closed as fixed in 3.1a0. --RDM _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 02:34:49 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Mar 2009 01:34:49 +0000 Subject: [issue5323] document expected/required behavior of 3.x io subsystem with respect to buffering In-Reply-To: <1235079370.71.0.9273857922.issue5323@psf.upfronthosting.co.za> Message-ID: <1236303289.44.0.856681520286.issue5323@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 02:37:35 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Mar 2009 01:37:35 +0000 Subject: [issue5420] Queue deprecation warning patch In-Reply-To: <1236218557.32.0.700265695834.issue5420@psf.upfronthosting.co.za> Message-ID: <1236303455.2.0.421089193372.issue5420@psf.upfronthosting.co.za> Benjamin Peterson added the comment: You should test that the warnings are given by the deprecated methods. Look at test_py3kwarn for an example of how to do that. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 04:11:28 2009 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 06 Mar 2009 03:11:28 +0000 Subject: [issue814253] Grouprefs in lookbehind assertions Message-ID: <1236309088.77.0.240637807251.issue814253@psf.upfronthosting.co.za> Matthew Barnett added the comment: As part of issue #2636 group references now work in lookbehinds. However, your example: (?<=(...)\1)abc will fail but: (?<=\1(...))abc will succeed. Why? Well, in lookbehinds it searches backwards. In the first regex it sees the group reference before the capture, whereas in the second it sees the group reference after the capture. (Hope that's clear! :-)) ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 04:13:28 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 06 Mar 2009 03:13:28 +0000 Subject: [issue5334] array.fromfile() fails to insert values when EOFError is raised In-Reply-To: <1235189293.4.0.0829880938906.issue5334@psf.upfronthosting.co.za> Message-ID: <1236309208.41.0.271498162329.issue5334@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Committed in r70203(py3k) ---------- priority: release blocker -> resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 05:35:41 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Fri, 06 Mar 2009 04:35:41 +0000 Subject: [issue5420] Queue deprecation warning patch In-Reply-To: <1236218557.32.0.700265695834.issue5420@psf.upfronthosting.co.za> Message-ID: <1236314141.39.0.321890594324.issue5420@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: Now, with unit tests... :) Added file: http://bugs.python.org/file13253/queue_patch3.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 05:52:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 06 Mar 2009 04:52:56 +0000 Subject: [issue400608] just testing Message-ID: <0016362836d09d566004646c0ec6@google.com> Daniel Diniz added the comment: Reviewers: , Message: While this is a test issue, the attached diff is a crude first draft of a patched upload.py that makes linking to the Python Tracker a bit easier. Here's the command line and output: $ python static/upload.py -R 400608 -F msg32813 Upload server: [...] Loaded authentication cookies [...] Issue created. URL: http://codereview.appspot.com/25073 Uploading base file for static/upload.py And the help is: $ python static/upload.py -h | tail -n5 Link options: -R ROUNDUP, --roundup=ROUNDUP Python tracker issue number to link with. -F FETCHDESCR, --fetch_descr=FETCHDESCR Tracker file or message to fetch description from. I like it :) Description: wish we could expunge the deleted ones Please review this at http://codereview.appspot.com/25073 Affected files: M static/upload.py Index: static/upload.py =================================================================== --- static/upload.py (revision 402) +++ static/upload.py (working copy) @@ -61,7 +61,31 @@ # Max size of patch or base file. MAX_UPLOAD_SIZE = 900 * 1024 +fields = {'issue':'title', 'msg':'content', 'file':'description', } +def fetch_item(nodeid, kind='issue', tracker='http://bugs.python.org'): + query_tpl = [('@action', 'export_csv'), ('@filter', 'id'), + ('id', nodeid), ('@columns', fields[kind])] + item_url = '/%s?%s' % (kind, urllib.urlencode(query_tpl)) + content = urllib.urlopen(tracker + item_url).read().split('\r\n') + if content[0] == 'title': + return '[issue%s] %s' % (nodeid, content[1].strip()) + elif content[0] == 'content' or content[0] == 'description': + return content[1].strip() +def fetch(nodeid): + try: + result = fetch_item(int(nodeid)) + except ValueError: + if nodeid.startswith('msg'): + nodeid = nodeid.replace('msg', '') + result = fetch_item(int(nodeid), 'msg') + elif nodeid.startswith('file'): + nodeid = nodeid.replace('file', '') + result = fetch_item(int(nodeid), 'file') + else: + raise + return result + def GetEmail(prompt): """Prompts the user for their email address and returns it. @@ -453,6 +477,14 @@ group.add_option("--send_mail", action="store_true", dest="send_mail", default=False, help="Send notification email to reviewers.") +# Link options +group = parser.add_option_group("Link options") +group.add_option("-R", "--roundup", action="store", dest="roundup", + metavar="ROUNDUP", default=None, + help="Python tracker issue number to link with.") +group.add_option("-F", "--fetch_descr", action="store", dest="fetch_descr", + metavar="FETCHDESCR", default=None, + help="Tracker file or message to fetch description from.") def GetRpcServer(options): @@ -1291,7 +1323,10 @@ prompt = "Message describing this patch set: " else: prompt = "New issue subject: " - message = options.message or raw_input(prompt).strip() + if options.roundup: + message = fetch(options.roundup) + else: + message = options.message or raw_input(prompt).strip() if not message: ErrorExit("A non-empty message is required") rpc_server = GetRpcServer(options) @@ -1307,11 +1342,16 @@ if "@" in reviewer and not reviewer.split("@")[1].count(".") == 1: ErrorExit("Invalid email address: %s" % reviewer) form_fields.append(("reviewers", options.reviewers)) + tracker_email = 'report at bugs.python.org,' if options.cc: for cc in options.cc.split(','): if "@" in cc and not cc.split("@")[1].count(".") == 1: ErrorExit("Invalid email address: %s" % cc) - form_fields.append(("cc", options.cc)) + if options.roundup: + cc = tracker_email + options.cc + form_fields.append(("cc", cc)) + elif options.roundup: + form_fields.append(("cc", tracker_email[:-1])) description = options.description if options.description_file: if options.description: @@ -1319,6 +1359,9 @@ file = open(options.description_file, 'r') description = file.read() file.close() + elif options.fetch_descr: + # XXX Add error handling as above + description = fetch(options.fetch_descr) if description: form_fields.append(("description", description)) # Send a hash of all the base file so the server can determine if a copy ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 06:29:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 06 Mar 2009 05:29:11 +0000 Subject: [issue2771] test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <00163630f1df3867d704646c8f51@google.com> Daniel Diniz added the comment: Reviewers: , Description: "This is a very long line. I am wondering how it will be wrapped. What will happen to this exceedingly long line? Will it be wrapped? Will it? Really? What will happen? Here's an example: def fact(n): if n > 1: return n * fact(n-1) else: assert n in (0, 1) return 1 What do you think of that?" Please review this at http://codereview.appspot.com/24075 Affected files: M static/upload.py Index: static/upload.py =================================================================== --- static/upload.py (revision 402) +++ static/upload.py (working copy) @@ -61,7 +61,30 @@ # Max size of patch or base file. MAX_UPLOAD_SIZE = 900 * 1024 +#python static/upload.py -R 2771 -F msg66272 --send_mail +fields = {'issue':'title', 'msg':'content', 'file':'description', } +def fetch_item(nodeid, kind='issue', tracker='http://bugs.python.org'): + query_tpl = [('@action', 'export_csv'), ('@filter', 'id'), + ('id', nodeid), ('@columns', fields[kind])] + item_url = '/%s?%s' % (kind, urllib.urlencode(query_tpl)) + content = urllib.urlopen(tracker + item_url).read().split('\r\n') + if content[0] == 'title': + return '[issue%s] %s' % (nodeid, content[1].strip()) + elif content[0] == 'content' or content[0] == 'description': + return content[1].strip() +def fetch(nodeid, debug=True): + kind = 'issue' + if nodeid.startswith('msg'): + kind = 'msg' + elif nodeid.startswith('file'): + kind = 'file' + nodeid = nodeid.replace(kind, '') + result = fetch_item(int(nodeid), kind) + if debug: + logging.info('Fetched "%s: %s"' % (kind, result)) + return result + def GetEmail(prompt): """Prompts the user for their email address and returns it. @@ -453,6 +476,14 @@ group.add_option("--send_mail", action="store_true", dest="send_mail", default=False, help="Send notification email to reviewers.") +# Link options +group = parser.add_option_group("Link options") +group.add_option("-R", "--roundup", action="store", dest="roundup", + metavar="ROUNDUP", default=None, + help="Python tracker issue number to link with.") +group.add_option("-F", "--fetch_descr", action="store", dest="fetch_descr", + metavar="FETCHDESCR", default=None, + help="Tracker file or message to fetch description from.") def GetRpcServer(options): @@ -1291,7 +1322,10 @@ prompt = "Message describing this patch set: " else: prompt = "New issue subject: " - message = options.message or raw_input(prompt).strip() + if options.roundup: + message = fetch(options.roundup) + else: + message = options.message or raw_input(prompt).strip() if not message: ErrorExit("A non-empty message is required") rpc_server = GetRpcServer(options) @@ -1307,11 +1341,16 @@ if "@" in reviewer and not reviewer.split("@")[1].count(".") == 1: ErrorExit("Invalid email address: %s" % reviewer) form_fields.append(("reviewers", options.reviewers)) + tracker_email = 'report at bugs.python.org,' if options.cc: for cc in options.cc.split(','): if "@" in cc and not cc.split("@")[1].count(".") == 1: ErrorExit("Invalid email address: %s" % cc) - form_fields.append(("cc", options.cc)) + if options.roundup: + cc = tracker_email + options.cc + form_fields.append(("cc", cc)) + elif options.roundup: + form_fields.append(("cc", tracker_email[:-1])) description = options.description if options.description_file: if options.description: @@ -1319,6 +1358,9 @@ file = open(options.description_file, 'r') description = file.read() file.close() + elif options.fetch_descr: + # XXX Add error handling as above + description = fetch(options.fetch_descr) if description: form_fields.append(("description", description)) # Send a hash of all the base file so the server can determine if a copy ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 06:36:30 2009 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 06 Mar 2009 05:36:30 +0000 Subject: [issue400608] just testing Message-ID: <0016361e89603a5b5404646caade@google.com> Guido van Rossum added the comment: This is specific to the Python tracker, which Rietveld tries to avoid. You could maintain this as a locally modified version, but a better approach would be to make just enough changes to upload.py itself so that you can write the rest of this script as a *wrapper* around upload.py. That's how the Chrome people manage their workflow, and that's a generally recommended approach: the wrapper does the project-specific stuff, passing everything to upload.py for the actual interaction with Rietveld. PS. What do you mean by "wish we could expunge the deleted ones"? If you delete a Rietveld issue it is really gone. If you merely close it, you can still delete it later. But I'm probably missing something. http://codereview.appspot.com/25073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 07:59:51 2009 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Fri, 06 Mar 2009 06:59:51 +0000 Subject: [issue5425] 2to3 wrong for types.StringTypes In-Reply-To: <1236264531.78.0.371254009899.issue5425@psf.upfronthosting.co.za> Message-ID: <1236322791.46.0.229361565578.issue5425@psf.upfronthosting.co.za> Hagen F?rstenau added the comment: Why I considered the existing translation incorrect was because it translates something which was a tuple of types in Python 2.x into a type of Python 3.x. I fail to see how this can be useful. (A check like "x in types.StringTypes" gets translated into "x in str", which will always fail.) I agree that translating into "(str, bytes)" won't always be correct, but it seems to have a much better chance of being correct than the existing translation into "str". Otherwise it should at least be "(str,)". _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 08:51:17 2009 From: report at bugs.python.org (Memeplex) Date: Fri, 06 Mar 2009 07:51:17 +0000 Subject: [issue5430] Must not replace LF or CR by CRLF in literals In-Reply-To: <1236325877.36.0.637700625895.issue5430@psf.upfronthosting.co.za> Message-ID: <1236325877.36.0.637700625895.issue5430@psf.upfronthosting.co.za> New submission from Memeplex : For example, after that "normalization", quoted printable encoded headers (as described at rfc 2047) longer than 76 characters are splitted in two different ill-formed headers because the soft LF line break becomes a "hard" CRLF one. This is clearly wrong. rfc 2060 specifically allows CR and LF inside literals: """ A literal is a sequence of zero or more octets (including CR and LF), prefix-quoted with an octet count in the form of an open brace ("{"), the number of octets, close brace ("}"), and CRLF. """ ---------- components: Library (Lib) messages: 83241 nosy: memeplex severity: normal status: open title: Must not replace LF or CR by CRLF in literals type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 08:52:05 2009 From: report at bugs.python.org (Memeplex) Date: Fri, 06 Mar 2009 07:52:05 +0000 Subject: [issue5430] imaplib: must not replace LF or CR by CRLF in literals In-Reply-To: <1236325877.36.0.637700625895.issue5430@psf.upfronthosting.co.za> Message-ID: <1236325925.91.0.191727045869.issue5430@psf.upfronthosting.co.za> Changes by Memeplex : ---------- title: Must not replace LF or CR by CRLF in literals -> imaplib: must not replace LF or CR by CRLF in literals _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 14:22:34 2009 From: report at bugs.python.org (Nigel Galloway) Date: Fri, 06 Mar 2009 13:22:34 +0000 Subject: [issue5431] cmpfunc in Python 3.0.1 windows installer In-Reply-To: <1236345754.09.0.226629136415.issue5431@psf.upfronthosting.co.za> Message-ID: <1236345754.09.0.226629136415.issue5431@psf.upfronthosting.co.za> New submission from Nigel Galloway : C:\Users\Nigel\myPython\iajaar>C:\Users\Nigel\swigwin-1.3.38\swig - c++ -python -py3 NigelzGLPK.swg generated a C++ wrapper and a Python file. When I attempted to compile the wrapper against Python 3.0.1 it failed see the output log at the end of this message. I decided to modify object.h from C:\Python30\include: typedef PyObject *(*getattrofunc)(PyObject *, PyObject *); typedef int (*setattrfunc)(PyObject *, char *, PyObject *); typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *); typedef PyObject *(*reprfunc)(PyObject *); typedef PyObject *(*getattrofunc)(PyObject *, PyObject *); typedef int (*setattrfunc)(PyObject *, char *, PyObject *); typedef int (*cmpfunc)(PyObject *, PyObject *); typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *); typedef PyObject *(*reprfunc)(PyObject *); adding the typedef for cmpfunc. It then compiles fine, AND appears to work. C:\Users\Nigel\myPython\iajaar\Python>c:\Python30\python sample.iajaar.3.py * 0: obj = 0.000000000e+000 infeas = 0.000e+000 (0) * 2: obj = 7.333333333e+002 infeas = 0.000e+000 (0) OPTIMAL SOLUTION FOUND Z = 733.333333333 ; x1 = 33.3333333333 ; x2 = 66.6666666667 ; x3 = 0.0 Is this good, or should I do something else? Compile Log: Build Log Rebuild started: Project: nigelzGLPK, Configuration: Release|Win32 Command Lines Creating temporary file "c:\Users\Nigel\Documents\Visual Studio 2008 \Projects\nigelzGLPK\nigelzGLPK\Release\RSP00001137523960.rsp" with contents [ /O2 /Oi /GL /I "C:\Users\Nigel\Documents\Visual Studio 2008 \Projects\glpk\include" /I "C:\Python30 \include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "NIGELZG LPK_EXPORTS" /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MD /Gy /Fo"Release\\" /Fd"Release\vc90.pdb" /W3 /c /Zi /TP "..\..\..\..\..\myP ython\iajaar\NigelzGLPK_wrap.cxx" ] Creating command line "cl.exe @"c:\Users\Nigel\Documents\Visual Studio 2008 \Projects\nigelzGLPK\nigelzGLPK\Release\RSP00001137523960.rsp" /nologo /errorReport:prompt" Output Window Compiling... NigelzGLPK_wrap.cxx ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1772) : error C2065: 'cmpfunc' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1772) : error C2146: syntax error : missing '}' before identifier 'SwigPyObject_compare' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1772) : error C2146: syntax error : missing ';' before identifier 'SwigPyObject_compare' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1817) : error C2059: syntax error : '}' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1818) : error C2065: 'tmp' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1825) : error C2059: syntax error : 'return' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1943) : error C2065: 'cmpfunc' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1943) : error C2146: syntax error : missing '}' before identifier 'SwigPyPacked_compare' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1943) : error C2146: syntax error : missing ';' before identifier 'SwigPyPacked_compare' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1988) : error C2059: syntax error : '}' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1989) : error C2065: 'tmp' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1996) : error C2059: syntax error : 'return' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1997) : error C2059: syntax error : '}' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1997) : error C2143: syntax error : missing ';' before '}' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1997) : error C2059: syntax error : '}' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2001) : error C2143: syntax error : missing ';' before '{' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2001) : error C2447: '{' : missing function header (old-style formal list?) ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2400) : error C3861: 'SwigPyPacked_New': identifier not found ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2635) : error C2059: syntax error : '}' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2635) : error C2143: syntax error : missing ';' before '}' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2635) : error C2059: syntax error : '}' ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2674) : error C2065: 'swig_types' : undeclared identifier c:\users\nigel\mypython\iajaar\iajaar.h(59) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow) ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3176) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3191) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3207) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3226) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3253) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3277) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3277) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3296) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3318) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3324) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3340) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3346) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3362) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3368) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3383) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3399) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3415) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3442) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3461) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3476) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3492) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3508) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3535) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3560) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3587) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3606) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3621) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3637) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3653) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3680) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3705) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3732) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3757) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3784) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3809) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3836) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3861) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3888) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3913) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3940) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3965) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3992) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4017) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4044) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4069) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4096) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4121) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4148) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4173) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4200) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4225) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4252) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4277) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4282) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4311) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4317) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4330) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4345) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4361) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4377) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4404) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4429) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4456) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4481) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4508) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4533) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4560) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4585) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4612) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4637) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4664) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4689) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4716) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4741) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4768) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4793) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4820) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4845) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4872) : error C2065: 'swig_types' : undeclared identifier ..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4872) : fatal error C1003: error count exceeds 100; stopping compilation Results Build log was saved at "file://c:\Users\Nigel\Documents\Visual Studio 2008 \Projects\nigelzGLPK\nigelzGLPK\Release\BuildLog.htm" nigelzGLPK - 102 error(s), 1 warning(s) ---------- files: BuildLog.htm messages: 83242 nosy: Nigel Galloway severity: normal status: open title: cmpfunc in Python 3.0.1 windows installer type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file13254/BuildLog.htm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 14:54:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 06 Mar 2009 13:54:52 +0000 Subject: [issue400608] just testing In-Reply-To: <0016361e89603a5b5404646caade@google.com> Message-ID: <2d75d7660903060554g33e0d673g95343e1646aad9be@mail.gmail.com> Daniel Diniz added the comment: Thanks for the feedback, Guido! gvanrossum wrote: > You could maintain this as a locally modified version, but a better > approach would be to make just enough changes to upload.py itself so > that you can write the rest of this script as a *wrapper* around > upload.py. Yes, a wrapper is an option. MvL suggested a patch[1] and for this initial implementation it makes things simpler. IIUC, in this case upload.py would need no changes, as we simply populate existing options with fetched values. > PS. What do you mean by "wish we could expunge the deleted ones"? ?If > you delete a Rietveld issue it is really gone. ?If you merely close it, > you can still delete it later. ?But I'm probably missing something. Yes, you're missing the fact that you were the one saying "wish we could expunge the deleted ones" :) upload.py fetched that from http://bugs.python.org/msg32813 because I told it to: python static/upload.py -R 400608 -F msg32813 [1] http://mail.python.org/pipermail/tracker-discuss/2009-March/001875.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 15:40:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 06 Mar 2009 14:40:03 +0000 Subject: [issue2771] test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <000325575a4e6b3f3e0464744264@google.com> Daniel Diniz added the comment: http://codereview.appspot.com/24075 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 15:42:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 06 Mar 2009 14:42:34 +0000 Subject: [issue2771] test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <00221532c414675ecf0464744bc2@google.com> Daniel Diniz added the comment: Reviewers: , Description: From http://bugs.python.org/issue2771 "This is a very long line. I am wondering how it will be wrapped. What will happen to this exceedingly long line? Will it be wrapped? Will it? Really? What will happen? Here's an example: def fact(n): if n > 1: return n * fact(n-1) else: assert n in (0, 1) return 1 What do you think of that?" Description fetched from: http://bugs.python.org/msg66272 Please review this at http://codereview.appspot.com/25076 Affected files: M static/upload.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 16:35:42 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 06 Mar 2009 15:35:42 +0000 Subject: [issue5431] cmpfunc in Python 3.0.1 windows installer In-Reply-To: <1236345754.09.0.226629136415.issue5431@psf.upfronthosting.co.za> Message-ID: <1236353742.31.0.843191671831.issue5431@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is not a bug in Python; apparently, SWIG hasn't been ported to Python 3.0.1. ---------- nosy: +loewis resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 16:42:10 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 06 Mar 2009 15:42:10 +0000 Subject: [issue5431] cmpfunc in Python 3.0.1 windows installer In-Reply-To: <1236345754.09.0.226629136415.issue5431@psf.upfronthosting.co.za> Message-ID: <1236354130.76.0.374468725406.issue5431@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I'm sure swig was ported to python 3.0. Is 3.0.1 allowed to break code developed with 3.0? http://svn.python.org/view/python/branches/release30-maint/Include/object.h?r1=69215&r2=69221 ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 17:08:10 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 06 Mar 2009 16:08:10 +0000 Subject: [issue5429] Core dumps on the Solaris buildbot In-Reply-To: <1236297194.7.0.256831518198.issue5429@psf.upfronthosting.co.za> Message-ID: <1236355690.92.0.00112317150854.issue5429@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Indeed, it crashes in TextIOWrapper_parseCookie(cookie=0xffbfb278, cookieObj=0x27e780) _textio.c:1739 1739 cookie->start_pos = * (Py_off_t *)(buffer + OFF_START_POS); with a call stack of #0 0x001426bc in TextIOWrapper_parseCookie (cookie=0xffbfb278, cookieObj=0x27e780) at _textio.c:1739 #1 0x001431f4 in TextIOWrapper_seek (self=0x545e38, args=0x70ce00) at _textio.c:1890 #2 0x001cef10 in PyCFunction_Call (func=0x715238, arg=0x70ce00, kw=0x0) at Objects/methodobject.c:81 ... The problem is that OFF_START_POS is 13, so the entire line produces an unaligned access. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 17:33:17 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Mar 2009 16:33:17 +0000 Subject: [issue5429] Core dumps on the Solaris buildbot In-Reply-To: <1236297194.7.0.256831518198.issue5429@psf.upfronthosting.co.za> Message-ID: <1236357197.55.0.278387373699.issue5429@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the debugging! I'll try to produce a patch before tomorrow's alpha release. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 17:46:52 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Mar 2009 16:46:52 +0000 Subject: [issue5429] Core dumps on the Solaris buildbot In-Reply-To: <1236297194.7.0.256831518198.issue5429@psf.upfronthosting.co.za> Message-ID: <1236358012.54.0.862196008319.issue5429@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch. Martin, can you test it or should I commit directly? ---------- keywords: +patch Added file: http://bugs.python.org/file13255/textio_unaligned_access.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 19:53:41 2009 From: report at bugs.python.org (Jim Correia) Date: Fri, 06 Mar 2009 18:53:41 +0000 Subject: [issue5432] plistlib contains unescaped hex sequence in doc string In-Reply-To: <1236365621.57.0.647888417793.issue5432@psf.upfronthosting.co.za> Message-ID: <1236365621.57.0.647888417793.issue5432@psf.upfronthosting.co.za> New submission from Jim Correia : The module doc string contains an example with hex escape sequences (see below). They are converted to their literal values by pydoc, which results in an unexpected encoding for the output of pydoc. (raw string, or proper escaping solves the problem) Relevant chunk of the file: anotherString="", aUnicodeValue=u'M\xe4ssig, Ma\xdf', aTrueValue=True, aFalseValue=False, ), someData = Data(""), someMoreData = Data("" * 10), aDate = datetime.datetime.fromtimestamp(time.mktime(time.gmtime())), ) # unicode keys are possible, but a little awkward to use: pl[u'\xc5benraa'] = "That was a unicode key." ---------- components: Library (Lib) messages: 83251 nosy: jim.correia severity: normal status: open title: plistlib contains unescaped hex sequence in doc string versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 20:10:50 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 06 Mar 2009 19:10:50 +0000 Subject: [issue5425] 2to3 wrong for types.StringTypes In-Reply-To: <1236322791.46.0.229361565578.issue5425@psf.upfronthosting.co.za> Message-ID: <49B17536.8030104@v.loewis.de> Martin v. L?wis added the comment: > Why I considered the existing translation incorrect was because it > translates something which was a tuple of types in Python 2.x into a > type of Python 3.x. I fail to see how this can be useful. It would translate "isinstance(x, types.StringTypes)" correctly. I agree that translating to a tuple would be correct in more cases. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 20:34:57 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 06 Mar 2009 19:34:57 +0000 Subject: [issue5431] cmpfunc in Python 3.0.1 windows installer In-Reply-To: <1236354130.76.0.374468725406.issue5431@psf.upfronthosting.co.za> Message-ID: <49B17ADC.1090201@v.loewis.de> Martin v. L?wis added the comment: > I'm sure swig was ported to python 3.0. > Is 3.0.1 allowed to break code developed with 3.0? Of course it was! Removal of cmp support was a deliberate breakage made in 3.0.1, see issue1717. In any case, it isn't coming back. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 21:31:16 2009 From: report at bugs.python.org (Gabriel Sean Farrell) Date: Fri, 06 Mar 2009 20:31:16 +0000 Subject: [issue670664] HTMLParser.py - more robust SCRIPT tag parsing Message-ID: <1236371476.31.0.600266008903.issue670664@psf.upfronthosting.co.za> Gabriel Sean Farrell added the comment: Now that BeautifulSoup uses HTMLParser, more people are seeing these errors. See http://groups.google.com/group/beautifulsoup/msg/d5a7540620538d14 and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516824 ---------- nosy: +gsf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 22:25:15 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Mar 2009 21:25:15 +0000 Subject: [issue5429] Core dumps on the Solaris buildbot In-Reply-To: <1236297194.7.0.256831518198.issue5429@psf.upfronthosting.co.za> Message-ID: <1236374715.25.0.621367719852.issue5429@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: high -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 22:43:52 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 06 Mar 2009 21:43:52 +0000 Subject: [issue5429] Core dumps on the Solaris buildbot In-Reply-To: <1236297194.7.0.256831518198.issue5429@psf.upfronthosting.co.za> Message-ID: <1236375832.38.0.887521189233.issue5429@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I have tested it; test_cgi now passes. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 22:44:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 06 Mar 2009 21:44:04 +0000 Subject: [issue4208] Make multiprocessing compatible with Python 2.4 and 2.5 In-Reply-To: <1225034474.82.0.458838457625.issue4208@psf.upfronthosting.co.za> Message-ID: <1236375844.29.0.478143871587.issue4208@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> jnoller versions: +Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 22:44:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 06 Mar 2009 21:44:06 +0000 Subject: [issue5162] multiprocessing cannot spawn child from a Windows service In-Reply-To: <1233885632.9.0.0484597105973.issue5162@psf.upfronthosting.co.za> Message-ID: <1236375846.76.0.938762939567.issue5162@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> jnoller keywords: +patch stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 22:44:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 06 Mar 2009 21:44:08 +0000 Subject: [issue5177] multiprocessing: SocketListener should use SO_REUSEADDR In-Reply-To: <1234015984.6.0.0454721510443.issue5177@psf.upfronthosting.co.za> Message-ID: <1236375848.62.0.420520769746.issue5177@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> jnoller keywords: +patch stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 22:44:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 06 Mar 2009 21:44:12 +0000 Subject: [issue5400] patches for multiprocessing module on NetBSD In-Reply-To: <1235945240.08.0.454455099363.issue5400@psf.upfronthosting.co.za> Message-ID: <1236375852.27.0.355417864732.issue5400@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> jnoller stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 22:44:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 06 Mar 2009 21:44:19 +0000 Subject: [issue3735] allow multiple threads to efficiently send the same requests to a processing.Pool without incurring duplicate processing In-Reply-To: <1220051229.09.0.236623735385.issue3735@psf.upfronthosting.co.za> Message-ID: <1236375859.55.0.170658351065.issue3735@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> jnoller stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 22:50:19 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Mar 2009 21:50:19 +0000 Subject: [issue5429] Core dumps on the Solaris buildbot In-Reply-To: <1236297194.7.0.256831518198.issue5429@psf.upfronthosting.co.za> Message-ID: <1236376219.74.0.706415862634.issue5429@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r70205, let's see what the buildbot says. ---------- stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 6 23:47:37 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Mar 2009 22:47:37 +0000 Subject: [issue5429] Core dumps on the Solaris buildbot In-Reply-To: <1236297194.7.0.256831518198.issue5429@psf.upfronthosting.co.za> Message-ID: <1236379657.15.0.193713307036.issue5429@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The usual Solaris test failures happened :-(, but nothing related with io-c. ---------- resolution: -> fixed status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 00:06:43 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Mar 2009 23:06:43 +0000 Subject: [issue5433] Excessive optimization in IncrementalNewlineDecoder In-Reply-To: <1236380802.95.0.0574474328629.issue5433@psf.upfronthosting.co.za> Message-ID: <1236380802.95.0.0574474328629.issue5433@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This is with the io-c code: >>> dec = io.IncrementalNewlineDecoder(None, translate=False) >>> dec.newlines >>> dec.decode("\u0A00") '\u0a00' >>> dec.newlines '\n' dec.newlines should have remained equal to None. It only affects the computation of the newlines property and shouldn't produce incorrect decoding results. ---------- assignee: pitrou components: Extension Modules messages: 83258 nosy: pitrou priority: high severity: normal stage: needs patch status: open title: Excessive optimization in IncrementalNewlineDecoder type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 00:09:12 2009 From: report at bugs.python.org (Jesse Noller) Date: Fri, 06 Mar 2009 23:09:12 +0000 Subject: [issue3735] allow multiple threads to efficiently send the same requests to a processing.Pool without incurring duplicate processing In-Reply-To: <1220051229.09.0.236623735385.issue3735@psf.upfronthosting.co.za> Message-ID: <1236380952.27.0.377017913601.issue3735@psf.upfronthosting.co.za> Jesse Noller added the comment: Daniel, if issues are in my queue, I can manage the state ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 00:36:36 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Mar 2009 23:36:36 +0000 Subject: [issue5433] Excessive optimization in IncrementalNewlineDecoder In-Reply-To: <1236380802.95.0.0574474328629.issue5433@psf.upfronthosting.co.za> Message-ID: <1236382596.42.0.721080497157.issue5433@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This patch fixes the bug without incurring any significant slowdown. ---------- keywords: +patch Added file: http://bugs.python.org/file13256/issue5433.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 00:41:19 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Mar 2009 23:41:19 +0000 Subject: [issue5433] Excessive optimization in IncrementalNewlineDecoder In-Reply-To: <1236380802.95.0.0574474328629.issue5433@psf.upfronthosting.co.za> Message-ID: <1236382879.73.0.588062688157.issue5433@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r70208. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 01:52:14 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 07 Mar 2009 00:52:14 +0000 Subject: [issue5394] Distutils in trunk does not work with old Python (2.3 - 2.5) In-Reply-To: <1235840226.43.0.117116762922.issue5394@psf.upfronthosting.co.za> Message-ID: <1236387134.55.0.417479749119.issue5394@psf.upfronthosting.co.za> Tarek Ziad? added the comment: done in r70212 and r70214 Thanks Akira ! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 01:56:08 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 07 Mar 2009 00:56:08 +0000 Subject: [issue5411] add xz compression support to distutils In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1236387368.29.0.267896234504.issue5411@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Good idea ! are you able provide a unit test for the changes made into the two commands ? ---------- keywords: +patch priority: -> normal stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 02:01:28 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 07 Mar 2009 01:01:28 +0000 Subject: [issue4214] no extension debug info with msvc9compiler.py In-Reply-To: <1225144462.62.0.9122976862.issue4214@psf.upfronthosting.co.za> Message-ID: <1236387688.92.0.319328394433.issue4214@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Since I am unfamiliar with MSVC, I will need to digg on this, so if anyone can help on this : any idea on what would be the proper fix and why ? ---------- versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 02:22:11 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Mar 2009 01:22:11 +0000 Subject: [issue5193] Guarantee that Tkinter.Text.search returns a string In-Reply-To: <1234199337.14.0.524717083127.issue5193@psf.upfronthosting.co.za> Message-ID: <1236388931.09.0.913012985582.issue5193@psf.upfronthosting.co.za> Guilherme Polo added the comment: Fixed in r70218, I will be merging into the other branches still today. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 02:37:51 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Mar 2009 01:37:51 +0000 Subject: [issue4792] PythonCmd in Modules/_tkinter.c should use the given "interp" parameter In-Reply-To: <1230737398.34.0.470687906349.issue4792@psf.upfronthosting.co.za> Message-ID: <1236389871.22.0.279364602812.issue4792@psf.upfronthosting.co.za> Guilherme Polo added the comment: I will be committing this but I'm afraid a test won't be added for it. Several people told me that creating multiple tcl interpreters (even if only one is active at some point) is problematic, specially in older tcl versions. So if someone can find another way to reproduce the problem you are welcome to add a test. Ideally it would let the only tcl interpreter created still alive (although as I see this bug you will only hit it if a Tkapp is dealloced and then a callback created through Python is invoked), otherwise the other existing tests will suffer. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 02:48:09 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Mar 2009 01:48:09 +0000 Subject: [issue4792] PythonCmd in Modules/_tkinter.c should use the given "interp" parameter In-Reply-To: <1230737398.34.0.470687906349.issue4792@psf.upfronthosting.co.za> Message-ID: <1236390489.9.0.64405373693.issue4792@psf.upfronthosting.co.za> Guilherme Polo added the comment: Fixed in r70219. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 02:58:32 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Mar 2009 01:58:32 +0000 Subject: [issue5193] Guarantee that Tkinter.Text.search returns a string In-Reply-To: <1234199337.14.0.524717083127.issue5193@psf.upfronthosting.co.za> Message-ID: <1236391112.48.0.654163166627.issue5193@psf.upfronthosting.co.za> Guilherme Polo added the comment: Merges: r70220, r70221, r70222 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 02:59:05 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Mar 2009 01:59:05 +0000 Subject: [issue4792] PythonCmd in Modules/_tkinter.c should use the given "interp" parameter In-Reply-To: <1230737398.34.0.470687906349.issue4792@psf.upfronthosting.co.za> Message-ID: <1236391145.05.0.428700407051.issue4792@psf.upfronthosting.co.za> Guilherme Polo added the comment: Merges: r70220, r70221, r70222 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 03:19:24 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Mar 2009 02:19:24 +0000 Subject: [issue2638] tkSimpleDialog Window Flashing In-Reply-To: <1208274253.49.0.82594797708.issue2638@psf.upfronthosting.co.za> Message-ID: <1236392364.4.0.754100858401.issue2638@psf.upfronthosting.co.za> Guilherme Polo added the comment: Fixed in r70223 and r70225. Thanks for reporting. ---------- resolution: accepted -> fixed status: open -> closed versions: -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 03:48:17 2009 From: report at bugs.python.org (Matthew Barnett) Date: Sat, 07 Mar 2009 02:48:17 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1236394097.44.0.675943933497.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-features-6.diff includes: Bugfixes Added group access via subscripting. >>> m = re.search("(\D*)(?\d+)(\D*)", "abc123def") >>> len(m) 4 >>> m[0] 'abc123def' >>> m[1] 'abc' >>> m[2] '123' >>> m[3] 'def' >>> m[1 : 4] ('abc', '123', 'def') >>> m[ : ] ('abc123def', 'abc', '123', 'def') >>> m["number"] '123' Added file: http://bugs.python.org/file13257/issue2636-features-6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 06:04:50 2009 From: report at bugs.python.org (Jess Austin) Date: Sat, 07 Mar 2009 05:04:50 +0000 Subject: [issue5434] datetime.MonthDelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> New submission from Jess Austin : datetime is a wonderful module. Perhaps the only inconvenient aspect of using it is dealing with month calculations and comparisons. This patch adds a simple class, monthdelta, which represents date offsets in terms of months. It supports basic integer-like arithmetic, and also it may be added to dates and datetimes. It deals sensibly with leap-year and month-length issues. Also provided is a function, monthmod (named by imperfect analogy to divmod), which allows round-tripping: that is, taking 2 dates and returning a (monthdelta, timedelta) tuple that represents the interim between the dates. Note: I have named the class "monthdelta", but in light of recent python-dev discussions I should probably rename this to "MonthDelta". ---------- components: Library (Lib) messages: 83272 nosy: jess.austin severity: normal status: open title: datetime.MonthDelta type: feature request versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 06:24:48 2009 From: report at bugs.python.org (Jess Austin) Date: Sat, 07 Mar 2009 05:24:48 +0000 Subject: [issue5434] datetime.MonthDelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1236403488.26.0.320386945734.issue5434@psf.upfronthosting.co.za> Jess Austin added the comment: This is my first try at a patch. All functionality, tests, and documentation are included, but I won't be surprised if I need to make some changes! Please let me know. ---------- keywords: +patch Added file: http://bugs.python.org/file13258/datetimemodule.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 06:37:23 2009 From: report at bugs.python.org (Michael Zamot) Date: Sat, 07 Mar 2009 05:37:23 +0000 Subject: [issue5435] test_httpservers on Debian Testing In-Reply-To: <1236404239.81.0.966059506466.issue5435@psf.upfronthosting.co.za> Message-ID: <1236404239.81.0.966059506466.issue5435@psf.upfronthosting.co.za> New submission from Michael Zamot : Hi, im trying to compile Python 3.0.1 under Debian Testing, and i get an error in the step make test. test_https fails with errno 13. The atach file has the full output. So, what is missing in my computer or what i need to do, to compile it, thanks and sorry for my english. ---------- components: None files: bug.txt messages: 83274 nosy: zamotcr severity: normal status: open title: test_httpservers on Debian Testing type: compile error versions: Python 3.0 Added file: http://bugs.python.org/file13259/bug.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 06:59:41 2009 From: report at bugs.python.org (Jess Austin) Date: Sat, 07 Mar 2009 05:59:41 +0000 Subject: [issue5434] datetime.MonthDelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1236405581.31.0.774463952818.issue5434@psf.upfronthosting.co.za> Jess Austin added the comment: Rietveld link: http://codereview.appspot.com/25079 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 10:42:45 2009 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Sat, 07 Mar 2009 09:42:45 +0000 Subject: [issue5425] 2to3 wrong for types.StringTypes In-Reply-To: <1236264531.78.0.371254009899.issue5425@psf.upfronthosting.co.za> Message-ID: <1236418965.91.0.597035095199.issue5425@psf.upfronthosting.co.za> Hagen F?rstenau added the comment: I can see the merit of not including "bytes" in StringTypes, but then the translation of StringType should be changed accordingly. How about changing the present StringType -> bytes StringTypes -> str into StringType -> str StringTypes -> (str,) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 11:17:42 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Mar 2009 10:17:42 +0000 Subject: [issue5435] test_httpservers on Debian Testing In-Reply-To: <1236404239.81.0.966059506466.issue5435@psf.upfronthosting.co.za> Message-ID: <1236421062.46.0.965200549169.issue5435@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- components: +Library (Lib), Tests -None type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 11:25:05 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Mar 2009 10:25:05 +0000 Subject: [issue5434] datetime.MonthDelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1236421505.55.0.172358525998.issue5434@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +lemburg, tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 12:27:09 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 07 Mar 2009 11:27:09 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1236425229.32.0.883457945066.issue2636@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't think it will be possible to accept these patches in the current form and way in which they are presented. I randomly picked issue2636-features-2.diff, and see that it contains lots of style and formatting changes, which is completely taboo for this kind of contribution. I propose to split up the patches into separate tracker issues, one issue per proposed new feature. No need to migrate all changes to new issues - start with the one single change that you think is already complete, and acceptance is likely without debate. Leave a note in this issue what change has been moved to what issue. For each such new issue, describe what precisely the patch is supposed to do. Make sure it is complete with respect to this specific change, and remove any code not contributing to the change. Also procedurally, it is not quite clear to me who is contributing these changes: Jeffrey C. Jacobs, or Matthew Barnett. We will need copyright forms from the original contributor. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 13:09:22 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 07 Mar 2009 12:09:22 +0000 Subject: [issue5435] test_httpservers on Debian Testing In-Reply-To: <1236404239.81.0.966059506466.issue5435@psf.upfronthosting.co.za> Message-ID: <1236427762.42.0.471261637286.issue5435@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I tried on coLinux(debian) and I got similar errors. But I'm not unix guy, I don't know well what "permission denied" means. debian:~/python-dev/py3k# ./python Lib/test/test_httpservers.py test_command (__main__.BaseHTTPServerTestCase) ... ok test_handler (__main__.BaseHTTPServerTestCase) ... ok test_head_keep_alive (__main__.BaseHTTPServerTestCase) ... ok test_header_close (__main__.BaseHTTPServerTestCase) ... ok test_internal_key_error (__main__.BaseHTTPServerTestCase) ... ok test_request_line_trimming (__main__.BaseHTTPServerTestCase) ... ok test_return_custom_status (__main__.BaseHTTPServerTestCase) ... ok test_return_header_keep_alive (__main__.BaseHTTPServerTestCase) ... ok test_send_blank (__main__.BaseHTTPServerTestCase) ... ok test_version_bogus (__main__.BaseHTTPServerTestCase) ... ok test_version_digits (__main__.BaseHTTPServerTestCase) ... ok test_version_invalid (__main__.BaseHTTPServerTestCase) ... ok test_version_none (__main__.BaseHTTPServerTestCase) ... ok test_version_none_get (__main__.BaseHTTPServerTestCase) ... ok test_get (__main__.SimpleHTTPServerTestCase) ... FAIL test_head (__main__.SimpleHTTPServerTestCase) ... ok test_invalid_requests (__main__.SimpleHTTPServerTestCase) ... ok test_authorization (__main__.CGIHTTPServerTestCase) ... Traceback (most recent call last): File "/root/python-dev/py3k/Lib/http/server.py", line 1031, in run_cgi os.execve(scriptfile, args, os.environ) OSError: [Errno 13] Permission denied ERROR test_headers_and_content (__main__.CGIHTTPServerTestCase) ... Traceback (most recent call last): File "/root/python-dev/py3k/Lib/http/server.py", line 1031, in run_cgi os.execve(scriptfile, args, os.environ) OSError: [Errno 13] Permission denied ERROR test_invaliduri (__main__.CGIHTTPServerTestCase) ... ok test_post (__main__.CGIHTTPServerTestCase) ... Traceback (most recent call last): File "/root/python-dev/py3k/Lib/http/server.py", line 1031, in run_cgi os.execve(scriptfile, args, os.environ) OSError: [Errno 13] Permission denied FAIL ====================================================================== ERROR: test_authorization (__main__.CGIHTTPServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_httpservers.py", line 342, in test_authorization (res.read(), res.getheader('Content-type'), res.status)) File "/root/python-dev/py3k/Lib/http/client.py", line 592, in getheader return ', '.join(self.msg.get_all(name, default)) TypeError ====================================================================== ERROR: test_headers_and_content (__main__.CGIHTTPServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_httpservers.py", line 322, in test_headers_and_content (res.read(), res.getheader('Content-type'), res.status)) File "/root/python-dev/py3k/Lib/http/client.py", line 592, in getheader return ', '.join(self.msg.get_all(name, default)) TypeError ====================================================================== FAIL: test_get (__main__.SimpleHTTPServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_httpservers.py", line 244, in test_get self.check_status_and_reason(response, 404) File "Lib/test/test_httpservers.py", line 220, in check_status_and_reason self.assertEquals(response.status, status) AssertionError: 200 != 404 ====================================================================== FAIL: test_post (__main__.CGIHTTPServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_httpservers.py", line 330, in test_post self.assertEquals(res.read(), b'1, python, 123456\n') AssertionError: b'' != b'1, python, 123456\n' ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 13:26:20 2009 From: report at bugs.python.org (Akira Kitada) Date: Sat, 07 Mar 2009 12:26:20 +0000 Subject: [issue3985] removed string module from distutils [patch] In-Reply-To: <1222597888.29.0.260615260643.issue3985@psf.upfronthosting.co.za> Message-ID: <1236428780.94.0.67961354289.issue3985@psf.upfronthosting.co.za> Akira Kitada added the comment: The patch looks ok to me. Python 2.3 - 2.6 seem working fine with this patch, too. ---------- nosy: +akitada _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 15:19:11 2009 From: report at bugs.python.org (Joshua Logan) Date: Sat, 07 Mar 2009 14:19:11 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1236435551.96.0.538281325104.issue2636@psf.upfronthosting.co.za> Changes by Joshua Logan : ---------- nosy: +jaylogan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 15:42:31 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 07 Mar 2009 14:42:31 +0000 Subject: [issue4214] no extension debug info with msvc9compiler.py In-Reply-To: <1225144462.62.0.9122976862.issue4214@psf.upfronthosting.co.za> Message-ID: <1236436951.87.0.734596887188.issue4214@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Like Robin, I think it's better to remove the /pdb option, and let the default behavior, which is (when /debug is present) to generate a .pdb file next to the generated target. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 17:04:28 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 07 Mar 2009 16:04:28 +0000 Subject: [issue1611] doctest.testmod gets noisy if called more than once per SystemExit In-Reply-To: <1197555194.14.0.664818118617.issue1611@psf.upfronthosting.co.za> Message-ID: <1236441868.62.0.190717764399.issue1611@psf.upfronthosting.co.za> R. David Murray added the comment: The offending output lines were commented out by Nick Coghlan in commit 67790 with the comment "Don't print here by default, since doing so breaks some of the buildbots". The actual code change disables the output rather than changing the default, so perhaps it is not quite what Nick intended. However, either way the intent seems to be to not generate this output normally, which would mean that this bug could be considered fixed in the trunk. ---------- nosy: +bitdancer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 17:35:03 2009 From: report at bugs.python.org (Akira Kitada) Date: Sat, 07 Mar 2009 16:35:03 +0000 Subject: [issue3992] removed custom log from distutils In-Reply-To: <1222645256.9.0.167855735394.issue3992@psf.upfronthosting.co.za> Message-ID: <1236443703.46.0.39354992969.issue3992@psf.upfronthosting.co.za> Akira Kitada added the comment: I updated the patch. Mine only changes log.py. ---------- nosy: +akitada Added file: http://bugs.python.org/file13260/remove-custom-log-revised.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 18:15:28 2009 From: report at bugs.python.org (Martina Oefelein) Date: Sat, 07 Mar 2009 17:15:28 +0000 Subject: [issue5436] test_distutils fails with official Mac OS X Installer Disk Image (3.0.1) In-Reply-To: <1236446128.5.0.33521760843.issue5436@psf.upfronthosting.co.za> Message-ID: <1236446128.5.0.33521760843.issue5436@psf.upfronthosting.co.za> New submission from Martina Oefelein : Majestix:~ martina$ python3.0 -m test.regrtest test_distutils Could not find '/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/test' in sys.path to remove it test_distutils test test_distutils failed -- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/distutils/tests/test_sysconfig.py", line 45, in test_get_python_inc self.assert_(os.path.isdir(inc_dir), inc_dir) AssertionError: /Users/ronald/Projects/python/bld/r301/Include 1 test failed: test_distutils ---------- assignee: tarek components: Distutils, Macintosh, Tests messages: 83283 nosy: oefe, tarek severity: normal status: open title: test_distutils fails with official Mac OS X Installer Disk Image (3.0.1) type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 19:01:23 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 07 Mar 2009 18:01:23 +0000 Subject: [issue5436] test_distutils fails with official Mac OS X Installer Disk Image (3.0.1) In-Reply-To: <1236446128.5.0.33521760843.issue5436@psf.upfronthosting.co.za> Message-ID: <1236448883.32.0.55090816022.issue5436@psf.upfronthosting.co.za> Tarek Ziad? added the comment: That's because get_config_vars reads the src_dir located in your Makefile (in config/Makefile): srcdir=>>......./Users/ronald/Projects/python/bld/r301 VPATH=>.>......./Users/ronald/Projects/python/bld/r301 Moreover, the test is totally broken because it uses "Include" which won't work under Windows in that case. So basically, it will work only on a trunk version. This test has to be reworked asap. ---------- priority: -> high versions: +Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 19:11:51 2009 From: report at bugs.python.org (Michael Zamot) Date: Sat, 07 Mar 2009 18:11:51 +0000 Subject: [issue5435] test_httpservers on Debian Testing In-Reply-To: <1236404239.81.0.966059506466.issue5435@psf.upfronthosting.co.za> Message-ID: <1236449511.03.0.841727032986.issue5435@psf.upfronthosting.co.za> Michael Zamot added the comment: I tried too yesterday with the svn version, and i get the same error. Is there a solution or im doing something wrong? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 19:20:41 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 07 Mar 2009 18:20:41 +0000 Subject: [issue5435] test_httpservers on Debian Testing In-Reply-To: <1236404239.81.0.966059506466.issue5435@psf.upfronthosting.co.za> Message-ID: <1236450041.58.0.839003371525.issue5435@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Probably this is short code to reproduce "permission denied". import os, pwd nobody = pwd.getpwnam('nobody')[2] os.setuid(nobody) open("dummy.txt", "w").write("foo") # permission denied Still I cannot understand what's going on. Is debian more secure than other unixes? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 19:24:07 2009 From: report at bugs.python.org (Michael Zamot) Date: Sat, 07 Mar 2009 18:24:07 +0000 Subject: [issue5435] test_httpservers on Debian Testing In-Reply-To: <1236404239.81.0.966059506466.issue5435@psf.upfronthosting.co.za> Message-ID: <1236450247.87.0.251238141252.issue5435@psf.upfronthosting.co.za> Michael Zamot added the comment: I dont know, it weird, because im running the test as root. I tried in a Stable Lenny, and nothing too _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 20:15:47 2009 From: report at bugs.python.org (Michael Zamot) Date: Sat, 07 Mar 2009 19:15:47 +0000 Subject: [issue5435] test_httpservers on Debian Testing In-Reply-To: <1236404239.81.0.966059506466.issue5435@psf.upfronthosting.co.za> Message-ID: <1236453347.7.0.104213442141.issue5435@psf.upfronthosting.co.za> Michael Zamot added the comment: I re-download again (maybe its the four time jaja) the python 3.0.1 from the svn and now, it pass all the tests. Thanks to all! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 20:39:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 07 Mar 2009 19:39:49 +0000 Subject: [issue5425] 2to3 wrong for types.StringTypes In-Reply-To: <1236264531.78.0.371254009899.issue5425@psf.upfronthosting.co.za> Message-ID: <1236454789.72.0.573393364715.issue5425@psf.upfronthosting.co.za> Daniel Diniz added the comment: I think Hagen's initial analysis makes more sense: the translation is currently guessing that the user meant the more restrict (text) alternative. IMHO it doesn't make much sense to have this: >>> strings = (types.StringType, types.UnicodeType) >>> strings == types.StringTypes True Translated to this: strings = (bytes, str) strings == str ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 7 23:39:41 2009 From: report at bugs.python.org (DSM) Date: Sat, 07 Mar 2009 22:39:41 +0000 Subject: [issue5415] uuid module generates incorrect values for uuid3 (and possibly uuid5) In-Reply-To: <1236151740.35.0.183499583743.issue5415@psf.upfronthosting.co.za> Message-ID: <1236465581.0.0.960251659349.issue5415@psf.upfronthosting.co.za> DSM added the comment: Hmm. I quickly wrote my own implementation and I agree with the uuid module and disagree with the RFC value. Further searching suggests that this may be an error in the RFC. See http://www.rfc-editor.org/errata_search.php?rfc=4122 ; see also http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5064537 for a specific explanation of what probably caused the bug in the reference code. I can reproduce the RFC value by (IMO incorrectly) flipping the namespace endianness. (It may be worth noting, though, that one of the links above points to the python implementation for support-- so there could be a vicious circle here. :^) ---------- nosy: +dsm001 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 00:40:12 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Mar 2009 23:40:12 +0000 Subject: [issue3700] test_bigmem broken In-Reply-To: <1219842927.03.0.0279927049136.issue3700@psf.upfronthosting.co.za> Message-ID: <1236469212.01.0.930323313736.issue3700@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed to py3k, let's see if the buildbots like it... ---------- stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 02:19:52 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Mar 2009 01:19:52 +0000 Subject: [issue5437] Singleton MemoryError can hold traceback data and locals indefinitely In-Reply-To: <1236475192.44.0.322213447469.issue5437@psf.upfronthosting.co.za> Message-ID: <1236475192.44.0.322213447469.issue5437@psf.upfronthosting.co.za> New submission from Antoine Pitrou : The PyExc_MemoryErrorInst object is persistent and its members never get cleared. This means any local variable which gets caught in the traceback isn't deallocated until the next MemoryError (!). Sample script demonstrates this. (this doesn't seem to affect 2.x because the traceback isn't attached to the exception instance) ---------- files: memerr.py messages: 83292 nosy: amaury.forgeotdarc, pitrou priority: high severity: normal stage: needs patch status: open title: Singleton MemoryError can hold traceback data and locals indefinitely type: resource usage versions: Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13261/memerr.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 02:21:57 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Mar 2009 01:21:57 +0000 Subject: [issue5437] Singleton MemoryError can hold traceback data and locals indefinitely In-Reply-To: <1236475192.44.0.322213447469.issue5437@psf.upfronthosting.co.za> Message-ID: <1236475317.4.0.714185013805.issue5437@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The following patch fixes the case when the exception is discarded in Python, but not when e.g. PyErr_Clear() is used from C code. ---------- keywords: +patch Added file: http://bugs.python.org/file13262/issue5437.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 02:23:02 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Mar 2009 01:23:02 +0000 Subject: [issue3700] test_bigmem broken In-Reply-To: <1219842927.03.0.0279927049136.issue3700@psf.upfronthosting.co.za> Message-ID: <1236475382.68.0.469862727871.issue3700@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks ok. ---------- resolution: -> fixed status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 02:25:16 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Mar 2009 01:25:16 +0000 Subject: [issue5438] test_bigmem.test_from_2G_generator uses more memory than expected In-Reply-To: <1236475515.92.0.849329057425.issue5438@psf.upfronthosting.co.za> Message-ID: <1236475515.92.0.849329057425.issue5438@psf.upfronthosting.co.za> New submission from Antoine Pitrou : It seems test_from_2G_generator doesn't respect its announced memory consumption. I launched test_bigmem with "-M 12G" on a 16GB machine, and the interpreter process got killed by the OOM killer (Out Of Memory) while running this test case. ---------- components: Tests messages: 83295 nosy: pitrou priority: normal severity: normal status: open title: test_bigmem.test_from_2G_generator uses more memory than expected type: resource usage versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 02:34:58 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Mar 2009 01:34:58 +0000 Subject: [issue5437] Singleton MemoryError can hold traceback data and locals indefinitely In-Reply-To: <1236475192.44.0.322213447469.issue5437@psf.upfronthosting.co.za> Message-ID: <1236476098.76.0.729013333949.issue5437@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A proper fix would probably be to maintain a bunch of preallocated instances in a freelist rather than relying on an explicit singleton. It would enforce proper dereferencing and garbage collection semantics. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 05:14:59 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 08 Mar 2009 04:14:59 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1236485699.4.0.297057210834.issue5251@psf.upfronthosting.co.za> Nick Coghlan added the comment: PEP 377 (http://www.python.org/dev/peps/pep-0377/) has now been submitted. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 05:34:09 2009 From: report at bugs.python.org (Jervis Whitley) Date: Sun, 08 Mar 2009 04:34:09 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1236486849.17.0.864330289298.issue1818@psf.upfronthosting.co.za> Jervis Whitley added the comment: Added a patch against py3k branch. in csv.rst removed reference to reader.next() as a public method. Added file: http://bugs.python.org/file13263/ntreader4_py3_1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 05:41:01 2009 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 08 Mar 2009 04:41:01 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1236486849.17.0.864330289298.issue1818@psf.upfronthosting.co.za> Message-ID: <18867.19544.420282.71317@montanaro.dyndns.org> Skip Montanaro added the comment: Jervis> in csv.rst removed reference to reader.next() as a public method. Because? I've not seen any discussion in this issue or in any other forums (most certainly not on the csv at python.org mailing list) which would suggest that csv.reader's next() method should no longer be a public method. Skip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 06:28:16 2009 From: report at bugs.python.org (Dongwook Jang) Date: Sun, 08 Mar 2009 05:28:16 +0000 Subject: [issue5439] string.strip behaves strangly In-Reply-To: <1236490094.86.0.622716526425.issue5439@psf.upfronthosting.co.za> Message-ID: <1236490094.86.0.622716526425.issue5439@psf.upfronthosting.co.za> New submission from Dongwook Jang : Python 2.4.2 (#1, Mar 4 2008, 22:56:43) [GCC 3.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> temp = "a/b/c" >>> temp.strip("a") '/b/c' >>> temp.strip("a/") 'b/c' >>> temp.strip("a/b") 'c' >>> temp.strip("a/b/") 'c' >>> So, in the second command from the last, I expected '/c' but it gives only 'c'. Why? Is it a bug or a feature that I don't understand? Thanks, DW ---------- components: Interpreter Core messages: 83300 nosy: dwjang severity: normal status: open title: string.strip behaves strangly type: behavior versions: Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 06:28:19 2009 From: report at bugs.python.org (Dongwook Jang) Date: Sun, 08 Mar 2009 05:28:19 +0000 Subject: [issue5440] string.strip behaves strangly In-Reply-To: <1236490099.52.0.543395696191.issue5440@psf.upfronthosting.co.za> Message-ID: <1236490099.52.0.543395696191.issue5440@psf.upfronthosting.co.za> New submission from Dongwook Jang : Python 2.4.2 (#1, Mar 4 2008, 22:56:43) [GCC 3.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> temp = "a/b/c" >>> temp.strip("a") '/b/c' >>> temp.strip("a/") 'b/c' >>> temp.strip("a/b") 'c' >>> temp.strip("a/b/") 'c' >>> So, in the second command from the last, I expected '/c' but it gives only 'c'. Why? Is it a bug or a feature that I don't understand? Thanks, DW ---------- components: Interpreter Core messages: 83301 nosy: dwjang severity: normal status: open title: string.strip behaves strangly type: behavior versions: Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 06:32:12 2009 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 08 Mar 2009 05:32:12 +0000 Subject: [issue5439] string.strip behaves strangly In-Reply-To: <1236490094.86.0.622716526425.issue5439@psf.upfronthosting.co.za> Message-ID: <1236490332.01.0.0488055168547.issue5439@psf.upfronthosting.co.za> Ezio Melotti added the comment: http://docs.python.org/library/string.html#string.strip string.strip(s[, chars]) Return a copy of the string with leading and trailing characters removed. If chars is omitted or None, whitespace characters are removed. If given and not None, chars must be a string; the characters in the string **will be stripped from the both ends** of the string this method is called on. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 06:33:35 2009 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 08 Mar 2009 05:33:35 +0000 Subject: [issue5440] string.strip behaves strangly In-Reply-To: <1236490099.52.0.543395696191.issue5440@psf.upfronthosting.co.za> Message-ID: <1236490415.61.0.281562343823.issue5440@psf.upfronthosting.co.za> Ezio Melotti added the comment: Duplicated of #5439 ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 06:44:43 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 08 Mar 2009 05:44:43 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1236491083.64.0.796080671705.issue5251@psf.upfronthosting.co.za> Nick Coghlan added the comment: Attached simple benchmark script to check for any slowdowns introduced by the planned with statement changes. Added file: http://bugs.python.org/file13264/pep377_bench.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 07:02:27 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 08 Mar 2009 06:02:27 +0000 Subject: [issue5441] Convenience API for timeit.main In-Reply-To: <1236492146.81.0.454674408295.issue5441@psf.upfronthosting.co.za> Message-ID: <1236492146.81.0.454674408295.issue5441@psf.upfronthosting.co.za> New submission from Nick Coghlan : For quick and dirty benchmarking, timeit.main() is one of the handiest tools out there, but calling it from Python code is a little tedious since you need to construct a fake list of command line arguments in order to call it. What would be nice is a convenience function that accepted appropriate arguments, with timeit.main being refactored to parse the command line arguments and then call the new convenience function. Possible API: def measure(stmt="pass", setup="pass", timer=default_timer, repeat=default_repeat, number=default_number, verbosity=0, precision=3) The new function would cover the latter section of the current main() function, starting from the line "t = Timer(stmt, setup, timer)". ---------- components: Library (Lib) keywords: easy messages: 83305 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Convenience API for timeit.main type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 09:08:23 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 08 Mar 2009 08:08:23 +0000 Subject: [issue5439] string.strip behaves strangly In-Reply-To: <1236490094.86.0.622716526425.issue5439@psf.upfronthosting.co.za> Message-ID: <1236499703.09.0.708216011247.issue5439@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It's a feature you don't understand. .strip() doesn't expect the substring to be stripped, but a list of characters. Since the strip characters contain /, all leading a,/,b characters get stripped (in any order: py> "////aaab/csdfhkab///c".strip("a/b") 'csdfhkab///c' ---------- nosy: +loewis resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 09:08:59 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 08 Mar 2009 08:08:59 +0000 Subject: [issue5440] string.strip behaves strangly In-Reply-To: <1236490099.52.0.543395696191.issue5440@psf.upfronthosting.co.za> Message-ID: <1236499739.98.0.317568304324.issue5440@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- dependencies: +string.strip behaves strangly resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 10:18:53 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 08 Mar 2009 09:18:53 +0000 Subject: [issue1701192] symbol conflict for 'readahead' Message-ID: <1236503933.6.0.372972505988.issue1701192@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: If your build process really needs fcntl.h in Python.h, I suggest to customize it again and add: #ifdef Py_BUILD_CORE #define readahead do_readahead #endif ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 13:59:20 2009 From: report at bugs.python.org (Ismail Donmez) Date: Sun, 08 Mar 2009 12:59:20 +0000 Subject: [issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6 In-Reply-To: <1236517160.74.0.61108619715.issue5442@psf.upfronthosting.co.za> Message-ID: <1236517160.74.0.61108619715.issue5442@psf.upfronthosting.co.za> New submission from Ismail Donmez : Two failures in test_importlib: ====================================================================== FAIL: test_case_insensitivity (importlib.test.extension.test_case_sensitivity.ExtensionModuleCaseSensi tivityTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a1/Lib/importlib/test/extension/test_case_sensitivity.py", line 29, in test_case_insensitivity self.assert_(hasattr(loader, 'load_module')) AssertionError: None ====================================================================== FAIL: test_insensitive (importlib.test.source.test_case_sensitivity.CaseSensitivityTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a1/Lib/importlib/test/source/test_case_sensitivity.py", line 49, in test_insensitive self.assert_(hasattr(insensitive, 'load_module')) AssertionError: None ---------------------------------------------------------------------- ---------- message_count: 1.0 messages: 83308 nosy: cartman nosy_count: 1.0 severity: normal status: open title: [3.1alpha1] test_importlib fails on Mac OSX 10.5.6 type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 14:05:15 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Mar 2009 13:05:15 +0000 Subject: [issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6 In-Reply-To: <1236517160.74.0.61108619715.issue5442@psf.upfronthosting.co.za> Message-ID: <1236517515.89.0.384623311981.issue5442@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brett.cannon nosy_count: 1.0 -> 2.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 14:05:30 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Mar 2009 13:05:30 +0000 Subject: [issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6 In-Reply-To: <1236517160.74.0.61108619715.issue5442@psf.upfronthosting.co.za> Message-ID: <1236517530.15.0.200196733221.issue5442@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- components: +Library (Lib), Tests priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 14:07:22 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Mar 2009 13:07:22 +0000 Subject: [issue5441] Convenience API for timeit.main In-Reply-To: <1236492146.81.0.454674408295.issue5441@psf.upfronthosting.co.za> Message-ID: <1236517642.18.0.288115667702.issue5441@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It would be even better if you could pass a locals or globals dictionnary instead of the "setup" arg. And even even better if it could implicitly get the locals/globals from the calling frame :-) ---------- message_count: 1.0 -> 2.0 nosy: +pitrou nosy_count: 1.0 -> 2.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 14:33:52 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Mar 2009 13:33:52 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1236519232.33.0.923032773876.issue1818@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't understand why NamedTupleReader requires the fieldnames array rather than the namedtuple class itself. If you could pass it the namedtuple class, users could choose whatever namedtuple subclass with whatever additional methods or behaviour suits them. It would make NamedTupleReader more flexible and more useful. ---------- message_count: 23.0 -> 24.0 nosy: +pitrou nosy_count: 5.0 -> 6.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 15:29:51 2009 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Sun, 08 Mar 2009 14:29:51 +0000 Subject: [issue5425] 2to3 wrong for types.StringTypes In-Reply-To: <1236264531.78.0.371254009899.issue5425@psf.upfronthosting.co.za> Message-ID: <1236522591.07.0.0246095477336.issue5425@psf.upfronthosting.co.za> Hagen F?rstenau added the comment: The automatic conversion can't be perfect in all cases, but I think my second suggestion is more in line with the other transformations done by 2to3 (string literals, "str", "basestring" etc.). I propose applying the second patch, but don't care enough to argue for it much more if it's rejected. ---------- message_count: 7.0 -> 8.0 status: closed -> open Added file: http://bugs.python.org/file13265/2to3_StringTypes_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 15:40:00 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Mar 2009 14:40:00 +0000 Subject: [issue3002] shutil.copyfile blocks indefinitely on named pipes In-Reply-To: <1212075150.42.0.761610345558.issue3002@psf.upfronthosting.co.za> Message-ID: <1236523200.76.0.960292968901.issue3002@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure the race condition possibility is important. Is shutil.copytree() protected against such race conditions in the first place? (I'd argue this bug is less about potential DOS attacks than the simple unfriendliness of indefinitely blocking) ---------- message_count: 6.0 -> 7.0 nosy: +pitrou nosy_count: 4.0 -> 5.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 17:48:53 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 08 Mar 2009 16:48:53 +0000 Subject: [issue1422398] Unicode IOError: execfile(u'\u043a\u043a\u043a/x.py') Message-ID: <1236530933.77.0.0089993947557.issue1422398@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It works with python 3.0. Of course you have to replace execfile with >>> s = '\u043a\u043a\u043a.py' >>> exec(compile(open(s).read(), s, 'exec')) ---------- message_count: 1.0 -> 2.0 nosy: +amaury.forgeotdarc nosy_count: 1.0 -> 2.0 resolution: -> out of date status: open -> closed title: Unicode IOError: execfile(u'\u043a\u043a\u043a/x.py') -> Unicode IOError: execfile(u'\u043a\u043a\u043a/x.py') _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 17:57:49 2009 From: report at bugs.python.org (Lorenz Quack) Date: Sun, 08 Mar 2009 16:57:49 +0000 Subject: [issue5443] trivial typo in itertools documentation In-Reply-To: <1236531469.71.0.843632021292.issue5443@psf.upfronthosting.co.za> Message-ID: <1236531469.71.0.843632021292.issue5443@psf.upfronthosting.co.za> New submission from Lorenz Quack : In the docs: "http://docs.python.org/library/itertools.html#module-itertools" In the table: "Iterators terminating on the shortest input sequence:" In row: "imap()" and "starmap()" In the column: "Results" It says "fun()" instead of "func()" ---------- assignee: georg.brandl components: Documentation message_count: 1.0 messages: 83314 nosy: donlorenzo, georg.brandl nosy_count: 2.0 severity: normal status: open title: trivial typo in itertools documentation versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 17:58:16 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 08 Mar 2009 16:58:16 +0000 Subject: [issue1390086] ScrolledText hungs up in some conditions Message-ID: <1236531496.28.0.872421777872.issue1390086@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Reproduces with 2.4.2, but seems fixed with 2.5. ---------- message_count: 2.0 -> 3.0 nosy: +amaury.forgeotdarc nosy_count: 3.0 -> 4.0 resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 18:02:56 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 08 Mar 2009 17:02:56 +0000 Subject: [issue1412632] Proper locking with asynchronous callbacks. Message-ID: <1236531776.54.0.529200727694.issue1412632@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: A (better IMO) fix was applied with r68460. ---------- message_count: 1.0 -> 2.0 nosy: +amaury.forgeotdarc nosy_count: 1.0 -> 2.0 resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 18:38:33 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 08 Mar 2009 17:38:33 +0000 Subject: [issue1324261] __name__ available during class dictionary build Message-ID: <1236533913.94.0.657342954194.issue1324261@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This can be done with a metaclass: the metaclass receives the name of the created class, and it's easy to update the class definition there. ---------- message_count: 1.0 -> 2.0 nosy: +amaury.forgeotdarc nosy_count: 1.0 -> 2.0 resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 20:13:26 2009 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 08 Mar 2009 19:13:26 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1236539606.62.0.748045325302.issue1818@psf.upfronthosting.co.za> Skip Montanaro added the comment: I don't know how NamedTuple objects work, but in many situations you want the content of the CSV file to drive the output. I would think you would use a technique similar to my DictReader example to tell the NamedTupleReader the fieldnames. For that you need a fieldnames argument. ---------- message_count: 24.0 -> 25.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 20:18:19 2009 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 08 Mar 2009 19:18:19 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1236539899.01.0.782554649128.issue1818@psf.upfronthosting.co.za> Skip Montanaro added the comment: I find this aspect of the proposal disturbing: .... If *fieldnames* is None the values in the first row of the *csvfile* will be used as the fieldnames.... I don't think this should be implicit. It makes the NamedTupleReader semantically different from the vanilla reader object which treats every row of the file as data. The use of the fieldnames argument should be required for NamedTupleReader objects as it is for DictReader objects. ---------- message_count: 25.0 -> 26.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 20:18:55 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Sun, 08 Mar 2009 19:18:55 +0000 Subject: [issue5444] .chm build process on Windows doesn't use the right filename In-Reply-To: <1236539934.85.0.997903417745.issue5444@psf.upfronthosting.co.za> Message-ID: <1236539934.85.0.997903417745.issue5444@psf.upfronthosting.co.za> New submission from Gabriel Genellina : doc/make.bat on Windows doesn't correctly build the right .chm filename. This patch does the same as the unix Makefile: run patchlevel.py and set the output as the DISTVERSION environment variable, so it can be used in the final file name. ---------- assignee: georg.brandl components: Documentation files: make.diff keywords: patch message_count: 1.0 messages: 83320 nosy: gagenellina, georg.brandl nosy_count: 2.0 severity: normal status: open title: .chm build process on Windows doesn't use the right filename type: behavior versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13266/make.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 20:19:42 2009 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 08 Mar 2009 19:19:42 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1236539982.04.0.544432005385.issue1818@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- message_count: 26.0 -> 25.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 20:21:02 2009 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 08 Mar 2009 19:21:02 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1236540062.25.0.617751364072.issue1818@psf.upfronthosting.co.za> Skip Montanaro added the comment: I retract my previous comment. I don't use the DictReader the way it operates (fieldnames==None => first row is a header) and forgot about that behavior. ---------- message_count: 25.0 -> 26.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 20:31:17 2009 From: report at bugs.python.org (Daniel Lescohier) Date: Sun, 08 Mar 2009 19:31:17 +0000 Subject: [issue5445] codecs.StreamWriter.writelines problem when passed generator In-Reply-To: <1236540676.96.0.036576866383.issue5445@psf.upfronthosting.co.za> Message-ID: <1236540676.96.0.036576866383.issue5445@psf.upfronthosting.co.za> New submission from Daniel Lescohier : This is the implementation of codecs.Streamwriter.writelines for all Python versions that I've checked: def writelines(self, list): """ Writes the concatenated list of strings to the stream using .write(). """ self.write(''.join(list)) This may be a problem if the 'list' parameter is a generator. The generator may be returning millions of values, which the join will concatenate in memory. It can surprise the programmer with large memory use. I think join should only be used when you know the size of your input, and this method does not know this. I think the safe implementation of this method would be: def writelines(self, list): """ Writes the concatenated list of strings to the stream using .write(). """ write = self.write for value in list: write(value) If a caller knows that it's input list would use a reasonable amount of memory, it can get the same functionality as before by doing stream.write(''.join(list)). ---------- components: Library (Lib) message_count: 1.0 messages: 83322 nosy: dlesco nosy_count: 1.0 severity: normal status: open title: codecs.StreamWriter.writelines problem when passed generator versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 20:34:56 2009 From: report at bugs.python.org (Tim Golden) Date: Sun, 08 Mar 2009 19:34:56 +0000 Subject: [issue5444] .chm build process on Windows doesn't use the right filename In-Reply-To: <1236539934.85.0.997903417745.issue5444@psf.upfronthosting.co.za> Message-ID: <49B41DDA.2020400@timgolden.me.uk> Tim Golden added the comment: Effectively a duplicate of http://bugs.python.org/issue2421 (which has been sitting around unapplied for a few months) I certainly don't mind which one goes in, but I think one should be closed in favour of the other. (And that one should be applied!) ---------- message_count: 1.0 -> 2.0 nosy: +tim.golden nosy_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 20:41:50 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Sun, 08 Mar 2009 19:41:50 +0000 Subject: [issue5446] doc building progress on Windows doesn't show any color In-Reply-To: <1236541287.43.0.597624783432.issue5446@psf.upfronthosting.co.za> Message-ID: <1236541310.8.0.890066720138.issue5446@psf.upfronthosting.co.za> Changes by Gabriel Genellina : ---------- versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 20:41:27 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Sun, 08 Mar 2009 19:41:27 +0000 Subject: [issue5446] doc building progress on Windows doesn't show any color In-Reply-To: <1236541287.43.0.597624783432.issue5446@psf.upfronthosting.co.za> Message-ID: <1236541287.43.0.597624783432.issue5446@psf.upfronthosting.co.za> New submission from Gabriel Genellina : The documentation building progress on Windows doesn't show any colorized output, unlike the linux environment. This patch to console.py provides minimal color support on Windows. ---------- assignee: georg.brandl components: Documentation files: console.diff keywords: patch message_count: 1.0 messages: 83324 nosy: gagenellina, georg.brandl nosy_count: 2.0 severity: normal status: open title: doc building progress on Windows doesn't show any color type: feature request Added file: http://bugs.python.org/file13267/console.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 20:57:58 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Mar 2009 19:57:58 +0000 Subject: [issue5446] doc building progress on Windows doesn't show any color In-Reply-To: <1236541287.43.0.597624783432.issue5446@psf.upfronthosting.co.za> Message-ID: <1236542278.41.0.115792674405.issue5446@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This should go on the Sphinx tracker. http://bitbucket.org/birkenfeld/sphinx ---------- message_count: 1.0 -> 2.0 nosy: +benjamin.peterson nosy_count: 2.0 -> 3.0 resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 21:11:33 2009 From: report at bugs.python.org (Poor Yorick) Date: Sun, 08 Mar 2009 20:11:33 +0000 Subject: [issue5447] future unicode literals and r'\u' In-Reply-To: <1236543092.99.0.796172268474.issue5447@psf.upfronthosting.co.za> Message-ID: <1236543092.99.0.796172268474.issue5447@psf.upfronthosting.co.za> New submission from Poor Yorick : from __future__ import unicode_literals print(r'\u.bug') SyntaxError: (unicode error) truncated \uXXXX ---------- components: Interpreter Core message_count: 1.0 messages: 83326 nosy: pooryorick nosy_count: 1.0 severity: normal status: open title: future unicode literals and r'\u' type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 21:17:33 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Mar 2009 20:17:33 +0000 Subject: [issue5447] future unicode literals and r'\u' In-Reply-To: <1236543092.99.0.796172268474.issue5447@psf.upfronthosting.co.za> Message-ID: <1236543453.97.0.988589641935.issue5447@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This happens with unicode literals even without "from __future__ import unicode_literals" because raw strings still have \u escapes interpreted. This isn't true in 3.0, so it would be nice to disable it with unicode_literals. ---------- message_count: 1.0 -> 2.0 nosy: +benjamin.peterson nosy_count: 1.0 -> 2.0 priority: -> normal type: compile error -> feature request versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 21:23:46 2009 From: report at bugs.python.org (Daniel Lescohier) Date: Sun, 08 Mar 2009 20:23:46 +0000 Subject: [issue5448] Add precision property to decimal.Decimal In-Reply-To: <1236543825.99.0.833291294426.issue5448@psf.upfronthosting.co.za> Message-ID: <1236543825.99.0.833291294426.issue5448@psf.upfronthosting.co.za> New submission from Daniel Lescohier : I would like to get the decimal precision of decimal.Decimal objects (for my application, in order to validate whether a Decimal value will fit in the defined decimal precision of a database field). The way I found to get it was with: precision = len(value._int) where value is a decimal.Decimal object. However, this uses a private API (_int). I would like to have a public API to get the decimal precision of a Decimal. I propose we add the following to the decimal.Decimal class: @property def precision(self): """The precision of this Decimal value.""" return len(self._int) decimal.Context has a precision for calculations. decimal.Decimal.precision is the minimum precision needed to represent that value, not the precision that was used in calculating it. If one wants to, one can actually use Decimal.precision to set your Context's precision: d1 = decimal.Decimal('999') d2 = d1 context.prec = d1.precision + d2.precision d3 = d1 * d2 Open for debate is whether to name it Decimal.prec to mirror Context.prec. We'd have to choose one or the other or both: @property def precision(self): """The precision of this Decimal value.""" return len(self._int) prec = precision ---------- components: Library (Lib) message_count: 1.0 messages: 83328 nosy: dlesco nosy_count: 1.0 severity: normal status: open title: Add precision property to decimal.Decimal versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 21:54:12 2009 From: report at bugs.python.org (Brett Cannon) Date: Sun, 08 Mar 2009 20:54:12 +0000 Subject: [issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6 In-Reply-To: <1236517160.74.0.61108619715.issue5442@psf.upfronthosting.co.za> Message-ID: <1236545652.64.0.70145390368.issue5442@psf.upfronthosting.co.za> Brett Cannon added the comment: Is your version of OS X installed on a case-sensitive filesystem? These tests all pass for me on my Macbook on 10.5.6. ---------- assignee: -> brett.cannon message_count: 1.0 -> 2.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 22:28:10 2009 From: report at bugs.python.org (Ismail Donmez) Date: Sun, 08 Mar 2009 21:28:10 +0000 Subject: [issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6 In-Reply-To: <1236517160.74.0.61108619715.issue5442@psf.upfronthosting.co.za> Message-ID: <1236547690.12.0.1388659019.issue5442@psf.upfronthosting.co.za> Ismail Donmez added the comment: Yes its case sensitive. ---------- message_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 22:30:47 2009 From: report at bugs.python.org (Brett Cannon) Date: Sun, 08 Mar 2009 21:30:47 +0000 Subject: [issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6 In-Reply-To: <1236517160.74.0.61108619715.issue5442@psf.upfronthosting.co.za> Message-ID: <1236547847.24.0.540779682847.issue5442@psf.upfronthosting.co.za> Brett Cannon added the comment: Ah, OK, that explains it then. I guess I need to come up with a test to verify whether commonly case-sensitive filesystems are truly case-sensitive before running the tests. Thanks for the quick response, Ismail. ---------- message_count: 3.0 -> 4.0 priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 8 23:53:09 2009 From: report at bugs.python.org (Jervis Whitley) Date: Sun, 08 Mar 2009 22:53:09 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1236552789.07.0.741956796175.issue1818@psf.upfronthosting.co.za> Jervis Whitley added the comment: Jervis> in csv.rst removed reference to reader.next() as a public method. Skip> Because? I've not seen any discussion in this issue or in any Skip> other forums Skip> (most certainly not on the csv at python.org mailing list) which would Skip> suggest Skip> that csv.reader's next() method should no longer be a public method. I agree, this should be applied separately. ---------- message_count: 26.0 -> 27.0 Added file: http://bugs.python.org/file13268/ntreader5_py3_1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 00:13:34 2009 From: report at bugs.python.org (Jervis Whitley) Date: Sun, 08 Mar 2009 23:13:34 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1236554014.64.0.799097078775.issue1818@psf.upfronthosting.co.za> Jervis Whitley added the comment: Antoine> I don't understand why NamedTupleReader requires the Antoine> fieldnames array Antoine> rather than the namedtuple class itself. If you could pass it Antoine> the namedtuple class, users could choose whatever namedtuple Antoine> subclass with whatever additional methods or behaviour suits Antoine> them. It would make NamedTupleReader more flexible and more Antoine> useful. The NamedTupleReader does take the namedtuple class as the fieldnames argument. It can be a namedtuple, a 'fieldnames' array or None. If a namedtuple is used as the fieldnames argument, returned rows are created using ._make from the this namedtuple. Unless I have read your requirements incorrectly, this is the behaviour you describe. Given the confusion, I accept that the documentation needs to be improved. The NamedTupleReader and Writer were created to follow as closely as possible the behaviour (and signature) of the DictReader and DictWriter, with the exception of using namedtuples instead of dicts. ---------- message_count: 27.0 -> 28.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 00:21:34 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Mar 2009 23:21:34 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1236554494.57.0.790669539354.issue1818@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I got misled by the documentation ("The contents of *fieldnames* are passed directly to be used as the namedtuple fieldnames"), and your implementation is a bit difficult to follow. ---------- message_count: 28.0 -> 29.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 00:23:52 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Mar 2009 23:23:52 +0000 Subject: [issue3002] shutil.copyfile blocks indefinitely on named pipes In-Reply-To: <1212075150.42.0.761610345558.issue3002@psf.upfronthosting.co.za> Message-ID: <1236554632.47.0.00684334313896.issue3002@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch, introducing a new exception named SpecialFileError which is raised when trying to copy a named pipe. Other kinds of special file aren't checked for, but they could it we thought it's sensible to do so. ---------- keywords: +patch message_count: 7.0 -> 8.0 Added file: http://bugs.python.org/file13269/issue3002.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 00:30:59 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Mar 2009 23:30:59 +0000 Subject: [issue3002] shutil.copyfile blocks indefinitely on named pipes In-Reply-To: <1212075150.42.0.761610345558.issue3002@psf.upfronthosting.co.za> Message-ID: <1236555059.77.0.575772179263.issue3002@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I forgot the case where the /destination/ file is a named pipe. Here is a new patch. ---------- message_count: 8.0 -> 9.0 Added file: http://bugs.python.org/file13270/issue3002-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 00:53:00 2009 From: report at bugs.python.org (Erick Tryzelaar) Date: Sun, 08 Mar 2009 23:53:00 +0000 Subject: [issue5449] bug fix to prevent io.BytesIO from accepting arbitrary keyword arguments In-Reply-To: <1236556380.35.0.110625961105.issue5449@psf.upfronthosting.co.za> Message-ID: <1236556380.35.0.110625961105.issue5449@psf.upfronthosting.co.za> New submission from Erick Tryzelaar : I noticed that it was possible to specify arbitrary arguments to io.BytesIO: >>> io.BytesIO(b'foo', foo=1) <_io.BytesIO object at 0x430150> But io.StringIO doesn't: >>> io.StringIO('foo', foo=1) Traceback (most recent call last): File "", line 1, in TypeError: 'foo' is an invalid keyword argument for this function So, I've attached a little patch that uses the same technique 3.1a1 uses to parse the arguments. One thing to be aware of is that I named the kwarg "intial_bytes" just like http://docs.python.org/3.0/library/io.html#io.BytesIO instead of "inital_value" like io.StringIO. I'm not sure if it'd be desirable to be consistent between the two. ---------- components: Library (Lib) files: 0001-Fix-io.BytesIO-to-not-accept-arbitrary-keywords.patch keywords: patch message_count: 1.0 messages: 83337 nosy: erickt nosy_count: 1.0 severity: normal status: open title: bug fix to prevent io.BytesIO from accepting arbitrary keyword arguments type: behavior versions: Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13271/0001-Fix-io.BytesIO-to-not-accept-arbitrary-keywords.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 00:55:45 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 08 Mar 2009 23:55:45 +0000 Subject: [issue5387] mmap.move crashes by integer overflow In-Reply-To: <1235756718.87.0.0651298987866.issue5387@psf.upfronthosting.co.za> Message-ID: <1236556545.47.0.821941530663.issue5387@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I tried r69943 on coLinux, and I got compile error "max is not defined". Here is updated patch. ---------- keywords: +patch message_count: 1.0 -> 2.0 Added file: http://bugs.python.org/file13272/fix_mmap_move.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 01:06:56 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 09 Mar 2009 00:06:56 +0000 Subject: [issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped In-Reply-To: <1236557215.68.0.756624952877.issue5450@psf.upfronthosting.co.za> Message-ID: <1236557215.68.0.756624952877.issue5450@psf.upfronthosting.co.za> New submission from R. David Murray : If the DISPLAY environment variable is set, the test_tcl test 'testLoadTk' gives a traceback. In the same circumstance, test_tk and test_ttkguionly display the error and are skipped. Although this is a nit rather than a problem, for consistencies sake I think the testLoadTk test should also be skipped rather than show up as a failure. I've attached a patch against the trunk that does this, with the caveat that it is an individual testcase being skipped so it doesn't get recorded in the 'skipped tests' summary. I don't think this is a problem since test_tk will likely show up in the skipped tests if this one is skipped, and also there are circumstances in which testLoadTkFailure is skipped completely silently. Perhaps the real problem is that the tk tests should be in test_tk instead of test_tcl? ---------- components: Tests, Tkinter files: test_tcl.patch keywords: patch message_count: 1.0 messages: 83339 nosy: bitdancer nosy_count: 1.0 severity: normal status: open title: test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped type: behavior versions: Python 2.6, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13273/test_tcl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 01:07:05 2009 From: report at bugs.python.org (Jervis Whitley) Date: Mon, 09 Mar 2009 00:07:05 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1236557225.88.0.885286826049.issue1818@psf.upfronthosting.co.za> Jervis Whitley added the comment: Updated version of docs for 2.7 and 3k. ---------- message_count: 29.0 -> 30.0 Added file: http://bugs.python.org/file13274/ntreader6_py3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 01:07:46 2009 From: report at bugs.python.org (Jervis Whitley) Date: Mon, 09 Mar 2009 00:07:46 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1236557266.75.0.929613269982.issue1818@psf.upfronthosting.co.za> Changes by Jervis Whitley : Added file: http://bugs.python.org/file13275/ntreader6_py27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 01:08:01 2009 From: report at bugs.python.org (Jervis Whitley) Date: Mon, 09 Mar 2009 00:08:01 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1236557281.05.0.329519349588.issue1818@psf.upfronthosting.co.za> Changes by Jervis Whitley : Removed file: http://bugs.python.org/file13268/ntreader5_py3_1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 01:09:54 2009 From: report at bugs.python.org (Erick Tryzelaar) Date: Mon, 09 Mar 2009 00:09:54 +0000 Subject: [issue5451] patch to make io.StringIO consistent with open with respect to newlines In-Reply-To: <1236557394.75.0.991537518962.issue5451@psf.upfronthosting.co.za> Message-ID: <1236557394.75.0.991537518962.issue5451@psf.upfronthosting.co.za> New submission from Erick Tryzelaar : I noticed that io.StringIO is inconsistent with open on how newlines are handled. The default approach open uses is universal newlines: >>> with open('foo', 'w') as f: ... f.write('hello hi\r\nla la\r\n') ... 17 >>> open('foo').readlines() ['hello hi\n', 'la la\n'] io.StringIO, however, defaults to just treating \n as newlines: >>> io.StringIO('hello hi\r\nla la \r\n').readlines() ['hello hi\r\n', 'la la \r\n'] The attached patch changes this so that if the newline keyword isn't specified, then StringIO will act just like open with respect to keywords. It will then produce this: >>> io.StringIO('hello hi\r\nla la \r\n').readlines() ['hello hi\n', 'la la \n'] ---------- components: Library (Lib) files: 0001-Make-StringIO-consistent-with-open-wrt-newlines.patch keywords: patch message_count: 1.0 messages: 83341 nosy: erickt nosy_count: 1.0 severity: normal status: open title: patch to make io.StringIO consistent with open with respect to newlines type: behavior versions: Python 3.1 Added file: http://bugs.python.org/file13276/0001-Make-StringIO-consistent-with-open-wrt-newlines.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 01:10:28 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 09 Mar 2009 00:10:28 +0000 Subject: [issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped In-Reply-To: <1236557215.68.0.756624952877.issue5450@psf.upfronthosting.co.za> Message-ID: <1236557428.36.0.832349158139.issue5450@psf.upfronthosting.co.za> R. David Murray added the comment: That first sentence should have read "If the DISPLAY environment variable is set but the display cannot be opened". ---------- message_count: 1.0 -> 2.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 01:16:27 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Mar 2009 00:16:27 +0000 Subject: [issue5451] patch to make io.StringIO consistent with open with respect to newlines In-Reply-To: <1236557394.75.0.991537518962.issue5451@psf.upfronthosting.co.za> Message-ID: <1236557787.27.0.716958454355.issue5451@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is the intended behavior. It is consist with 2.x's StringIO.StringIO behavior. ---------- message_count: 1.0 -> 2.0 nosy: +benjamin.peterson nosy_count: 1.0 -> 2.0 resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 01:55:03 2009 From: report at bugs.python.org (Erick Tryzelaar) Date: Mon, 09 Mar 2009 00:55:03 +0000 Subject: [issue5451] patch to make io.StringIO consistent with open with respect to newlines In-Reply-To: <1236557394.75.0.991537518962.issue5451@psf.upfronthosting.co.za> Message-ID: <1236560103.79.0.0346969970237.issue5451@psf.upfronthosting.co.za> Erick Tryzelaar added the comment: Thanks Benjamin. Could the documentation for StringIO be updated then? The docs for io.StringIO [1] says that io.TextIOWrapper implements the constructor, but TextIOWrapper defaults newline to None [2], and there's nothing that states that io.StringIO changes the default to newline='\n'. [1]: http://docs.python.org/3.0/library/io.html#io.StringIO [2]: http://docs.python.org/3.0/library/io.html#io.TextIOWrapper ---------- message_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 02:03:12 2009 From: report at bugs.python.org (Erick Tryzelaar) Date: Mon, 09 Mar 2009 01:03:12 +0000 Subject: [issue5452] Documentation for io.StringIO has wrong info for arguments In-Reply-To: <1236560592.13.0.29473692422.issue5452@psf.upfronthosting.co.za> Message-ID: <1236560592.13.0.29473692422.issue5452@psf.upfronthosting.co.za> New submission from Erick Tryzelaar : (this is redirecting from http://bugs.python.org/issue5451). The documentation for io.StringIO is incorrect on the arguments. First off, it doesn't actually accept the "encoding" and "errors" arguments. Second, it's not stated that the default "newline" argument is "\n", as opposed to it's parent class TextIOWrapper, which defaults to None. ---------- assignee: georg.brandl components: Documentation message_count: 1.0 messages: 83345 nosy: erickt, georg.brandl nosy_count: 2.0 severity: normal status: open title: Documentation for io.StringIO has wrong info for arguments type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 02:04:11 2009 From: report at bugs.python.org (Erick Tryzelaar) Date: Mon, 09 Mar 2009 01:04:11 +0000 Subject: [issue5451] patch to make io.StringIO consistent with open with respect to newlines In-Reply-To: <1236557394.75.0.991537518962.issue5451@psf.upfronthosting.co.za> Message-ID: <1236560651.84.0.343969455046.issue5451@psf.upfronthosting.co.za> Erick Tryzelaar added the comment: Moving this to a documentation bug here: http://bugs.python.org/issue5452 ---------- message_count: 3.0 -> 4.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 02:24:14 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Mar 2009 01:24:14 +0000 Subject: [issue5452] Documentation for io.StringIO has wrong info for arguments In-Reply-To: <1236560592.13.0.29473692422.issue5452@psf.upfronthosting.co.za> Message-ID: <1236561854.98.0.321966045601.issue5452@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: georg.brandl -> benjamin.peterson nosy: +benjamin.peterson nosy_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 03:02:27 2009 From: report at bugs.python.org (dariusp) Date: Mon, 09 Mar 2009 02:02:27 +0000 Subject: [issue5453] pydoc -k fails (release30-maint patch) In-Reply-To: <1236564146.1.0.579118375216.issue5453@psf.upfronthosting.co.za> Message-ID: <1236564146.1.0.579118375216.issue5453@psf.upfronthosting.co.za> New submission from dariusp : pydoc -k fails for both release30-maint and py3k. In release30-maint the python io module (or more accurately the underlying codecs module used by the io module) raises a LookupError if the encoding is invalid. There is a test module with a deliberate encoding misspelled as "uft-8". In py3k the C io module doesn't raise this exception. In addition both release30-maint and py3k raise a SyntaxError if the BOM is invalid. Again there is a test module with an invalid BOM. The only difference between the patch for release30-maint and the patch for py3k is that py3k doesn't catch LookupError since the C io module doesn't raise it. Apart from that, pkgutil.py handles SyntaxError the same as ImportError and returns None. pydoc.py handles receiving the None and also handles the LookupError the same as UnicodeDecodeError. A test was added to test_pydoc.py to ensure that a keyword search sends text to stdout and nothing to stderr. Before (release30-maint): $ pydoc -k sys errno - This module makes available standard errno system symbols. posix - This module provides access to operating system functionality that is sys - This module provides access to some objects used or maintained by the colorsys - Conversion functions between RGB and other color systems. distutils.sysconfig - Provide access to Python's configuration information. The specific distutils.tests.test_sysconfig - Tests for distutils.dist. lib2to3.fixes.fix_sys_exc - Fixer for sys.exc_{type, value, traceback} os - OS routines for Mac, NT, or Posix depending on what system we're on. site - Append module search paths for third-party packages to sys.path. Traceback (most recent call last): File "/usr/local/bin/pydoc", line 5, in pydoc.cli() File "/usr/local/lib/python3.0/pydoc.py", line 2260, in cli apropos(val) File "/usr/local/lib/python3.0/pydoc.py", line 1966, in apropos ModuleScanner().run(callback, key, onerror=onerror) File "/usr/local/lib/python3.0/pydoc.py", line 1928, in run source = loader.get_source(modname) File "/usr/local/lib/python3.0/pkgutil.py", line 293, in get_source self.source = self.file.read() File "/usr/local/lib/python3.0/io.py", line 1724, in read decoder = self._decoder or self._get_decoder() File "/usr/local/lib/python3.0/io.py", line 1509, in _get_decoder make_decoder = codecs.getincrementaldecoder(self._encoding) File "/usr/local/lib/python3.0/codecs.py", line 960, in getincrementaldecoder decoder = lookup(encoding).incrementaldecoder LookupError: unknown encoding: uft-8 After (release30-maint): $ pydoc -k sys errno - This module makes available standard errno system symbols. posix - This module provides access to operating system functionality that is sys - This module provides access to some objects used or maintained by the colorsys - Conversion functions between RGB and other color systems. distutils.sysconfig - Provide access to Python's configuration information. The specific distutils.tests.test_sysconfig - Tests for distutils.dist. lib2to3.fixes.fix_sys_exc - Fixer for sys.exc_{type, value, traceback} os - OS routines for Mac, NT, or Posix depending on what system we're on. site - Append module search paths for third-party packages to sys.path. test.test_colorsys test.test_largefile - Test largefile support on system where this makes sense. test.test_sys test.test_syslog warnings - Python part of the warnings subsystem. syslog Before (py3k): $ pydoc -k sys errno - This module makes available standard errno system symbols. posix - This module provides access to operating system functionality that is sys - This module provides access to some objects used or maintained by the colorsys - Conversion functions between RGB and other color systems. distutils.sysconfig - Provide access to Python's configuration information. The specific distutils.tests.test_sysconfig - Tests for distutils.dist. importlib.test.import_.test_caching - Test that sys.modules is used properly by import. lib2to3.fixes.fix_sys_exc - Fixer for sys.exc_{type, value, traceback} os - OS routines for Mac, NT, or Posix depending on what system we're on. site - Append module search paths for third-party packages to sys.path. Traceback (most recent call last): File "/usr/local/bin/pydoc", line 5, in pydoc.cli() File "/usr/local/lib/python3.1/pydoc.py", line 2260, in cli apropos(val) File "/usr/local/lib/python3.1/pydoc.py", line 1966, in apropos ModuleScanner().run(callback, key, onerror=onerror) File "/usr/local/lib/python3.1/pydoc.py", line 1925, in run loader = importer.find_module(modname) File "/usr/local/lib/python3.1/pkgutil.py", line 183, in find_module file, filename, etc = imp.find_module(subname, path) SyntaxError: encoding problem: with BOM After (py3k): $ pydoc -k sys errno - This module makes available standard errno system symbols. posix - This module provides access to operating system functionality that is sys - This module provides access to some objects used or maintained by the colorsys - Conversion functions between RGB and other color systems. distutils.sysconfig - Provide access to Python's configuration information. The specific distutils.tests.test_sysconfig - Tests for distutils.dist. importlib.test.import_.test_caching - Test that sys.modules is used properly by import. lib2to3.fixes.fix_sys_exc - Fixer for sys.exc_{type, value, traceback} os - OS routines for Mac, NT, or Posix depending on what system we're on. site - Append module search paths for third-party packages to sys.path. test.test_colorsys test.test_largefile - Test largefile support on system where this makes sense. test.test_sys test.test_syslog warnings - Python part of the warnings subsystem. syslog ---------- components: Library (Lib) files: pydoc-keyword-search-patch-release30-maint.diff keywords: patch message_count: 1.0 messages: 83347 nosy: dariusp nosy_count: 1.0 severity: normal status: open title: pydoc -k fails (release30-maint patch) type: crash versions: Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13277/pydoc-keyword-search-patch-release30-maint.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 03:02:44 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Mar 2009 02:02:44 +0000 Subject: [issue5452] Documentation for io.StringIO has wrong info for arguments In-Reply-To: <1236560592.13.0.29473692422.issue5452@psf.upfronthosting.co.za> Message-ID: <1236564164.28.0.158771455684.issue5452@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70255. ---------- message_count: 1.0 -> 2.0 resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 03:06:20 2009 From: report at bugs.python.org (dariusp) Date: Mon, 09 Mar 2009 02:06:20 +0000 Subject: [issue5454] pydoc -k fails (py3k patch) In-Reply-To: <1236564380.19.0.502429557812.issue5454@psf.upfronthosting.co.za> Message-ID: <1236564380.19.0.502429557812.issue5454@psf.upfronthosting.co.za> New submission from dariusp : Apologies for the duplicate issue, but I wanted to supply two patches (one for release30-maint and one for py3k) and appears that each issue can only have one file. pydoc -k fails for both release30-maint and py3k. In release30-maint the python io module (or more accurately the underlying codecs module used by the io module) raises a LookupError if the encoding is invalid. There is a test module with a deliberate encoding misspelled as "uft-8". In py3k the C io module doesn't raise this exception. In addition both release30-maint and py3k raise a SyntaxError if the BOM is invalid. Again there is a test module with an invalid BOM. The only difference between the patch for release30-maint and the patch for py3k is that py3k doesn't catch LookupError since the C io module doesn't raise it. Apart from that, pkgutil.py handles SyntaxError the same as ImportError and returns None. pydoc.py handles receiving the None and also handles the LookupError the same as UnicodeDecodeError. A test was added to test_pydoc.py to ensure that a keyword search sends text to stdout and nothing to stderr. Before (release30-maint): $ pydoc -k sys errno - This module makes available standard errno system symbols. posix - This module provides access to operating system functionality that is sys - This module provides access to some objects used or maintained by the colorsys - Conversion functions between RGB and other color systems. distutils.sysconfig - Provide access to Python's configuration information. The specific distutils.tests.test_sysconfig - Tests for distutils.dist. lib2to3.fixes.fix_sys_exc - Fixer for sys.exc_{type, value, traceback} os - OS routines for Mac, NT, or Posix depending on what system we're on. site - Append module search paths for third-party packages to sys.path. Traceback (most recent call last): File "/usr/local/bin/pydoc", line 5, in pydoc.cli() File "/usr/local/lib/python3.0/pydoc.py", line 2260, in cli apropos(val) File "/usr/local/lib/python3.0/pydoc.py", line 1966, in apropos ModuleScanner().run(callback, key, onerror=onerror) File "/usr/local/lib/python3.0/pydoc.py", line 1928, in run source = loader.get_source(modname) File "/usr/local/lib/python3.0/pkgutil.py", line 293, in get_source self.source = self.file.read() File "/usr/local/lib/python3.0/io.py", line 1724, in read decoder = self._decoder or self._get_decoder() File "/usr/local/lib/python3.0/io.py", line 1509, in _get_decoder make_decoder = codecs.getincrementaldecoder(self._encoding) File "/usr/local/lib/python3.0/codecs.py", line 960, in getincrementaldecoder decoder = lookup(encoding).incrementaldecoder LookupError: unknown encoding: uft-8 After (release30-maint): $ pydoc -k sys errno - This module makes available standard errno system symbols. posix - This module provides access to operating system functionality that is sys - This module provides access to some objects used or maintained by the colorsys - Conversion functions between RGB and other color systems. distutils.sysconfig - Provide access to Python's configuration information. The specific distutils.tests.test_sysconfig - Tests for distutils.dist. lib2to3.fixes.fix_sys_exc - Fixer for sys.exc_{type, value, traceback} os - OS routines for Mac, NT, or Posix depending on what system we're on. site - Append module search paths for third-party packages to sys.path. test.test_colorsys test.test_largefile - Test largefile support on system where this makes sense. test.test_sys test.test_syslog warnings - Python part of the warnings subsystem. syslog Before (py3k): $ pydoc -k sys errno - This module makes available standard errno system symbols. posix - This module provides access to operating system functionality that is sys - This module provides access to some objects used or maintained by the colorsys - Conversion functions between RGB and other color systems. distutils.sysconfig - Provide access to Python's configuration information. The specific distutils.tests.test_sysconfig - Tests for distutils.dist. importlib.test.import_.test_caching - Test that sys.modules is used properly by import. lib2to3.fixes.fix_sys_exc - Fixer for sys.exc_{type, value, traceback} os - OS routines for Mac, NT, or Posix depending on what system we're on. site - Append module search paths for third-party packages to sys.path. Traceback (most recent call last): File "/usr/local/bin/pydoc", line 5, in pydoc.cli() File "/usr/local/lib/python3.1/pydoc.py", line 2260, in cli apropos(val) File "/usr/local/lib/python3.1/pydoc.py", line 1966, in apropos ModuleScanner().run(callback, key, onerror=onerror) File "/usr/local/lib/python3.1/pydoc.py", line 1925, in run loader = importer.find_module(modname) File "/usr/local/lib/python3.1/pkgutil.py", line 183, in find_module file, filename, etc = imp.find_module(subname, path) SyntaxError: encoding problem: with BOM After (py3k): $ pydoc -k sys errno - This module makes available standard errno system symbols. posix - This module provides access to operating system functionality that is sys - This module provides access to some objects used or maintained by the colorsys - Conversion functions between RGB and other color systems. distutils.sysconfig - Provide access to Python's configuration information. The specific distutils.tests.test_sysconfig - Tests for distutils.dist. importlib.test.import_.test_caching - Test that sys.modules is used properly by import. lib2to3.fixes.fix_sys_exc - Fixer for sys.exc_{type, value, traceback} os - OS routines for Mac, NT, or Posix depending on what system we're on. site - Append module search paths for third-party packages to sys.path. test.test_colorsys test.test_largefile - Test largefile support on system where this makes sense. test.test_sys test.test_syslog warnings - Python part of the warnings subsystem. syslog ---------- components: Library (Lib) files: pydoc-keyword-search-patch-py3k.diff keywords: patch message_count: 1.0 messages: 83349 nosy: dariusp nosy_count: 1.0 severity: normal status: open title: pydoc -k fails (py3k patch) type: crash versions: Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13278/pydoc-keyword-search-patch-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 03:48:39 2009 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 09 Mar 2009 02:48:39 +0000 Subject: [issue5455] csv module no longer works as expected when file opened in binary mode In-Reply-To: <1236566919.88.0.376307932068.issue5455@psf.upfronthosting.co.za> Message-ID: <1236566919.88.0.376307932068.issue5455@psf.upfronthosting.co.za> New submission from Skip Montanaro : I just discovered that the csv module's reader class in 3.x doesn't work as expected when used as documented. The requirement has always been that the CSV file is opened in binary mode so that embedded newlines in fields are screwed up. Alas, in 3.x files opened in binary mode return their contents as bytes, not unicode strings which are apparently not allowed by the next() builtin: % python3.1 Python 3.1a0 (py3k:70084M, Feb 28 2009, 20:46:48) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import csv >>> next(csv.reader(open("f.csv", "rb"))) Traceback (most recent call last): File "", line 1, in _csv.Error: iterator should return strings, not bytes (did you open the file in text mode?) >>> next(csv.reader(open("f.csv", "r"))) ['col1', 'col2', 'color'] At the very least the documentation for the csv.reader class is no longer correct. However, I can't see how you can open a CSV file in text mode and not screw up embedded newlines. I think binary mode *has* to stay and some other way of dealing with bytes has to be found. ---------- components: Library (Lib) message_count: 1.0 messages: 83350 nosy: skip.montanaro nosy_count: 1.0 severity: normal status: open title: csv module no longer works as expected when file opened in binary mode type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 03:56:12 2009 From: report at bugs.python.org (Jervis Whitley) Date: Mon, 09 Mar 2009 02:56:12 +0000 Subject: [issue5455] csv module no longer works as expected when file opened in binary mode In-Reply-To: <1236566919.88.0.376307932068.issue5455@psf.upfronthosting.co.za> Message-ID: <1236567372.83.0.273530605859.issue5455@psf.upfronthosting.co.za> Changes by Jervis Whitley : ---------- nosy: +jdwhitley nosy_count: 1.0 -> 2.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 04:01:04 2009 From: report at bugs.python.org (Jervis Whitley) Date: Mon, 09 Mar 2009 03:01:04 +0000 Subject: [issue5455] csv module no longer works as expected when file opened in binary mode In-Reply-To: <1236566919.88.0.376307932068.issue5455@psf.upfronthosting.co.za> Message-ID: <1236567664.39.0.912806944135.issue5455@psf.upfronthosting.co.za> Jervis Whitley added the comment: in _csv.c, the check is done here: lineobj = PyIter_Next(self->input_iter); if (lineobj == NULL) { /* End of input OR exception */ if (!PyErr_Occurred() && self->field_len != 0) PyErr_Format(error_obj, "newline inside string"); return NULL; } if (!PyUnicode_Check(lineobj)) { PyErr_Format(error_obj, "iterator should return strings, " "not %.200s " "(did you open the file in text mode?)", lineobj->ob_type->tp_name ); Py_DECREF(lineobj); return NULL; } So the returned lineobj is a bytes type and then the PyUnicode_Check throws the error. ---------- message_count: 1.0 -> 2.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 04:05:32 2009 From: report at bugs.python.org (Erick Tryzelaar) Date: Mon, 09 Mar 2009 03:05:32 +0000 Subject: [issue5456] io.StringIO's universal newlines support is broken in 3.0.1 In-Reply-To: <1236567931.99.0.98085182563.issue5456@psf.upfronthosting.co.za> Message-ID: <1236567931.99.0.98085182563.issue5456@psf.upfronthosting.co.za> New submission from Erick Tryzelaar : Python version 3.0.1's io.StringIO has a bug when trying to use universal newlines on the mac. It's fixed in 3.1a1 though. Here's the exception: >>> io.StringIO('hello there\r\nlela\r\n', newline=None).readlines() Traceback (most recent call last): File "", line 1, in File "/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3 .0/io.py", line 536, in readlines return list(self) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3 .0/io.py", line 523, in __next__ line = self.readline() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3 .0/io.py", line 2110, in readline more_line = self.read(self._CHUNK_SIZE) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3 .0/io.py", line 2007, in read res = self._decode_newlines(self._read(n), True) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3 .0/io.py", line 1953, in _decode_newlines return output UnboundLocalError: local variable 'output' referenced before assignment The broken code is this: if self._readtranslate: if crlf: output = input.replace("\r\n", "\n") if cr: output = input.replace("\r", "\n") else: output = input It appears to fix the problem if we do this: output = input if self._readtranslate: if crlf: output = output.replace("\r\n", "\n") if cr: output = output.replace("\r", "\n") ---------- components: Library (Lib) message_count: 1.0 messages: 83352 nosy: erickt nosy_count: 1.0 severity: normal status: open title: io.StringIO's universal newlines support is broken in 3.0.1 type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 04:09:35 2009 From: report at bugs.python.org (Jervis Whitley) Date: Mon, 09 Mar 2009 03:09:35 +0000 Subject: [issue5455] csv module no longer works as expected when file opened in binary mode In-Reply-To: <1236566919.88.0.376307932068.issue5455@psf.upfronthosting.co.za> Message-ID: <1236568175.29.0.593179483459.issue5455@psf.upfronthosting.co.za> Jervis Whitley added the comment: Hi Skip, Currently, once we are sure the lineobj is a unicode obj we then get it's internal buffer using: line = PyUnicode_AsUnicode(lineobj); for the purpose of iterating through the line. is there an opportunity to use: line = PyBytes_AsString(lineobj); (or similar approach if I have quoted an incorrect function) for the case that we have a bytes object (not Unicode)? ---------- message_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 04:56:13 2009 From: report at bugs.python.org (lplatypus) Date: Mon, 09 Mar 2009 03:56:13 +0000 Subject: [issue5223] infinite recursion in PyErr_WriteUnraisable In-Reply-To: <1234412915.77.0.527314714811.issue5223@psf.upfronthosting.co.za> Message-ID: <1236570973.2.0.159352782103.issue5223@psf.upfronthosting.co.za> lplatypus added the comment: Hi amaury, I am copying you into this issue because I think it was introduced in your revision 65320 when you added a call to PyErr_WriteUnraisable from PyErr_GivenExceptionMatches in Python/errors.c. Any thoughts on on this issue or how to fix it would be very welcome. ---------- message_count: 3.0 -> 4.0 nosy: +amaury.forgeotdarc nosy_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 05:43:53 2009 From: report at bugs.python.org (John Machin) Date: Mon, 09 Mar 2009 04:43:53 +0000 Subject: [issue5455] csv module no longer works as expected when file opened in binary mode In-Reply-To: <1236566919.88.0.376307932068.issue5455@psf.upfronthosting.co.za> Message-ID: <1236573833.35.0.881373067124.issue5455@psf.upfronthosting.co.za> John Machin added the comment: This is in effect a duplicate of issue 4847. Summary: The docs are CORRECT. The 3.X implementation is WRONG. The 2.X implementation is CORRECT. See examples in my comment on issue 4847. ---------- message_count: 3.0 -> 4.0 nosy: +sjmachin nosy_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 06:11:32 2009 From: report at bugs.python.org (Jervis Whitley) Date: Mon, 09 Mar 2009 05:11:32 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1236575492.47.0.0523080771295.issue4847@psf.upfronthosting.co.za> Jervis Whitley added the comment: Hi all, This patch takes the approach of assuming utf-8 format encoding for files opened with 'rb' directive. That is: 1. Check if each line is Unicode Or Bytes Type. 2. If Bytes, get char array reference to internal buffer. 3. use PyUnicode_FromString to create a new unicode object from the char* - This step assumes UTF-8. 4. get a Py_UNICODE reference to internal unicode object buffer and continue as before. Is this in the right direction at all? Cheers, Jervis ---------- message_count: 9.0 -> 10.0 nosy: +jdwhitley nosy_count: 5.0 -> 6.0 Added file: http://bugs.python.org/file13279/csv.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 06:29:39 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Mar 2009 05:29:39 +0000 Subject: [issue5441] Convenience API for timeit.main In-Reply-To: <1236492146.81.0.454674408295.issue5441@psf.upfronthosting.co.za> Message-ID: <1236576579.44.0.465739227332.issue5441@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger nosy_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 07:02:16 2009 From: report at bugs.python.org (John Machin) Date: Mon, 09 Mar 2009 06:02:16 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1236578536.52.0.795400385325.issue4847@psf.upfronthosting.co.za> John Machin added the comment: Before patching, could we discuss the requirements? There are two different concepts: (1) "text" file (assume that CR and/or LF are line terminators, and provide methods for accessing a line at a time) versus "binary" file (no such assumptions, no such access) (2) reading the file as a raw undecoded "bytes" file or as a decoded "str" file. Options for 3.X: (1) caller uses mode 'rb', is given bytes objects back. (2) caller uses mode 'rt' and provides an encoding, is given str objects back. IMPORTANT: Option 2 must NOT not read the file as a collection of "lines"; it must process it (conceptually at least) a character at a time so that embedded CR and/or LF are not taken to be row terminators. Following the line that 3.X line should do what's best, not what we used to do, the implication is that we choose option 2. ---------- message_count: 10.0 -> 11.0 nosy: +skip.montanaro nosy_count: 6.0 -> 7.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 07:03:55 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 09 Mar 2009 06:03:55 +0000 Subject: [issue5453] pydoc -k fails (release30-maint patch) In-Reply-To: <1236564146.1.0.579118375216.issue5453@psf.upfronthosting.co.za> Message-ID: <1236578635.54.0.869750322533.issue5453@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Added file: http://bugs.python.org/file13278/pydoc-keyword-search-patch-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 07:05:09 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 09 Mar 2009 06:05:09 +0000 Subject: [issue5454] pydoc -k fails (py3k patch) In-Reply-To: <1236564380.19.0.502429557812.issue5454@psf.upfronthosting.co.za> Message-ID: <1236578709.13.0.307144416877.issue5454@psf.upfronthosting.co.za> Martin v. L?wis added the comment: You can have multiple attachments to a single issue. I have attached this file to the other issue. ---------- message_count: 1.0 -> 2.0 nosy: +loewis nosy_count: 1.0 -> 2.0 resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 07:05:27 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 09 Mar 2009 06:05:27 +0000 Subject: [issue5454] pydoc -k fails (py3k patch) In-Reply-To: <1236564380.19.0.502429557812.issue5454@psf.upfronthosting.co.za> Message-ID: <1236578727.38.0.904858563637.issue5454@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Removed file: http://bugs.python.org/file13278/pydoc-keyword-search-patch-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 07:49:11 2009 From: report at bugs.python.org (John Machin) Date: Mon, 09 Mar 2009 06:49:11 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1236581351.09.0.0878535306965.issue4847@psf.upfronthosting.co.za> John Machin added the comment: ... and it looks like Option 2 might already *almost* be in place. Continuing with the previous example (book1.csv has embedded lone LFs): C:\devel\csv>\python30\python -c "import csv; print(repr(list(csv.reader(open('book1.csv','rt', encoding='ascii')))))" [['Field1', 'Field 2 has a\nvery long\nheading', 'Field3'], ['1.11', '2.22', '3.33']] Looks good. However consider book2.csv which has embedded CRLFs: C:\devel\csv>\python30\python -c "print(repr(open('book2.csv', 'rb').read()))" b'Field1,"Field 2 has a\r\nvery long\r\nheading",Field3\r\n1.11,2.22,3.33\r\n' This gives: C:\devel\csv>\python30\python -c "import csv; print(repr(list(csv.reader(open('book2.csv','rt', encoding='ascii')))))" [['Field1', 'Field 2 has a\nvery long\nheading', 'Field3'], ['1.11', '2.22', '3.33']] Not good. It should preserve ALL characters in the field. ---------- message_count: 11.0 -> 12.0 versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 07:58:17 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 09 Mar 2009 06:58:17 +0000 Subject: [issue5234] Enhance 3.1 IDLE to exec IDLESTARTUP/PYTHONSTARTUP on restart In-Reply-To: <1234478129.58.0.678019243108.issue5234@psf.upfronthosting.co.za> Message-ID: <1236581897.1.0.220725165834.issue5234@psf.upfronthosting.co.za> Martin v. L?wis added the comment: How does that differ from issue5233? If this is a straight-forward port, no additional issue is needed. Even if there are differences, please attach the patch to the other issue. ---------- message_count: 1.0 -> 2.0 nosy: +loewis nosy_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 08:39:16 2009 From: report at bugs.python.org (Josiah Carlson) Date: Mon, 09 Mar 2009 07:39:16 +0000 Subject: [issue5406] asyncore doc issue In-Reply-To: <1236019589.34.0.225430476333.issue5406@psf.upfronthosting.co.za> Message-ID: <1236584356.29.0.573552226078.issue5406@psf.upfronthosting.co.za> Josiah Carlson added the comment: Actually, that's exactly what it does. If the count is missing, it defaults to None. The code that is executed is exactly: if count is None: while map: poll_fun(timeout, map) It will loop until the map is empty. ---------- message_count: 1.0 -> 2.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 08:42:16 2009 From: report at bugs.python.org (Josiah Carlson) Date: Mon, 09 Mar 2009 07:42:16 +0000 Subject: [issue5406] asyncore doc issue In-Reply-To: <1236019589.34.0.225430476333.issue5406@psf.upfronthosting.co.za> Message-ID: <1236584536.53.0.10288323116.issue5406@psf.upfronthosting.co.za> Josiah Carlson added the comment: Well...the loop can also die if an uncaptured exception is raised, but I'm not sure that is necessary to spell out explicitly. ---------- message_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 09:55:15 2009 From: report at bugs.python.org (Zach Hirsch) Date: Mon, 09 Mar 2009 08:55:15 +0000 Subject: [issue5447] future unicode literals and r'\u' In-Reply-To: <1236543092.99.0.796172268474.issue5447@psf.upfronthosting.co.za> Message-ID: <1236588915.0.0.838328897851.issue5447@psf.upfronthosting.co.za> Zach Hirsch added the comment: I've hit this, too, and it's annoyed me. So here's a patch against trunk that should fix it. The idea is: whenever unicode_literals are turned on (or the -U command line flag is passed), to convert r"\u" to "\u005c\u0075" and r"\U" to "\u005c\u0055" for every string literal in the source file before passing the string to PyUnicode_DecodeRawUnicodeEscape. ---------- keywords: +patch message_count: 2.0 -> 3.0 nosy: +zhirsch nosy_count: 2.0 -> 3.0 Added file: http://bugs.python.org/file13280/raw-unicode-literals.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 10:38:32 2009 From: report at bugs.python.org (Christian Theune) Date: Mon, 09 Mar 2009 09:38:32 +0000 Subject: [issue5457] ZipFile writes incorrect modification time (second is off-by-one) In-Reply-To: <1236591512.01.0.852258757862.issue5457@psf.upfronthosting.co.za> Message-ID: <1236591512.01.0.852258757862.issue5457@psf.upfronthosting.co.za> New submission from Christian Theune : See the attached unit test. On seconds that are > 0 and < 60 the written second is reduced by 1. (The test doesn't explicitly prove that this happens during writing, but we checked this manually. The read function is fine.) ---------- components: Library (Lib) files: zipbug.py message_count: 1.0 messages: 83364 nosy: ctheune nosy_count: 1.0 severity: normal status: open title: ZipFile writes incorrect modification time (second is off-by-one) type: behavior versions: Python 2.4, Python 2.5, Python 2.6, Python 3.0 Added file: http://bugs.python.org/file13281/zipbug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 10:56:54 2009 From: report at bugs.python.org (Zach Hirsch) Date: Mon, 09 Mar 2009 09:56:54 +0000 Subject: [issue2889] curses for windows (alternative patch) In-Reply-To: <1210919907.42.0.842256015219.issue2889@psf.upfronthosting.co.za> Message-ID: <1236592614.61.0.381599851784.issue2889@psf.upfronthosting.co.za> Zach Hirsch added the comment: > * test_curses: I'd be happier to see the 'if' statement as sys.platform > != 'win32' and (not term or term == 'unknown') -- easier to read. OK, fixed. > * test_curses: does putp() make PDCurses crash, or is it not available? > If the latter, I'd prefer to see 'if hasattr(curses, "putp"): '. Same for the tparm() test. They're stubs in pdcurses that always return an error. I'm not sure which is better in this case -- make them available through the curses module but always raise an exception on Windows, or make them unavailable and have it be an AttributeError if something tries to call them on Windows. > * Given that you include term.h and IRIX included term.h, I wonder if we > should make _cursesmodule.c include term.h on all platforms that have it, and then fix the resulting breakage claimed by the comment (if any). Yea, it was actually really easy to resolve the conflicts. I've done that, and tested the result on Linux and OS X 10.4. > * Is setupterm() a no-up on Windows? Maybe the function just shouldn't > be defined on Windows, then, so that user code can check for the function's existence. PDCurses does the same thing for setupterm as it does for putp/tparm (and a number of other unsupported functions) -- always returns an error. However, the curses module keeps track of whether it's been initialized based on whether setupterm has been called, so I think it makes sense to keep setupterm available but not call PDCurses's setupterm function on Windows. ---------- message_count: 4.0 -> 5.0 Added file: http://bugs.python.org/file13282/python-pdcurses-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 11:15:37 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Mar 2009 10:15:37 +0000 Subject: [issue5457] ZipFile writes incorrect modification time (second is off-by-one) In-Reply-To: <1236591512.01.0.852258757862.issue5457@psf.upfronthosting.co.za> Message-ID: <1236593737.34.0.13159222197.issue5457@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This appears to be an intrinsic limitation built into a zipfile's standard file header format. The header conforms to http://www.pkware.com/documents/casestudies/APPNOTE.TXT where the date and time fields are specified to be stored in the MS-DOS standard date/time format detailed at http://www.vsft.com/hal/dostime.htm. In that format, there are only five bits allocated for seconds. Accordingly, seconds are stored without their least significant bit (see the first few lines of Zipfile.Fileheader where the seconds are encoded with dt[5] // 2). Upon decoding, the seconds are scaled back up (see the _RealGetContents() method where the decoding is (t&0x1F) * 2). Since zipfiles are supposed to be cross-platform and the file-format is fixed, I don't see a way to remove this restriction. Recommending to close as wont-fix. ---------- message_count: 1.0 -> 2.0 nosy: +rhettinger nosy_count: 1.0 -> 2.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 11:31:13 2009 From: report at bugs.python.org (Eyal Gordon) Date: Mon, 09 Mar 2009 10:31:13 +0000 Subject: [issue5458] threading.Thread.join() documentation: missing 'from version' for RuntimeError exceptions In-Reply-To: <1236594673.49.0.326177093971.issue5458@psf.upfronthosting.co.za> Message-ID: <1236594673.49.0.326177093971.issue5458@psf.upfronthosting.co.za> New submission from Eyal Gordon : In threading documentation: http://www.python.org/doc/current/library/threading.html?highlight=threading#threading.Thread.join It is not specified from which python version the join() call raises the RuntimeError exception. In python version 2.4.3 join asserts on such conditions. ---------- assignee: georg.brandl components: Documentation message_count: 1.0 messages: 83367 nosy: eyal.gordon, georg.brandl nosy_count: 2.0 severity: normal status: open title: threading.Thread.join() documentation: missing 'from version' for RuntimeError exceptions versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 11:39:35 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 09 Mar 2009 10:39:35 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1236581351.09.0.0878535306965.issue4847@psf.upfronthosting.co.za> Message-ID: <1236595224.8096.6.camel@fsol> Antoine Pitrou added the comment: > Not good. It should preserve ALL characters in the field. Please look at the doc for open() and io.TextIOWrapper. The `newline` parameter defaults to None, which means universal newlines with newline translation. Setting to '' (yes, the empty string) enables universal newlines but disables newline translation (that it, it will split lines on all of ['\n', '\r', '\r\n'], but will leave these newlines intact rather than convert them to '\n'). However, I think csv should accept files opened in binary mode and be able to deal with line endings itself. How am I supposed to know the encoding of a CSV file? Surely Excel uses a defined, default encoding when exporting to CSV... that knowledge should be embedded in the csv module. ---------- message_count: 12.0 -> 13.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 12:30:10 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Mar 2009 11:30:10 +0000 Subject: [issue5448] Add precision property to decimal.Decimal In-Reply-To: <1236543825.99.0.833291294426.issue5448@psf.upfronthosting.co.za> Message-ID: <1236598210.46.0.807950706921.issue5448@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, there is a public API to get at the same information: Decimal.as_tuple(). That being said, I don't see how your len(value._int) test could be correct. The exponent will potentially shift the value way out-of-bounds for a database. Consider Decimal('999E+10') or Decimal('999E-10') whose database storage sizes do not fit in a DECIMAL(7,4) field eventhough their len(value._int) is three. To see if the fractional part of a decimal number fits in a database, set the context precision to the database precision and quantize the decimal to the allowed number of decimal places. If the Inexact flag gets set, then it didn't fit. -1 on extending the API any further from the underlying IBM specification. ---------- message_count: 1.0 -> 2.0 nosy: +rhettinger nosy_count: 1.0 -> 2.0 resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 12:32:15 2009 From: report at bugs.python.org (John Machin) Date: Mon, 09 Mar 2009 11:32:15 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1236598335.68.0.48982698314.issue4847@psf.upfronthosting.co.za> John Machin added the comment: pitrou> Please look at the doc for open() and io.TextIOWrapper. The `newline` parameter defaults to None, which means universal newlines with newline translation. Setting to '' (yes, the empty string) enables universal newlines but disables newline translation ... I had already read it. I gave it a prize for "least intuitive arg in the language". So you plan to use that, reading "lines" instead of blocks? You'll still have to examine which CRs and LFs are embedded and which are line terminators. You might just as well use f.read(BLOCKSZ) and avoid having to insist that the user explicitly write ", newline=''". pitrou> However, I think csv should accept files opened in binary mode and be able to deal with line endings itself. How am I supposed to know the encoding of a CSV file? Surely Excel uses a defined, default encoding when exporting to CSV... that knowledge should be embedded in the csv module. Excel has no default, because the user has no option -- the defined encoding is "cp" + str(codepage_number_derived_from_locale), e.g. "cp1252". Likewise other software writing delimited data to text files will use (one of) the local legacy encoding(s). So: (i) mode='rb' and no encoding => caller gets bytes back and needs to do own decoding or (ii) mode='rb' and an encoding [which looks rather daft and is currently not possible] and the the caller gets str objects. Both of these are ugly -- hence my preference for the mode="rt" variety of solution. Do we really want the double hassle of both a str csv implementation and a bytes csv implementation? ---------- message_count: 13.0 -> 14.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 12:33:22 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Mar 2009 11:33:22 +0000 Subject: [issue5443] trivial typo in itertools documentation In-Reply-To: <1236531469.71.0.843632021292.issue5443@psf.upfronthosting.co.za> Message-ID: <1236598402.04.0.771020690199.issue5443@psf.upfronthosting.co.za> Raymond Hettinger added the comment: r70261 ---------- message_count: 1.0 -> 2.0 nosy: +rhettinger nosy_count: 2.0 -> 3.0 resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 12:38:20 2009 From: report at bugs.python.org (Dan Villiom Podlaski Christiansen) Date: Mon, 09 Mar 2009 11:38:20 +0000 Subject: [issue4111] Add DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1236598700.1.0.801213640793.issue4111@psf.upfronthosting.co.za> Changes by Dan Villiom Podlaski Christiansen : ---------- nosy: +danchr nosy_count: 12.0 -> 13.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 12:40:14 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 09 Mar 2009 11:40:14 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1236598335.68.0.48982698314.issue4847@psf.upfronthosting.co.za> Message-ID: <1236598859.8096.13.camel@fsol> Antoine Pitrou added the comment: > I had already read it. I gave it a prize for "least intuitive arg in the > language". Please open a bug, then :) > So you plan to use that, reading "lines" instead of blocks? > You'll still have to examine which CRs and LFs are embedded and which > are line terminators. You might just as well use f.read(BLOCKSZ) and > avoid having to insist that the user explicitly write ", newline=''". Sorry, but who is "you" in that paragraph? The csv module currently accepts any iterator yielding lines of text, not only file objects. Changing this would be a major compatibility break. > Excel has no default, because the user has no option -- the defined > encoding is "cp" + str(codepage_number_derived_from_locale), e.g. > "cp1252". Then Excel-generated CSV files all use different encodings? Gasp :-( ---------- message_count: 14.0 -> 15.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 13:17:04 2009 From: report at bugs.python.org (Eric Smith) Date: Mon, 09 Mar 2009 12:17:04 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236601024.52.0.909780562423.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: I'm attaching a patch that delivers the basic functionality in str.format. This patch is against trunk, although it will probably work elsewhere. DO NOT USE THIS PATCH IN ANY SERIOUS WORK It doesn't implement all of the needed functionality, it probably has a memory leak, and it most likely can cause a GP fault. It does, however, handle the common cases and it will give you a taste of the feature. In particular, it doesn't handle anything other than empty braces ('{:d}' will fail). I can add this, and I think it should be added, but I just haven't had the time to finish it up. I wanted to get this posted so others can play with it and we can reach a decision if we want to add this functionality. Personally, I think it's a great improvement, and the more I play with it the more I like it. If we reach a consensus that the feature should be added, I can probably get it cleaned up and finished before PyCon. $ ./python.exe Python 2.7a0 (trunk:70244M, Mar 8 2009, 16:54:23) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> '{} {} {}'.format(1, 3.4, 'test') '1 3.4 test' >>> '{} {1}'.format(1, 2) Traceback (most recent call last): File "", line 1, in ValueError: cannot switch from automatic field numbering to manual field specification >>> ---------- keywords: +patch message_count: 14.0 -> 15.0 Added file: http://bugs.python.org/file13283/half-baked-not-for-real-use.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 13:19:05 2009 From: report at bugs.python.org (Eric Smith) Date: Mon, 09 Mar 2009 12:19:05 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236601145.77.0.507542219448.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: Also note that this patch causes a few tests to fail, since they're trying to ensure that '{}'.format will fail. If we go forward I'll address that too, of course. ---------- message_count: 15.0 -> 16.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 13:31:24 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 09 Mar 2009 12:31:24 +0000 Subject: [issue5223] infinite recursion in PyErr_WriteUnraisable In-Reply-To: <1234412915.77.0.527314714811.issue5223@psf.upfronthosting.co.za> Message-ID: <1236601884.07.0.454126307494.issue5223@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: python 3.0 does not crash. And it has better code for infinite recursion (r55850, r66186) I suggest to backport the py3k code, patch attached. Martin, your comments are welcome. Are there compatibility issues? ---------- keywords: +patch message_count: 4.0 -> 5.0 nosy: +loewis nosy_count: 3.0 -> 4.0 Added file: http://bugs.python.org/file13284/recursioncheck.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 14:15:45 2009 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 09 Mar 2009 13:15:45 +0000 Subject: [issue5455] csv module no longer works as expected when file opened in binary mode In-Reply-To: <1236567664.39.0.912806944135.issue5455@psf.upfronthosting.co.za> Message-ID: <18869.5755.705088.181998@montanaro.dyndns.org> Skip Montanaro added the comment: Jervis> So the returned lineobj is a bytes type and then the Jervis> PyUnicode_Check throws the error. Right, but given that fact how do you get a Unicode string out of the bytes without an encoding? You can't open a file in binary mode and give the encoding arg. ---------- message_count: 4.0 -> 5.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 14:27:36 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 09 Mar 2009 13:27:36 +0000 Subject: [issue5406] asyncore doc issue In-Reply-To: <1236019589.34.0.225430476333.issue5406@psf.upfronthosting.co.za> Message-ID: <1236605256.02.0.702331374105.issue5406@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: You're right, my fault. ---------- message_count: 3.0 -> 4.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 16:22:16 2009 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 09 Mar 2009 15:22:16 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <18869.11988.296803.404068@montanaro.dyndns.org> Message-ID: <18869.13347.56562.706301@montanaro.dyndns.org> Skip Montanaro added the comment: me> What should be the default? Scratch that. If the iterator passed to csv.reader is in a mode which will cause it to emit bytes instead of unicode objects the caller must give an encoding. The csv.reader code will then perform the necessary bytes-to-unicode conversion. If bytes are returned by the iterator but no encoding was given it should raise an exception (something standard? something new?). Skip ---------- message_count: 20.0 -> 21.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 16:53:57 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 09 Mar 2009 15:53:57 +0000 Subject: [issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped In-Reply-To: <1236557215.68.0.756624952877.issue5450@psf.upfronthosting.co.za> Message-ID: <1236614036.97.0.611216618583.issue5450@psf.upfronthosting.co.za> R. David Murray added the comment: Patch uploaded as bzr branch to Launchpad at bzr+ssh://bazaar.launchpad.net/~rdmurray/python/bug5450-test ---------- message_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 17:13:42 2009 From: report at bugs.python.org (Daniel Lescohier) Date: Mon, 09 Mar 2009 16:13:42 +0000 Subject: [issue5448] Add precision property to decimal.Decimal In-Reply-To: <1236543825.99.0.833291294426.issue5448@psf.upfronthosting.co.za> Message-ID: <1236615222.26.0.135415804444.issue5448@psf.upfronthosting.co.za> Daniel Lescohier added the comment: I had other code to check scale, but you are right, I should use quantize. There is certainly a lot to absorb in the IBM decimal specification. I really appreciate you pointing me to quantize and Inexact. I guess I inadvertently used the issue tracker for help on the decimal module, I didn't really mean to do that, I really thought there was a need for Decimal.precision. The other unrelated issue I entered (#5445) should be more of a real issue. My code constructs a conversion/validation closure for every field in the Schema, based on a SchemaField definition for each field. My SchemaFieldDecimal class includes precision and scale parameters, and now I'm going to add a rounding parameter, with None meaning raise an error on Inexact. So pseudo-code for the fix: scale = None if scale is None else Decimal((0,(1,),-scale)) traps = (InvalidOperation, Inexact) if rounding is None else (InvalidOperation,) context = Context(prec=precision, rounding=rounding, traps=traps) doing the conversion/validation: For case if scale is not None: try: with context: value = Decimal(value).quantize(scale) except handlers... For case if scale is None: try: with context: value = Decimal(value)+Decimal(0) # will round or raise Inexact except handlers... ---------- message_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 17:51:03 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 09 Mar 2009 16:51:03 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236617463.3.0.643971062526.issue5237@psf.upfronthosting.co.za> Guido van Rossum added the comment: Please go ahead and finish this. I'm glad this is going in! ---------- message_count: 16.0 -> 17.0 nosy: +gvanrossum nosy_count: 6.0 -> 7.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 20:00:14 2009 From: report at bugs.python.org (Fabio Zadrozny) Date: Mon, 09 Mar 2009 19:00:14 +0000 Subject: [issue5460] Python 3.0 grammar is ambiguous with the addition of star_expr In-Reply-To: <1236625214.13.0.530481898617.issue5460@psf.upfronthosting.co.za> Message-ID: <1236625214.13.0.530481898617.issue5460@psf.upfronthosting.co.za> New submission from Fabio Zadrozny : Note: A discussion related to this bug was raised on: http://mail.python.org/pipermail/python-dev/2009-March/086939.html The following constructs are ambiguous in the Python 3.0 grammar: arglist: (argument ',')* (argument [','] |'*' test (',' argument)* [',' '**' test] |'**' test ) argument: test [comp_for] test: or_test or_test: and_test and_test: not_test not_test: 'not' not_test | comparison comparison: star_expr star_expr: ['*'] expr So, with that construct, having call(arglist) in a format: call(*test), the grammar would find it to be consumed in the argument construction (because of the star_expr) and not in the arglist in the '*' test. Python seems to be lucky in this because it seems to be getting in the correct choice, when that's not really possible from the grammar -- maybe it tries the 2nd construct before the 1st and succeeds because of that? It seems to me that this could actually be a bug in the Python grammar generator. It doesn't seem possible to disambiguate that without semantic actions later on, but the grammar could be changed to disambiguate that. I've used the constructs below in a JavaCC grammar successfully (and I think Python could use the same constructs): expr_stmt: testlist_star_expr (augassign (yield_expr|testlist) | ('=' (yield_expr|testlist_star_expr))*) testlist_star_expr: (test|star_expr) (',' test|star_expr)* [','] star_expr: '*' expr ---------- components: Interpreter Core message_count: 1.0 messages: 83395 nosy: fabioz nosy_count: 1.0 severity: normal status: open title: Python 3.0 grammar is ambiguous with the addition of star_expr type: feature request versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 20:08:58 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 09 Mar 2009 19:08:58 +0000 Subject: [issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped In-Reply-To: <1236557215.68.0.756624952877.issue5450@psf.upfronthosting.co.za> Message-ID: <1236625738.78.0.0455333879905.issue5450@psf.upfronthosting.co.za> Guilherme Polo added the comment: Please use test_support.TestSkipped instead of showing a skip message using print. ---------- message_count: 3.0 -> 4.0 nosy: +gpolo nosy_count: 1.0 -> 2.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 20:16:14 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 09 Mar 2009 19:16:14 +0000 Subject: [issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped In-Reply-To: <1236557215.68.0.756624952877.issue5450@psf.upfronthosting.co.za> Message-ID: <1236626174.5.0.178347180223.issue5450@psf.upfronthosting.co.za> Guilherme Polo added the comment: It should be okay to move tk tests to somewhere in Lib/lib-tk/test/test_tkinter/ (answering the final question). Even the rest of test_tcl could be relocated to that place. ---------- message_count: 4.0 -> 5.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 20:21:40 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 09 Mar 2009 19:21:40 +0000 Subject: [issue5234] Enhance 3.1 IDLE to exec IDLESTARTUP/PYTHONSTARTUP on restart In-Reply-To: <1234478129.58.0.678019243108.issue5234@psf.upfronthosting.co.za> Message-ID: <1236626500.16.0.511631864754.issue5234@psf.upfronthosting.co.za> Guilherme Polo added the comment: Closing in favor of 5233, I see the fix being applied to both 2.7 and 3.1 if accepted. ---------- message_count: 3.0 -> 4.0 nosy: +gpolo nosy_count: 3.0 -> 4.0 resolution: -> duplicate status: open -> closed superseder: -> Enhance 2.7 IDLE to exec IDLESTARTUP/PYTHONSTARTUP on restart _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 20:22:23 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 09 Mar 2009 19:22:23 +0000 Subject: [issue5233] Enhance 2.7 IDLE to exec IDLESTARTUP/PYTHONSTARTUP on restart In-Reply-To: <1234478082.8.0.463106292983.issue5233@psf.upfronthosting.co.za> Message-ID: <1236626543.88.0.433605826633.issue5233@psf.upfronthosting.co.za> Guilherme Polo added the comment: Assigning to kbk since 5234 was assigned to him. ---------- assignee: -> kbk message_count: 2.0 -> 3.0 nosy: +gpolo, kbk nosy_count: 1.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 20:22:43 2009 From: report at bugs.python.org (David Ripton) Date: Mon, 09 Mar 2009 19:22:43 +0000 Subject: [issue5461] python3 symlink In-Reply-To: <1236626563.57.0.797071883805.issue5461@psf.upfronthosting.co.za> Message-ID: <1236626563.57.0.797071883805.issue5461@psf.upfronthosting.co.za> New submission from David Ripton : When Python 2.x is manually installed on Linux, a python2 symlink is created, like this: lrwxrwxrwx 1 root root 9 Jan 24 00:03 /usr/bin/python2 -> python2.6 ("make install" updates the symlink; "make altinstall" does not). When Python 3.x is installed, no python3 symlink is created. For Python 2.x, one had a choice of #!/usr/bin/python, #!/usr/bin/python2, or #!/usr/bin/python2.6 for shebang line. For Python 3.x, the middle choice is lost. This seems like a small regression. ---------- components: Installation message_count: 1.0 messages: 83400 nosy: dripton nosy_count: 1.0 severity: normal status: open title: python3 symlink type: feature request versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 21:13:01 2009 From: report at bugs.python.org (=?utf-8?q?Per_=C3=98yvind_Karlsen?=) Date: Mon, 09 Mar 2009 20:13:01 +0000 Subject: [issue5411] add xz compression support to distutils In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1236629581.24.0.931798985951.issue5411@psf.upfronthosting.co.za> Per ?yvind Karlsen added the comment: hmm, I'm unsure about how this should be done.. I guess such a test would belong in Lib/distutils/test_dist.py, but I'm uncertain about how it should be done, ie. should it be a test for doing 'bdist', 'bdist_rpm' and 'sdist' for each of the formats supported? I cannot seem to find any tests for the currently supported formats and such tests would introduce dependencies on the tools used to compress with these formats.. ---------- message_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 21:47:55 2009 From: report at bugs.python.org (Julie Earls) Date: Mon, 09 Mar 2009 20:47:55 +0000 Subject: [issue5462] Pythonwin Vista Compatibility In-Reply-To: <1236631675.9.0.0916261345881.issue5462@psf.upfronthosting.co.za> Message-ID: <1236631675.9.0.0916261345881.issue5462@psf.upfronthosting.co.za> New submission from Julie Earls : Hello- I am trying to install a version of Python that includes Pythonwin and is compatible with a 32-bit Winsows Vista computer. Can anyone tell me which version works? I have tried several and so far no luck. Thanks ---------- components: Windows message_count: 1.0 messages: 83402 nosy: jearls nosy_count: 1.0 severity: normal status: open title: Pythonwin Vista Compatibility versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 22:03:21 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Mar 2009 21:03:21 +0000 Subject: [issue5462] Pythonwin Vista Compatibility In-Reply-To: <1236631675.9.0.0916261345881.issue5462@psf.upfronthosting.co.za> Message-ID: <1236632601.63.0.295777670918.issue5462@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Please direct your question to the win32 or Python mailing lists. This tracker is for reporting bugs in Python, not support. ---------- message_count: 1.0 -> 2.0 nosy: +benjamin.peterson nosy_count: 1.0 -> 2.0 resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 22:07:07 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 09 Mar 2009 21:07:07 +0000 Subject: [issue5411] add xz compression support to distutils In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1236632827.91.0.127684423669.issue5411@psf.upfronthosting.co.za> Tarek Ziad? added the comment: > I guess such a test would belong in Lib/distutils/test_dist.py no, rather in test_bdist_rpm, test_sdist and so on, but I can do it, it'll just take more time. ---------- message_count: 3.0 -> 4.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 22:16:57 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Mar 2009 21:16:57 +0000 Subject: [issue5456] io.StringIO's universal newlines support is broken in 3.0.1 In-Reply-To: <1236567931.99.0.98085182563.issue5456@psf.upfronthosting.co.za> Message-ID: <1236633417.19.0.510467245234.issue5456@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks, fixed in r70285. ---------- message_count: 1.0 -> 2.0 nosy: +benjamin.peterson nosy_count: 1.0 -> 2.0 resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 22:17:20 2009 From: report at bugs.python.org (Andreas Schawo) Date: Mon, 09 Mar 2009 21:17:20 +0000 Subject: [issue5463] Compiler warning get_ulong is never used 3.x In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> New submission from Andreas Schawo : When compiling the newest 3.x trunk I've got a compiler warning that get_ulong is defined but never used. I moved the function near the only place where it is used (disabled code). Now I have no more warnings. I don't know if it's of any use. ---------- components: Extension Modules files: get_ulong_patch.diff keywords: patch message_count: 1.0 messages: 83406 nosy: andreas.schawo nosy_count: 1.0 severity: normal status: open title: Compiler warning get_ulong is never used 3.x type: compile error versions: Python 3.1 Added file: http://bugs.python.org/file13288/get_ulong_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 22:47:10 2009 From: report at bugs.python.org (Stephen George) Date: Mon, 09 Mar 2009 21:47:10 +0000 Subject: [issue5464] msgfmt.py does not work with plural form In-Reply-To: <1236635230.35.0.0644981096799.issue5464@psf.upfronthosting.co.za> Message-ID: <1236635230.35.0.0644981096799.issue5464@psf.upfronthosting.co.za> New submission from Stephen George : It seems that C:\Python26\Tools\i18n\msgfmt.py does not work with PO files that use plural form. Get the following error. ERROR Traceback (most recent call last): File "C:\Python26\Tools\i18n\msgfmt.py", line 203, in main() File "C:\Python26\Tools\i18n\msgfmt.py", line 199, in main make(filename, outfile) File "C:\Python26\Tools\i18n\msgfmt.py", line 151, in make l = eval(l) File "", line 1 _plural "%d generations" ^ SyntaxError: invalid syntax ---------- components: Demos and Tools files: de.po message_count: 1.0 messages: 83407 nosy: steve_geo nosy_count: 1.0 severity: normal status: open title: msgfmt.py does not work with plural form type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file13289/de.po _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 22:54:09 2009 From: report at bugs.python.org (Facundo Batista) Date: Mon, 09 Mar 2009 21:54:09 +0000 Subject: [issue5445] codecs.StreamWriter.writelines problem when passed generator In-Reply-To: <1236540676.96.0.036576866383.issue5445@psf.upfronthosting.co.za> Message-ID: <1236635649.29.0.0442140136323.issue5445@psf.upfronthosting.co.za> Facundo Batista added the comment: When fixing this, note that the builtin name "list" should not be overwritten by the argument name. ---------- message_count: 1.0 -> 2.0 nosy: +facundobatista nosy_count: 1.0 -> 2.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 23:29:08 2009 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 09 Mar 2009 22:29:08 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236637748.72.0.8415347615.issue5237@psf.upfronthosting.co.za> Nick Coghlan added the comment: Excellent feature - with this, I would actually see some hope for dropping all of my remaining uses of %-formatting at some point in the future. ---------- message_count: 17.0 -> 18.0 nosy: +ncoghlan nosy_count: 7.0 -> 8.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 23:33:53 2009 From: report at bugs.python.org (Michel Weinachter) Date: Mon, 09 Mar 2009 22:33:53 +0000 Subject: [issue5428] Pyshell history management error In-Reply-To: <1236292624.96.0.0314806770428.issue5428@psf.upfronthosting.co.za> Message-ID: <29723f450903091533n21653a54g36334b58163db49c@mail.gmail.com> Michel Weinachter added the comment: Hello, Ok, you are right I'm currently working using latex and I should have made a copy from the pdf. Sorry. 2009/3/5 Georg Brandl : > > Georg Brandl added the comment: > > The code you pasted contains a non-ASCII quote (?). > > ---------- > nosy: +georg.brandl > resolution: ?-> invalid > status: open -> pending > > _______________________________________ > Python tracker > > _______________________________________ > ---------- message_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 9 23:58:33 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 09 Mar 2009 22:58:33 +0000 Subject: [issue5457] ZipFile writes incorrect modification time (second is off-by-one) In-Reply-To: <1236591512.01.0.852258757862.issue5457@psf.upfronthosting.co.za> Message-ID: <1236639513.4.0.74283605132.issue5457@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 00:09:56 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 09 Mar 2009 23:09:56 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1236611755.37.0.12931687253.issue2636@psf.upfronthosting.co.za> Message-ID: <49B5A1C0.8040707@v.loewis.de> Martin v. L?wis added the comment: > I've been far too busy in the new year to keep up with all your updates > to this issue, but since Martin wanted some clarification on direction > and copyright, Thanks for the clarification. So I think we should focus on Matthew's patches first, and come back to yours when you have time to contribute them. ---------- message_count: 68.0 -> 69.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 00:21:27 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 09 Mar 2009 23:21:27 +0000 Subject: [issue5464] msgfmt.py does not work with plural form In-Reply-To: <1236635230.35.0.0644981096799.issue5464@psf.upfronthosting.co.za> Message-ID: <1236640887.66.0.809031060399.issue5464@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- assignee: -> loewis nosy: +loewis nosy_count: 1.0 -> 2.0 priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 01:37:53 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Mar 2009 00:37:53 +0000 Subject: [issue5460] Python 3.0 grammar is ambiguous with the addition of star_expr In-Reply-To: <1236625214.13.0.530481898617.issue5460@psf.upfronthosting.co.za> Message-ID: <1236645473.91.0.542430214874.issue5460@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 03:44:39 2009 From: report at bugs.python.org (Eddie Slimak) Date: Tue, 10 Mar 2009 02:44:39 +0000 Subject: [issue5465] No edit in IDLE in right click context menu In-Reply-To: <1236653078.99.0.544160626901.issue5465@psf.upfronthosting.co.za> Message-ID: <1236653078.99.0.544160626901.issue5465@psf.upfronthosting.co.za> New submission from Eddie Slimak : I was mucking around attempting to get WConio working and so had an installation for both python 2.5 and 2.6 at the same time. After I uninstalled python 2.5 windows somehow stopped associating .py files with python. ---------- components: IDLE, Windows message_count: 1.0 messages: 83412 nosy: ESlim nosy_count: 1.0 severity: normal status: open title: No edit in IDLE in right click context menu versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 03:47:17 2009 From: report at bugs.python.org (Eddie Slimak) Date: Tue, 10 Mar 2009 02:47:17 +0000 Subject: [issue5465] No edit in IDLE in right click context menu In-Reply-To: <1236653078.99.0.544160626901.issue5465@psf.upfronthosting.co.za> Message-ID: <1236653237.01.0.284886258501.issue5465@psf.upfronthosting.co.za> Changes by Eddie Slimak : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 03:49:42 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Tue, 10 Mar 2009 02:49:42 +0000 Subject: [issue2706] datetime: define division timedelta/timedelta In-Reply-To: <1209330247.56.0.71148380164.issue2706@psf.upfronthosting.co.za> Message-ID: <1236653382.22.0.55127291915.issue2706@psf.upfronthosting.co.za> Changes by Tennessee Leeuwenburg : ---------- nosy: +tleeuwenburg at gmail.com nosy_count: 6.0 -> 7.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 06:32:58 2009 From: report at bugs.python.org (Mike Meyer) Date: Tue, 10 Mar 2009 05:32:58 +0000 Subject: [issue5370] unpickling vs. __getattr__ In-Reply-To: <1235597176.48.0.557535954175.issue5370@psf.upfronthosting.co.za> Message-ID: <1236663178.64.0.205833274456.issue5370@psf.upfronthosting.co.za> Mike Meyer added the comment: I don't believe in documenting bugs instead of fixing them. If this bug is going to stay in the code, I can either fix my install of Python to have non-broken Pickle modules, or I can fix every third-party libraries objects I use whose authors didn't worry about pickling them enough to find this. The fornmer is almost certainly easier, given a little time. Probably even easier than agreeing on proper document wording. The __init__ case is different - there isn't a common use case (this one comes from the standard library) for __init__ that breaks pickling, and the problems tend to manifest in the resulting pickles, not in the unpickling process. ---------- message_count: 4.0 -> 5.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 06:36:58 2009 From: report at bugs.python.org (Senthil) Date: Tue, 10 Mar 2009 05:36:58 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1236637748.72.0.8415347615.issue5237@psf.upfronthosting.co.za> Message-ID: <7c42eba10903092236o4a568df7y69a6b2fa79006392@mail.gmail.com> Senthil added the comment: Would someone like to point the python-ideas discussion which rationalizes this request? And what would be written in the documentation? As much as I understand this, emptry braces {} for replacement fields is kind of unseen and leaves much thinking if this can be simplified, just as % or # or any other character instead of a opening { and closing }. ---------- message_count: 18.0 -> 19.0 nosy: +orsenthil nosy_count: 8.0 -> 9.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 06:58:30 2009 From: report at bugs.python.org (Mike Meyer) Date: Tue, 10 Mar 2009 05:58:30 +0000 Subject: [issue5370] unpickling vs. __getattr__ In-Reply-To: <1235597176.48.0.557535954175.issue5370@psf.upfronthosting.co.za> Message-ID: <1236664710.94.0.533905564005.issue5370@psf.upfronthosting.co.za> Mike Meyer added the comment: QAD patch for 2.6 pickle.py to fix this bug. Passes the 2.6 pickle unit tests. ---------- message_count: 5.0 -> 6.0 Added file: http://bugs.python.org/file13290/pp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 07:03:31 2009 From: report at bugs.python.org (Fredrik Johansson) Date: Tue, 10 Mar 2009 06:03:31 +0000 Subject: [issue2706] datetime: define division timedelta/timedelta In-Reply-To: <1209330247.56.0.71148380164.issue2706@psf.upfronthosting.co.za> Message-ID: <1236665011.12.0.558633510233.issue2706@psf.upfronthosting.co.za> Fredrik Johansson added the comment: I think datetime division would be a fine application for Fractions. ---------- message_count: 18.0 -> 19.0 nosy: +fredrikj nosy_count: 7.0 -> 8.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 07:53:01 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Mar 2009 06:53:01 +0000 Subject: [issue5465] No edit in IDLE in right click context menu In-Reply-To: <1236653078.99.0.544160626901.issue5465@psf.upfronthosting.co.za> Message-ID: <1236667981.35.0.0627441831068.issue5465@psf.upfronthosting.co.za> Martin v. L?wis added the comment: That's not a bug. When you installed 2.5, you had defined that files are associated with 2.5. When you uninstalled 2.5, those associations were removed. In "Add and Remove Programs", find 2.6, and run a "Repair" installation to get the files associated with 2.6. ---------- message_count: 1.0 -> 2.0 nosy: +loewis nosy_count: 1.0 -> 2.0 resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 08:14:26 2009 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 10 Mar 2009 07:14:26 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236669266.22.0.113527851393.issue5237@psf.upfronthosting.co.za> Ezio Melotti added the comment: http://mail.python.org/pipermail/python-ideas/2009-February/002873.html ---------- message_count: 19.0 -> 20.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 08:33:37 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 10 Mar 2009 07:33:37 +0000 Subject: [issue5445] codecs.StreamWriter.writelines problem when passed generator In-Reply-To: <1236540676.96.0.036576866383.issue5445@psf.upfronthosting.co.za> Message-ID: <1236670417.08.0.916754828364.issue5445@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: For the common case where list is in fact a sequence of strings, the used implementation is a lot faster and more efficient than the one you propose. Note that the method doesn't pretend to support generators for the list argument, so adding support for iterators would be a feature request, not a bug report. Furthermore, the StreamWriter method can easily be overridden by the codec's own implementation (the version in codecs.py is the base method defining the interface and providing a default implementation), so adding support to the base method will not necessarily mean that all codecs then support iterators as parameter to .writelines(). IMHO, it's better to use the .write() method in a for-loop of your application if you want to support iterators that generate a lot of output. ---------- message_count: 2.0 -> 3.0 nosy: +lemburg nosy_count: 2.0 -> 3.0 type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 08:46:50 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Mar 2009 07:46:50 +0000 Subject: [issue5463] Compiler warning get_ulong is never used 3.x In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1236671210.12.0.14221598148.issue5463@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the patch! Certainly it's desirable to get rid of this warning, especially as in this case the warning indicates a genuine problem: namely that there's unused code floating around. I think it would not be unreasonable to simply remove the code that's #ifdef'd away. It was there for backwards compatibility, and should no longer be needed in 3.0 and 3.1. ---------- message_count: 1.0 -> 2.0 nosy: +marketdickinson nosy_count: 1.0 -> 2.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 10:03:54 2009 From: report at bugs.python.org (Jervis Whitley) Date: Tue, 10 Mar 2009 09:03:54 +0000 Subject: [issue4540] typo in a module describes utf-8 as uft-8 In-Reply-To: <1228433923.53.0.179522089961.issue4540@psf.upfronthosting.co.za> Message-ID: <1236675834.21.0.754591355862.issue4540@psf.upfronthosting.co.za> Jervis Whitley added the comment: I can still reproduce on py3 >>> help("modules anything") Traceback (most recent call last): ... This patch works (on Py3.1a1). Amaury, are you still o.k with catching Exception rather than just (SyntaxError, UnicodeDecodeError, ImportError)? The code-refactoring does clean the structure up well. Cheers, Jervis ---------- message_count: 9.0 -> 10.0 nosy: +jdwhitley nosy_count: 3.0 -> 4.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 10:13:58 2009 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 10 Mar 2009 09:13:58 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236676438.64.0.177887048868.issue5237@psf.upfronthosting.co.za> Nick Coghlan added the comment: Terry covered how to document the feature in his original description of the proposal. After the phrase "either the numeric index of a positional argument, or the name of a keyword argument." in the docs, add a sentence along the lines of the following: "If the index/name is left out for all replacement fields, then the sequential values 0, 1, ... will be automatically inserted." ---------- message_count: 20.0 -> 21.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 10:34:22 2009 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 10 Mar 2009 09:34:22 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236677662.55.0.235079435171.issue5237@psf.upfronthosting.co.za> Nick Coghlan added the comment: It may also be worth explicitly stating the following in the docs: "Note that automatically numbered and explcitly namged/numbered replacement fields cannot be mixed in a single format string". (This could probably be relegated to a footnote). This proposal is also significantly better defined than the rather bizarre behaviour seen in the equivalent situation with %-formatting: >>> "%s %(name)s" % dict(name="Hmm") "{'name': 'Hmm'} Hmm" >>> "%s %(name)s %s" % dict(name="Hmm") Traceback (most recent call last): File "", line 1, in TypeError: not enough arguments for format string >>> "%s %(name)s %s" % (dict(name="Hmm"), "dodgy") Traceback (most recent call last): File "", line 1, in TypeError: format requires a mapping ---------- message_count: 21.0 -> 22.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 11:42:57 2009 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 10 Mar 2009 10:42:57 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1236681777.82.0.389073201039.issue4847@psf.upfronthosting.co.za> Skip Montanaro added the comment: This issue seems to have simply been overlooked when 3.0 was released. It should be fixed in the next round of 3.0 and 3.1 updates. Any feeback on the idea that the csv.reader constructor (and probably the DictReader and proposed NamedTupleReader constructors) should take an optional encoding argument? In fact, the writers should as well which would inform the writer how to encode the output when writing. ---------- message_count: 21.0 -> 22.0 priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 12:21:59 2009 From: report at bugs.python.org (Tim Lesher) Date: Tue, 10 Mar 2009 11:21:59 +0000 Subject: [issue4510] ValueError for list.remove() not very helpful In-Reply-To: <1228347518.63.0.0108612017272.issue4510@psf.upfronthosting.co.za> Message-ID: <1236684119.6.0.0084974508602.issue4510@psf.upfronthosting.co.za> Changes by Tim Lesher : ---------- nosy: +tlesher nosy_count: 2.0 -> 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 12:43:35 2009 From: report at bugs.python.org (Lorenz Quack) Date: Tue, 10 Mar 2009 11:43:35 +0000 Subject: [issue5443] trivial typo in itertools documentation In-Reply-To: <1236531469.71.0.843632021292.issue5443@psf.upfronthosting.co.za> Message-ID: <1236685415.82.0.637745777673.issue5443@psf.upfronthosting.co.za> Lorenz Quack added the comment: Thanks for fixing. But I'm afraid you missed the second typo in this Bug. It's the same thing one line beneath the one you fixed. next time I'll attach a patch. I promise. ---------- message_count: 2.0 -> 3.0 status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 12:51:05 2009 From: report at bugs.python.org (Lorenz Quack) Date: Tue, 10 Mar 2009 11:51:05 +0000 Subject: [issue5443] trivial typo in itertools documentation In-Reply-To: <1236531469.71.0.843632021292.issue5443@psf.upfronthosting.co.za> Message-ID: <1236685865.43.0.14776369548.issue5443@psf.upfronthosting.co.za> Lorenz Quack added the comment: FWIW here is the patch. It is against r70267 of the trunk ---------- keywords: +patch message_count: 3.0 -> 4.0 Added file: http://bugs.python.org/file13291/itertools.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 13:00:48 2009 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Tue, 10 Mar 2009 12:00:48 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1236686448.88.0.877135098691.issue2636@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: Okay, as I said, Atomic Grouping, etc., off a recent 2.6 is already available and I can do any cleanups requested to those already mentioned, I just don't want to start any new items at the moment. As it is, we are still over a year from any of this seeing the light of day as it's not going to be merged until we start 2.7 / 3.1 alpha. Fortunately, I think Matthew here DOES have a lot of potential to have everything wrapped up by then, but I think to summarize everyone's concern, we really would like to be able to examine each change incrementally, rather than as a whole. So, for the purposes of this, I would recommend that you, Matthew, make a version of your new engine WITHOUT any Atomic Group, variable length look behind / ahead assertions, reverse string scanning, positional, negated or scoped inline flags, group key indexing or any other feature described in the various issues, and that we then evaluate purely on the merits of the engine itself whether it is worth moving to that engine, and having made that decision officially move all work to that design if warranted. Personally, I'd like to see that 'pure' engine for myself and maybe we can all develop an appropriate benchmark suite to test it fairly against the existing engine. I also think we should consider things like presentation (are all lines terminated by column 80), number of comments, and general readability. IMHO, the current code is conformant in the line length, but VERY deficient WRT comments and readability, the later of which it sacrifices for speed (as well as being retrofitted for iteration rather than recursion). I'm no fan of switch-case, but I found that by turning the various case statements into bite-sized functions and adding many, MANY comments, the code became MUCH more readable at the minor cost of speed. As I think speed trumps readability (though not blindly), I abandoned my work on the engines, but do feel that if we are going to keep the old engine, I should try and adapt my comments to the old framework to make the current code a bit easier to understand since the framework is more or less the same code as in the existing engine, just re-arranged. I think all of the things you've added to your engine, Matthew, can, with varying levels of difficulty be implemented in the existing Regexp Engine, though I'm not suggesting that we start that effort. Simply, let's evaluate fairly whether your engine is worth the switch over. Personally, I think the engine has some potential -- though not much better than current WRT readability -- but we've only heard anecdotal evidence of it's superior speed. Even if the engine isn't faster, developing speed benchmarks that fairly gage any potential new engine would be handy for the next person to have a great idea for a rewrite, so perhaps while you peruse the stripped down version of your engine, the rest of us can work on modifying regex_tests.py, test_re.py and re_tests.py in Lib/test specifically for the purpose of benchmarking. If we can focus on just these two issues ('pure' engine and fair benchmarks) I think I can devote some time to the later as I've dealt a lot with benchmarking (WRT the compiler-cache) and test cases and hope to be a bit more active here. ---------- message_count: 69.0 -> 70.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 13:08:09 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Mar 2009 12:08:09 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1236686448.88.0.877135098691.issue2636@psf.upfronthosting.co.za> Message-ID: <1236686949.6770.2.camel@fsol> Antoine Pitrou added the comment: > Okay, as I said, Atomic Grouping, etc., off a recent 2.6 is already > available and I can do any cleanups requested to those already > mentioned, I just don't want to start any new items at the moment. As > it is, we are still over a year from any of this seeing the light of day > as it's not going to be merged until we start 2.7 / 3.1 alpha. 3.1 will actually be released, if all goes well, before July of this year. The first alpha was released a couple of days ago. The goal is to fix most deficiencies of the 3.0 release. See http://www.python.org/dev/peps/pep-0375/ for the planned release schedule. ---------- message_count: 70.0 -> 71.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 13:14:24 2009 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Tue, 10 Mar 2009 12:14:24 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1236687264.1.0.346194752012.issue2636@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: Thanks, Antione! Then I think for the most part any changes to Regexp will have to wait for 3.2 / 2.7. ---------- message_count: 71.0 -> 72.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 13:17:41 2009 From: report at bugs.python.org (Andrew Gregory) Date: Tue, 10 Mar 2009 12:17:41 +0000 Subject: [issue5466] Tix.Balloon causes TCLError: unknown color name "{#ffff60}" in Python 2.6.1 In-Reply-To: <1236687460.92.0.36885933672.issue5466@psf.upfronthosting.co.za> Message-ID: <1236687460.92.0.36885933672.issue5466@psf.upfronthosting.co.za> New submission from Andrew Gregory : All programs using Tix.Balloon in Python 2.6.1 (Windows XP) crash when a Tix.Balloon object is created. The Balloon.py Tix demo is supplied as an example. Andrew. ---------- components: Tkinter files: Balloon.py message_count: 1.0 messages: 83430 nosy: andrewp22 nosy_count: 1.0 severity: normal status: open title: Tix.Balloon causes TCLError: unknown color name "{#ffff60}" in Python 2.6.1 type: crash versions: Python 2.6 Added file: http://bugs.python.org/file13292/Balloon.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 13:53:38 2009 From: report at bugs.python.org (dariusp) Date: Tue, 10 Mar 2009 12:53:38 +0000 Subject: [issue4540] typo in a module describes utf-8 as uft-8 In-Reply-To: <1228433923.53.0.179522089961.issue4540@psf.upfronthosting.co.za> Message-ID: <1236689618.51.0.333728623731.issue4540@psf.upfronthosting.co.za> dariusp added the comment: This appears to be the same issue as described in 5453 in which I supplied a patch for release30-maint and py3k branches. It's probably useful to address both issue 4540 & 5453 at the same time. I would have added to this issue, but I didn't see it when I raised 5453. On a side note, the line importer.find_module(modname) in pydoc.py line 1925 appears that it may return None. If this is the case then the None return value should be handled. ---------- message_count: 10.0 -> 11.0 nosy: +dariusp nosy_count: 4.0 -> 5.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 15:05:54 2009 From: report at bugs.python.org (Nigel Galloway) Date: Tue, 10 Mar 2009 14:05:54 +0000 Subject: [issue5431] cmpfunc in Python 3.0.1 windows installer In-Reply-To: <1236345754.09.0.226629136415.issue5431@psf.upfronthosting.co.za> Message-ID: <1236693954.68.0.514764206814.issue5431@psf.upfronthosting.co.za> Nigel Galloway added the comment: Not quite an answer to the question. I have built this wrapper with the change to Python indicated. It seems to work. It does not complain about unresolved references. Is this satisfactory for 3.0.1, with perhaps a change to SWIG from 3.1. Or must I obtain Python 3.0 and start again? ---------- message_count: 4.0 -> 5.0 status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 15:11:55 2009 From: report at bugs.python.org (Tim Golden) Date: Tue, 10 Mar 2009 14:11:55 +0000 Subject: [issue5467] tools\msi\merge.py is sensitive to lack of config.py In-Reply-To: <1236694315.39.0.154575641767.issue5467@psf.upfronthosting.co.za> Message-ID: <1236694315.39.0.154575641767.issue5467@psf.upfronthosting.co.za> New submission from Tim Golden : tools\msi\merge.py attempts to import config and fails with an ImportError if it doesn't exist (which it doesn't by default). msi.py catches this exception and ignores it. The attached patch carries the same behaviour over to merge.py ---------- components: Installation files: merge.patch keywords: patch message_count: 1.0 messages: 83433 nosy: tim.golden nosy_count: 1.0 severity: normal status: open title: tools\msi\merge.py is sensitive to lack of config.py versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13293/merge.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 15:45:17 2009 From: report at bugs.python.org (Dan Mahn) Date: Tue, 10 Mar 2009 14:45:17 +0000 Subject: [issue5468] urlencode does not handle "bytes", and could easily handle alternate encodings In-Reply-To: <1236696316.6.0.478633045289.issue5468@psf.upfronthosting.co.za> Message-ID: <1236696316.6.0.478633045289.issue5468@psf.upfronthosting.co.za> New submission from Dan Mahn : urllib.parse.urlencode() uses quote_plus() extensively to create a complete query string, but doesn't effectively/properly take advantage of the flexibility built into quote_plus(). Namely: 1) Instances of type "bytes" are not properly encoded, as str() is used prior to passing to quote_plus(). This creates a nonsensical string such as b'1234', while quote_plus() can handle these types properly if passed intact. The ability to encode this type is particularly useful for putting binary data into the query string, or for pre-encoded text which you may want to encode in a non-standard character encoding. 2) Sometimes it would be desirable to encode query strings entirely in "latin-1" or possibly "ascii" instead of "utf-8". Adding the extra parameters now present on quote_plus() can easily give that extra functionality. I have attached a new version of urlencode() that provides both of the above fixes/enhancements. Additionally, an unused codepath in the existing function has been eliminated/cleaned up. Some doctests are included as well. ---------- components: Library (Lib) files: new_urlencode.py message_count: 1.0 messages: 83434 nosy: dmahn nosy_count: 1.0 severity: normal status: open title: urlencode does not handle "bytes", and could easily handle alternate encodings type: behavior versions: Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13294/new_urlencode.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 15:48:52 2009 From: report at bugs.python.org (Daniel Lescohier) Date: Tue, 10 Mar 2009 14:48:52 +0000 Subject: [issue5445] codecs.StreamWriter.writelines problem when passed generator In-Reply-To: <1236540676.96.0.036576866383.issue5445@psf.upfronthosting.co.za> Message-ID: <1236696532.96.0.90491164511.issue5445@psf.upfronthosting.co.za> Daniel Lescohier added the comment: In Python's file protocol, readlines and writelines is a protocol for iterating over a file. In Python's file protocol, if one doesn't want to iterate over the file, one calls read() with no argument in order to read the whole file in, or one calls write() with the complete contents you want to write. If writelines is using join, then if one passes an iterator as the parameter to writelines, it will not iteratively write to the file, it will accumulate everything in memory until the iterator raises StopIteration, and then write to the file. So, if one is tailing the output file, one is not going to see anything in the file until the end, instead of iteratively seeing content. So, it's breaking the promise of the file protocol's writelines meaning iteratively write. I think following the protocol is more important than performance. If the application is having performance problems, it's up to the application to buffer the data in memory and make a single write call. However, here is an alternative implementation that is slightly more complicated, but possibly has better performance for the passed-a-list case. It covers three cases: 1. Passed an empty sequence; do not call self.write at all. 2. Passed a sequence with a length. That implies that all the data is available immediately, so one can concantenate and write with one self.write call. 3. Passed a sequence with no length. That implies that all the data is not available immediately, so iteratively write it. def writelines(self, sequence): """ Writes the sequence of strings to the stream using .write(). """ try: sequence_len = len(sequence) except TypeError: write = self.write for value in sequence: write(value) return if sequence_len: self.write(''.join(sequence)) I'm not sure which is better. But one last point is that Python is moving more in the direction of using iterators; e.g., in Py3K, replacing dict's keys, values, and items with the implementation of iterkeys, itervalues, and iteritems. ---------- message_count: 3.0 -> 4.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 16:36:41 2009 From: report at bugs.python.org (Daniel Lescohier) Date: Tue, 10 Mar 2009 15:36:41 +0000 Subject: [issue5445] codecs.StreamWriter.writelines problem when passed generator In-Reply-To: <1236540676.96.0.036576866383.issue5445@psf.upfronthosting.co.za> Message-ID: <1236699401.94.0.646854639239.issue5445@psf.upfronthosting.co.za> Daniel Lescohier added the comment: Let me give an example of why it's important that writelines iteratively writes. For: rows = (line[:-1].split('\t') for line in in_file) projected = (keep_fields(row, 0, 3, 7) for row in rows) filtered = (row for row in projected if row[2]=='1') out_file.writelines('\t'.join(row)+'\n' for row in filtered) For a large input file, for a regular out_file object, this will work. For a codecs.StreamWriter wrapped out_file object, this won't work, because it's not following the file protocol that writelines should iteratively write. ---------- message_count: 4.0 -> 5.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 16:52:56 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 10 Mar 2009 15:52:56 +0000 Subject: [issue5445] codecs.StreamWriter.writelines problem when passed generator In-Reply-To: <1236699401.94.0.646854639239.issue5445@psf.upfronthosting.co.za> Message-ID: <49B68CD4.6040101@egenix.com> Marc-Andre Lemburg added the comment: On 2009-03-10 16:36, Daniel Lescohier wrote: > Daniel Lescohier added the comment: > > Let me give an example of why it's important that writelines > iteratively writes. For: > > rows = (line[:-1].split('\t') for line in in_file) > projected = (keep_fields(row, 0, 3, 7) for row in rows) > filtered = (row for row in projected if row[2]=='1') > out_file.writelines('\t'.join(row)+'\n' for row in filtered) > > For a large input file, for a regular out_file object, this will work. > For a codecs.StreamWriter wrapped out_file object, this won't work, > because it's not following the file protocol that writelines should > iteratively write. Of course, it's possible to have a generator producing lots of data, but that does not warrant making most uses of that method slow. If you'd like to see such support in .writelines(), please provide an implementation that follows the approach of the file object implementation in Python 2.x: it writes the lines in chunks of 1000 lines each, if it finds that the input object is not a sequence (actually, it's stricter than that for some: it requires a Python list). The standard case of passing a list of strings to that method should not get slower because of this. BTW: I am not aware of any .writelines() file protocol. If there were such a protocol, .readlines() would also have to return an iterator (which it doesn't). The idea behind .writelines() is to be able to write back a list generated with .readlines(). Thanks, -- Marc-Andre Lemburg eGenix.com ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- message_count: 5.0 -> 6.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 17:22:16 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Mar 2009 16:22:16 +0000 Subject: [issue2771] test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <0016e643486a23bf870464c6277b@google.com> Daniel Diniz added the comment: Reviewers: , Description: From http://bugs.python.org/issue2771 Testing 1..2..3 Description fetched from: http://bugs.python.org/msg82496 Please review this at http://codereview.appspot.com/22062 Affected files: M static/upload.py ---------- message_count: 8.0 -> 9.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 17:59:50 2009 From: report at bugs.python.org (Mitchell Model) Date: Tue, 10 Mar 2009 16:59:50 +0000 Subject: [issue5469] Reference paragraph about the constructs that bind names needs updating for Python 3 In-Reply-To: <1236704390.32.0.698658997265.issue5469@psf.upfronthosting.co.za> Message-ID: <1236704390.32.0.698658997265.issue5469@psf.upfronthosting.co.za> New submission from Mitchell Model : In the Python Language Reference, in the Naming and binding section of Execution Model, there is a paragraph that states: The following constructs bind names: formal parameters to functions, import statements, class and function definitions (these bind the class or function name in the defining block), and targets that are identifiers if occurring in an assignment, for loop header, or in the second position of an except clause header. The import statement of the form ?from ...import *? binds all names defined in the imported module, except those beginning with an underscore. This form may only be used at the module level. This misdescribes the except clause, which now uses "as", and omits the "with ... as" construct which also binds names. ---------- assignee: georg.brandl components: Documentation message_count: 1.0 messages: 83439 nosy: MLModel, georg.brandl nosy_count: 2.0 severity: normal status: open title: Reference paragraph about the constructs that bind names needs updating for Python 3 versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 18:05:13 2009 From: report at bugs.python.org (Tim Golden) Date: Tue, 10 Mar 2009 17:05:13 +0000 Subject: [issue5470] MSI installer misses zipdir.zip file in Lib\test In-Reply-To: <1236704713.71.0.795823631214.issue5470@psf.upfronthosting.co.za> Message-ID: <1236704713.71.0.795823631214.issue5470@psf.upfronthosting.co.za> New submission from Tim Golden : The msi.py determines which files to carry over into the installer for the lib\test directory. zipdir.zip was added recently for test_zipfile and this isn't picked up. The attached patch adds it in. ---------- components: Installation files: msi-zipdir.patch keywords: patch message_count: 1.0 messages: 83440 nosy: tim.golden nosy_count: 1.0 severity: normal status: open title: MSI installer misses zipdir.zip file in Lib\test versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13295/msi-zipdir.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 18:17:46 2009 From: report at bugs.python.org (jan matejek) Date: Tue, 10 Mar 2009 17:17:46 +0000 Subject: [issue891930] configure argument --libdir is ignored Message-ID: <1236705466.31.0.180439903444.issue891930@psf.upfronthosting.co.za> Changes by jan matejek : ---------- nosy: +matejcik nosy_count: 3.0 -> 4.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 18:18:04 2009 From: report at bugs.python.org (jan matejek) Date: Tue, 10 Mar 2009 17:18:04 +0000 Subject: [issue1019715] distutils ignores configure's --includedir Message-ID: <1236705484.95.0.00581534297494.issue1019715@psf.upfronthosting.co.za> Changes by jan matejek : ---------- nosy: +matejcik nosy_count: 3.0 -> 4.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 18:36:03 2009 From: report at bugs.python.org (Daniel Lescohier) Date: Tue, 10 Mar 2009 17:36:03 +0000 Subject: [issue5445] codecs.StreamWriter.writelines problem when passed generator In-Reply-To: <1236540676.96.0.036576866383.issue5445@psf.upfronthosting.co.za> Message-ID: <1236706563.47.0.656290158457.issue5445@psf.upfronthosting.co.za> Daniel Lescohier added the comment: OK, I think I see where I went wrong in my perceptions of the file protocol. I thought that readlines() returned an iterator, not a list, but I see in the library reference manual on File Objects that it returns a list. I think I got confused because there is no equivalent of __iter__ for writing to streams. For input, I'm always using 'for line in file_object' (in other words, file_object.__iter__), so I had assumed that writelines was the mirror image of that, because I never use the readlines method. Then, in my mind, readlines became the mirror image of writelines, which I had assumed took an iterator, so I assumed that readlines returned an iterator. I wonder if this perception problem is common or not. So, the StreamWriter interface matches the file protocol; readlines() and writelines() deal with lists. There shouldn't be any change to it, because it follows the protocol. Then, the example I wrote would be instead: rows = (line[:-1].split('\t') for line in in_file) projected = (keep_fields(row, 0, 3, 7) for row in rows) filtered = (row for row in projected if row[2]=='1') formatted = (u'\t'.join(row)+'\n' for row in filtered) write = out_file.write for line in formatted: write(line) I think it's correct that the file object write C code only does 1000-line chunks for sequences that have a defined length: if it has a defined length, then that implies that the data exists now, and can be concatenated and written now. Something without a defined length may be a generator with items arriving later. ---------- message_count: 6.0 -> 7.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 18:49:41 2009 From: report at bugs.python.org (Brad Miller) Date: Tue, 10 Mar 2009 17:49:41 +0000 Subject: [issue5276] IDLE startup file .Idle.py not documented In-Reply-To: <1234741317.8.0.0064983097243.issue5276@psf.upfronthosting.co.za> Message-ID: <1236707381.01.0.0669481396686.issue5276@psf.upfronthosting.co.za> Brad Miller added the comment: Here's a simple patch that documents the different startup files. It is missing a good use case for .Idle.py but I'd be happy to add that if someone can give me one. ---------- keywords: +patch message_count: 1.0 -> 2.0 nosy: +bmiller nosy_count: 2.0 -> 3.0 Added file: http://bugs.python.org/file13296/idlestartdoc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 19:00:06 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 10 Mar 2009 18:00:06 +0000 Subject: [issue5466] Tix.Balloon causes TCLError: unknown color name "{#ffff60}" in Python 2.6.1 In-Reply-To: <1236687460.92.0.36885933672.issue5466@psf.upfronthosting.co.za> Message-ID: <1236708006.49.0.219142754716.issue5466@psf.upfronthosting.co.za> Guilherme Polo added the comment: Unfortunately this is a tix issue, so we can't fix it from python. See http://sourceforge.net/tracker/index.php?func=detail&aid=1864027&group_id=5649&atid=105649 Leaving this open as a reminder to incldue a newer tix in the next releases. ---------- message_count: 1.0 -> 2.0 nosy: +gpolo nosy_count: 1.0 -> 2.0 versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 20:13:31 2009 From: report at bugs.python.org (Brad Miller) Date: Tue, 10 Mar 2009 19:13:31 +0000 Subject: [issue2610] string representation of range and dictionary views In-Reply-To: <1207858708.98.0.537185652213.issue2610@psf.upfronthosting.co.za> Message-ID: <1236712411.25.0.872775464312.issue2610@psf.upfronthosting.co.za> Brad Miller added the comment: Just to restart the discussion on the original issue since I see that the latest 3.1 has solved the problem with dict_keys, dict_values, etc al objects. Many thanks! A suggestion was made by Alexander to create a custom displayhook that could be included in the standard library. From the research I've done it looks like a solution for range would be something like the following: import sys def eduhook(o): if o is None: return if isinstance(o,range): print(list(o)) else: print(repr(o)) sys.displayhook = eduhook Now if 5233/5234 were approved I could tell my students to setup an environment variable PYTHONSTARTUP that points to a file that imports a module containing the above code. (or I could just tell them to import said module each time.) The above hook appears to work fine. Is there anything obvious I'm missing? If this is along the right track then I could extend it to support other custom display ideas that my fellow educators have in mind. Thanks, Brad ---------- message_count: 30.0 -> 31.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 20:16:15 2009 From: report at bugs.python.org (pancake) Date: Tue, 10 Mar 2009 19:16:15 +0000 Subject: [issue5471] os.path.expanduser('~') doesnt works correctly when HOME is '/' In-Reply-To: <1236712575.55.0.379860744016.issue5471@psf.upfronthosting.co.za> Message-ID: <1236712575.55.0.379860744016.issue5471@psf.upfronthosting.co.za> New submission from pancake : When the HOME path is just '/' python says that the home path is "" (zero length string) I was able to reproduce this issue in 2.5.2 and 2.6 (no idea about 3.0) Here's an example: $ HOME=/ python -c 'import os;print os.path.expanduser("~")' $ HOME=/tmp python -c 'import os;print os.path.expanduser("~")' /tmp $ HOME=a python -c 'import os;print os.path.expanduser("~")' a ------8<---------- I just used "if !os.path.isdir(os.path.expanduser('~')):" check in my application to avoid messing around the resulting paths when the application runs. The correct response should be '/' instead of ''. ---------- components: None message_count: 1.0 messages: 83445 nosy: pancake nosy_count: 1.0 severity: normal status: open title: os.path.expanduser('~') doesnt works correctly when HOME is '/' type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 20:30:20 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 10 Mar 2009 19:30:20 +0000 Subject: [issue5471] os.path.expanduser('~') doesnt works correctly when HOME is '/' In-Reply-To: <1236712575.55.0.379860744016.issue5471@psf.upfronthosting.co.za> Message-ID: <1236713420.61.0.480900626102.issue5471@psf.upfronthosting.co.za> Guilherme Polo added the comment: Patch with a test attached. ---------- keywords: +patch message_count: 1.0 -> 2.0 nosy: +gpolo nosy_count: 1.0 -> 2.0 versions: +Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13297/issue_5471.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 22:15:57 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Tue, 10 Mar 2009 21:15:57 +0000 Subject: [issue2706] datetime: define division timedelta/timedelta In-Reply-To: <1209330247.56.0.71148380164.issue2706@psf.upfronthosting.co.za> Message-ID: <1236719757.32.0.275185773952.issue2706@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: Hi all, I'm trying to help out by reviewing issues in the tracker... so this is just a first attempt and I hope it is somewhat useful. This issue covers a number of discrete functional changes. I here review each in turn: 1) Allow truediv, the operator '/', to be applied to two timedeltas (e.g. td1 / td2). The return value is a float representing the number of times that td2 goes into td1. Evaluation: Since both time deltas are quantitative values of the same unit, it makes sense they should be able to support basic math operations. In this case, operation to be added is '/' or truediv. I would personally find this functionality useful, and believe it is a natural addition to the code. Recommendation: That this functionality be recommended for development 2) Allow truediv to be applied to a timedelta and an int or float. The return value is a timedelta representing the fractional proportion of the original timedelta. Evaluation: This makes total sense. Recommendation: That this functionality be recommended for development 2) Allow divmod, the operator '%', to be applied to two timedeltas (e.g. td1 % td2). I think there is some debate here about whether the return value be an integer in microsends, or a timedelta. I personally believe that a timedelta should be returned, representing the amount of time remaining after (td1 // td2) * td2 has been subtracted. The alternative is an integer, but due to a lack of immediate clarity over what time quanta this integer represents, I would suggest returning a unit amount. There is also some discussion of returning (long, timedelta), but I personally fail to see the merits of returning the long without some unit attached. 3) Allow divmod, the operator '%', to be applied to a timedelta and an integer or float. (e.g. % 3). I'm not quite as sold on this. I suggest that more discussion is required to flesh this out further. A patch has been attached which implements some of this behaviour. I would suggest that it's valuable to start doing this work in discrete chunks so that progress can be begun before the issues under debate are resolved. I suggest that it would be appropriate to create three smaller issues, each tackling just one piece of functionality. This should make the changes more atomic and the code patch simpler. -T ---------- message_count: 19.0 -> 20.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 22:16:05 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Mar 2009 21:16:05 +0000 Subject: [issue5467] tools\msi\merge.py is sensitive to lack of config.py In-Reply-To: <1236694315.39.0.154575641767.issue5467@psf.upfronthosting.co.za> Message-ID: <1236719765.75.0.619154085844.issue5467@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- assignee: -> loewis nosy: +loewis nosy_count: 1.0 -> 2.0 priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 22:23:37 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Mar 2009 21:23:37 +0000 Subject: [issue5470] MSI installer misses zipdir.zip file in Lib\test In-Reply-To: <1236704713.71.0.795823631214.issue5470@psf.upfronthosting.co.za> Message-ID: <1236720217.06.0.353649669888.issue5470@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- assignee: -> loewis nosy: +loewis nosy_count: 1.0 -> 2.0 priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 10 23:20:13 2009 From: report at bugs.python.org (Dan Mahn) Date: Tue, 10 Mar 2009 22:20:13 +0000 Subject: [issue5468] urlencode does not handle "bytes", and could easily handle alternate encodings In-Reply-To: <1236696316.6.0.478633045289.issue5468@psf.upfronthosting.co.za> Message-ID: <1236723613.5.0.332699164811.issue5468@psf.upfronthosting.co.za> Dan Mahn added the comment: I also made some tests for the new code that could be added to the unit tests in test_urllib.py ---------- message_count: 1.0 -> 2.0 Added file: http://bugs.python.org/file13298/new_urlencode_tests.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 00:16:38 2009 From: report at bugs.python.org (Tim Golden) Date: Tue, 10 Mar 2009 23:16:38 +0000 Subject: [issue5472] distutils.test_util fails to restore os.uname In-Reply-To: <49B6F4D0.2020103@timgolden.me.uk> Message-ID: <49B6F4D0.2020103@timgolden.me.uk> New submission from Tim Golden : lib\distutils\tests\test_util.py, run as part of the full testsuite, creates a stub os.uname on an OS which doesn't support it natively. However, it fails to restore it correctly -- ie fails to delete the attribute. As a result, test_platform and test_pep352 fail when run as a part of regrtest, since they rely on os.uname raising an AttributeError on, eg, Windows. Patch attached against r70302 of lib\distutils\tests\test_util.py ---------- files: test_util.patch keywords: patch messages: 83449 nosy: tim.golden severity: normal status: open title: distutils.test_util fails to restore os.uname Added file: http://bugs.python.org/file13299/test_util.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: test_util.patch URL: From report at bugs.python.org Wed Mar 11 00:18:54 2009 From: report at bugs.python.org (Christian Taylor) Date: Tue, 10 Mar 2009 23:18:54 +0000 Subject: [issue5473] round(float, ndigits<0) sometimes rounds to odd In-Reply-To: <1236727134.95.0.532046507723.issue5473@psf.upfronthosting.co.za> Message-ID: <1236727134.95.0.532046507723.issue5473@psf.upfronthosting.co.za> New submission from Christian Taylor : round(x, n) may unexpectedly round floats upwards to odd multiples of 10**(-n) if n is negative, depending on the system Python 3 is running on. I think this is distinct from issue 1869. Example: >>> round(25.0, -1) 30.0 I used the following function to check 1000 cases for a given exponent and yield the values where rounding to odd occurs: def check(exponent): factor = 10**exponent for x in range(5, 5+20000, 20): if not round(float(x*factor), -1-exponent) < x*factor: yield float(x*factor) On a Core2 Duo running Arch Linux (32bit): Python 3.1a1+ (py3k:70302, Mar 10 2009, 21:43:09) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> [len(list(check(exponent))) for exponent in range(10)] [1000, 1000, 1000, 1000, 1000, 0, 0, 1000, 1000, 1000] On an Athlon XP running Slackware (32bit): Python 3.1a1+ (py3k:70302, Mar 11 2009, 01:01:18) [GCC 4.1.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> [len(list(check(exponent))) for exponent in range(10)] [1000, 1000, 1000, 1000, 1000, 0, 0, 1000, 1000, 1000] On an Athlon 64 running Debian (32bit): Python 3.1a1+ (py3k:70302, Mar 10 2009, 22:45:59) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> [len(list(check(exponent))) for exponent in range(10)] [0, 0, 0, 0, 630, 0, 0, 0, 195, 0] >>> next(check(4)) 650000.0 >>> next(check(8)) 14500000000.0 ---------- components: Interpreter Core messages: 83450 nosy: dingo severity: normal status: open title: round(float, ndigits<0) sometimes rounds to odd type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 03:17:33 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Mar 2009 02:17:33 +0000 Subject: [issue3099] On windows, "import nul" always succeed In-Reply-To: <1213319928.58.0.193615390811.issue3099@psf.upfronthosting.co.za> Message-ID: <1236737853.74.0.192359012624.issue3099@psf.upfronthosting.co.za> Brett Cannon added the comment: Since I don't have access to Windows I am unassigning. Amaury, if this is still a problem should we go ahead and switch to GetFileAttributesEx()? Or just realize this is a problem for people developing Python? ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 03:21:27 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Mar 2009 02:21:27 +0000 Subject: [issue1538778] pyo's are not overwritten by different optimization levels Message-ID: <1236738087.28.0.211118056548.issue1538778@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 03:24:50 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Mar 2009 02:24:50 +0000 Subject: [issue1548371] filterwarnings('error') has no effect Message-ID: <1236738290.64.0.378049765617.issue1548371@psf.upfronthosting.co.za> Brett Cannon added the comment: At this point the warnings module has been working as it is for so long that this is not going to be able to change without a lot of pain for people. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 04:33:47 2009 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 11 Mar 2009 03:33:47 +0000 Subject: [issue2706] datetime: define division timedelta/timedelta In-Reply-To: <1236719757.32.0.275185773952.issue2706@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Mar 10, 2009 at 5:15 PM, Tennessee Leeuwenburg wrote: .. > 2) Allow divmod, the operator '%', to be applied to two timedeltas (e.g. > td1 % td2). I think there is some debate here about whether the return > value be an integer in microsends, or a timedelta. I personally believe > that a timedelta should be returned, representing the amount of time > remaining after (td1 // td2) ?* td2 has been subtracted. > > The alternative is an integer, but due to a lack of immediate clarity > over what time quanta this integer represents, I would suggest returning > a unit amount. There is also some discussion of returning (long, > timedelta), but I personally fail to see the merits of returning the > long without some unit attached. > I don't think this alternative was ever seriously considered and no patch was ever proposed to do it that way. Victor's latest patch implements divmod(timedelta, timedelta) -> (int, timedelta) and therefore timedelta % timedelta -> timedelta. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 05:15:19 2009 From: report at bugs.python.org (Rudd-O) Date: Wed, 11 Mar 2009 04:15:19 +0000 Subject: [issue5474] distutils produces invalid RPM packages of prerelease python packages In-Reply-To: <1236744919.07.0.603710480384.issue5474@psf.upfronthosting.co.za> Message-ID: <1236744919.07.0.603710480384.issue5474@psf.upfronthosting.co.za> New submission from Rudd-O : Description of problem: Building pre-release python distutils packages with python setup.py bdist_rpm works, but the version number is "RPM-higher" than the official release package that is released later. This constitutes a problem because many of the components in major Python apps like Zope -- distributed as cheese shop eggs and downloadable via pip or buildout -- are pre-release packages which, when turned into RPMs, contain RPM-invalid version numbers. The RPMs build, but the pre-release packages are considered "newer" by yum, so you can imagine the havoc that breaks. How reproducible: always Steps to Reproduce: 1. python setup.py bdist_rpm 2. inspect version / release number of resulting RPMs, find out it's wrong 3. do not profit! Actual results: distutils package version: 1.4a rpm package version: 1.4a Expected results: http://fedoraproject.org/wiki/Packaging/NamingGuidelines#Non-Numeric_Version_in_Release Additional info: patch attached. works against python 2.4, may apply fine to python 2.5 or 2.6 too since distutils hasn't undergone that big of a rewrite. Ojo: the patch has been tested with distutils AND setuptools. ---------- assignee: tarek components: Distutils files: distutils-bdist_rpm-prereleaseversion.patch keywords: patch messages: 83454 nosy: Rudd-O, tarek severity: normal status: open title: distutils produces invalid RPM packages of prerelease python packages versions: Python 2.4 Added file: http://bugs.python.org/file13300/distutils-bdist_rpm-prereleaseversion.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 05:23:32 2009 From: report at bugs.python.org (Rudd-O) Date: Wed, 11 Mar 2009 04:23:32 +0000 Subject: [issue5474] distutils produces invalid RPM packages of prerelease python packages In-Reply-To: <1236744919.07.0.603710480384.issue5474@psf.upfronthosting.co.za> Message-ID: <1236745412.11.0.190535581851.issue5474@psf.upfronthosting.co.za> Rudd-O added the comment: Heads up: The fix requires a patch (distributed with the python 2.4.x RPM in CentOS) to be applied first. I am attaching said patch so you can apply the fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 05:24:41 2009 From: report at bugs.python.org (Rudd-O) Date: Wed, 11 Mar 2009 04:24:41 +0000 Subject: [issue5474] distutils produces invalid RPM packages of prerelease python packages In-Reply-To: <1236744919.07.0.603710480384.issue5474@psf.upfronthosting.co.za> Message-ID: <1236745481.63.0.20639818456.issue5474@psf.upfronthosting.co.za> Changes by Rudd-O : Added file: http://bugs.python.org/file13301/python-2.4-distutils-bdist-rpm.patch (prerequisite for the patch I wrote which is the prereleaseversion.patch) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 06:12:09 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Mar 2009 05:12:09 +0000 Subject: [issue3652] Remove DeprecationWarning in _warnings about 'line' In-Reply-To: <1219453990.4.0.253900549478.issue3652@psf.upfronthosting.co.za> Message-ID: <1236748329.68.0.194523656763.issue3652@psf.upfronthosting.co.za> Brett Cannon added the comment: Applied in r70305 on trunk. Apparently I had already applied the patch for py3k. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 08:53:43 2009 From: report at bugs.python.org (Rudd-O) Date: Wed, 11 Mar 2009 07:53:43 +0000 Subject: [issue5474] distutils produces invalid RPM packages of prerelease python packages In-Reply-To: <1236744919.07.0.603710480384.issue5474@psf.upfronthosting.co.za> Message-ID: <1236758023.65.0.634907358579.issue5474@psf.upfronthosting.co.za> Rudd-O added the comment: the newest svnversions patch is to handle the case of people who want to build svn checkouts (usually versionnumbered by dev or dev-rXXXYYZZ). it overrides the release to be zero so they never upgrade alpha, beta packages. ---------- Added file: http://bugs.python.org/file13302/python-2.4-distutils-bdist_rpm-svnversions.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 09:24:53 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Mar 2009 08:24:53 +0000 Subject: [issue1869] Builtin round function is sometimes inaccurate for floats In-Reply-To: <1200704666.74.0.121276369369.issue1869@psf.upfronthosting.co.za> Message-ID: <1236759893.66.0.701839199313.issue1869@psf.upfronthosting.co.za> Mark Dickinson added the comment: ...and issue 5473 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 09:30:13 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Mar 2009 08:30:13 +0000 Subject: [issue5473] round(float, ndigits<0) sometimes rounds to odd In-Reply-To: <1236727134.95.0.532046507723.issue5473@psf.upfronthosting.co.za> Message-ID: <1236760213.33.0.555435340514.issue5473@psf.upfronthosting.co.za> Mark Dickinson added the comment: I think this *is* the same issue as 1869, at least in broad terms: the rounding code involves inexact floating-point operations (in this case a division by 10.0), which can result in a value that was *exactly* halfway between two rounded values losing that exactness, so that the rounding direction is essentially random. Can you tell me why you think this issue is distinct from issue 1869? ---------- nosy: +marketdickinson resolution: -> duplicate status: open -> pending superseder: -> Builtin round function is sometimes inaccurate for floats _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 09:59:29 2009 From: report at bugs.python.org (Tim Golden) Date: Wed, 11 Mar 2009 08:59:29 +0000 Subject: [issue5472] distutils.test_util fails to restore os.uname; causes test_platform to fail In-Reply-To: <49B6F4D0.2020103@timgolden.me.uk> Message-ID: <1236761969.16.0.388236153214.issue5472@psf.upfronthosting.co.za> Tim Golden added the comment: Adding Tarek to nosy list as he added the code earlier this month ---------- nosy: +tarek title: distutils.test_util fails to restore os.uname -> distutils.test_util fails to restore os.uname; causes test_platform to fail _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 10:14:51 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Wed, 11 Mar 2009 09:14:51 +0000 Subject: [issue5472] distutils.test_util fails to restore os.uname; causes test_platform to fail In-Reply-To: <49B6F4D0.2020103@timgolden.me.uk> Message-ID: <1236762891.96.0.597840667045.issue5472@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Thanks for the patch, I'll apply it later today ---------- assignee: -> tarek components: +Distutils versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 10:17:58 2009 From: report at bugs.python.org (Lie Ryan) Date: Wed, 11 Mar 2009 09:17:58 +0000 Subject: [issue2312] Update PEP 3135 (super()) In-Reply-To: <1205703537.32.0.106170069939.issue2312@psf.upfronthosting.co.za> Message-ID: <1236763078.47.0.646899870122.issue2312@psf.upfronthosting.co.za> Lie Ryan added the comment: The possible new PEP 3135, however I'm not that familiar with the implementation of the new super, thus please review whether it is "right w.r.t. reality". I'm writing only from whatever I can determine from observing the behavior of super in python 3.0.1 Probably not related, but while playing with super, I noticed several things, I'm not sure about whether this is bug or design decision: - super() in normal function is SystemError, instead of SyntaxError or a more descriptive error btw, is "__class__" related to "__this_class__" alt implementation? I assume yes, so I removed the alt implementation for __this_class__ ---------- nosy: +lieryan Added file: http://bugs.python.org/file13303/pep3135 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 11:05:17 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Mar 2009 10:05:17 +0000 Subject: [issue5473] round(float, ndigits<0) sometimes rounds to odd In-Reply-To: <1236727134.95.0.532046507723.issue5473@psf.upfronthosting.co.za> Message-ID: <1236765917.97.0.960097811295.issue5473@psf.upfronthosting.co.za> Mark Dickinson added the comment: > (in this case a division by 10.0) Of course, that's not true: division by 10.0 is harmless when the result is exactly representable. It's actually a multiplication by pow(10.0, -1), which is worse... I'm currently working on incorporating David Gay's code for string <-> float conversions into Python. If these go in, then it would be straightforward to implement a fast, correctly-rounded round for floats based on a combination of Gay's strtod and dtoa functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 11:14:56 2009 From: report at bugs.python.org (Tim Michelsen) Date: Wed, 11 Mar 2009 10:14:56 +0000 Subject: [issue5475] urllib2.getproxies not documented In-Reply-To: <1236766495.94.0.773728136477.issue5475@psf.upfronthosting.co.za> Message-ID: <1236766495.94.0.773728136477.issue5475@psf.upfronthosting.co.za> New submission from Tim Michelsen : There is no documentation for the function in http://docs.python.org/search.html?q=getproxies&check_keywords=yes&area=default But the docstring shows: ul.getproxies? Type: function Base Class: String Form: Namespace: Interactive File: c:\programme\pythonxy\python\lib\urllib.py Definition: ul.getproxies() Docstring: Return a dictionary of scheme -> proxy server URL mappings. Returns settings gathered from the environment, if specified, or the registry. ---------- assignee: georg.brandl components: Documentation messages: 83464 nosy: georg.brandl, timmie severity: normal status: open title: urllib2.getproxies not documented versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 12:28:50 2009 From: report at bugs.python.org (Andreas Schawo) Date: Wed, 11 Mar 2009 11:28:50 +0000 Subject: [issue5463] Compiler warning get_ulong is never used 3.x In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1236770930.22.0.543218520378.issue5463@psf.upfronthosting.co.za> Andreas Schawo added the comment: Hi Mark, I've removed all overflow masking from _struct.c. Running the regression test test_struct failed for test_issue4228 wich I think have to be removed too because it tests the deprecated feature. I've tested the constraints with some values and got the expected overflow errors. So here's the new patch without overflow masking and deleted test_issue4228. The patch is just tested on windows. So when I get home I'll give it a try on Linux. ---------- Added file: http://bugs.python.org/file13304/struct_overflow_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 12:28:58 2009 From: report at bugs.python.org (Andreas Schawo) Date: Wed, 11 Mar 2009 11:28:58 +0000 Subject: [issue5463] Compiler warning get_ulong is never used 3.x In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1236770938.49.0.0686232326583.issue5463@psf.upfronthosting.co.za> Changes by Andreas Schawo : Removed file: http://bugs.python.org/file13288/get_ulong_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 13:55:27 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Wed, 11 Mar 2009 12:55:27 +0000 Subject: [issue5472] distutils.test_util fails to restore os.uname; causes test_platform to fail In-Reply-To: <49B6F4D0.2020103@timgolden.me.uk> Message-ID: <1236776127.64.0.0822578517925.issue5472@psf.upfronthosting.co.za> Tarek Ziad? added the comment: done in r70308, r70310. Thx. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 14:02:49 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Mar 2009 13:02:49 +0000 Subject: [issue4258] Use 30-bit digits instead of 15-bit digits for Python integers. In-Reply-To: <1225795512.12.0.546973896448.issue4258@psf.upfronthosting.co.za> Message-ID: <1236776569.84.0.134431858207.issue4258@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I tried the patch on a 64-bit Linux system and it's ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 14:41:23 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 11 Mar 2009 13:41:23 +0000 Subject: [issue3099] On windows, "import nul" always succeed In-Reply-To: <1213319928.58.0.193615390811.issue3099@psf.upfronthosting.co.za> Message-ID: <1236778883.08.0.287799692043.issue3099@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It's a problem with debug builds on Windows. Lowering priority. Also, it is likely that the new import library will correct the problem. ---------- priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 16:42:07 2009 From: report at bugs.python.org (Mike Coleman) Date: Wed, 11 Mar 2009 15:42:07 +0000 Subject: [issue3392] subprocess fails in select when descriptors are large In-Reply-To: <1216293940.59.0.136491841956.issue3392@psf.upfronthosting.co.za> Message-ID: <1236786127.98.0.92658623397.issue3392@psf.upfronthosting.co.za> Mike Coleman added the comment: I also ran into this bug. In my case I'm able to work around this by "reserving" some fds at the start of my program (open 20 reserved fds, open 2000 real fds, close 20 reserved fds), but this is both a kludge and not a general solution. Probably virtually all uses of 'select' (both in Python and C) should be replaced under Linux with poll or epoll. (Also, until/unless this is fixed, it'd be nice to mention it in the 'communicate' doc.) ---------- nosy: +mkc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 16:50:47 2009 From: report at bugs.python.org (Barron Henderson) Date: Wed, 11 Mar 2009 15:50:47 +0000 Subject: [issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input In-Reply-To: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> Message-ID: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> New submission from Barron Henderson : Initializing a timedelta object with numpy.int32 arguments give mixed results; it fails for days keyword, gives bad results for minutes, and give correct results for seconds/microseconds. Failure confirmed on Linux i686 (Py 2.5.2; numpy 1.2.1) and OS X 10.5.6 (Py 2.5.1; 1.2.1).Test case below: from datetime import timedelta from numpy import int32 from numpy import int32 from datetime import timedelta assert timedelta(seconds = 36) == timedelta(seconds = int32(36)) print 'pass 36 sec' assert timedelta(microseconds = 36) == timedelta(microseconds = int32(36)) print 'pass 36 usec' assert timedelta(minutes = 35) == timedelta(minutes = int32(35)) print 'pass 35 min' assert timedelta(minutes = 36) == timedelta(minutes = int32(36)) print 'pass 36 min' # returns bad value assert timedelta(days = 36) == timedelta(days = int32(36)) print 'pass 36 days' # fails SystemError: Objects/longobject.c:223 ---------- messages: 83470 nosy: barronh severity: normal status: open title: datetime: timedelta(minutes = i) silently fails with numpy.int32 input _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 16:51:24 2009 From: report at bugs.python.org (Barron Henderson) Date: Wed, 11 Mar 2009 15:51:24 +0000 Subject: [issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input In-Reply-To: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> Message-ID: <1236786684.19.0.0140664176646.issue5476@psf.upfronthosting.co.za> Changes by Barron Henderson : ---------- components: +Library (Lib) versions: +Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 17:06:15 2009 From: report at bugs.python.org (David W. Lambert) Date: Wed, 11 Mar 2009 16:06:15 +0000 Subject: [issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input In-Reply-To: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> Message-ID: <1236787575.57.0.890381908309.issue5476@psf.upfronthosting.co.za> David W. Lambert added the comment: With older versions of each timedelta rejects the data type. Maybe that's a good resolution? $ /usr/local/bin/python2.4 Python 2.4.2 (#2, Jul 7 2006, 10:20:47) [GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy >>> numpy.version.version '0.9.8' >>> from numpy import int32 >>> from datetime import timedelta >>> assert timedelta(seconds = 36) == timedelta(seconds = int32(36)) Traceback (most recent call last): File "", line 1, in ? TypeError: unsupported type for timedelta seconds component: int32scalar >>> ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 17:10:08 2009 From: report at bugs.python.org (Thomas Guest) Date: Wed, 11 Mar 2009 16:10:08 +0000 Subject: [issue5477] Typo in itertools documentation In-Reply-To: <1236787808.63.0.125744634711.issue5477@psf.upfronthosting.co.za> Message-ID: <1236787808.63.0.125744634711.issue5477@psf.upfronthosting.co.za> New submission from Thomas Guest : http://docs.python.org/3.0/library/itertools.html says: > The tools also work well with the high-speed functions in the operator module. For example, the plus-operator can be mapped across two vectors to form an efficient dot-product: sum(map(operator.add, vector1, vector2)). I think there are two problems here. 1. I think this should read: "the multiplication operator ... sum(map(operator.mul, vector1, vector2))." 2. This example has nothing to do with itertools! (At 3.n, map is a built in function) ---------- assignee: georg.brandl components: Documentation messages: 83472 nosy: georg.brandl, thomasguest severity: normal status: open title: Typo in itertools documentation versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 17:22:29 2009 From: report at bugs.python.org (Christian Taylor) Date: Wed, 11 Mar 2009 16:22:29 +0000 Subject: [issue5473] round(float, ndigits<0) sometimes rounds to odd In-Reply-To: <1236727134.95.0.532046507723.issue5473@psf.upfronthosting.co.za> Message-ID: <1236788549.09.0.251326121767.issue5473@psf.upfronthosting.co.za> Christian Taylor added the comment: I see what you mean. I originally thought that intermediate numbers not being representable as floats was not the issue here, since for example 25.0/10.0 should give the exact result - despite issue 1869 clearly mentioning the *multiplication* by powers of 10. Thanks for clearing that up and sorry for the noise! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 17:31:31 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 11 Mar 2009 16:31:31 +0000 Subject: [issue2312] Update PEP 3135 (super()) In-Reply-To: <1205703537.32.0.106170069939.issue2312@psf.upfronthosting.co.za> Message-ID: <1236789091.41.0.620545070434.issue2312@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks for contributing. However since you reformatted the whole file it's kind of hard to see what you changed, which makes review laborious. Could you try to upload a unified diff relative to the PEP source code in Subversion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 18:34:19 2009 From: report at bugs.python.org (Lie Ryan) Date: Wed, 11 Mar 2009 17:34:19 +0000 Subject: [issue2312] Update PEP 3135 (super()) In-Reply-To: <1205703537.32.0.106170069939.issue2312@psf.upfronthosting.co.za> Message-ID: <1236792859.53.0.87426528263.issue2312@psf.upfronthosting.co.za> Lie Ryan added the comment: Here is the unified diff. ---------- keywords: +patch Added file: http://bugs.python.org/file13305/pep-3135.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 19:03:42 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Mar 2009 18:03:42 +0000 Subject: [issue5477] Typo in itertools documentation In-Reply-To: <1236787808.63.0.125744634711.issue5477@psf.upfronthosting.co.za> Message-ID: <1236794622.53.0.957509906175.issue5477@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: georg.brandl -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 20:00:41 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 11 Mar 2009 19:00:41 +0000 Subject: [issue2312] Update PEP 3135 (super()) In-Reply-To: <1205703537.32.0.106170069939.issue2312@psf.upfronthosting.co.za> Message-ID: <1236798041.26.0.543345012873.issue2312@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks! Reviewing now... ---------- assignee: georg.brandl -> gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 20:15:45 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 11 Mar 2009 19:15:45 +0000 Subject: [issue2312] Update PEP 3135 (super()) In-Reply-To: <1205703537.32.0.106170069939.issue2312@psf.upfronthosting.co.za> Message-ID: <1236798945.52.0.430462385879.issue2312@psf.upfronthosting.co.za> Guido van Rossum added the comment: Submitted as revision 70312, with some additional changes. I suppose it could use some more work (e.g. adding the penultimate proposal to the History section) but I'll leave that to others. (Lie, if you feel like writing that history section, just add it to this bug.) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 21:05:28 2009 From: report at bugs.python.org (Brad Miller) Date: Wed, 11 Mar 2009 20:05:28 +0000 Subject: [issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface In-Reply-To: <1209319360.66.0.583090952017.issue2704@psf.upfronthosting.co.za> Message-ID: <1236801928.94.0.405683264034.issue2704@psf.upfronthosting.co.za> Brad Miller added the comment: I hand applied the patch because I hoped it would fix the problem of the cursor going all the way to the left of the >>> in the Python shell when you press home or ctrl-a. The patch as it is does not solve this problem on the Mac. I've uploaded the patch as a unified diff to make it easier for others who might want to give it a try. The patch does a great job of scrolling through the history at the current prompt. This is a great improvement! Thanks. ---------- nosy: +bmiller Added file: http://bugs.python.org/file13306/PyShell.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 21:26:38 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Mar 2009 20:26:38 +0000 Subject: [issue2610] string representation of range and dictionary views In-Reply-To: <1207858708.98.0.537185652213.issue2610@psf.upfronthosting.co.za> Message-ID: <1236803198.02.0.937651257039.issue2610@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Closing since this is now implemented. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 11 22:39:46 2009 From: report at bugs.python.org (Jess Austin) Date: Wed, 11 Mar 2009 21:39:46 +0000 Subject: [issue5434] datetime.MonthDelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1236807586.2.0.168259314858.issue5434@psf.upfronthosting.co.za> Jess Austin added the comment: This prototype python implementation passes the same tests that the C implementation in the patch does (modulo import differences). I'll probably backport this for 2.x versions. ---------- Added file: http://bugs.python.org/file13307/monthdelta.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 00:05:28 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Mar 2009 23:05:28 +0000 Subject: [issue5223] infinite recursion in PyErr_WriteUnraisable In-Reply-To: <1234412915.77.0.527314714811.issue5223@psf.upfronthosting.co.za> Message-ID: <1236812728.13.0.569651752665.issue5223@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Amaury, there is a funny bug in the 3.0 implementation with very low recursion limits (#5392). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 01:16:14 2009 From: report at bugs.python.org (Kouki Hashimoto) Date: Thu, 12 Mar 2009 00:16:14 +0000 Subject: [issue5478] document mistake xml.dom.minidom.Element In-Reply-To: <1236816974.37.0.966826029984.issue5478@psf.upfronthosting.co.za> Message-ID: <1236816974.37.0.966826029984.issue5478@psf.upfronthosting.co.za> New submission from Kouki Hashimoto : I found mistake in python documentation about xml.dom.minidom.Element class. http://docs.python.org/dev/py3k/library/xml.dom.html#module-xml.dom I think it is NOT Element.getElementsByTagNameNS(tagName) It SHOULD be Element.getElementsByTagNameNS(namespaceURI, tagName) ---------- assignee: georg.brandl components: Documentation messages: 83482 nosy: georg.brandl, hsmtkk severity: normal status: open title: document mistake xml.dom.minidom.Element versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 01:30:12 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Mar 2009 00:30:12 +0000 Subject: [issue5477] Typo in itertools documentation In-Reply-To: <1236787808.63.0.125744634711.issue5477@psf.upfronthosting.co.za> Message-ID: <1236817812.98.0.138786012952.issue5477@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed. See r70317. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 01:56:07 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Thu, 12 Mar 2009 00:56:07 +0000 Subject: [issue444582] Finding programs in PATH, addition to os Message-ID: <1236819367.28.0.80253232492.issue444582@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: +1 adding which to shutil ---------- nosy: +tleeuwenburg at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 02:23:45 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Thu, 12 Mar 2009 01:23:45 +0000 Subject: [issue5236] time.strptime should reject bytes arguments on Py3 In-Reply-To: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> Message-ID: <1236821025.04.0.156960995359.issue5236@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: I believe this shouldn't be tagged as part of the Lib component... Also, I am happy to work on this issue, developing tests and a patch. Would that be appropriate? I may take a little while to get the hang of things, but I'm happy to put some time into this. ---------- components: +Extension Modules -Library (Lib), Unicode nosy: +tleeuwenburg at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 02:33:34 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Thu, 12 Mar 2009 01:33:34 +0000 Subject: [issue5236] time.strptime should reject bytes arguments on Py3 In-Reply-To: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> Message-ID: <1236821614.55.0.49005811334.issue5236@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: My mistake, it is part of the Lib component ... I failed to see the callback to Python from timemodule.c and jumped to conclusions. In any case, I'm happy to work on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 04:41:45 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Thu, 12 Mar 2009 03:41:45 +0000 Subject: [issue5236] time.strptime should reject bytes arguments on Py3 In-Reply-To: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> Message-ID: <1236829305.28.0.78806079128.issue5236@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: See also thread http://mail.python.org/pipermail/python-dev/2009-March/087104.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 06:52:41 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 12 Mar 2009 05:52:41 +0000 Subject: [issue5236] time.strptime should reject bytes arguments on Py3 In-Reply-To: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> Message-ID: <1236837161.62.0.0414460301187.issue5236@psf.upfronthosting.co.za> Brett Cannon added the comment: If you want to work on it, Tennesse, then go for it! ---------- components: +Library (Lib) -Extension Modules priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 08:07:15 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 12 Mar 2009 07:07:15 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1236841635.83.0.439946354633.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: For those of you following along, the only thing keeping PEP 3108 and this issue from being finished are the two dependent issues: os.stat and profile/cProfile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 09:18:37 2009 From: report at bugs.python.org (=?utf-8?q?Mart_S=C3=B5mermaa?=) Date: Thu, 12 Mar 2009 08:18:37 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1236845917.79.0.765415316549.issue5479@psf.upfronthosting.co.za> Message-ID: <1236845917.79.0.765415316549.issue5479@psf.upfronthosting.co.za> New submission from Mart S?mermaa : See http://mail.python.org/pipermail/python-dev/2009-March/087000.html and http://code.activestate.com/recipes/576685/ . ---------- assignee: georg.brandl components: Documentation, Library (Lib) messages: 83490 nosy: georg.brandl, mrts, rhettinger severity: normal status: open title: Add an easy way to provide total ordering now that __cmp__ is deprecated/gone type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 09:37:20 2009 From: report at bugs.python.org (David W. Lambert) Date: Thu, 12 Mar 2009 08:37:20 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1236845917.79.0.765415316549.issue5479@psf.upfronthosting.co.za> Message-ID: <1236847040.54.0.684902633943.issue5479@psf.upfronthosting.co.za> David W. Lambert added the comment: That's the best version I recall seeing at activestate. Still, I'd deprecate and remove > and >= from mathematics. ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 16:27:06 2009 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Thu, 12 Mar 2009 15:27:06 +0000 Subject: [issue5480] ".egg-info" => ".pkg-info" In-Reply-To: <1236871625.96.0.687827007763.issue5480@psf.upfronthosting.co.za> Message-ID: <1236871625.96.0.687827007763.issue5480@psf.upfronthosting.co.za> New submission from Zooko O'Whielacronx : The .egg-info files which are produced by distutils in Python >= 2.5 are the only standard, cross-platform way for a Python package ("distribution") to declare its name and version number in a machine-parseable way. Unfortunately, these files are named ".egg-info" even when the Python package in question was produced by distutils without setuptools, was never packaged as an egg, and is not installed as an egg. It has nothing to do with "egg". The fact that the file has "egg" in its name causes most people to think that it has something to do with eggs, which leads to all sorts of problems including people removing the file and thus deleting the machine-parseable metadata about the Python package's name and version number. This ticket is a request that distutils start calling this file ".pkg-info" instead. Obviously we can't just stop including them under the name ".egg-info" since that would break existing usage, but we could start producing files under the name ".pkg-info", and make ".egg-info" be a symlink or a copy of ".pkg-info" for backwards compatibility. Also of course we can update the documentation (if there is any) of what the .pkg-info file is. Since the current problems are mostly problems of communication and documentation, this simple change to the name of the file might go a long way to improving things. ---------- assignee: tarek components: Distutils messages: 83492 nosy: tarek, zooko severity: normal status: open title: ".egg-info" => ".pkg-info" type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 16:33:42 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 12 Mar 2009 15:33:42 +0000 Subject: [issue5480] ".egg-info" => ".pkg-info" In-Reply-To: <1236871625.96.0.687827007763.issue5480@psf.upfronthosting.co.za> Message-ID: <1236872022.44.0.764175509321.issue5480@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Please have a look at PEP 376 we are buildin instead http://svn.python.org/projects/peps/trunk/pep-0376.txt and commentin distutils-ML ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 16:46:50 2009 From: report at bugs.python.org (bms) Date: Thu, 12 Mar 2009 15:46:50 +0000 Subject: [issue3863] 2.6rc1: test_threading hangs on FreeBSD 6.3 i386 In-Reply-To: <1221391510.13.0.209829217282.issue3863@psf.upfronthosting.co.za> Message-ID: <1236872810.51.0.24692928381.issue3863@psf.upfronthosting.co.za> bms added the comment: Hi, I've committed a fix to FreeBSD-CURRENT for POSIX semaphores this morning. Root cause analysis on the fork-mt issue points towards the rtld and malloc in RELENG_7 not being able to deal with a mixture of fork and mt. As a workaround, you may wish to try my patches against the FreeBSD port to build with GNU Pth (until we can settle on resolution):- http://people.freebsd.org/~bms/dump/python26-fbsd-pth.patch thanks! BMS ---------- nosy: +bms _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 16:51:45 2009 From: report at bugs.python.org (bms) Date: Thu, 12 Mar 2009 15:51:45 +0000 Subject: [issue3770] test_multiprocessing fails on systems with HAVE_SEM_OPEN=0 In-Reply-To: <1220487838.93.0.477905681389.issue3770@psf.upfronthosting.co.za> Message-ID: <1236873105.95.0.296802031695.issue3770@psf.upfronthosting.co.za> bms added the comment: POSIX semaphores should be fixed in 8-CURRENT, pending MFC. There are rtld + malloc issues in FreeBSD. Python multiprocessing's use of POSIX threads is not strictly POSIX compliant, as it tries to do a lot more than just call exec() or async-signal-safe POSIX APIs after fork()-ing. There is a degree of reluctance in the camp to fix for these reasons... In the meantime, you may wish to try building Python 2.6 on FreeBSD using GNU Pth, here is a patch: http://people.freebsd.org/~bms/dump/python26-fbsd-pth.patch thanks! BMS ---------- nosy: +bms _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 17:02:01 2009 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Thu, 12 Mar 2009 16:02:01 +0000 Subject: [issue5480] ".egg-info" => ".pkg-info" In-Reply-To: <1236871625.96.0.687827007763.issue5480@psf.upfronthosting.co.za> Message-ID: <1236873721.72.0.486161424657.issue5480@psf.upfronthosting.co.za> Zooko O'Whielacronx added the comment: Thank you. I've now read PEP 376. It is good. However, this same issue remains in PEP 376 like it does in today's distutils. If the new work in PEP 376 is going to continue to use the word "egg" in its filenames, then we need to send out an announcement of some sort to say "HEY! Pay attention! This is actually a supported part of the core of Python even though it has the word 'egg' in it.". I suppose including a sentence to that effect in the distutils release announcements and in the "What's new in Python" document will suffice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 17:09:16 2009 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Thu, 12 Mar 2009 16:09:16 +0000 Subject: [issue5480] ".egg-info" => ".pkg-info" In-Reply-To: <1236871625.96.0.687827007763.issue5480@psf.upfronthosting.co.za> Message-ID: <1236874156.37.0.962891417232.issue5480@psf.upfronthosting.co.za> Zooko O'Whielacronx added the comment: By the way, here is the ticket on allmydata.org "Tahoe" where this issue was bugging me which is why I opened this ticket: http://allmydata.org/trac/tahoe/ticket/149 # unable to use pre-installed non-setuptools^H^H^H^H^H^H^H^H^H^Hdistutils-aware nevow ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 17:21:48 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 12 Mar 2009 16:21:48 +0000 Subject: [issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped In-Reply-To: <1236557215.68.0.756624952877.issue5450@psf.upfronthosting.co.za> Message-ID: <1236874908.28.0.960430419179.issue5450@psf.upfronthosting.co.za> R. David Murray added the comment: I tried using TestSkipped first, but since I was throwing it from an individual testcase and not from the top level, it still showed up as an error in test_tcl (I may have done it wrong, of course). Moving the tests makes more sense anyway, so I've revised my patch to do that. I didn't move all of the tests because as far as I could understand the test.test_tk code, if I moved them all they'd only get run if the GUI resource was enabled, and that seems wrong. So I just moved the tests that specifically involved tk. I ran the test suite under a variety of DISPLAY settings and non-settings, and it seemed to do the right thing with the patch applied. I have pushed the change up to Launchpad as well. ---------- Added file: http://bugs.python.org/file13308/test_tcl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 19:57:34 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 12 Mar 2009 18:57:34 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1236845917.79.0.765415316549.issue5479@psf.upfronthosting.co.za> Message-ID: <1236884254.58.0.490654158909.issue5479@psf.upfronthosting.co.za> Martin v. L?wis added the comment: What is the purpose of this submission? What do you want to happen about Python? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 21:00:27 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Mar 2009 20:00:27 +0000 Subject: [issue5481] Expand Decimal.__format__() support to include "n" In-Reply-To: <1236888027.08.0.305136534993.issue5481@psf.upfronthosting.co.za> Message-ID: <1236888027.08.0.305136534993.issue5481@psf.upfronthosting.co.za> New submission from Raymond Hettinger : >>> from decimal import Decimal as D >>> format(D('1234.5'), "n") . . . ValueError: Invalid format specifier: n ---------- assignee: marketdickinson components: Library (Lib) messages: 83500 nosy: marketdickinson, rhettinger severity: normal status: open title: Expand Decimal.__format__() support to include "n" versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 21:10:39 2009 From: report at bugs.python.org (David W. Lambert) Date: Thu, 12 Mar 2009 20:10:39 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1236845917.79.0.765415316549.issue5479@psf.upfronthosting.co.za> Message-ID: <1236888639.28.0.205731755513.issue5479@psf.upfronthosting.co.za> David W. Lambert added the comment: (As I recall) in python-dev mailing list Ray claimed he could clean up a cited active state recipe to address this issue. He succeeded to the extent I'm aware---he's the author of http://code.activestate.com/recipes/576685/. I haven't used the redundant >, >= comparisons operators in code since 1981. The chances of simplifying python by removing them from the language are None, but the mistake predates python by 10**n years, where (3 <= n <= 7) or (7 >= n >= 3). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 21:26:44 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 12 Mar 2009 20:26:44 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1236845917.79.0.765415316549.issue5479@psf.upfronthosting.co.za> Message-ID: <1236889604.43.0.793064809536.issue5479@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Then why was this classified as a documentation issue? And why did Mart S?mmermaa submit it, and not Raymond? AFAICT, Raymond said he would propose something when it's ready (which I assume it currently isn't). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 21:54:51 2009 From: report at bugs.python.org (Jess Austin) Date: Thu, 12 Mar 2009 20:54:51 +0000 Subject: [issue5434] datetime.MonthDelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1236891291.8.0.120910646488.issue5434@psf.upfronthosting.co.za> Changes by Jess Austin : Added file: http://bugs.python.org/file13309/monthdelta.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 21:56:18 2009 From: report at bugs.python.org (Jess Austin) Date: Thu, 12 Mar 2009 20:56:18 +0000 Subject: [issue5434] datetime.MonthDelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1236891378.17.0.692545082106.issue5434@psf.upfronthosting.co.za> Changes by Jess Austin : Removed file: http://bugs.python.org/file13258/datetimemodule.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 22:05:14 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 12 Mar 2009 21:05:14 +0000 Subject: [issue5481] Expand Decimal.__format__() support to include "n" In-Reply-To: <1236888027.08.0.305136534993.issue5481@psf.upfronthosting.co.za> Message-ID: <1236891914.71.0.73397258501.issue5481@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks---this is already on my list of things to get done for 3.1: see issue 2110. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 22:11:33 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 12 Mar 2009 21:11:33 +0000 Subject: [issue2110] Implement __format__ for Decimal In-Reply-To: <1202994255.28.0.383332155678.issue2110@psf.upfronthosting.co.za> Message-ID: <1236892293.68.0.0421895008103.issue2110@psf.upfronthosting.co.za> Mark Dickinson added the comment: Adding support for the 'n' format specifier should be done before 3.1 goes out. ---------- priority: high -> critical versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 23:07:11 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 12 Mar 2009 22:07:11 +0000 Subject: [issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped In-Reply-To: <1236557215.68.0.756624952877.issue5450@psf.upfronthosting.co.za> Message-ID: <1236895631.77.0.288980810673.issue5450@psf.upfronthosting.co.za> R. David Murray added the comment: Oops, I forgot to remove the changes I'd previously made to testLoadTk. I've updated the patch file and pushed to Launchpad, after re-running my tests. ---------- Added file: http://bugs.python.org/file13310/test_tcl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 12 23:08:04 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 12 Mar 2009 22:08:04 +0000 Subject: [issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped In-Reply-To: <1236557215.68.0.756624952877.issue5450@psf.upfronthosting.co.za> Message-ID: <1236895684.93.0.889396140149.issue5450@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file13308/test_tcl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 00:47:33 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Thu, 12 Mar 2009 23:47:33 +0000 Subject: [issue5236] time.strptime should reject bytes arguments on Py3 In-Reply-To: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> Message-ID: <1236901653.19.0.97423949978.issue5236@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: Python implementation to raise this exception if a bytes argument is passed in as argument 1. Test case added to test_time ---------- Added file: http://bugs.python.org/file13311/strptime_patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 02:27:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Mar 2009 01:27:13 +0000 Subject: [issue4535] Build / Test Py3K failed on Ubuntu 8.10 In-Reply-To: <1228423046.58.0.110673745829.issue4535@psf.upfronthosting.co.za> Message-ID: <1236907633.46.0.399515773272.issue4535@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tests status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 03:29:13 2009 From: report at bugs.python.org (R. David Murray) Date: Fri, 13 Mar 2009 02:29:13 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1236911353.72.0.582834773426.issue2170@psf.upfronthosting.co.za> R. David Murray added the comment: I have applied the supplied patch to the current trunk, and it passes the tests. I've also attached a more extensive test case that exercises the recursion. ---------- keywords: +patch nosy: +bitdancer Added file: http://bugs.python.org/file13312/test_minidom.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 06:51:49 2009 From: report at bugs.python.org (Rudd-O) Date: Fri, 13 Mar 2009 05:51:49 +0000 Subject: [issue5474] distutils produces invalid RPM packages of prerelease python packages In-Reply-To: <1236744919.07.0.603710480384.issue5474@psf.upfronthosting.co.za> Message-ID: <1236923509.73.0.857316499511.issue5474@psf.upfronthosting.co.za> Rudd-O added the comment: A better patch ---------- Added file: http://bugs.python.org/file13313/python-2.4-distutils-bdist_rpm-rpmversion-lexicalorder.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 09:34:12 2009 From: report at bugs.python.org (=?utf-8?q?Mart_S=C3=B5mermaa?=) Date: Fri, 13 Mar 2009 08:34:12 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1236845917.79.0.765415316549.issue5479@psf.upfronthosting.co.za> Message-ID: <1236933252.32.0.300710194878.issue5479@psf.upfronthosting.co.za> Mart S?mermaa added the comment: > Then why was this classified as a documentation issue? As the documentation section of http://docs.python.org/reference/datamodel.html#object.__lt__ needs to be updated as well to mark the eventual solution as the recommended easy way to provide total ordering. > And why did Mart S?mmermaa submit it, and not Raymond? AFAICT, Raymond said he would propose something when it's ready (which I assume it currently isn't). Raymond's recipe at http://code.activestate.com/recipes/576685/ looks more or less complete, do you feel that his posting on the mailing list does not count as proposal? I submitted the feature request instead of him because I was the one who noticed the problem (as discussed on the mailing list) and felt "responsible" to report it here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 09:34:13 2009 From: report at bugs.python.org (Rudd-O) Date: Fri, 13 Mar 2009 08:34:13 +0000 Subject: [issue5474] distutils produces invalid RPM packages of prerelease python packages In-Reply-To: <1236744919.07.0.603710480384.issue5474@psf.upfronthosting.co.za> Message-ID: <1236933253.13.0.126420535846.issue5474@psf.upfronthosting.co.za> Rudd-O added the comment: This patch autodetects dependencies based on the earlier patch and egg metadata, if setuptools is importable. ---------- Added file: http://bugs.python.org/file13314/python-2.4-distutils-bdist_rpm-autodeps.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 11:04:22 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Fri, 13 Mar 2009 10:04:22 +0000 Subject: [issue5236] time.strptime should reject bytes arguments on Py3 In-Reply-To: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> Message-ID: <1236938662.06.0.742560293935.issue5236@psf.upfronthosting.co.za> Changes by Tennessee Leeuwenburg : ---------- stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 11:19:18 2009 From: report at bugs.python.org (Neyro) Date: Fri, 13 Mar 2009 10:19:18 +0000 Subject: [issue4749] Issue with RotatingFileHandler logging handler on Windows In-Reply-To: <1230295606.47.0.842082380856.issue4749@psf.upfronthosting.co.za> Message-ID: <1236939558.6.0.19826818946.issue4749@psf.upfronthosting.co.za> Neyro added the comment: I have the same problem with a program I'm writing. The attached script is made using parts of it's code. The logger is set up using a configuration file. By the way, the error is: Traceback (most recent call last): File "C:\Python26\lib\logging\handlers.py", line 74, in emit if self.shouldRollover(record): File "C:\Python26\lib\logging\handlers.py", line 146, in shouldRollover self.stream.seek(0, 2) #due to non-posix-compliant Windows feature ValueError: I/O operation on closed file ---------- nosy: +neyro versions: +Python 2.6 Added file: http://bugs.python.org/file13315/loggertest.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 12:27:33 2009 From: report at bugs.python.org (Rudd-O) Date: Fri, 13 Mar 2009 11:27:33 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> New submission from Rudd-O : Hello, guys. I am looking for feedback on the topic which I am going to lay out. First, sys.path: ------------------- # python2.4 >>> import sys >>> sys.path ['', '/home/rudd-o', '/usr/lib64/python24.zip', '/usr/lib64/python2.4', '/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk', '/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages', '/usr/lib64/python2.4/site-packages/Numeric', '/usr/lib64/python2.4/site-packages/PIL', '/usr/lib64/python2.4/site-packages/gtk-2.0', '/usr/lib/python2.4/site-packages', '/usr/lib64/site-python', '/usr/lib/site-python'] ------------------ Now: Currently, bdist_rpm target builds RPMs that install to /usr/lib(64)/python2.X/site-packages/. This is wasteful and inefficient in the case of pure python modules for the following reasons: 1. It necessitates a rebuild of the python modules for at least 2 architectures -- 64-bit and 32-bit, since they go to different directories. Worst part is, the packages themselves are indistinguishable by name (they are built as Noarch in all architectures) so a package built in 64bit cannot function in 32bit BUT it is *installable* by RPM. 2. It necessitates a rebuild for every python minor version out there, 2.4, 2.5, 2.6. This is also problematic because packages need to be rebuilt for every distribution release out there, instead of being able to build a single RPM that works across distro releases (or, the holy grail, across distros altogether). Now, I have familiarized myself with distutils enough that I can make a quick patch that - detects if the package is a pure python module - ensures that the install-purelib directive in the [install] section of setup.cfg is absent and if both conditions are present, then the package is automatically installed into /usr/lib/site-python. The benefits are clear: - only a single RPM needs to be built across distro versions and architectures - it enables cheese shop packages to be quickly built on a machine and then installed in another - it eliminates the need for the tedious process of writing custom spec files - packages built this way can be loaded and run by virtually all 2.x python interpreters out there right now - it would be possible to even build python RPMs that work across distributions This patch is no more than a two-liner, and I am looking for input, to see if someone agrees, or not, to flesh out any pitfalls before going in. So do your best and provide sensible reasons why I should not do this, or else I will do it and submit a patch. Clock's ticking. ---------- assignee: tarek components: Distutils messages: 83513 nosy: Rudd-O, tarek severity: normal status: open title: RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 12:33:04 2009 From: report at bugs.python.org (Rudd-O) Date: Fri, 13 Mar 2009 11:33:04 +0000 Subject: [issue5474] distutils produces invalid RPM packages of prerelease python packages In-Reply-To: <1236744919.07.0.603710480384.issue5474@psf.upfronthosting.co.za> Message-ID: <1236943984.34.0.946923738651.issue5474@psf.upfronthosting.co.za> Rudd-O added the comment: brown paper bug in the last lexic patch ---------- Added file: http://bugs.python.org/file13316/python-2.4-distutils-bdist_rpm-rpmversion-lexicalorder.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 13:37:09 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Mar 2009 12:37:09 +0000 Subject: [issue5223] infinite recursion in PyErr_WriteUnraisable In-Reply-To: <1234412915.77.0.527314714811.issue5223@psf.upfronthosting.co.za> Message-ID: <1236947829.68.0.555865283954.issue5223@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: yes, let's add this change to the backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 14:12:05 2009 From: report at bugs.python.org (Zhigang Wang) Date: Fri, 13 Mar 2009 13:12:05 +0000 Subject: [issue5483] [PATCH]Add FastDbfilenameShelf: shelf nerver sync cache even when writeback=True In-Reply-To: <1236949925.76.0.785103969967.issue5483@psf.upfronthosting.co.za> Message-ID: <1236949925.76.0.785103969967.issue5483@psf.upfronthosting.co.za> New submission from Zhigang Wang : shelf without writeback=True is too slow, while shelves with writeback=True takes too much time to close. And even worse, these codes can not run: $ cat test_shelve.py #!/usr/bin/env python import shelve store = shelve.open("/tmp/shelve.db", writeback=True) class Test(object): pass def main(): store["a"] = Test() if __name__ == '__main__': main() $ python test_shelve.py Exception cPickle.PicklingError: "Can't pickle : it's not the same object as __main__.Test" in ignored With this module, we can make it to run. I think it's worth add this function to shelve. We can achieve great improvement with some avoidable limitations. The other approach to add this function is to add a extra option the shelve.open(). We can discuss for which is better. ---------- components: Library (Lib) files: fast_shelf.patch keywords: patch messages: 83516 nosy: zhigang severity: normal status: open title: [PATCH]Add FastDbfilenameShelf: shelf nerver sync cache even when writeback=True type: feature request versions: Python 3.1 Added file: http://bugs.python.org/file13317/fast_shelf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 14:20:52 2009 From: report at bugs.python.org (Zhigang Wang) Date: Fri, 13 Mar 2009 13:20:52 +0000 Subject: [issue5483] [PATCH]Add FastDbfilenameShelf: shelf nerver sync cache even when writeback=True In-Reply-To: <1236949925.76.0.785103969967.issue5483@psf.upfronthosting.co.za> Message-ID: <1236950452.96.0.308678520543.issue5483@psf.upfronthosting.co.za> Zhigang Wang added the comment: Add some errata of the patch: add the new class to __all__. ---------- Added file: http://bugs.python.org/file13318/fast_shelf-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 15:32:07 2009 From: report at bugs.python.org (Erik Sandberg) Date: Fri, 13 Mar 2009 14:32:07 +0000 Subject: [issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis In-Reply-To: <1236954727.06.0.0825252452212.issue5484@psf.upfronthosting.co.za> Message-ID: <1236954727.06.0.0825252452212.issue5484@psf.upfronthosting.co.za> New submission from Erik Sandberg : When subprocess.call is told to execute a .bat file on Windows, and the path to the batch file is given as an absolute path, and the path includes a left parenthesis ('('), then the call fails with a message similar to the following; it appears that the parenthesis is incorrectly quoted. 'c:\tmp\f' is not recognized as an internal or external command, operable program or batch file. Traceback (most recent call last): File "parenbug.py", line 7, in subprocess.check_call(os.path.join(os.getcwd(), bat)) File "c:\Python25\lib\subprocess.py", line 461, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'c:\tmp\f(o.bat' returned non-zero exit status 1 I have reproduced this on Windows XP. ---------- components: Library (Lib), Windows files: parenbug.py messages: 83518 nosy: sandberg severity: normal status: open title: subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file13319/parenbug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 15:34:53 2009 From: report at bugs.python.org (Erik Sandberg) Date: Fri, 13 Mar 2009 14:34:53 +0000 Subject: [issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis In-Reply-To: <1236954727.06.0.0825252452212.issue5484@psf.upfronthosting.co.za> Message-ID: <1236954893.02.0.337961573743.issue5484@psf.upfronthosting.co.za> Erik Sandberg added the comment: I'm using Python 2.5.1, by the way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 17:34:21 2009 From: report at bugs.python.org (Erik Sandberg) Date: Fri, 13 Mar 2009 16:34:21 +0000 Subject: [issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis In-Reply-To: <1236954727.06.0.0825252452212.issue5484@psf.upfronthosting.co.za> Message-ID: <1236962061.06.0.901035048209.issue5484@psf.upfronthosting.co.za> Erik Sandberg added the comment: I have narrowed down the problem further: The same error happens with the following code: import win32process win32process.CreateProcess(None, 'f(o.bat', None, None, 1, 0, None, None, win32process.STARTUPINFO()) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 17:51:02 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Fri, 13 Mar 2009 16:51:02 +0000 Subject: [issue5485] pyexpat has no unit tests for UseForeignDTD functionality In-Reply-To: <1236963062.63.0.579203765421.issue5485@psf.upfronthosting.co.za> Message-ID: <1236963062.63.0.579203765421.issue5485@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : Lacking unit tests for this (documented) functionality makes it harder for alternate Python runtimes to correctly provide it. Plus, if it's not tested, it might not work. I tried to write tests for the feature since I recently used it and thought it would be pretty straightforward. However, I failed. expat inscrutably refuses to call the external entity ref handler I provided in my test. Attached is my attempted, in case anyone feels like helping complete it. ---------- components: Library (Lib), Tests, XML files: use-foreign-dtd.patch keywords: patch messages: 83521 nosy: exarkun severity: normal status: open title: pyexpat has no unit tests for UseForeignDTD functionality type: feature request versions: Python 2.7 Added file: http://bugs.python.org/file13320/use-foreign-dtd.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 18:07:34 2009 From: report at bugs.python.org (Erik Sandberg) Date: Fri, 13 Mar 2009 17:07:34 +0000 Subject: [issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis In-Reply-To: <1236954727.06.0.0825252452212.issue5484@psf.upfronthosting.co.za> Message-ID: <1236964054.94.0.501851350525.issue5484@psf.upfronthosting.co.za> Erik Sandberg added the comment: argh, it seems that the problem is in how CreateProcess works; exactly the same error can be provoked from C. ---------- Added file: http://bugs.python.org/file13321/parenbug.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 19:12:30 2009 From: report at bugs.python.org (Erik Sandberg) Date: Fri, 13 Mar 2009 18:12:30 +0000 Subject: [issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis In-Reply-To: <1236954727.06.0.0825252452212.issue5484@psf.upfronthosting.co.za> Message-ID: <1236967950.93.0.476722591158.issue5484@psf.upfronthosting.co.za> Erik Sandberg added the comment: I experimented further, the only way to run a .bat file whose name contains funny characters, seems to be: subprocess.call('""f(o.bat""', shell=True) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 19:20:03 2009 From: report at bugs.python.org (DSM) Date: Fri, 13 Mar 2009 18:20:03 +0000 Subject: [issue5486] doc copyedits In-Reply-To: <1236968402.64.0.364958791658.issue5486@psf.upfronthosting.co.za> Message-ID: <1236968402.64.0.364958791658.issue5486@psf.upfronthosting.co.za> New submission from DSM : Handful of typos. Patch against py3k trunk @ r70341. I left howto/webservers.rst alone, despite a fair number of problems, 'cause it could do with a more serious rewrite than I have time for. ---------- assignee: georg.brandl components: Documentation files: py3k.typos.diff keywords: patch messages: 83524 nosy: dsm001, georg.brandl severity: normal status: open title: doc copyedits versions: Python 3.1 Added file: http://bugs.python.org/file13322/py3k.typos.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 19:20:35 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 13 Mar 2009 18:20:35 +0000 Subject: [issue5485] pyexpat has no unit tests for UseForeignDTD functionality In-Reply-To: <1236963062.63.0.579203765421.issue5485@psf.upfronthosting.co.za> Message-ID: <1236968435.44.0.0503336762055.issue5485@psf.upfronthosting.co.za> Martin v. L?wis added the comment: You need to make two changes: 1. Enable parsing of parameter entities in the first place, e.g. through SetParamEntityParsing(XML_PARAM_ENTITY_PARSING_ALWAYS) 2. Pass a well-formed document, e.g. "" ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 19:29:41 2009 From: report at bugs.python.org (Tim Golden) Date: Fri, 13 Mar 2009 18:29:41 +0000 Subject: [issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis In-Reply-To: <1236967950.93.0.476722591158.issue5484@psf.upfronthosting.co.za> Message-ID: <49BAA60C.6070103@timgolden.me.uk> Tim Golden added the comment: Erik Sandberg wrote: > Erik Sandberg added the comment: > > I experimented further, the only way to run a .bat file whose name > contains funny characters, seems to be: > > subprocess.call('""f(o.bat""', shell=True) Well there's a bit of a double-whammy going on here. There's a long-unfixed bug which doesn't quote parameters to subprocess under Windows when shell=True: http://bugs.python.org/issue2304 but in fact you don't need to set shell=True to run a batch file anyway: import subprocess open ("t(o.bat", "w").write ("echo we are here\n") subprocess.call (["t(o.bat"]) ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 19:32:27 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Fri, 13 Mar 2009 18:32:27 +0000 Subject: [issue5485] pyexpat has no unit tests for UseForeignDTD functionality In-Reply-To: <1236963062.63.0.579203765421.issue5485@psf.upfronthosting.co.za> Message-ID: <1236969147.74.0.529293327041.issue5485@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Thanks, that helped a bunch. I'm sure it would have taken me a long time to find SetParamEntityParsing(XML_PARAM_ENTITY_PARSING_ALWAYS). Perhaps it would also be good to expand the pyexpat documentation to cover that method and parameter (unless it's there already and I missed it, but I don't think so). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 19:42:54 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 13 Mar 2009 18:42:54 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1236933252.32.0.300710194878.issue5479@psf.upfronthosting.co.za> Message-ID: <49BAA929.5030301@v.loewis.de> Martin v. L?wis added the comment: > As the documentation section of > http://docs.python.org/reference/datamodel.html#object.__lt__ needs to > be updated as well to mark the eventual solution as the recommended easy > way to provide total ordering. This is the 2.6 version. What about the 3.0 version in http://docs.python.org/3.0/reference/datamodel.html#object.__lt__ needs to be updated? > Raymond's recipe at http://code.activestate.com/recipes/576685/ looks > more or less complete, do you feel that his posting on the mailing list > does not count as proposal? I submitted the feature request instead of > him because I was the one who noticed the problem (as discussed on the > mailing list) and felt "responsible" to report it here. I see. So it's a feature request. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 20:05:49 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Mar 2009 19:05:49 +0000 Subject: [issue5486] doc copyedits In-Reply-To: <1236968402.64.0.364958791658.issue5486@psf.upfronthosting.co.za> Message-ID: <1236971149.93.0.201719405996.issue5486@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r70342, r70343. Thanks very much! ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 20:09:43 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 13 Mar 2009 19:09:43 +0000 Subject: [issue5485] pyexpat has no unit tests for UseForeignDTD functionality In-Reply-To: <1236963062.63.0.579203765421.issue5485@psf.upfronthosting.co.za> Message-ID: <1236971383.52.0.0554535444217.issue5485@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you provide an update patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 20:11:30 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Fri, 13 Mar 2009 19:11:30 +0000 Subject: [issue5485] pyexpat has no unit tests for UseForeignDTD functionality In-Reply-To: <1236963062.63.0.579203765421.issue5485@psf.upfronthosting.co.za> Message-ID: <1236971490.05.0.130024980694.issue5485@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Here's the version I have now. I don't think it's complete, but it finishes the test started in the previous patch, and the test passes. ---------- Added file: http://bugs.python.org/file13323/use-foreign-dtd.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 20:12:07 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Fri, 13 Mar 2009 19:12:07 +0000 Subject: [issue5485] pyexpat has no unit tests for UseForeignDTD functionality In-Reply-To: <1236963062.63.0.579203765421.issue5485@psf.upfronthosting.co.za> Message-ID: <1236971527.38.0.189978567581.issue5485@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: To clarify, I'll probably work on this patch a bit more later, adding a few more tests for related behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 20:25:57 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Mar 2009 19:25:57 +0000 Subject: [issue5392] stack overflow after hitting recursion limit twice In-Reply-To: <1235820404.86.0.303625232795.issue5392@psf.upfronthosting.co.za> Message-ID: <1236972357.39.0.868672148499.issue5392@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r70344. ---------- resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 20:51:08 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 13 Mar 2009 19:51:08 +0000 Subject: [issue5481] Expand Decimal.__format__() support to include "n" In-Reply-To: <1236888027.08.0.305136534993.issue5481@psf.upfronthosting.co.za> Message-ID: <1236973868.18.0.13833595341.issue5481@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 21:03:36 2009 From: report at bugs.python.org (Erik Sandberg) Date: Fri, 13 Mar 2009 20:03:36 +0000 Subject: [issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis In-Reply-To: <1236954727.06.0.0825252452212.issue5484@psf.upfronthosting.co.za> Message-ID: <1236974616.85.0.793858181991.issue5484@psf.upfronthosting.co.za> Erik Sandberg added the comment: Did you test your code? I'm pretty sure I tried almost exactly the code you suggest, and got an error like "'t' is not recognized as an internal or external command...' (I cannot test this right now as I don't have access to Windows machines). In order to use shell=False, I think the correct thing should be something like this, though I haven't tried it myself yet: subprocess.call(["/c", "t(o.bat"], executable="cmd.exe") (this guess is based on what I read in msdn.com's docs on CreateProcess: """To run a batch file, you must start the command interpreter; set lpApplicationName to cmd.exe and set lpCommandLine to the following arguments: /c plus the name of the batch file.""") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 21:20:06 2009 From: report at bugs.python.org (Tim Golden) Date: Fri, 13 Mar 2009 20:20:06 +0000 Subject: [issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis In-Reply-To: <1236974616.85.0.793858181991.issue5484@psf.upfronthosting.co.za> Message-ID: <49BABFED.5050800@timgolden.me.uk> Tim Golden added the comment: Erik Sandberg wrote: > Erik Sandberg added the comment: > > Did you test your code? Several times, cutting and pasting into the Python interpreter. But I missed the fact that you were running Python 2.5 Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC Type "help", "copyright", "credits" or "license" for m >>> import subprocess >>> open ("t(o.bat", "w").write ("echo we are here\n") >>> subprocess.call (["t(o.bat"]) c:\temp>echo we are here we are here 0 >>> Testing under 2.5 shows the issue you describe However, I doubt very much whether any change would be made to 2.5 at this point anyway: I think it's in security-bug-fix-only mode now. Bizarrely, I can't see any reason why the behaviour should have changed. Might even be the runtime it links to. > (this guess is based on what I read in msdn.com's docs on CreateProcess: > """To run a batch file, you must start the command interpreter; set > lpApplicationName to cmd.exe and set lpCommandLine to the following > arguments: /c plus the name of the batch file.""") In fact, the shell=True code on Windows basically does: %COMSPEC% /c args... for you behind the scenes. But, as my example above shows, you don't seem to need to do that in any case. TJG ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 22:00:44 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Mar 2009 21:00:44 +0000 Subject: [issue5392] stack overflow after hitting recursion limit twice In-Reply-To: <1235820404.86.0.303625232795.issue5392@psf.upfronthosting.co.za> Message-ID: <1236978044.42.0.618715696094.issue5392@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 22:13:42 2009 From: report at bugs.python.org (R. David Murray) Date: Fri, 13 Mar 2009 21:13:42 +0000 Subject: [issue1611] doctest.testmod gets noisy if called more than once per SystemExit In-Reply-To: <1197555194.14.0.664818118617.issue1611@psf.upfronthosting.co.za> Message-ID: <1236978822.39.0.947789350443.issue1611@psf.upfronthosting.co.za> R. David Murray added the comment: Nick, is the change you made to Lib/doctest.py, commenting out the print "*** DocTestRunner.merge:" message, intended to be permanent? If so, we can close this bug. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 22:47:44 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Mar 2009 21:47:44 +0000 Subject: [issue2110] Implement __format__ for Decimal In-Reply-To: <1202994255.28.0.383332155678.issue2110@psf.upfronthosting.co.za> Message-ID: <1236980864.18.0.86940368378.issue2110@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch to implement the 'n' format specifier for Decimals (see also issue 5481). Raymond, could you give this a sanity check? ---------- assignee: marketdickinson -> rhettinger Added file: http://bugs.python.org/file13324/decimal_n_format.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 22:47:54 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Mar 2009 21:47:54 +0000 Subject: [issue2110] Implement __format__ for Decimal In-Reply-To: <1202994255.28.0.383332155678.issue2110@psf.upfronthosting.co.za> Message-ID: <1236980874.29.0.780052130802.issue2110@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: accepted -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 23:36:41 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 13 Mar 2009 22:36:41 +0000 Subject: [issue2110] Implement __format__ for Decimal In-Reply-To: <1202994255.28.0.383332155678.issue2110@psf.upfronthosting.co.za> Message-ID: <1236983801.3.0.352829030935.issue2110@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sure, I will take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 23:37:53 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Mar 2009 22:37:53 +0000 Subject: [issue5473] round(float, ndigits<0) sometimes rounds to odd In-Reply-To: <1236727134.95.0.532046507723.issue5473@psf.upfronthosting.co.za> Message-ID: <1236983873.84.0.975510324977.issue5473@psf.upfronthosting.co.za> Mark Dickinson added the comment: Actually the negative n case *is* quite different from the positive n, although I think it's fair to say that the issue 1869 title covers both cases fairly well. :) It's not at all hard to make sure that round(x, -n) correct for -22 <= -n <= 0 and any finite x, using the fact that the remainder fmod(x, 10.0**-n) is exactly representable as a float. I'll try to find time to implement this before 3.1. Positive n is still tricky, though. Anyway, I'm going to close this and fold the discussion into issue 1869. Thanks for the report! ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 23:52:57 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Mar 2009 22:52:57 +0000 Subject: [issue2396] Backport memoryview object to Python 2.7 In-Reply-To: <1205856163.49.0.847674946563.issue2396@psf.upfronthosting.co.za> Message-ID: <1236984777.26.0.302703547005.issue2396@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is an updated patch removing memory_str. I know Py_TPFLAGS_HAVE_NEWBUFFER should be documented, but I'm not sure where and how (I didn't add it in the first place). ---------- Added file: http://bugs.python.org/file13325/memview-trunk3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 13 23:56:33 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Mar 2009 22:56:33 +0000 Subject: [issue5449] bug fix to prevent io.BytesIO from accepting arbitrary keyword arguments In-Reply-To: <1236556380.35.0.110625961105.issue5449@psf.upfronthosting.co.za> Message-ID: <1236984993.99.0.539315483405.issue5449@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 00:02:29 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Mar 2009 23:02:29 +0000 Subject: [issue5396] os.read not handling O_DIRECT flag In-Reply-To: <1235847751.77.0.558509867366.issue5396@psf.upfronthosting.co.za> Message-ID: <1236985349.23.0.586247139407.issue5396@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think we will try to support O_DIRECT. First, it is a rather platform-specific flag. Second, Python's memory allocator doesn't allow specifying an arbitrary alignment value. Third, I don't even think O_DIRECT can make a positive difference in a Python program (the open() manpage actually warns against likely performance degradation when using O_DIRECT). So I'm closing this bug, sorry. ---------- nosy: +pitrou resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 00:11:50 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Fri, 13 Mar 2009 23:11:50 +0000 Subject: [issue5370] unpickling vs. __getattr__ In-Reply-To: <1235597176.48.0.557535954175.issue5370@psf.upfronthosting.co.za> Message-ID: <1236985910.09.0.0351231491376.issue5370@psf.upfronthosting.co.za> Gabriel Genellina added the comment: Are you sure you uploaded the right patch? I've not tested it, but I don't think this actually fixes the reported bug. __setstate__ is *very* unlikely to be found in the instance's dict, so you end up not calling __setstate__ at all. If no test failed, this may indicate bad test coverage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 00:28:04 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Mar 2009 23:28:04 +0000 Subject: [issue5047] Remove Monterey support from configure.in In-Reply-To: <20090124214044.37BA7D56A89@montanaro.dyndns.org> Message-ID: <1236986884.57.0.387805609969.issue5047@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You can probably commit this :-) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 00:30:39 2009 From: report at bugs.python.org (Mike Meyer) Date: Fri, 13 Mar 2009 23:30:39 +0000 Subject: [issue5370] unpickling vs. __getattr__ In-Reply-To: <1235597176.48.0.557535954175.issue5370@psf.upfronthosting.co.za> Message-ID: <1236987039.25.0.103026685456.issue5370@psf.upfronthosting.co.za> Mike Meyer added the comment: True. But hat's why it was a QAD hack - all I did was make sure it didn't blow up on the test code, and that it passed the provided unit tests. It really needs to walk the class tree. So something like hasattr(inst.__class__, '__setstate__') is more likely to be correct. And yes, the pickle unit tests apparently don't test the __*state__ routines, but that's a different bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 00:48:11 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Mar 2009 23:48:11 +0000 Subject: [issue5016] FileIO.seekable() can return False In-Reply-To: <1232494718.16.0.105569040712.issue5016@psf.upfronthosting.co.za> Message-ID: <1236988091.26.0.0041310840477.issue5016@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r70352 (py3k), r70353 (3.0). Needs backport to trunk and 2.6, if someone is interested. ---------- priority: high -> normal resolution: -> accepted stage: needs patch -> committed/rejected versions: -Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 00:51:27 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 13 Mar 2009 23:51:27 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236988287.94.0.772153678696.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: I'm thinking of allowing you to mix keywords and auto-numbering, but not manual numbering and auto-numbering. This would be so we could do: >>> '{:{fmt}} {:{fmt}}'.format(3.1415, 2.71828, fmt='1.4f') 'pi=3.1415 e=2.7183' Unfortunately the ':' is required, because if it's not there you have 2 braces next to each other, which is the escape sequence for a single brace. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 00:53:17 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 13 Mar 2009 23:53:17 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236988397.67.0.450922789537.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: Copy and paste error. That should be: >>> 'pi={:{fmt}} e={:{fmt}}'.format(3.1415, 2.71828, fmt='1.4f') 'pi=3.1415 e=2.7183' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 00:56:47 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Mar 2009 23:56:47 +0000 Subject: [issue4503] exception traceback sometimes slow In-Reply-To: <1228300311.73.0.0289401405318.issue4503@psf.upfronthosting.co.za> Message-ID: <1236988607.14.0.442706881236.issue4503@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I suppose we can close this now, it should be solved with the IO-C rewrite in 3.1, and won't be backported to 3.0. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 01:16:27 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 00:16:27 +0000 Subject: [issue1222] locale.format bug if thousand separator is space (french separator as example) In-Reply-To: <1191172668.69.0.513518274707.issue1222@psf.upfronthosting.co.za> Message-ID: <1236989787.69.0.51255540959.issue1222@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r70356, r70357, r70358, r70359. I didn't try to change anything about the trailing space since it's minor anyway. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 01:28:07 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Sat, 14 Mar 2009 00:28:07 +0000 Subject: [issue5370] unpickling vs. __getattr__ In-Reply-To: <1235597176.48.0.557535954175.issue5370@psf.upfronthosting.co.za> Message-ID: <1236990487.31.0.614177826821.issue5370@psf.upfronthosting.co.za> Gabriel Genellina added the comment: I think that trying to emulate all "getattr" details in the middle of unpickling (but omiting calls to __getattr__) isn't the right thing to do. What if in some cases __getattr__ (or __getattribute__) *does* the right thing, but pickle doesn't call it? Other people would be rightfully upset. There should be a warning note about __getattr__ in the pickle documentation, and people should be encouraged to write __getattr__ in a more robust way, if class instances are meant to be pickled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 01:28:39 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 00:28:39 +0000 Subject: [issue2281] Enhanced cPython profiler with high-resolution timer In-Reply-To: <1205359008.42.0.436050296007.issue2281@psf.upfronthosting.co.za> Message-ID: <1236990519.59.0.883386426336.issue2281@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Interesting patch, but there are lots of spurious #if's and #ifdef's which could be simplified. Also, some changes look slightly unrelated (e.g. the switch from malloc/free to PyObject_Malloc/PyObject_Free). ---------- nosy: +pitrou stage: -> patch review versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 01:41:53 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 00:41:53 +0000 Subject: [issue4928] Problem with tempfile.NamedTemporaryFile on Solaris 10 In-Reply-To: <1231838566.25.0.143957228078.issue4928@psf.upfronthosting.co.za> Message-ID: <1236991313.26.0.708534863896.issue4928@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Martin, do you have time to confirm this problem? Failure of (Named)TemporaryFile to remove the file on shutdown should be considered a serious issue. ---------- nosy: +loewis, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 01:44:49 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Mar 2009 00:44:49 +0000 Subject: [issue5431] cmpfunc in Python 3.0.1 windows installer In-Reply-To: <1236345754.09.0.226629136415.issue5431@psf.upfronthosting.co.za> Message-ID: <1236991489.52.0.478892288285.issue5431@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This development issues tracker is for issues that might result in changes in future Python releases. This issue was properly closed and in the absence of a new proposal for future change, should have stayed closed, even with the addition of a comment. The only-half removal of the cmp family in 3.0 was an error. For better or for worse, and after much discussion, the developers decided to fix the error immediately in 3.0.1 in order to prevent more error-dependent portings that would need further fix in 3.1. In other words, better a little pain now than more pain in the future. What you do with your installation is up to you. If adding a line works for you as a temporary measure, great. Or help the SWIG folks to finish the port to Python 3 as intended and as it is in 3.0.1 and will be in the future. Further current-release usage questions should be directed to the python-list (or c.l.p or the gmane mirror) or other forums. PS. Your original post would have been more readable with the long error log severely snipped to just show the essential point. ---------- nosy: +tjreedy status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 01:50:00 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 00:50:00 +0000 Subject: [issue5006] Duplicate UTF-16 BOM if a file is open in append mode In-Reply-To: <1232407475.88.0.821271875363.issue5006@psf.upfronthosting.co.za> Message-ID: <1236991800.72.0.888731743725.issue5006@psf.upfronthosting.co.za> Antoine Pitrou added the comment: One possible solution would be to call tell() in the TextIOWrapper constructor, and then decoder.setstate((b"", 0)) if the current pos is >0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 01:50:44 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 14 Mar 2009 00:50:44 +0000 Subject: [issue2281] Enhanced cPython profiler with high-resolution timer In-Reply-To: <1205359008.42.0.436050296007.issue2281@psf.upfronthosting.co.za> Message-ID: <1236991844.06.0.654240140138.issue2281@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 01:59:17 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 00:59:17 +0000 Subject: [issue1143] Update to latest ElementTree in Python 2.7 In-Reply-To: <1189491195.66.0.621818063137.issue1143@psf.upfronthosting.co.za> Message-ID: <1236992357.28.0.431644379645.issue1143@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This could be a nice addition to the next 3.1 alphas/betas. ---------- nosy: +benjamin.peterson, pitrou versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:05:10 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:05:10 +0000 Subject: [issue3820] Python 3.0b3 doesn't start on German Win XP SP3/SP2 In-Reply-To: <1220976054.63.0.127579855963.issue3820@psf.upfronthosting.co.za> Message-ID: <1236992710.15.0.261808115959.issue3820@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:10:02 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:10:02 +0000 Subject: [issue1674032] Make threading.Event().wait(timeout=3) return isSet Message-ID: <1236993002.86.0.605751981136.issue1674032@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A test should be added to the patch, and then I think it could go in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:11:40 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:11:40 +0000 Subject: [issue2874] Remove use of the stat module in the stdlib In-Reply-To: <1210913145.44.0.456986373707.issue2874@psf.upfronthosting.co.za> Message-ID: <1236993100.73.0.198451139373.issue2874@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What's the story on this? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:12:53 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:12:53 +0000 Subject: [issue3699] test_bigaddrspace broken In-Reply-To: <1219841607.12.0.523528748152.issue3699@psf.upfronthosting.co.za> Message-ID: <1236993173.48.0.572164024688.issue3699@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:14:14 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:14:14 +0000 Subject: [issue2394] [Py3k] Finish the memoryview object implementation In-Reply-To: <1205855988.24.0.314040259236.issue2394@psf.upfronthosting.co.za> Message-ID: <1236993254.57.0.568244915033.issue2394@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file11166/mem6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:14:20 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:14:20 +0000 Subject: [issue2394] [Py3k] Finish the memoryview object implementation In-Reply-To: <1205855988.24.0.314040259236.issue2394@psf.upfronthosting.co.za> Message-ID: <1236993260.97.0.531724145972.issue2394@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file11159/mem5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:14:26 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:14:26 +0000 Subject: [issue2394] [Py3k] Finish the memoryview object implementation In-Reply-To: <1205855988.24.0.314040259236.issue2394@psf.upfronthosting.co.za> Message-ID: <1236993266.06.0.1783626381.issue2394@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file11158/mem4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:14:29 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:14:29 +0000 Subject: [issue2394] [Py3k] Finish the memoryview object implementation In-Reply-To: <1205855988.24.0.314040259236.issue2394@psf.upfronthosting.co.za> Message-ID: <1236993269.87.0.925153433967.issue2394@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file11157/mem3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:14:33 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:14:33 +0000 Subject: [issue2394] [Py3k] Finish the memoryview object implementation In-Reply-To: <1205855988.24.0.314040259236.issue2394@psf.upfronthosting.co.za> Message-ID: <1236993273.51.0.0907387065028.issue2394@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file11156/mem2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:14:50 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:14:50 +0000 Subject: [issue2394] [Py3k] Finish the memoryview object implementation In-Reply-To: <1205855988.24.0.314040259236.issue2394@psf.upfronthosting.co.za> Message-ID: <1236993290.63.0.376778154286.issue2394@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file11155/mem1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:15:05 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:15:05 +0000 Subject: [issue2394] [Py3k] Finish the memoryview object implementation In-Reply-To: <1205855988.24.0.314040259236.issue2394@psf.upfronthosting.co.za> Message-ID: <1236993305.94.0.10370295236.issue2394@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:18:54 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:18:54 +0000 Subject: [issue1568] PATCH: Armin's attribute lookup caching for 3.0 In-Reply-To: <1197034097.09.0.871896219058.issue1568@psf.upfronthosting.co.za> Message-ID: <1236993534.64.0.517735048051.issue1568@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This has been merged to py3k a long time ago, hasn't it? ---------- nosy: +pitrou resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:19:27 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 14 Mar 2009 01:19:27 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236993567.31.0.377084316807.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: Should string.Format also support auto-numbering? It seems like it should, but I'm not convinced it's possible without modifying the signatures to the public methods, in particular get_field(). The design of string.Format doesn't support state that is created in format() or vformat() and is passed in to get_field(). I could use object state in the string.Format instance, but that doesn't work well, due to the fact that format() can be called multiple times per instance lifetime. string.Format really needs to have no state of its own, for example in the case where a single instance is being used by multiple threads or if it calls the same instance of itself recursively. I'm going to punt on this for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:20:04 2009 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 14 Mar 2009 01:20:04 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236993604.3.0.639971907748.issue5237@psf.upfronthosting.co.za> Guido van Rossum added the comment: Not sure if that's worth it -- doesn't sound like the people who would need that feature would mind much using explicit numbering. Let's try KISS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:23:05 2009 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 14 Mar 2009 01:23:05 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236993785.35.0.807508948998.issue5237@psf.upfronthosting.co.za> Guido van Rossum added the comment: (I meant that as a reply to the {:{fmt}} example, but it applies to your later post too. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:27:32 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:27:32 +0000 Subject: [issue1597000] Use \r\n, not \n for HTTP headers Message-ID: <1236994052.07.0.653245643876.issue1597000@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Closing as suggested one year ago. ---------- nosy: +pitrou resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:32:13 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:32:13 +0000 Subject: [issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs In-Reply-To: <1202731134.77.0.201279568783.issue2066@psf.upfronthosting.co.za> Message-ID: <1236994333.51.0.461937722447.issue2066@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Based on the feedback above, it seems this should be committed, shouldn't it? ---------- nosy: +pitrou stage: -> commit review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:34:30 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:34:30 +0000 Subject: [issue1977] Python reinitialization test In-Reply-To: <1201720244.02.0.0976736262476.issue1977@psf.upfronthosting.co.za> Message-ID: <1236994470.18.0.494997839787.issue1977@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is still a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:35:43 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 14 Mar 2009 01:35:43 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236994543.7.0.539213579659.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: I believe this patch is complete. I need to add tests and documentation, but the code itself should be finished. Here's the normal case: >>> '{} {}'.format('test', 0) 'test 0' It also handles error checking: >>> '{1} {}'.format('test', 0) Traceback (most recent call last): File "", line 1, in ValueError: cannot switch from manual field specification to automatic field numbering >>> '{} {1}'.format('test', 0) Traceback (most recent call last): File "", line 1, in ValueError: cannot switch from automatic field numbering to manual field specification You can use named fields along with auto-numbered fields: >>> '{test} {}'.format(1, test=2) '2 1' You can nest either named or auto-numbered fields: >>> '{:^{}}'.format('x', 10) ' x ' >>> 'pi={:{fmt}} {:{fmt}}'.format(3.1415, 2.71828, fmt='1.4f') 'pi=3.1415 2.7183' Attribute access is supported: >>> '{.__abs__}'.format(0) "" As is subscripting: >>> '{[x]}'.format({'x':4}) '4' >>> '{[1]}'.format([1, 2]) '2' I'll work on the tests over the weekend, then commit to trunk and py3k. We need to decide what to do about string.Formatter (which I just realized I erroneously called string.Format in the previous message). ---------- Added file: http://bugs.python.org/file13326/issue5237-0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:45:12 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:45:12 +0000 Subject: [issue1613130] str.split creates new string even if pattern not found Message-ID: <1236995112.76.0.276781953593.issue1613130@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> needs patch type: feature request -> performance versions: +Python 2.7, Python 3.1 -Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:46:10 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 01:46:10 +0000 Subject: [issue1399935] enhance unittest to define tests that *should* fail Message-ID: <1236995170.49.0.554042007651.issue1399935@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Benjamin, is it on your plate? (or perhaps you already have a working patch somewhere? :-)) ---------- nosy: +benjamin.peterson, pitrou stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:49:35 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 14 Mar 2009 01:49:35 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236995375.1.0.294215110415.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: About '{:{fmt}}' and other wacky combinations, like '{.__doc__}': It's much easier and cleaner in the code to allow these cases than it would be to disallow them. And I rather like the '{:{fmt}}' example! I suggest leaving them in. They might be useful, and it makes the implementation cleaner. I think it will be easier to document, as well. There are no special cases to describe: If the field name is omitted, it's auto-numbered with a sequential index number. You can't mix auto-numbering and manual specification of indexes. As for string.Formatter, I agree we should leave it alone. I'd be surprised if anyone is actually using it, anyway. But I'd love to hear otherwise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:50:11 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 14 Mar 2009 01:50:11 +0000 Subject: [issue1611] doctest.testmod gets noisy if called more than once per SystemExit In-Reply-To: <1197555194.14.0.664818118617.issue1611@psf.upfronthosting.co.za> Message-ID: <1236995411.56.0.360659979884.issue1611@psf.upfronthosting.co.za> Nick Coghlan added the comment: I believe I commented it out when we were trying to get the buildbots green before releasing 2.6. (The fact that regrtest.py trips over it does suggest there are legitimate reasons for calling doctest.testmod() more than once in a single test suite though) It looked like some debugging code that was accidentally left in to me (putting random stuff on the screen in a test tool that monitors what is written to stdout is less than helpful...) Since 2.5 is only getting security fixes now and later versions don't suffer from the issue, I'm closing this one as "out of date". ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 02:50:44 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Sat, 14 Mar 2009 01:50:44 +0000 Subject: [issue5370] unpickling vs. __getattr__ In-Reply-To: <1235597176.48.0.557535954175.issue5370@psf.upfronthosting.co.za> Message-ID: <1236995444.28.0.706072379434.issue5370@psf.upfronthosting.co.za> Gabriel Genellina added the comment: This doc update should warn people about the need to implement __getinitargs__ / __getnewargs__ when the instance relies on some internal invariants that must be preserved, and reiterates the important fact that __init__ / __new__ are NOT normally invoked. The patch is against trunk; wording for 3.x should omit references to __getinitargs__ and __init__. ---------- assignee: -> georg.brandl components: +Documentation, Library (Lib) keywords: +patch nosy: +georg.brandl versions: +Python 2.7, Python 3.1 -Python 2.5 Added file: http://bugs.python.org/file13327/pickle.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 03:44:27 2009 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 14 Mar 2009 02:44:27 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236998667.14.0.414616270674.issue5237@psf.upfronthosting.co.za> Guido van Rossum added the comment: > About '{:{fmt}}' and other wacky combinations, like '{.__doc__}': > > It's much easier and cleaner in the code to allow these cases than it > would be to disallow them. And I rather like the '{:{fmt}}' example! > > I suggest leaving them in. They might be useful, and it makes the > implementation cleaner. I think it will be easier to document, as well. > There are no special cases to describe: If the field name is omitted, > it's auto-numbered with a sequential index number. You can't mix > auto-numbering and manual specification of indexes. OK, if allowing it is simpler, I'm all for allowing it! (I thought it would be extra work. Shame on me for not looking at the code. :-) > As for string.Formatter, I agree we should leave it alone. I'd be > surprised if anyone is actually using it, anyway. But I'd love to hear > otherwise. OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 03:50:27 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 14 Mar 2009 02:50:27 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1236999027.92.0.04526453489.issue5237@psf.upfronthosting.co.za> Nick Coghlan added the comment: Only Formatter.format_field() is particularly hard to override at the moment (for the same reason that __format__() methods are tricky to write). That said, creating a locale aware version of string formatting based on string.Formatter is such an obvious idea that I would actually be surprised if someone *hasn't* done it by now (they may not have published it anywhere, but I expect someone has implemented it for their own use). That said, I think it's OK for string.Formatter to lag the actual str.format implementation when it comes to features like this. I see it as similar to the formatting mini-language parser problem: the primary goal is to have a good implementation and syntax for str.format, while providing the tools to allow people to create alternative formatters with similar power is secondary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 06:16:26 2009 From: report at bugs.python.org (oc) Date: Sat, 14 Mar 2009 05:16:26 +0000 Subject: [issue5487] Parts of Tkinter missing (but not when running from IDLE) In-Reply-To: <1237007786.64.0.764590527521.issue5487@psf.upfronthosting.co.za> Message-ID: <1237007786.64.0.764590527521.issue5487@psf.upfronthosting.co.za> New submission from oc : When running a script using Python 3.0.1 I get an error saying that tkinter.messagebox doesn't exist. However when I run the same script from within IDLE, it works fine. This has led to my thinking I'd fixed the Python 2.6/3 compatibility errors while testing in IDLE, but had end users say it didn't work. ---------- components: Tkinter files: snippet.py messages: 83572 nosy: oc severity: normal status: open title: Parts of Tkinter missing (but not when running from IDLE) type: crash versions: Python 3.0 Added file: http://bugs.python.org/file13328/snippet.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 08:42:51 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 14 Mar 2009 07:42:51 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1237016571.86.0.712368620391.issue5237@psf.upfronthosting.co.za> Changes by Eric Smith : Removed file: http://bugs.python.org/file13283/half-baked-not-for-real-use.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 09:43:57 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Mar 2009 08:43:57 +0000 Subject: [issue5487] Parts of Tkinter missing (but not when running from IDLE) In-Reply-To: <1237007786.64.0.764590527521.issue5487@psf.upfronthosting.co.za> Message-ID: <1237020237.9.0.989393754951.issue5487@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Why do you think this is a bug? You need to import tkinter.messagebox explicitly for your program to be correct. That you could do without inside IDLE is only because IDLE had already imported that module. Closing as "won't fix". ---------- nosy: +loewis resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 09:44:15 2009 From: report at bugs.python.org (=?utf-8?q?Mart_S=C3=B5mermaa?=) Date: Sat, 14 Mar 2009 08:44:15 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1236845917.79.0.765415316549.issue5479@psf.upfronthosting.co.za> Message-ID: <1237020255.45.0.205125591209.issue5479@psf.upfronthosting.co.za> Mart S?mermaa added the comment: > This is the 2.6 version. What about the 3.0 version in > http://docs.python.org/3.0/reference/datamodel.html#object.__lt__ > needs to be updated? When functools.total_ordering (whether it lands in functools is open) lands that section should be amended in the lines of the following: "There are no implied relationships among the comparison operators. The truth of x==y does not imply that x!=y is false. Accordingly, when defining __eq__(), one should also define __ne__() so that the operators will behave as expected. However, given a class defining one or more ordering methods, `functools.total_ordering`_ class decorator can be used to fill in the rest. Please see the documentation of `functools.total_ordering`_ for further details." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 09:45:26 2009 From: report at bugs.python.org (Rudd-O) Date: Sat, 14 Mar 2009 08:45:26 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1237020326.68.0.587909331864.issue5482@psf.upfronthosting.co.za> Rudd-O added the comment: More info: >From my wicked noarch RPM compiled in an i386 machine, installed into my 64 bit centos (same OS): [rudd-o at tobey ~]$ python Python 2.4.5 (#1, Mar 13 2009, 12:13:36) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import wicked >>> wicked.__file__ '/usr/lib/site-python/wicked/__init__.pyc' Evidence that the compiled file is being not recompiled, and is being used directly on import, even across architectures. ------------- However, I have discovered that I cannot run the same pyc file across interpreters, even though the py file would run, so I am stumped at this. The reason i am stumped is that I can find a platform-independent, interpreter-independent dir (site-python), and a platform-dependent, interpreter-dependent dir (site-packages), but NOT a platform-independent, interpreter-dependent dir, which is the BIG issue here if we want to at least avoid having to rebuild python packages for different architectures with the SAME interpreter. Ideas? I am thirsty for more knowledge here and losing hope. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 09:50:49 2009 From: report at bugs.python.org (Rudd-O) Date: Sat, 14 Mar 2009 08:50:49 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1237020649.17.0.42577974521.issue5482@psf.upfronthosting.co.za> Rudd-O added the comment: apparently, /usr/lib/python2.4/site-packages IS in the sys.path, which would seem to indicate that python would actually load pure python modules from there. Which means that the only fixes that need to go within distutils would be: 1. a fix so in 64bit arches, pure python modules are STILL INSTALLED within the /usr/lib/python2.X dir instead of lib64 2. making every RPM built out of a pure python module depend on the specific Python interpreter it was built under, to a precision of major.minor version. Right? This sort of busts my plan of providing universal RPM packages for all distributions, BUT... BUT... at least means that a single package can work in all platforms of all distributions that have a particular version of the interpreter it was built in. Which is a space / busywork savings of at least platforms*distributions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 09:53:55 2009 From: report at bugs.python.org (Rudd-O) Date: Sat, 14 Mar 2009 08:53:55 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1237020835.6.0.262178361206.issue5482@psf.upfronthosting.co.za> Rudd-O added the comment: last comment, first line, I should amend it to say that even in 64bit arches, the /usr/lib (NOT ilb64) sitepackages dir is available. I would have to actually try this on the packages that I have, see how i fare. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 10:48:32 2009 From: report at bugs.python.org (Rudd-O) Date: Sat, 14 Mar 2009 09:48:32 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1237024112.28.0.497995593596.issue5482@psf.upfronthosting.co.za> Rudd-O added the comment: FYI: In RPM, the correct dependency to require a particulr python minor version is: python(abi) = 2.X where X is the minor version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 12:15:18 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 14 Mar 2009 11:15:18 +0000 Subject: [issue1568] PATCH: Armin's attribute lookup caching for 3.0 In-Reply-To: <1197034097.09.0.871896219058.issue1568@psf.upfronthosting.co.za> Message-ID: <1237029318.83.0.261949054087.issue1568@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I'm not sure this should be closed. According to Neil (see above) the implementation could be simpler in 3.0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 12:53:20 2009 From: report at bugs.python.org (Vlastimil Brom) Date: Sat, 14 Mar 2009 11:53:20 +0000 Subject: [issue4281] Idle - incorrectly displaying a character (Latin capital letter sharp s) In-Reply-To: <1226089920.44.0.90680757022.issue4281@psf.upfronthosting.co.za> Message-ID: <1237031600.29.0.581009060568.issue4281@psf.upfronthosting.co.za> Vlastimil Brom added the comment: I just wanted to confirm, that there isn't a bug in idle nor tk, but somwhere in my istalled fonts. Now while testing python 3.1a1, when I also have a font containing ? LATIN CAPITAL LETTER SHARP S (DejaVu), it's more clear. Printing this character using a default font in idle I get the wrong glyph mentioned in the report; however this is corrected immediately after changing the font to DejaVu. Some of the fonts on my system seems to "shadow" this newly added character with a wrong glyph (also preventing tk to find a font realy suporting this). Sorry for the needles bug report. vbr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 13:11:11 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 14 Mar 2009 12:11:11 +0000 Subject: [issue5463] Compiler warning get_ulong is never used 3.x In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1237032671.64.0.478337746859.issue5463@psf.upfronthosting.co.za> Mark Dickinson added the comment: The latest patch looks good to me, and results in a much cleaner looking _struct.c. Thank you! One worry: the issue 4228 discussion suggests that the zipfile module still relies on the deprecated wrapping. I think this needs to be investigated (and fixed if necessary) before this patch can be applied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 13:21:53 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 12:21:53 +0000 Subject: [issue1568] PATCH: Armin's attribute lookup caching for 3.0 In-Reply-To: <1197034097.09.0.871896219058.issue1568@psf.upfronthosting.co.za> Message-ID: <1237033313.26.0.917279441743.issue1568@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, reopening and retargetting to 3.1 in case someone wants to work on it. ---------- resolution: fixed -> accepted stage: -> patch review status: closed -> open type: feature request -> performance versions: +Python 3.1 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 13:38:55 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 14 Mar 2009 12:38:55 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1237034335.39.0.334647780257.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: Committed: r70364 (trunk) r70366 (py3k) The docs still need updating. If anyone with more knowledge of the documentation system than I have would like to tackle those, please feel free! ---------- priority: -> high resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 13:49:11 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 14 Mar 2009 12:49:11 +0000 Subject: [issue4228] struct.pack('L', -1) In-Reply-To: <1225294862.2.0.0798680271584.issue4228@psf.upfronthosting.co.za> Message-ID: <1237034951.85.0.243003461752.issue4228@psf.upfronthosting.co.za> Mark Dickinson added the comment: Was zipfile ever fixed to avoid this deprecated behaviour? If not, is the fix fairly trivial? It would be nice to be able to finally turn these struct deprecation warnings into errors in Python 3.1 and/or Python 2.7. ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 14:30:14 2009 From: report at bugs.python.org (Jervis Whitley) Date: Sat, 14 Mar 2009 13:30:14 +0000 Subject: [issue1714448] if something as x: Message-ID: <1237037414.68.0.676639559007.issue1714448@psf.upfronthosting.co.za> Jervis Whitley added the comment: Hi, I like this idea. I've put together a short patch that will implement inline assignment. if f() -> name: use(name) or more powerfully: if f() -> name == 'spam': usespam(name) the old syntax if something as x: is still available if that is what is desired. if (f() == 'spam') -> name: newname = name.replace('p', 'h') Patched against Py3k please kick the tires, I've added some tests and developed a PEP. ---------- keywords: +patch nosy: +jdwhitley versions: +Python 3.1 -Python 2.6 Added file: http://bugs.python.org/file13329/assexp.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 16:08:17 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 14 Mar 2009 15:08:17 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1237043297.41.0.479102300074.issue5251@psf.upfronthosting.co.za> Nick Coghlan added the comment: First draft of patch attached. Limitations of this version of the patch: - includes some unrelated marshal.c changes (improved error messages) - no tests of the new functionality - contextlib not changed yet - no documentation changes The new semantics are in place though, and the existing test_with and test_contextlib tests all still pass. ---------- keywords: +patch Added file: http://bugs.python.org/file13330/pep377_v1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 16:30:14 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Mar 2009 15:30:14 +0000 Subject: [issue1143] Update to latest ElementTree in Python 2.7 In-Reply-To: <1189491195.66.0.621818063137.issue1143@psf.upfronthosting.co.za> Message-ID: <1237044614.72.0.324512108238.issue1143@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Well, sure, but I'm not going to do it. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 16:47:41 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 15:47:41 +0000 Subject: [issue1143] Update to latest ElementTree in Python 2.7 In-Reply-To: <1189491195.66.0.621818063137.issue1143@psf.upfronthosting.co.za> Message-ID: <1237045661.63.0.803611778218.issue1143@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I was silently suggesting that you could add it to the release PEP :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 16:50:15 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Mar 2009 15:50:15 +0000 Subject: [issue1143] Update to latest ElementTree in Python 2.7 In-Reply-To: <1237045661.63.0.803611778218.issue1143@psf.upfronthosting.co.za> Message-ID: <1afaf6160903140850y706b9cb6q8dc8283620ebcfa2@mail.gmail.com> Benjamin Peterson added the comment: 2009/3/14 Antoine Pitrou : > > Antoine Pitrou added the comment: > > I was silently suggesting that you could add it to the release PEP :-) Wow, I'm really not getting the subtle hints today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 17:12:19 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 16:12:19 +0000 Subject: [issue4688] GC optimization: don't track simple tuples and dicts In-Reply-To: <1229557269.64.0.0932795571555.issue4688@psf.upfronthosting.co.za> Message-ID: <1237047139.1.0.80734630133.issue4688@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file12387/tupleopts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 17:12:23 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 16:12:23 +0000 Subject: [issue4688] GC optimization: don't track simple tuples and dicts In-Reply-To: <1229557269.64.0.0932795571555.issue4688@psf.upfronthosting.co.za> Message-ID: <1237047143.31.0.951526773343.issue4688@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file12389/dictopts2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 17:12:26 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 16:12:26 +0000 Subject: [issue4688] GC optimization: don't track simple tuples and dicts In-Reply-To: <1229557269.64.0.0932795571555.issue4688@psf.upfronthosting.co.za> Message-ID: <1237047146.79.0.682373920512.issue4688@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file12396/tupleopts-alt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 17:12:30 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 16:12:30 +0000 Subject: [issue4688] GC optimization: don't track simple tuples and dicts In-Reply-To: <1229557269.64.0.0932795571555.issue4688@psf.upfronthosting.co.za> Message-ID: <1237047150.47.0.342437400736.issue4688@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file12397/tuple+dictopts-alt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 17:12:58 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 16:12:58 +0000 Subject: [issue4688] GC optimization: don't track simple tuples and dicts In-Reply-To: <1229557269.64.0.0932795571555.issue4688@psf.upfronthosting.co.za> Message-ID: <1237047178.42.0.819943155123.issue4688@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a new patch against trunk. ---------- Added file: http://bugs.python.org/file13331/containeropts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 17:13:18 2009 From: report at bugs.python.org (Rudd-O) Date: Sat, 14 Mar 2009 16:13:18 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1237047198.58.0.790693638101.issue5482@psf.upfronthosting.co.za> Rudd-O added the comment: Apropos this bug, the issues are fleshed out here: http://rudd-o.com/new-projects/python-improvements/how-to-slash-man-years-from-the-process-of-building-rpms-out-of-python-modules ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 17:31:15 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 16:31:15 +0000 Subject: [issue4688] GC optimization: don't track simple tuples and dicts In-Reply-To: <1229557269.64.0.0932795571555.issue4688@psf.upfronthosting.co.za> Message-ID: <1237048275.0.0.321031608628.issue4688@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a benchmark ripped from the Computer Language Shootout (http://shootout.alioth.debian.org). Running "binary_trees.py 18" takes the following time: -> without patch: 330s. -> with patch: 201s. (40% speedup) -> with GC disabled : 165s. Running pybench --with-gc doesn't show any performance variation, which seems to imply the overhead of the heuristic is negligible. ---------- Added file: http://bugs.python.org/file13332/binary-trees.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 18:16:33 2009 From: report at bugs.python.org (Lorenz Quack) Date: Sat, 14 Mar 2009 17:16:33 +0000 Subject: [issue5488] nb_inplace_divide slot is missing in docs In-Reply-To: <1237050993.04.0.349296113477.issue5488@psf.upfronthosting.co.za> Message-ID: <1237050993.04.0.349296113477.issue5488@psf.upfronthosting.co.za> New submission from Lorenz Quack : http://docs.python.org/c-api/typeobj.html#PyNumberMethods lists the slots in the PyNumberMethods struct used to implement the Number Protocol for extension types. The entry for "binaryfunc nb_inplace_divide;" is missing from this listing. It belongs between "binaryfunc nb_inplace_multiply;" and "binaryfunc nb_inplace_remainder;" There is a patch against r70371 of the trunk attached. ---------- assignee: georg.brandl components: Documentation files: typeobj.rst.patch keywords: patch messages: 83595 nosy: donlorenzo, georg.brandl severity: normal status: open title: nb_inplace_divide slot is missing in docs versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13333/typeobj.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 19:37:31 2009 From: report at bugs.python.org (JCoder) Date: Sat, 14 Mar 2009 18:37:31 +0000 Subject: [issue5489] Broken DLL In-Reply-To: <1237055851.94.0.0616888340997.issue5489@psf.upfronthosting.co.za> Message-ID: <1237055851.94.0.0616888340997.issue5489@psf.upfronthosting.co.za> New submission from JCoder : The windows installer for Python 2.6 failed to install Python on Windows ME because a DLL required for installation could not be run. ---------- components: Installation messages: 83596 nosy: JCoder severity: normal status: open title: Broken DLL type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 19:44:15 2009 From: report at bugs.python.org (Brett Cannon) Date: Sat, 14 Mar 2009 18:44:15 +0000 Subject: [issue2874] Remove use of the stat module in the stdlib In-Reply-To: <1210913145.44.0.456986373707.issue2874@psf.upfronthosting.co.za> Message-ID: <1237056255.27.0.0882665376771.issue2874@psf.upfronthosting.co.za> Brett Cannon added the comment: We never came to an agreement on how to handle this so it's just been sitting here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 20:00:40 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 14 Mar 2009 19:00:40 +0000 Subject: [issue5489] Broken DLL In-Reply-To: <1237055851.94.0.0616888340997.issue5489@psf.upfronthosting.co.za> Message-ID: <1237057240.36.0.538497995536.issue5489@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: The support for Win9x,Me,NT4 was dropped from python2.6. See http://www.python.org/dev/peps/pep-0011/ ---------- nosy: +ocean-city resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 20:36:41 2009 From: report at bugs.python.org (JCoder) Date: Sat, 14 Mar 2009 19:36:41 +0000 Subject: [issue5490] Broken DLL In-Reply-To: <1237059401.43.0.683662043097.issue5490@psf.upfronthosting.co.za> Message-ID: <1237059401.43.0.683662043097.issue5490@psf.upfronthosting.co.za> New submission from JCoder : When I try to install Python 2.6 on Windows ME, I get an error message saying that a DLL file needed to install it cannot be opened. By the way, I just posted this message, and apparantly, it disappeared. ---------- components: Installation messages: 83599 nosy: JCoder severity: normal status: open title: Broken DLL type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 21:37:33 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Mar 2009 20:37:33 +0000 Subject: [issue5490] Broken DLL In-Reply-To: <1237059401.43.0.683662043097.issue5490@psf.upfronthosting.co.za> Message-ID: <1237063053.53.0.415565323888.issue5490@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is a duplicate of issue 5490. ---------- nosy: +loewis resolution: -> duplicate status: open -> closed superseder: -> Broken DLL _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 21:37:52 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Mar 2009 20:37:52 +0000 Subject: [issue5490] Broken DLL In-Reply-To: <1237059401.43.0.683662043097.issue5490@psf.upfronthosting.co.za> Message-ID: <1237063072.26.0.899148043095.issue5490@psf.upfronthosting.co.za> Martin v. L?wis added the comment: issue 5489, I mean. ---------- superseder: Broken DLL -> Broken DLL _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 22:02:15 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sat, 14 Mar 2009 21:02:15 +0000 Subject: [issue1700507] Carbon.Scrap.PutScrapFlavor Message-ID: <1237064535.2.0.737898366717.issue1700507@psf.upfronthosting.co.za> Garrett Cooper added the comment: I'm confirming this issue on Intel / Leopard with python 2.5 (system python), 2.5 (macports) and 2.6 (macports). PPC / Tiger with python 2.3 (system python), 2.5 (macports) and 2.6 (macports) just errors out with: MacOS.Error: (-4960, 'coreFoundationUnknownErr') ---------- nosy: +yaneurabeya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 22:05:40 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sat, 14 Mar 2009 21:05:40 +0000 Subject: [issue1700507] Carbon.Scrap.PutScrapFlavor Message-ID: <1237064740.78.0.271738608499.issue1700507@psf.upfronthosting.co.za> Garrett Cooper added the comment: The failure testcase that dingus9 provided is: import Carbon.Scrap as Scrap scrap = Scrap.GetCurrentScrap() scrap.GetScrapFlavorData('TEXT') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 22:05:48 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sat, 14 Mar 2009 21:05:48 +0000 Subject: [issue1700507] Carbon.Scrap.PutScrapFlavor Message-ID: <1237064748.44.0.240827954856.issue1700507@psf.upfronthosting.co.za> Changes by Garrett Cooper : ---------- versions: +Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 22:06:02 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sat, 14 Mar 2009 21:06:02 +0000 Subject: [issue1700507] Carbon.Scrap.PutScrapFlavor Message-ID: <1237064762.27.0.928909731799.issue1700507@psf.upfronthosting.co.za> Changes by Garrett Cooper : ---------- versions: -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 22:30:57 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Mar 2009 21:30:57 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1237066257.41.0.746524329466.issue5237@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Either Brandl or Peterson can and typically will change the .rst source if given the exact new text. For me to write that, I need to know the grammar you actually implemented. Did you, in essence, simply change field_name ::= (identifier | integer) ("." attribute_name | "[" element_index "]")* to (in essence) field_name ::= (identifier | integer | ) ("." attribute_name | "[" element_index "]")* with the proviso that integers and blanks not be mixed in the same string, so that{.attr} and {[dex]} become legal? Or are those still illegal because only totally blank field names are allowed, so that the new field_name rule is essentially field_name ::= ((identifier | integer) ("." attribute_name | "[" element_index "]")*) | ( ) (with the same proviso). The existing doc text after the grammar box is slightly ambiguous or contradictory in that it first says that field names *are* ints or names and then says, correctly, that they *begin* with an int or name. (I would like to fix this in addition to adding a sentence.) Hence 'blank field name' can have two slightly different meanings and hence the question above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 14 23:05:24 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 14 Mar 2009 22:05:24 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1237068324.73.0.735753400161.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: I implemented this one: field_name ::= (identifier | integer | ) ("." attribute_name | "[" element_index "]")* Which I would have written as: field_name ::= (identifier | integer)? ("." attribute_name | "[" element_index "]")* Not that it matters, of course. And the proviso is correct: blanks and integers cannot be mixed in the same string. Thanks for looking at this! ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 00:49:11 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 23:49:11 +0000 Subject: [issue2116] weakref copy module interaction In-Reply-To: <1203024154.91.0.456074381022.issue2116@psf.upfronthosting.co.za> Message-ID: <1237074551.6.0.0440543529361.issue2116@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Should a deepcopy of a weakref return the same weakref, or a weakref to a new copied object? Also, what about the optional callback? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 00:53:09 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Mar 2009 23:53:09 +0000 Subject: [issue2116] weakref copy module interaction In-Reply-To: <1203024154.91.0.456074381022.issue2116@psf.upfronthosting.co.za> Message-ID: <1237074789.26.0.496778793082.issue2116@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hmm, forget that question. If we deepcopy the weakref target, it will be destroyed just afterwards, making the deepcopied weakref useless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 01:30:19 2009 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 15 Mar 2009 00:30:19 +0000 Subject: [issue1714448] if something as x: Message-ID: <1237077019.79.0.283600919442.issue1714448@psf.upfronthosting.co.za> Steven D'Aprano added the comment: What's wrong with this? ob = map[x][y].overpay if ob: ob.blit(x, y) Is this proposal just about saving one line? If we allow this, how many of the following will be allowed? if expr as name: while expr as name: expr as name # alternative to "name = expr" Frankly, the only one that seems to be useful to me is the second. As for using "->", please no, there are plenty of languages that use line noise, but Python doesn't need to be one of them. ---------- nosy: +stevenjd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 01:34:33 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 15 Mar 2009 00:34:33 +0000 Subject: [issue2116] weakref copy module interaction In-Reply-To: <1203024154.91.0.456074381022.issue2116@psf.upfronthosting.co.za> Message-ID: <1237077273.78.0.347014710649.issue2116@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch providing proper copy and deepcopy support, including for weak dicts (the Proxy type is unsupported, though). ---------- Added file: http://bugs.python.org/file13334/issue2116.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 01:37:54 2009 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 15 Mar 2009 00:37:54 +0000 Subject: [issue1714448] if something as x: Message-ID: <1237077474.8.0.434582167647.issue1714448@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Regarding the proposed syntax: if (f() == 'spam') -> name: newname = name.replace('p', 'h') Surely that should assign the *bool* result of comparing f() with 'spam' to name? Doing anything else is opening the door to a world of pain. if (f() == 'spam') -> name # binds name=f() if ('spam' == f()) -> name # binds 'spam' to name? if (f() == g()) -> name # binds what to name? if (f() or g()) -> name # binds what to name? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 01:42:52 2009 From: report at bugs.python.org (Jervis Whitley) Date: Sun, 15 Mar 2009 00:42:52 +0000 Subject: [issue1714448] if something as x: Message-ID: <1237077772.33.0.836178281489.issue1714448@psf.upfronthosting.co.za> Jervis Whitley added the comment: > If we allow this, how many of the following will be allowed? > if expr as name: > while expr as name: > expr as name # alternative to "name = expr" This patch implements your final point: expr as name (albeit with a nominal '->' RARROW rather than 'as') the patch creates a new expression, assexp (assignment expression) there is no need to implement this for countless other if/while/for because they accept expressions and this assignment is an expression. (Note it is a patch for a different behaviour than the OP suggested.) > As for using "->", please no, there are plenty of languages that use > line noise, but Python doesn't need to be one of them. I have begun a discussion about this on python-ideas to give it some air as suggested by Raymond. We can always close the issue as 'wont fix' if it doesn't get off the ground. This issue (although addressing an old concern dating back to the beginning of python) has been sitting unloved for 9 or so months and I felt that we should at least resolve it. Cheers, Jervis ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 01:45:20 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 15 Mar 2009 00:45:20 +0000 Subject: [issue2116] weakref copy module interaction In-Reply-To: <1203024154.91.0.456074381022.issue2116@psf.upfronthosting.co.za> Message-ID: <1237077920.2.0.876401365578.issue2116@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch so that copied weakdicts are decoupled (adding an item to the copy doesn't mutate the original). ---------- Added file: http://bugs.python.org/file13335/issue2116-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 01:47:43 2009 From: report at bugs.python.org (Jervis Whitley) Date: Sun, 15 Mar 2009 00:47:43 +0000 Subject: [issue1714448] if something as x: Message-ID: <1237078063.62.0.312910289916.issue1714448@psf.upfronthosting.co.za> Jervis Whitley added the comment: > Regarding the proposed syntax: > if (f() == 'spam') -> name: > newname = name.replace('p', 'h') > Surely that should assign the *bool* result of comparing f() > with 'spam' to name? Doing anything else is opening the door to a > world of pain. You are correct. It does assign the result of the bool. I have made an error in creating the example. This is what happens when I copy and paste and don't check the result. should read if f -> name: # use name, (pointless example but in line with the OP's suggestion) Thanks for picking this up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 03:45:41 2009 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 15 Mar 2009 02:45:41 +0000 Subject: [issue1714448] if something as x: Message-ID: <1237085141.27.0.34672577671.issue1714448@psf.upfronthosting.co.za> Matthew Barnett added the comment: At the moment binding occurs either right-to-left with "=", eg. x = y where "x" is the new name, or left-to-right, eg. import x as y where "y" is the new name. If the order is to be right-to-left then using "as" seems to be the best choice. On the other hand, if there should be a form of binding explicitly for use in an expression in order to prevent accidental use of "=" then the order should probably be the same as "=", ie right-to-left, and a new symbol is needed (using punctuation feels preferable somehow, because "=" uses punctuation). The only symbol I can think of is "~=". How does this: if ob ~= map[x][y].overpay: ob.blit(x, y) look compared to: if map[x][y].overpay as ob: ob.blit(x, y) IMHO, of course. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 03:49:28 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 15 Mar 2009 02:49:28 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1237085368.75.0.510266979715.issue5251@psf.upfronthosting.co.za> Changes by Nick Coghlan : Removed file: http://bugs.python.org/file13330/pep377_v1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 03:50:32 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 15 Mar 2009 02:50:32 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1237085432.88.0.674804654235.issue5251@psf.upfronthosting.co.za> Nick Coghlan added the comment: Removed first draft of patch - it was fundamentally flawed (it didn't clean up the stack properly when the statement body was skipped) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 04:04:56 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 15 Mar 2009 03:04:56 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1237086296.1.0.324486086496.issue5251@psf.upfronthosting.co.za> Nick Coghlan added the comment: Second draft attached, this time with tests and sans segmentation faults :) Limitations of this version of the patch: - still includes some unrelated marshal.c changes (improved error messages) - no documentation changes yet ---------- Added file: http://bugs.python.org/file13336/pep377_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 05:04:46 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 15 Mar 2009 04:04:46 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1237089886.59.0.750838104365.issue5251@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that the semantics in the current patch aren't quite correct, since the __exit__ attribute is retrieved inside the scope of the outer try/except block. Updated patch with the correct semantics coming soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 05:38:04 2009 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 15 Mar 2009 04:38:04 +0000 Subject: [issue1714448] if something as x: Message-ID: <1237091884.45.0.3167126413.issue1714448@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Matthew suggested ~= instead of -> or "as". I dislike this because ~= first makes me think of "approximately equal to", and then it makes me think of augmented assignment, and only then do I remember that although ~ is used in Python for bitwise-not, ~= is not a legal augmented assignment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 05:51:10 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 15 Mar 2009 04:51:10 +0000 Subject: [issue5491] Clarify contextlib.nested semantics In-Reply-To: <1237092670.04.0.313927493642.issue5491@psf.upfronthosting.co.za> Message-ID: <1237092670.04.0.313927493642.issue5491@psf.upfronthosting.co.za> New submission from Nick Coghlan : Current doc example: with nested(A, B, C) as (X, Y, Z): do_something() with A as X: with B as Y: with C as Z: do_something() Recommended docs change: with nested(A(), B(), C()) as (X, Y, Z): do_something() m1, m2, m3 = A(), B(), C() with m1 as X: with m2 as Y: with m3 as Z: do_something() This makes it clearer that when using nested, the context managers are all created outside the scope of the with statement. ---------- assignee: georg.brandl components: Documentation messages: 83619 nosy: georg.brandl, ncoghlan severity: normal status: open title: Clarify contextlib.nested semantics _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 06:58:32 2009 From: report at bugs.python.org (Jervis Whitley) Date: Sun, 15 Mar 2009 05:58:32 +0000 Subject: [issue1714448] if something as x: Message-ID: <1237096712.69.0.0804538659925.issue1714448@psf.upfronthosting.co.za> Jervis Whitley added the comment: > Matthew suggested ~= instead of -> or "as". Try the patch, you can make changes (for those that aren't aware) by changing the token in Grammar/Grammar to whatever you wish. It is easy to do and you need only recompile after this step. example: assexp: xor_expr ['->' xor_expr] could become assexp: xor_expr ['magic' xor_expr] >>> 'hello' magic words 'hello' >>> words 'hello' Note that Mr Barnett may need to look at other fixes to get his '~=' idea off the ground (tokenizer.c and specifically adding a new token) I've recommended that we close this issue. Cheers, Jervis ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 07:46:48 2009 From: report at bugs.python.org (James William Pye) Date: Sun, 15 Mar 2009 06:46:48 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1237099608.15.0.464550794288.issue5251@psf.upfronthosting.co.za> James William Pye added the comment: Just downloaded v2 and tried it out against Python 2.7a0 (trunk:70381M, Mar 14 2009, 23:12:51). output of the "nested_issue.py" script with patch: jwp at torch[]:org/python/trunk 0% /src/build/py/bin/python ./nested_issue.py () [try_with_nested] Skipping statement body () SUCCESS! i guess.. () [try_with_nested_class] Skipping statement body () SUCCESS! i guess.. () [try_with_nested_statements] () SUCCESS! i guess.. () [try_with_nested_statements_class] () SUCCESS! i guess.. I'm going to play with it a bit more, but it looks pretty solid already... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 08:13:10 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 15 Mar 2009 07:13:10 +0000 Subject: [issue1714448] if something as x: Message-ID: <1237101190.24.0.45471601372.issue1714448@psf.upfronthosting.co.za> Nick Coghlan added the comment: Rejecting this after discussion on python-ideas: http://mail.python.org/pipermail/python-ideas/2009-March/003423.html Overview of some of the major objections here: http://mail.python.org/pipermail/python-ideas/2009-March/003440.html ---------- nosy: +ncoghlan resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 08:20:24 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 15 Mar 2009 07:20:24 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1237101624.69.0.743127184507.issue5251@psf.upfronthosting.co.za> Nick Coghlan added the comment: To see what is wrong with v2, try something like: class Bizarre(): def __getattr__(self, attr): raise SkipStatement with Bizarre(): print "Not gonna happen, but no exception either!" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 10:38:45 2009 From: report at bugs.python.org (Benny Bach) Date: Sun, 15 Mar 2009 09:38:45 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1237109925.24.0.49417156989.issue4015@psf.upfronthosting.co.za> Benny Bach added the comment: I think this should be the default. I am a rookie in python, setup.py in particular, but I cannot see how you can write portable setup scripts without this. I agree that the batch script can be improved. Here is how ruby gems do it: @ECHO OFF IF NOT "%~f0" == "~f0" GOTO :WinNT @"ruby.exe" "C:/ruby/bin/fd" %1 %2 %3 %4 %5 %6 %7 %8 %9 GOTO :EOF :WinNT @"ruby.exe" "%~dpn0" %* ---------- nosy: +bebac _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 11:16:17 2009 From: report at bugs.python.org (Jani Hakala) Date: Sun, 15 Mar 2009 10:16:17 +0000 Subject: [issue5466] Tix.Balloon causes TCLError: unknown color name "{#ffff60}" in Python 2.6.1 In-Reply-To: <1236687460.92.0.36885933672.issue5466@psf.upfronthosting.co.za> Message-ID: <1237112177.06.0.64690523167.issue5466@psf.upfronthosting.co.za> Jani Hakala added the comment: I too had trouble with the tix that is shipped with python 2.6(.1) The version seems the bad one that causes those 'unknown color name' errors. I was able to see the error message only after following the useful advice of G. Polo in issue 639266. I downloaded and installed Tcl 8.5.x, Tk 8.5.x and Tix 8.4.3 from sources, and after this I copied the Tix843.dll (mingw32 made) and Tix8.4.3-folder with the tcl-code to my python installation directory. My program started to work after this. The Balloon.py script also seems to work. The fix (Tix 8.4.3) was supposed to be in 2.6 as issue 3872 with resolution 'fixed' seems to indicate? ---------- nosy: +jahakala versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 13:29:55 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 15 Mar 2009 12:29:55 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1237120195.78.0.504135503542.issue5251@psf.upfronthosting.co.za> Nick Coghlan added the comment: Version 3 of patch attached - now functionally complete with the correct semantics - compiler package not updated yet - documentation not updated yet Unfortunately, getting the semantics right involves moving context.__enter__ and context.__exit__ to temporary variables instead of being able to leave them on the stack - that makes for something of a speed hit. ---------- Added file: http://bugs.python.org/file13337/pep377_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 13:31:44 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 15 Mar 2009 12:31:44 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1237120304.26.0.23717296165.issue5251@psf.upfronthosting.co.za> Nick Coghlan added the comment: Updated micro benchmark to also give numbers for direct try/finally execution ---------- Added file: http://bugs.python.org/file13338/pep377_bench.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 13:36:58 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 15 Mar 2009 12:36:58 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1237120618.27.0.237872921507.issue5251@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm definitely not happy with the effect the current patch has on with statement execution speed - I think I'll try to come up with a patch that adds a new SETUP_WITH opcode and see how that performs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 13:44:37 2009 From: report at bugs.python.org (Ger Luijten) Date: Sun, 15 Mar 2009 12:44:37 +0000 Subject: [issue5492] Error on leaving IDLE with quit() or exit() under Linux In-Reply-To: <1237121077.76.0.63532373748.issue5492@psf.upfronthosting.co.za> Message-ID: <1237121077.76.0.63532373748.issue5492@psf.upfronthosting.co.za> New submission from Ger Luijten : Hello developers, Found a small error when using IDLE Version 3.1a1 under Kubuntu Linux 8.10 in the terminal. Kubuntu is fully updated and no installation errors for Python 3.1a1. See the listing from my installation notes below. Greetings, Ger Let's see if IDLE works, by starting it in the terminal: $ idle IDLE works in the new Python version 3.1a1, but there is an error! When leaving IDLE with quit() or exit() and clicking the OK button for the question 'The program is still running! Do you want to kill it? there's the errors listed below, that does not occur when leaving IDLE with Ctrl-D instead of quit(): Error when leaving with quit() (Full error listing) *** Internal Error: rpc.py:SocketIO.localcall() Object: stderr Method: > Args: ('Traceback (most recent call last):',) Traceback (most recent call last): File "/usr/local/lib/python3.1/idlelib/rpc.py", line 188, in localcall ret = method(*args, **kwargs) File "/usr/local/lib/python3.1/idlelib/PyShell.py", line 1218, in write self.shell.write(s, self.tags) File "/usr/local/lib/python3.1/idlelib/PyShell.py", line 1201, in write self.text.mark_gravity("iomark", "left") AttributeError: 'NoneType' object has no attribute 'mark_gravity' Error when leaving with exit() (Partial error listing: only the error part that difffers is listed here) Object: stderr Method: > Args: (' File "", line 1, in \n',) ---------- components: IDLE messages: 83629 nosy: gerluijten severity: normal status: open title: Error on leaving IDLE with quit() or exit() under Linux type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 13:57:03 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 15 Mar 2009 12:57:03 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1237121823.95.0.481928659054.issue5251@psf.upfronthosting.co.za> Changes by Nick Coghlan : Removed file: http://bugs.python.org/file13264/pep377_bench.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 14:21:24 2009 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 15 Mar 2009 13:21:24 +0000 Subject: [issue5493] Rephrasing the doc of object.__nonzero__ In-Reply-To: <1237123284.32.0.590929476776.issue5493@psf.upfronthosting.co.za> Message-ID: <1237123284.32.0.590929476776.issue5493@psf.upfronthosting.co.za> New submission from Ezio Melotti : The doc [1] actually says: object.__nonzero__(self) Called to implement truth value testing, and the built-in operation bool(); should return False or True, or their integer equivalents 0 or 1. When this method is not defined, __len__() is called, if it is defined (see below). If a class defines neither __len__() nor __nonzero__(), all its instances are considered true. I suggest to: 1) drop the comma after 'testing'; 2) clarify what happens when __nonzero__ is defined and where 'below' actually is (and possibly add a link). [1]: http://docs.python.org/reference/datamodel.html#object.__nonzero__ ---------- assignee: georg.brandl components: Documentation messages: 83630 nosy: ezio.melotti, georg.brandl severity: normal status: open title: Rephrasing the doc of object.__nonzero__ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 14:42:07 2009 From: report at bugs.python.org (Ger Luijten) Date: Sun, 15 Mar 2009 13:42:07 +0000 Subject: [issue5494] Failure in test_httpservers on Linux In-Reply-To: <1237124527.44.0.964288018613.issue5494@psf.upfronthosting.co.za> Message-ID: <1237124527.44.0.964288018613.issue5494@psf.upfronthosting.co.za> New submission from Ger Luijten : Hello developers, While running 'make test' for Python 3.1a1 there was an error reported, obviously a permission problem, but when trying to run the reported server.py script in verbose mode it turned up an error in the regrtest.py script. Manually running the server.py script seems to go fine. See my installation notes below. Commands were issued with and without sudo in a terminal under fully updated Kubuntu 8.10 and with no installation problems for Python 3.1a1. Also I noticed Issue 4951 failure in test_httpserver under Windows, but with a different kind of error message. Greetings, Ger $ sudo make test Errors: 1 error reported; no idea what the script server.py is trying to access for which it says to have no rights. This error was listed 3 times: test_httpservers Traceback (most recent call last): File "/home/ger/Systeembeheer/Python/Python_Packages/Python-3.1a1/Lib/http/server.py", line 1031, in run_cgi OSError: [Errno 13] Permission denied test test_httpservers failed -- errors occurred; run in verbose mode for details See the readme file for the Python installation on how to run the script in verbose mode: General: $ ./python Lib/test/regrtest.py -v test_whatever So go to the folder Python-3.1a1/Lib/test/ Run testscript in verbose mode: $ sudo ./regrtest.py -v server.py No idea if this regrtest.py script knows the path to server.py, otherwise add the correct path later in testing. This shows a programming error in the regrtest.py script, so a run of server.py is not possible with this script: File "./regrtest.py", line 185 print(msg, file=sys.stderr) ^ SyntaxError: invalid syntax So let's run the server.py script directly to see if this script crashes or not. When directly running the server.py script with and without sudo it runs with no errors, until broken off by Ctrl+C. The script seems to run or simulate a small webserver for tests. Python-3.1a1/Lib/http$ sudo python3.1 server.py Serving HTTP on 0.0.0.0 port 8000 ... ^CTraceback (most recent call last): File "server.py", line 1101, in test(HandlerClass=BaseHTTPRequestHandler) File "server.py", line 1097, in test httpd.serve_forever() File "/usr/local/lib/python3.1/socketserver.py", line 224, in serve_forever r, w, e = select.select([self], [], [], poll_interval) KeyboardInterrupt ---------- components: Tests messages: 83631 nosy: gerluijten severity: normal status: open title: Failure in test_httpservers on Linux type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 14:47:18 2009 From: report at bugs.python.org (Ger Luijten) Date: Sun, 15 Mar 2009 13:47:18 +0000 Subject: [issue4951] failure in test_httpservers In-Reply-To: <1231978384.8.0.984870711272.issue4951@psf.upfronthosting.co.za> Message-ID: <1237124838.94.0.506171558859.issue4951@psf.upfronthosting.co.za> Ger Luijten added the comment: Reported Issue 5494 Failure in test_httpservers on Linux with other error message. Maybe there is a relation, maybe not. Greetings, Ger ---------- nosy: +gerluijten _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 15:30:36 2009 From: report at bugs.python.org (Retro) Date: Sun, 15 Mar 2009 14:30:36 +0000 Subject: [issue5495] ValueError exception of tuple.index(x) gives imprecise error message In-Reply-To: <1237127436.03.0.0963869402695.issue5495@psf.upfronthosting.co.za> Message-ID: <1237127436.03.0.0963869402695.issue5495@psf.upfronthosting.co.za> New submission from Retro : >>> t = (0, 1, 2, 3, 4, 5, 6, 7) >>> t.index(8) Traceback (most recent call last): File "", line 1, in ValueError: tuple.index(x): x not in list The error message "x not in list" should have been "x not in tuple". Please fix the error message of the index method of the tuple type. ---------- components: None messages: 83633 nosy: Retro severity: normal status: open title: ValueError exception of tuple.index(x) gives imprecise error message versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 15:33:34 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 15 Mar 2009 14:33:34 +0000 Subject: [issue5495] ValueError exception of tuple.index(x) gives imprecise error message In-Reply-To: <1237127436.03.0.0963869402695.issue5495@psf.upfronthosting.co.za> Message-ID: <1237127614.38.0.360787140555.issue5495@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached patch fixes the error message. ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file13339/not_in_tuple.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 15:39:11 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 15 Mar 2009 14:39:11 +0000 Subject: [issue5495] ValueError exception of tuple.index(x) gives imprecise error message In-Reply-To: <1237127436.03.0.0963869402695.issue5495@psf.upfronthosting.co.za> Message-ID: <1237127951.35.0.720445715233.issue5495@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70385. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 15:56:08 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 15 Mar 2009 14:56:08 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1237128968.85.0.800917197996.issue2382@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is a problem of units. The error text is an utf8 *byte* string and offset is a number of *bytes*. The goal is to get the text *width* of a *character* string. We have to: 1- convert offset from bytes number to character number 2- get the error message as (unicode) characters 3- get the width of text[:offset] It's already possible to get (2) from the utf8 string, and code from ocean-city's patch (py3k_adjust_cursor_at_syntax_error_v2.patch) can be used for (3). The most difficult point is (1). I will try to implement that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 16:39:25 2009 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 15 Mar 2009 15:39:25 +0000 Subject: [issue1714448] if something as x: Message-ID: <1237131565.37.0.94229275433.issue1714448@psf.upfronthosting.co.za> Matthew Barnett added the comment: Just for the record, I wasn't happy with "~=" either, and I have no problem with just forgetting the whole idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 16:52:08 2009 From: report at bugs.python.org (Eduardo Aguiar) Date: Sun, 15 Mar 2009 15:52:08 +0000 Subject: [issue5396] os.read not handling O_DIRECT flag In-Reply-To: <1235847751.77.0.558509867366.issue5396@psf.upfronthosting.co.za> Message-ID: <1237132328.52.0.00731426523965.issue5396@psf.upfronthosting.co.za> Eduardo Aguiar added the comment: Hi, I think I have a few more issues you can consider: 1) to allocated an aligned buffer it is as simple as allocate 4096 + len (buffer) and truncate address to 4k boundary. 2) I wrote a floppy imager, and without O_DIRECT, it gives me 8 sectors (4k = kernel page) errors whenever one sector is bad. 3) There is os.O_DIRECT and os.open help page references it Best regards, Eduardo Aguiar ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 16:55:40 2009 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 15 Mar 2009 15:55:40 +0000 Subject: [issue444582] Finding programs in PATH, addition to os Message-ID: <1237132540.83.0.306122913733.issue444582@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- nosy: -skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 17:05:28 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 15 Mar 2009 16:05:28 +0000 Subject: [issue5396] os.read not handling O_DIRECT flag In-Reply-To: <1237132328.52.0.00731426523965.issue5396@psf.upfronthosting.co.za> Message-ID: <1237133197.6760.13.camel@fsol> Antoine Pitrou added the comment: Hello Eduardo, > 1) to allocated an aligned buffer it is as simple as allocate 4096 + len > (buffer) and truncate address to 4k boundary. Yes, but it is wasteful, especially since the common case is not to use O_DIRECT. Also, os.read does not allocate a buffer, it allocates a whole string object, and there's no way in the current Python object allocator to choose a specific alignment boundary. > 2) I wrote a floppy imager, and without O_DIRECT, it gives me 8 sectors > (4k = kernel page) errors whenever one sector is bad. Well, sorry for that... I guess Python is not well adapted to this (very particular) use case. Or you could write a C extension to read() to a properly aligned buffer, or try to do it with ctypes. > 3) There is os.O_DIRECT and os.open help page references it I think the policy is to mirror all possible O_* constants, even if they are of no use in Python. For example, we also have os.O_DIRECTORY. Regards Antoine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 17:26:32 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Sun, 15 Mar 2009 16:26:32 +0000 Subject: [issue5496] codecs.lookup docstring is misleading In-Reply-To: <1237134392.29.0.239509482226.issue5496@psf.upfronthosting.co.za> Message-ID: <1237134392.29.0.239509482226.issue5496@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : codecs.lookup is documented as returning a tuple. It actually returns a what the registered lookup function returns, which really *should* be a codecs.CodecInfo instance. If a registered lookup function actually returns a tuple, then codecs.getreader and the other similar functions won't work. ---------- assignee: georg.brandl components: Documentation messages: 83640 nosy: exarkun, georg.brandl severity: normal status: open title: codecs.lookup docstring is misleading _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 22:32:29 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 15 Mar 2009 21:32:29 +0000 Subject: [issue5496] codecs.lookup docstring is misleading In-Reply-To: <1237134392.29.0.239509482226.issue5496@psf.upfronthosting.co.za> Message-ID: <1237152749.41.0.323604284002.issue5496@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r70386. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 22:37:32 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 15 Mar 2009 21:37:32 +0000 Subject: [issue5493] Rephrasing the doc of object.__nonzero__ In-Reply-To: <1237123284.32.0.590929476776.issue5493@psf.upfronthosting.co.za> Message-ID: <1237153052.6.0.67887297236.issue5493@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r70387. ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 22:44:54 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 15 Mar 2009 21:44:54 +0000 Subject: [issue5491] Clarify contextlib.nested semantics In-Reply-To: <1237092670.04.0.313927493642.issue5491@psf.upfronthosting.co.za> Message-ID: <1237153494.16.0.445357585353.issue5491@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, committed in r70390. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 22:45:03 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 15 Mar 2009 21:45:03 +0000 Subject: [issue5493] Rephrasing the doc of object.__nonzero__ In-Reply-To: <1237123284.32.0.590929476776.issue5493@psf.upfronthosting.co.za> Message-ID: <1237153503.62.0.924934757738.issue5493@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 22:46:08 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 15 Mar 2009 21:46:08 +0000 Subject: [issue5488] nb_inplace_divide slot is missing in docs In-Reply-To: <1237050993.04.0.349296113477.issue5488@psf.upfronthosting.co.za> Message-ID: <1237153568.11.0.567858751564.issue5488@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r70392. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 22:48:13 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 15 Mar 2009 21:48:13 +0000 Subject: [issue5478] document mistake xml.dom.minidom.Element In-Reply-To: <1236816974.37.0.966826029984.issue5478@psf.upfronthosting.co.za> Message-ID: <1237153693.07.0.10440102449.issue5478@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r70393. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 22:52:02 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 15 Mar 2009 21:52:02 +0000 Subject: [issue5276] IDLE startup file .Idle.py not documented In-Reply-To: <1234741317.8.0.0064983097243.issue5276@psf.upfronthosting.co.za> Message-ID: <1237153922.84.0.327795467918.issue5276@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, edited a bit and committed in r70395. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 15 22:57:28 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 15 Mar 2009 21:57:28 +0000 Subject: [issue5469] Reference paragraph about the constructs that bind names needs updating for Python 3 In-Reply-To: <1236704390.32.0.698658997265.issue5469@psf.upfronthosting.co.za> Message-ID: <1237154248.45.0.31320959702.issue5469@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in trunk in r70397 and 3k in r70398. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Mon Mar 16 01:06:58 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Mon, 16 Mar 2009 00:06:58 +0000 Subject: [issue1064] Test issue In-Reply-To: <1188505590.02.0.0614913365706.issue1064@psf.upfronthosting.co.za> Message-ID: <1237162018.66.0.50195095054.issue1064@psf.upfronthosting.co.za> Martin v. L=C3=B6wis added the comment: Try sending email ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Mon Mar 16 01:20:18 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Mon, 16 Mar 2009 00:20:18 +0000 Subject: [issue1064] Test issue In-Reply-To: <1188505590.02.0.0614913365706.issue1064@psf.upfronthosting.co.za> Message-ID: <1237162818.71.0.149059213161.issue1064@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Send more email ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 16 03:34:37 2009 From: report at bugs.python.org (James William Pye) Date: Mon, 16 Mar 2009 02:34:37 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1237170877.57.0.28962139012.issue5251@psf.upfronthosting.co.za> James William Pye added the comment: I tested the attached script against v2. It further identifies consistencies between nested with-statements and nested() that should exist(and do in v2). It answers the question: what is the effect of a SkipStatement exception on another, outer CM? with nested(outer(), trap(), fail()): ... That is, validate that outer()'s __exit__ invocation is not given an exception. This is probably an obvious effect of the patch, but I think it merited a test. ---------- Added file: http://bugs.python.org/file13346/outer_sees_no_exc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 16 06:24:55 2009 From: report at bugs.python.org (David W. Lambert) Date: Mon, 16 Mar 2009 05:24:55 +0000 Subject: [issue3565] array documentation, method names not 3.0 compliant In-Reply-To: <1218878053.61.0.879399084038.issue3565@psf.upfronthosting.co.za> Message-ID: <1237181095.36.0.673796794009.issue3565@psf.upfronthosting.co.za> Changes by David W. Lambert : ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 16 06:29:35 2009 From: report at bugs.python.org (David W. Lambert) Date: Mon, 16 Mar 2009 05:29:35 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1237181375.6.0.0424160214138.issue2382@psf.upfronthosting.co.za> David W. Lambert added the comment: Resolution of this may be applicable to Issue3446 as well. "center, ljust and rjust are inconsistent with unicode parameters" ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 07:44:01 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 17 Mar 2009 06:44:01 +0000 Subject: [issue5497] openssl compileerror with original source In-Reply-To: <1237272241.76.0.44185655243.issue5497@psf.upfronthosting.co.za> Message-ID: <1237272241.76.0.44185655243.issue5497@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : I ported "compile openssl without perl" scheme into PC/VC6 from PCBuild. And I noticed openssl compilation fails with a message "IDEA is disabled" if I use original source code from openssl homepage. I hope attached patch will fix this. openssl's Configure seems to take options to exclude specific algorithms. I tested test_ssl, it seems working on my VC6. ---------- components: Build files: fix_openssl_compile_error.patch keywords: patch messages: 83660 nosy: ocean-city severity: normal status: open title: openssl compileerror with original source type: compile error versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13347/fix_openssl_compile_error.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 07:54:12 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 17 Mar 2009 06:54:12 +0000 Subject: [issue5494] Failure in test_httpservers on Linux In-Reply-To: <1237124527.44.0.964288018613.issue5494@psf.upfronthosting.co.za> Message-ID: Amaury Forgeot d'Arc added the comment: The SyntaxError show that you are running python version 2.x. > Run testscript in verbose mode: $ sudo ./regrtest.py -v server.py Your sudo command is wrong: it should specify the path to the tested python executable, and not rely on the #! line in regrtest.py, which uses whatever python is installed on your machine. Probably something like sudo ../../python regrtest.py -v server.py ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 07:58:14 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Mar 2009 06:58:14 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1237273094.2.0.922563255085.issue4136@psf.upfronthosting.co.za> Raymond Hettinger added the comment: What needs to happen next for this patch to go forward? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 08:28:50 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Mar 2009 07:28:50 +0000 Subject: [issue2110] Implement __format__ for Decimal In-Reply-To: <1202994255.28.0.383332155678.issue2110@psf.upfronthosting.co.za> Message-ID: <1237274930.19.0.263140593071.issue2110@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Mark, this looks fine. Can you add support for PEP 378? ---------- assignee: rhettinger -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 08:32:46 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Mar 2009 07:32:46 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1237275166.04.0.323385459771.issue5139@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 09:45:08 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 17 Mar 2009 08:45:08 +0000 Subject: [issue5494] Failure in test_httpservers on Linux In-Reply-To: <1237124527.44.0.964288018613.issue5494@psf.upfronthosting.co.za> Message-ID: <1237279508.48.0.435312217836.issue5494@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 11:31:53 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Mar 2009 10:31:53 +0000 Subject: [issue3565] array documentation, method names not 3.0 compliant In-Reply-To: <1218878053.61.0.879399084038.issue3565@psf.upfronthosting.co.za> Message-ID: <1237285913.41.0.0639729455309.issue3565@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Benjamin, do you think this should be fixed in 3.1? ---------- nosy: +benjamin.peterson, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 11:56:31 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 17 Mar 2009 10:56:31 +0000 Subject: [issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs In-Reply-To: <1236994333.51.0.461937722447.issue2066@psf.upfronthosting.co.za> Message-ID: <49BF81D2.4050504@egenix.com> Marc-Andre Lemburg added the comment: On 2009-03-14 02:32, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > Based on the feedback above, it seems this should be committed, > shouldn't it? +1 As mentioned several times on the ticket: static C data is not really something to worry about these days. ---------- title: Adding new CNS11643, a *huge* charset, support in cjkcodecs -> Adding new CNS11643, a *huge* charset, support in cjkcodecs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 12:09:34 2009 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 17 Mar 2009 11:09:34 +0000 Subject: [issue4749] Issue with RotatingFileHandler logging handler on Windows In-Reply-To: <1230295606.47.0.842082380856.issue4749@psf.upfronthosting.co.za> Message-ID: <1237288174.25.0.50197671237.issue4749@psf.upfronthosting.co.za> Vinay Sajip added the comment: Neyro, your problem is caused by having two handlers (a FileHandler and a RotatingFileHandler) pointing to the same file. Because of this, rollover fails (the file is still open because there is a handle open to it from the FileHandler). If you remove the FileHandler from the config file and re-run, things appear to work as expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 12:19:36 2009 From: report at bugs.python.org (once-off) Date: Tue, 17 Mar 2009 11:19:36 +0000 Subject: [issue5498] Can SGMLParser properly handle tags? In-Reply-To: <1237288775.97.0.464945533476.issue5498@psf.upfronthosting.co.za> Message-ID: <1237288775.97.0.464945533476.issue5498@psf.upfronthosting.co.za> New submission from once-off : The attached script (sgml_error.py) was designed to output XML files unchanged, other than expanding tags into an opening and closing tag, such as . It seems the SGMLParser class recognizes an empty tag, but does not emit the closing tag until the NEXT forward slash it sees. So everything from the forward slash in (even the closing angle bracket) until the next forward slash is considered to be textual data. See the following line output. Have I missed something here (like a conscious design limitation on the class, an error on my part, etc), or is this really a bug with the class? C:\Python24\Lib>python sgmllib.py H:\input.xml start tag: data: '\n ' start tag: end tag: data: '\n ' start tag: data: '>\n hello<' end tag: data: 'tag3>\n' end tag: C:\Python24\Lib>python ActivePython 2.4.3 Build 12 (ActiveState Software Inc.) based on Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sgml_error Input: hello Output: > hello<tag3> Expected: hello ---------- components: Extension Modules, Library (Lib), XML files: sgml_error.py messages: 83667 nosy: once-off severity: normal status: open title: Can SGMLParser properly handle tags? type: behavior versions: 3rd party, Python 2.4, Python 2.5 Added file: http://bugs.python.org/file13348/sgml_error.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 12:48:22 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 17 Mar 2009 11:48:22 +0000 Subject: [issue3565] array documentation, method names not 3.0 compliant In-Reply-To: <1218878053.61.0.879399084038.issue3565@psf.upfronthosting.co.za> Message-ID: <1237290502.69.0.369013219126.issue3565@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It would be nice to deprecate the old names in 3.1 and remove them in 3.2, but I think it should get approval on python-dev. ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 13:05:38 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 12:05:38 +0000 Subject: [issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs In-Reply-To: <1202731134.77.0.201279568783.issue2066@psf.upfronthosting.co.za> Message-ID: <1237291538.56.0.210565929456.issue2066@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 13:11:06 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 12:11:06 +0000 Subject: [issue3446] center, ljust and rjust are inconsistent with unicode parameters In-Reply-To: <1217001563.39.0.568934696199.issue3446@psf.upfronthosting.co.za> Message-ID: <1237291866.64.0.936629723446.issue3446@psf.upfronthosting.co.za> STINNER Victor added the comment: About Python3, bytes.center accepts unicode as second argument, which is an error for me: >>> b"x".center(5, b"\xe9") b'\xe9\xe9x\xe9\xe9' >>> b"x".center(5, "\xe9") b'\xe9\xe9x\xe9\xe9' The second example must fail with a TypeError. str.center has the right behaviour: >>> "x".center(5, "\xe9") '??x??' >>> "x".center(5, b"\xe9") TypeError: The fill character cannot be converted to Unicode ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 13:15:11 2009 From: report at bugs.python.org (Matt Giuca) Date: Tue, 17 Mar 2009 12:15:11 +0000 Subject: [issue3565] array documentation, method names not 3.0 compliant In-Reply-To: <1218878053.61.0.879399084038.issue3565@psf.upfronthosting.co.za> Message-ID: <1237292111.31.0.0668496828889.issue3565@psf.upfronthosting.co.za> Matt Giuca added the comment: Note that, irrespective of the changes to the library itself, the documentation is out of date since it still uses the old "string/unicode" nomenclature, rather than the new "bytes/string". I have provided a separate documentation patch which should be applicable with relatively little fuss. (It's from August so it will probably conflict, but I can update it if necessary). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 13:15:45 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Mar 2009 12:15:45 +0000 Subject: [issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs In-Reply-To: <49BF81D2.4050504@egenix.com> Message-ID: <1237292214.7966.1.camel@fsol> Antoine Pitrou added the comment: Le mardi 17 mars 2009 ? 10:56 +0000, Marc-Andre Lemburg a ?crit : > +1 > > As mentioned several times on the ticket: static C data is not really > something to worry about these days. Well, I suggest that someone familiar with the codec-building machinery do the committing, in order to avoid mistakes :-) ---------- title: Adding new CNS11643, a *huge* charset, support in cjkcodecs -> Adding new CNS11643, a *huge* charset, support in cjkcodecs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 13:30:26 2009 From: report at bugs.python.org (Hye-Shik Chang) Date: Tue, 17 Mar 2009 12:30:26 +0000 Subject: [issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs In-Reply-To: <1202731134.77.0.201279568783.issue2066@psf.upfronthosting.co.za> Message-ID: <1237293026.43.0.719191434139.issue2066@psf.upfronthosting.co.za> Hye-Shik Chang added the comment: When I asked Taiwanese developers how often they use these character sets, it appeared that they are almost useless in the usual computing environment in Taiwan. This will only serve for a historical compatibility and literal standard compliance. I'm quite neutral in adding this into python without any user's request from Taiwan (I'm from South Korea :), but I can finish committing it with pleasure if you are still fond of the codec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 13:33:02 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 17 Mar 2009 12:33:02 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237293182.79.0.314871463999.issue2170@psf.upfronthosting.co.za> R. David Murray added the comment: I checked the speed of the proposed patch, and found that it was definitely slower than the original code. So I took another look at the original, and refactored it in a different way: instead of moving the sibling relinking into a second pass, I changed to code to only relink siblings when a node is removed. The new patch passes all test, and is faster than the old code. I tested the timing both against the same small nested document I used in testNormalize2, and by running normalize on a 37K html document (a copy of the xml.dom.minidom chapter from the Library Reference): original code: testNormalize2: [2.5144219398498535, 2.5053589344024658, 2.5059471130371094] example.html: [44.641155958175659, 44.575434923171997, 44.996657133102417] original patch testNormalize2: [2.7070891857147217, 2.7012341022491455, 2.7003159523010254] example.html: [67.908604860305786, 68.088788986206055, 67.92288613319397] My patch testNormalize2: [2.4626028537750244, 2.4619381427764893, 2.4617609977722168] example.html: [22.780415058135986, 22.780103921890259, 22.721666097640991] IMO my refactoring is also easier to understand than either the old code or the proposed patch. Patch, including new test, is attached, and also pushed to bzr+ssh://bazaar.launchpad.net/~rdmurray/python/issue2170. ---------- versions: +Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13349/issue2170.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 13:35:30 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 17 Mar 2009 12:35:30 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237293330.46.0.866982576654.issue2170@psf.upfronthosting.co.za> R. David Murray added the comment: Er, I meant to say, "as easy to understand" as the proposed patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 13:54:25 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 17 Mar 2009 12:54:25 +0000 Subject: [issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs In-Reply-To: <1237293026.43.0.719191434139.issue2066@psf.upfronthosting.co.za> Message-ID: <49BF9D7D.1080302@egenix.com> Marc-Andre Lemburg added the comment: On 2009-03-17 13:30, Hye-Shik Chang wrote: > Hye-Shik Chang added the comment: > > When I asked Taiwanese developers how often they use these character > sets, it appeared that they are almost useless in the usual computing > environment in Taiwan. This will only serve for a historical > compatibility and literal standard compliance. I'm quite neutral in > adding this into python without any user's request from Taiwan (I'm from > South Korea :), but I can finish committing it with pleasure if you are > still fond of the codec. If there's no user base for it, then we should not include it. I was under the impression that this charset is essential for the Taiwanese and Chinese (http://www.cns11643.gov.tw/). However, the wiki page http://en.wikipedia.org/wiki/CNS_11643 says "In practice, variants of Big5 are de facto standard.", so perhaps there's no real need for the codec after all. The German version of the wiki page mentions that CNS11643 is the legal standard charset, but not used much in practice because it needs 3 bytes per glyph instead of just 2 for Big5 variants. The Chinese version of the wiki page says more or less the same: http://translate.google.de/translate?hl=en&sl=zh-TW&u=http://zh.wikipedia.org/wiki/%25E5%259C%258B%25E5%25AE%25B6%25E6%25A8%2599%25E6%25BA%2596%25E4%25B8%25AD%25E6%2596%2587%25E4%25BA%25A4%25E6%258F%259B%25E7%25A2%25BC&ei=C52_SZepPJKTsAbw8PW5DQ&sa=X&oi=translate&resnum=1&ct=result&prev=/search%3Fq%3Dhttp://zh.wikipedia.org/wiki/%2525E5%25259C%25258B%2525E5%2525AE%2525B6%2525E6%2525A8%252599%2525E6%2525BA%252596%2525E4%2525B8%2525AD%2525E6%252596%252587%2525E4%2525BA%2525A4%2525E6%25258F%25259B%2525E7%2525A2%2525BC%26hl%3Den%26sa%3DG ---------- title: Adding new CNS11643, a *huge* charset, support in cjkcodecs -> Adding new CNS11643, a *huge* charset, support in cjkcodecs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 13:58:19 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 12:58:19 +0000 Subject: [issue5499] only accept byte for getarg('c') and unicode for getarg('C') In-Reply-To: <1237294698.92.0.380829116259.issue5499@psf.upfronthosting.co.za> Message-ID: <1237294698.92.0.380829116259.issue5499@psf.upfronthosting.co.za> New submission from STINNER Victor : To avoid byte/character mixture, getarg('c') must only accept a byte string of 1 byte and getarg('C') only an unicode string of 1 character. Impacted methods: - datetime.datetime.isoformat(sep), array.array(type, data): don't accept byte anymore - msvcrt.putch(char), msvcrt.ungetch(char), .write_byte(char): don't accept unicode anymore I tried runtests.sh: only the 3 bytes.{center,ljust,rjust} tests have to be changed, all other tests are ok. Related issues: #3446, #5391. ---------- files: getarg_strict_char.patch keywords: patch messages: 83676 nosy: haypo severity: normal status: open title: only accept byte for getarg('c') and unicode for getarg('C') versions: Python 3.1 Added file: http://bugs.python.org/file13350/getarg_strict_char.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 14:05:28 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 13:05:28 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1237295128.39.0.739201801909.issue5391@psf.upfronthosting.co.za> STINNER Victor added the comment: In the python-dev thread, most people agree to use bytes in mmap. Did anyone reviewed the patch? Can you commit it to py3k than then to the 3.0 branch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 14:39:59 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 17 Mar 2009 13:39:59 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1237297199.57.0.458165635717.issue5391@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: >In the python-dev thread, most people agree to use bytes in mmap. Did >anyone reviewed the patch? Well, there is no conclusion which of your choices (a or b) is preferred. http://www.nabble.com/What-type-of-object-mmap.read_byte-should-return-on-py3k--tt22261245.html#a22261245 I opened similar issue for msvcrt in issue5410. >Can you commit it to py3k than then to the 3.0 branch? If the patch is acceptable, yes. This patch will change behavior of functions, I don't think I can commit this without review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 14:47:29 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 17 Mar 2009 13:47:29 +0000 Subject: [issue5353] Improve IndexError messages with actual values In-Reply-To: <1235414311.83.0.833112713041.issue5353@psf.upfronthosting.co.za> Message-ID: <1237297649.61.0.225264594791.issue5353@psf.upfronthosting.co.za> R. David Murray added the comment: This issue was discussed two years ago in this thread: http://mail.python.org/pipermail/python-list/2006-December/588224.html Most of the messages under that subject are noise about politeness or lack thereof (including a post by the submitter of this issue trying to get people to be reasonable!), but an actual patch was posted as well: http://mail.python.org/pipermail/python-list/2006-December/588377.html The patch addresses only one object type, but does demonstrate a pattern that might be usable in general. A concern was raised about the generality of the function proposed, as well as the performance implications of calling it. I have not tried to apply the patch to the current trunk, but from a quick look it doesn't seem like the source has changed much. Since the problem turns out to be a lot less trivial than it seems like it should be, the patch is a good reference in any case. ---------- nosy: +bitdancer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 16:36:02 2009 From: report at bugs.python.org (Elijah Merkin) Date: Tue, 17 Mar 2009 15:36:02 +0000 Subject: [issue5500] tarfile: path problem in arcname under windows In-Reply-To: <1237304162.51.0.555320282686.issue5500@psf.upfronthosting.co.za> Message-ID: <1237304162.51.0.555320282686.issue5500@psf.upfronthosting.co.za> New submission from Elijah Merkin : Tested on Python 2.5.4. 1. Use tarfile.open("fname", "w|gz") to create an archive. 2. Add a file using TarFile.add(name, arcname=None, recursive=True, exclude=None) by specifying 2 params: absolute path to a source file as 'name' and something containing one or more directories, e.g. 'test/myfile.txt' as 'arcname'. 3. Close the archive. On Linux file is added as 'test/myfile.txt'. On Windows the full path specified as 'name' is used (e.g. 'D:\\MyDir\\myfile.txt'). When I use 'w|bz2' everything works correctly. Probably this bug is somewhat similar to a bug #4750, though it happens under Windows and doesn't happen under Linux. ---------- components: Library (Lib), Windows messages: 83680 nosy: ellioh severity: normal status: open title: tarfile: path problem in arcname under windows type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 17:05:51 2009 From: report at bugs.python.org (Malte Helmert) Date: Tue, 17 Mar 2009 16:05:51 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237305951.76.0.0282172351633.issue2170@psf.upfronthosting.co.za> Malte Helmert added the comment: I eyeballed the new patch and wonder if the case where text nodes are collapsed is handled correctly. Assume that self.childNodes contains nodes [A, B, C], where A and B are non-empty text nodes and C is a non-text node. The algorithm would collapse A and B into A and then unlink B, and I think C.previousSibling would still reference the unlinked B, rather than the correct A. Am I missing something? If this is indeed a bug in the proposed patch, I suggest adding an additional test for this case. The bug itself should not be too hard to fix; the "elif" case would need the same if child.nextSibling: child.nextSibling.previousSibling = child.previousSibling assignment as the "if" case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 17:30:15 2009 From: report at bugs.python.org (Neyro) Date: Tue, 17 Mar 2009 16:30:15 +0000 Subject: [issue4749] Issue with RotatingFileHandler logging handler on Windows In-Reply-To: <1230295606.47.0.842082380856.issue4749@psf.upfronthosting.co.za> Message-ID: <1237307415.84.0.0475931397091.issue4749@psf.upfronthosting.co.za> Neyro added the comment: @vsajip thank you very much for correcting me. I always thought that since I was not using that FileHandler it didn't count, as if the handler was not created. Now I see that there are no reasons for the config loader to ignore it, especially since it is declared in the [handlers] section. Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 17:37:22 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 17 Mar 2009 16:37:22 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237307842.57.0.985694995327.issue2170@psf.upfronthosting.co.za> R. David Murray added the comment: You are absolutely right. I will write a test case and fix the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 18:08:30 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 17:08:30 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1237297199.57.0.458165635717.issue5391@psf.upfronthosting.co.za> Message-ID: <200903171807.47465.victor.stinner@haypocalc.com> STINNER Victor added the comment: Le Tuesday 17 March 2009 14:39:59 Hirokazu Yamamoto, vous avez ?crit?: > Well, there is no conclusion which of your choices (a or b) is preferred. Guido just wrote in other mail thread (py3k: accept unicode for 'c' and byte for 'C' in getarg?): "Yeah, mmap should be defined exclusively in terms of bytes." > I opened similar issue for msvcrt in issue5410. Cool, thanks. > >Can you commit it to py3k than then to the 3.0 branch? > > If the patch is acceptable, yes. This patch will change behavior of > functions, I don't think I can commit this without review. Sure, we need a review of the patch. Should the patch be ported to 3.0? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 18:12:30 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 17:12:30 +0000 Subject: [issue5410] msvcrt bytes cleanup In-Reply-To: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> Message-ID: <1237309950.29.0.0753426996254.issue5410@psf.upfronthosting.co.za> STINNER Victor added the comment: > msvcrt.ungetwch() calls _ungetch not _ungetwch ... are you sure that someone already used these functions? :-) If you suppose that issue5499 is fixed, you can leave msvcrt_putch() and msvcrt_ungetch unchanged and use "C" format in msvcrt_ungetwch() ("Py_UNICODE ch;" have to be replaced by "int ch;" for the format "C"). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 18:22:48 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 17:22:48 +0000 Subject: [issue5410] msvcrt bytes cleanup In-Reply-To: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> Message-ID: <1237310568.3.0.277913052276.issue5410@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch implementing my proposition (depends on issue5499). ---------- Added file: http://bugs.python.org/file13351/msvcrt_wchar.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 18:25:19 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 17:25:19 +0000 Subject: [issue5499] only accept byte for getarg('c') and unicode for getarg('C') In-Reply-To: <1237294698.92.0.380829116259.issue5499@psf.upfronthosting.co.za> Message-ID: <1237310719.38.0.433646976544.issue5499@psf.upfronthosting.co.za> STINNER Victor added the comment: unicode methods center(), ljust(), rjust() use a callback (convert_uc) to get an unicode character (unicode string of 1 character). If 'C' is fixed, convert_uc() callback can be removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 18:39:13 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 17 Mar 2009 17:39:13 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1237311553.16.0.864456769763.issue5391@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Ah, no, this should not be backported to 3.0. Martin saids so in msg82904, and I agreed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 18:47:43 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 17 Mar 2009 17:47:43 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237312063.82.0.203533536527.issue2170@psf.upfronthosting.co.za> R. David Murray added the comment: Added several more tests, to validate the sibling link code more, and fixed the bug. ---------- Added file: http://bugs.python.org/file13352/issue2170.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 18:47:58 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 17 Mar 2009 17:47:58 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237312078.42.0.812563015997.issue2170@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file13349/issue2170.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 19:01:44 2009 From: report at bugs.python.org (Brandon Corfman) Date: Tue, 17 Mar 2009 18:01:44 +0000 Subject: [issue5501] Update multiprocessing docs re: freeze_support In-Reply-To: <1237312904.73.0.910184118935.issue5501@psf.upfronthosting.co.za> Message-ID: <1237312904.73.0.910184118935.issue5501@psf.upfronthosting.co.za> New submission from Brandon Corfman : Indicate in docs whether freeze_support() can be called without issues on Unix or OS X, so the user knows whether they can have a single code base that works correctly on all platforms. ---------- assignee: georg.brandl components: Documentation messages: 83690 nosy: bcorfman, georg.brandl, jnoller severity: normal status: open title: Update multiprocessing docs re: freeze_support type: feature request versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 19:03:01 2009 From: report at bugs.python.org (Jesse Noller) Date: Tue, 17 Mar 2009 18:03:01 +0000 Subject: [issue5501] Update multiprocessing docs re: freeze_support In-Reply-To: <1237312904.73.0.910184118935.issue5501@psf.upfronthosting.co.za> Message-ID: <1237312981.25.0.657485080533.issue5501@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: georg.brandl -> jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 20:25:26 2009 From: report at bugs.python.org (Imri Goldberg) Date: Tue, 17 Mar 2009 19:25:26 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237317926.89.0.69526137867.issue2531@psf.upfronthosting.co.za> Imri Goldberg added the comment: This behavior also exists in Python 2.6. However, in Python 3 an exception is raised instead, as these kinds of comparisons are considered incorrect. Because of that, I'd like Python 3's behavior of raising exceptions on float-decimal comparisons to be backported to Python 2.6. As an aside, regardless of Python 3's behavior, there is a big difference between 2<"1.9" and 1.6 < decimal("2.0"). It seems reasonable to expect decimal comparisons to be made according to numerical value. When this doesn't happen, it is better to fail loudly rather than silently. ---------- nosy: +lorg _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Mar 17 20:39:15 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 17 Mar 2009 19:39:15 +0000 Subject: [issue5500] tarfile: path problem in arcname under windows In-Reply-To: <1237304162.51.0.555320282686.issue5500@psf.upfronthosting.co.za> Message-ID: <1237318755.54.0.648771225914.issue5500@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Lars, what do you think? ---------- assignee: -> lars.gustaebel nosy: +lars.gustaebel, loewis _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Mar 17 20:41:49 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 17 Mar 2009 19:41:49 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <200903171807.47465.victor.stinner@haypocalc.com> Message-ID: <49BFFCF8.3040904@v.loewis.de> Martin v. L?wis added the comment: STINNER Victor wrote: > STINNER Victor added the comment: > > Le Tuesday 17 March 2009 14:39:59 Hirokazu Yamamoto, vous avez ?crit : >> Well, there is no conclusion which of your choices (a or b) is preferred. > > Guido just wrote in other mail thread (py3k: accept unicode for 'c' and byte > for 'C' in getarg?): > > "Yeah, mmap should be defined exclusively in terms of bytes." How does that answer the question? We know what data type to use for multiple bytes - but what data type should be used for a single byte? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 20:45:09 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 17 Mar 2009 19:45:09 +0000 Subject: [issue5499] only accept byte for getarg('c') and unicode for getarg('C') In-Reply-To: <1237294698.92.0.380829116259.issue5499@psf.upfronthosting.co.za> Message-ID: <1237319109.21.0.598184846207.issue5499@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 20:51:21 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Mar 2009 19:51:21 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237319481.35.0.292710909373.issue2531@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Imri, I don't think the 3.0 model for cross-type comparisons can be backported without breaking code, so it probably isn't going to happen. The whole purpose of the 3.x series was to allow improvements that weren't backwards compatible. Mark, this raises a question for us. Now that we have decimal.from_float(), we do have a means of making exact comparisons between decimals and floats. While I think cross-type interaction is generally a bad idea, the 2.x way of doing things already gives an answer (though somewhat useless). What are your thoughts on making Decimal('0.80') < float('0.75') do the right thing in the 2.x series so that the answer that is given won't be flat-out wrong. ---------- assignee: -> marketdickinson nosy: +marketdickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 21:55:59 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 20:55:59 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1237323359.82.0.0530212857556.issue5391@psf.upfronthosting.co.za> STINNER Victor added the comment: > How does that answer the question? We know what data type to > use for multiple bytes - but what data type should be used > for a single byte? Hum, what was the question? :-) Quote of my email: ? About m.read_byte(), we have two choices: (a) Py_BuildValue("b", value) => 0 (b) Py_BuildValue("y#", &value, 1) => b"\x00" About m.write_byte(x), we have also two choices: (a) PyArg_ParseTuple(args, "b:write_byte", &value): write_byte(0) (b) PyArg_ParseTuple(args, "y#:write_byte", &value, &length) and check for length=1: write_byte(b"\x00") (b) choices are close to Python 2.x API. But we can already use m.read(1)->b"\x00" and m.write(b"\x00") to use byte string of 1 byte. So it would be better to break the API and use integers, (a) choices (...) ? Oh, I though that the question was about bytes vs str :-/ Ocean-city and I prefer the solution (a). And you Martin? ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Mar 17 22:10:24 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 17 Mar 2009 21:10:24 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1237323359.82.0.0530212857556.issue5391@psf.upfronthosting.co.za> Message-ID: <49C011AD.4060102@v.loewis.de> Martin v. L?wis added the comment: > Oh, I though that the question was about bytes vs str :-/ Ocean-city > and I prefer the solution (a). And you Martin? I also think that ints should be used to represent individual bytes. However, your list of alternatives is incomplete: we *could* also change the "c" code to accept and produce int - then mmapmodule would not need to change at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 22:18:40 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 17 Mar 2009 21:18:40 +0000 Subject: [issue2110] Implement __format__ for Decimal In-Reply-To: <1202994255.28.0.383332155678.issue2110@psf.upfronthosting.co.za> Message-ID: <1237324720.46.0.178540193331.issue2110@psf.upfronthosting.co.za> Mark Dickinson added the comment: New version of decimal_n_format.patch, with support for the thousands separator (PEP 378). As discussed on python-dev, during zero-padding the patched code adds an extra '0' on the left to avoid a leading ',' if necessary. For example: >>> format(Decimal('123456'), '08,') '0,123,456' The Decimal.__format__ method (and support code) had to be fairly significantly reworked. However, I'm reasonably confident that this code is correct: a patch review would be welcome if anyone has the time; otherwise I'll commit this in a couple of days or so. ---------- stage: -> commit review type: -> behavior Added file: http://bugs.python.org/file13353/decimal_n_format2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 22:22:18 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 17 Mar 2009 21:22:18 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1237324938.43.0.961504637399.issue4015@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I sometimes use this trick on Windows: name the script with a .bat extension, and put these lines on top of the file: @echo off rem = """ rem run python on this bat file. rem The -x causes python to skip the first line of the file: c:\path\to\python -x %~dpnx0 %* goto :EOF rem """ ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 22:23:33 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Mar 2009 21:23:33 +0000 Subject: [issue2110] Implement __format__ for Decimal In-Reply-To: <1202994255.28.0.383332155678.issue2110@psf.upfronthosting.co.za> Message-ID: <1237325013.97.0.492065212283.issue2110@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The tests you submitted are reassuring. I think you should go ahead and commit this. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 22:40:30 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 21:40:30 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1237326030.9.0.435545192021.issue2382@psf.upfronthosting.co.za> STINNER Victor added the comment: Proof of concept of patch fixing this issue: - parse_syntax_error() reads the text line into a PyUnicodeObject* instead of a "const char**" - create utf8_to_unicode_offset(): convert byte offset to a number of characters. The Python version should be something like: def utf8_to_unicode_offset(text, byte_offset): utf8 = text.encode("utf-8") utf8 = utf8[:byte_offset] text = str(utf8, "utf-8") return len(text) - reuse adjust_offset() from py3k_adjust_cursor_at_syntax_error_v2.patch, but force the use of wcswidth() because HAVE_WCSWIDTH is not defined by configure - print_error_text() works on unicode characters and not on bytes! The patch should be refactorized: - move adjust_offset(), utf8_to_unicode_offset(), utf8_len() in unicodeobject.c. You might create a new method "width()" for the unicode type. This method can be used to fix center(), ljust() and rjust() unicode methods (see issue #3446). ---------- Added file: http://bugs.python.org/file13354/issue2382.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 22:55:28 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 17 Mar 2009 21:55:28 +0000 Subject: [issue5236] time.strptime should reject bytes arguments on Py3 In-Reply-To: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> Message-ID: <1237326928.73.0.00192044026775.issue5236@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Please remove the whitespace changes in the patch (around "_cache_lock"). Otherwise it is good. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 22:57:32 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Tue, 17 Mar 2009 21:57:32 +0000 Subject: [issue5236] time.strptime should reject bytes arguments on Py3 In-Reply-To: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> Message-ID: <1237327052.38.0.995615501865.issue5236@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: Thanks for the comments all and sorry for the delay -- life! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 23:05:27 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Tue, 17 Mar 2009 22:05:27 +0000 Subject: [issue5236] time.strptime should reject bytes arguments on Py3 In-Reply-To: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> Message-ID: <1237327527.57.0.362200675565.issue5236@psf.upfronthosting.co.za> Changes by Tennessee Leeuwenburg : Added file: http://bugs.python.org/file13355/strptime_patch_v2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 23:07:29 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Mar 2009 22:07:29 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1237327649.67.0.911053369107.issue4136@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, if Bob has addressed all of Martin's comments, I suppose it can get in. The second step will be to port it to py3k... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 23:21:05 2009 From: report at bugs.python.org (Bob Ippolito) Date: Tue, 17 Mar 2009 22:21:05 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1237328465.22.0.458549939578.issue4136@psf.upfronthosting.co.za> Bob Ippolito added the comment: All of the comments are addressed. I am not going to go through the trouble of creating a new patch to remove the remaining backwards compatibility cruft in the C code and struct function. That is easier to remove later. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Mar 17 23:37:57 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 17 Mar 2009 22:37:57 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1237329477.3.0.0445665341438.issue4136@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch in its current form is fine with me, please apply (OTOH, I don't see the need for urgency - 2.7 is still many months away, and likely, we will see another update to the same code before it gets released) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 23:44:35 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Mar 2009 22:44:35 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1237329875.03.0.215414952701.issue4136@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Bob, please go ahead and commit. I don't see any advantage to letting the code continue sit in the tracker. Also, having it in will let me go forward with issue 5381 which has been held-up until this was complete. Thanks for all your work on JSON. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 17 23:58:36 2009 From: report at bugs.python.org (Malte Helmert) Date: Tue, 17 Mar 2009 22:58:36 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237330716.25.0.428216750528.issue2170@psf.upfronthosting.co.za> Malte Helmert added the comment: While we're cleaning up: data = child.data if not data: could be if not child.data: since data is not used again. Alternatively, you could use data in place of child.data later on for a small speed-up, but I doubt that we care about such small optimizations here. If we do, then we should also assign a name to child.nextSibling, though. I found the three-line duplication between the two branches mildly refactor-worthy, but when I eliminated it the control logic got more involved and I don't think that's a good trade-off here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:01:56 2009 From: report at bugs.python.org (Malte Helmert) Date: Tue, 17 Mar 2009 23:01:56 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237330916.62.0.478306431526.issue2170@psf.upfronthosting.co.za> Changes by Malte Helmert : Removed file: http://bugs.python.org/file9513/minidom.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:02:02 2009 From: report at bugs.python.org (Rudd-O) Date: Tue, 17 Mar 2009 23:02:02 +0000 Subject: [issue5474] distutils produces invalid RPM packages of prerelease python packages In-Reply-To: <1236744919.07.0.603710480384.issue5474@psf.upfronthosting.co.za> Message-ID: <1237330922.27.0.21353084572.issue5474@psf.upfronthosting.co.za> Rudd-O added the comment: I am considering some changes in the auto-dependency part of the patch. Keep tuned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:02:40 2009 From: report at bugs.python.org (Malte Helmert) Date: Tue, 17 Mar 2009 23:02:40 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237330960.8.0.168359934553.issue2170@psf.upfronthosting.co.za> Malte Helmert added the comment: I removed my original patch which has been superseded by David's patch. David, I suggest that you also remove test_minidom.patch which is superseded by your later patch (see http://bugs.python.org/msg77766 for policy on this). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:16:19 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 17 Mar 2009 23:16:19 +0000 Subject: [issue2110] Implement __format__ for Decimal In-Reply-To: <1202994255.28.0.383332155678.issue2110@psf.upfronthosting.co.za> Message-ID: <1237331779.24.0.545479992233.issue2110@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed, r70439 and r70440. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:17:14 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 17 Mar 2009 23:17:14 +0000 Subject: [issue5481] Expand Decimal.__format__() support to include "n" In-Reply-To: <1236888027.08.0.305136534993.issue5481@psf.upfronthosting.co.za> Message-ID: <1237331834.93.0.387551476579.issue5481@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing as duplicate of issue 2110. ---------- resolution: -> duplicate status: open -> closed superseder: -> Implement __format__ for Decimal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:23:36 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 23:23:36 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1237332216.73.0.0574011104955.issue2382@psf.upfronthosting.co.za> STINNER Victor added the comment: For an easier review, I splitted my patch in multiple small patches: - unicode_utf8size.patch: create _PyUnicode_UTF8Size() function: Number of bytes needed to encode the unicode character as UTF-8 - unicode_width.patch: create PyUnicode_Width(): Number of column needed to represent the string in the current locale. -1 is returned in case of an error. - adjust_offset.patch: Change unit of SyntaxError.offset, convert utf8 offset to unicode offset - print_exception.patch: process error text as an unicode string (instead of a byte string), convert offset from characters to "columns" Dependencies: - adjust_offset.patch depends on unicode_utf8size.patch - print_exception.patch depends on unicode_width.patch Changes since issue2382.patch: - PyUnicode_Width() doesn't change the locale - PyUnicode_Width() uses WideCharToMultiByte() on MS_WINDOWS, and wcswidth() otherwise (before: do nothing if HAVE_WCSWIDTH is not definied) - the offset was converted from utf8 index to unicode index only in print_error_text(), not on SyntaxError creation - _PyUnicode_UTF8Size() and PyUnicode_Width() are public ---------- Added file: http://bugs.python.org/file13356/unicode_utf8size.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:23:45 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 23:23:45 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1237332225.73.0.240320743211.issue2382@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file13357/unicode_width.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:23:51 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 23:23:51 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1237332231.88.0.187865911638.issue2382@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file13358/adjust_offset.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:24:01 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 23:24:01 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1237332241.5.0.676259843004.issue2382@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file13359/print_exception.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:35:49 2009 From: report at bugs.python.org (Bob Ippolito) Date: Tue, 17 Mar 2009 23:35:49 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1237332949.13.0.921936031123.issue4136@psf.upfronthosting.co.za> Bob Ippolito added the comment: r70443 in trunk ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:41:00 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 23:41:00 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1237333260.92.0.477095906943.issue2382@psf.upfronthosting.co.za> STINNER Victor added the comment: Comments about my own patches. unicode_width.patch: * error messages should be improved: ValueError("Unable to compute string width") for Windows IOError(strerror(errno)) otherwise adjust_offset.patch: * format_exception_only() from Lib/traceback.py may need a fix * about the documentation: it looks like SyntaxError.offset unit is not documentation in exceptions.rst (should it be documented, or leaved unchanged?) print_exception.patch: * i'm not sure of the reference counts (ref leak?) * in case of PyUnicode_FromUnicode(text, textlen) error, >>PyFile_WriteObject(textobj, f, Py_PRINT_RAW); PyFile_WriteString("\n", f);<< is used to display the line but textobj may already ends with \n. * format_exception_only() from Lib/traceback.py should do the same job than fixed print_exception(): get the string width (to fix this issue!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:41:04 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Mar 2009 23:41:04 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1237333264.78.0.540773609184.issue4136@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Reopening so that we don't forget to merge it in py3k :) (I have the feeling it won't be trivial, although I hope to be proven wrong) ---------- status: closed -> open versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:42:35 2009 From: report at bugs.python.org (Andy Buckley) Date: Tue, 17 Mar 2009 23:42:35 +0000 Subject: [issue5374] optparse special usage tokens conflict with formatting characters In-Reply-To: <1235657301.0.0.570372518506.issue5374@psf.upfronthosting.co.za> Message-ID: <1237333355.57.0.675539819144.issue5374@psf.upfronthosting.co.za> Andy Buckley added the comment: Doc patch for Doc/library/optparse.rst attached. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:45:58 2009 From: report at bugs.python.org (Andy Buckley) Date: Tue, 17 Mar 2009 23:45:58 +0000 Subject: [issue5374] optparse special usage tokens conflict with formatting characters In-Reply-To: <1235657301.0.0.570372518506.issue5374@psf.upfronthosting.co.za> Message-ID: <1237333558.04.0.0876190620709.issue5374@psf.upfronthosting.co.za> Andy Buckley added the comment: Sorry, browser error last time. Should work now (fingers crossed). ---------- keywords: +patch Added file: http://bugs.python.org/file13360/optparse-prog-escape.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:49:45 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 23:49:45 +0000 Subject: [issue3022] mailbox module, two small fixes In-Reply-To: <1212355773.67.0.369854949727.issue3022@psf.upfronthosting.co.za> Message-ID: <1237333785.83.0.156782738661.issue3022@psf.upfronthosting.co.za> STINNER Victor added the comment: Ping. Nobody is interested by the patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:52:58 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 23:52:58 +0000 Subject: [issue4034] traceback attribute error In-Reply-To: <1223076719.45.0.395696576555.issue4034@psf.upfronthosting.co.za> Message-ID: <1237333978.19.0.187941601794.issue4034@psf.upfronthosting.co.za> STINNER Victor added the comment: Ping. benjamin.peterson's patch fixes the very strange issue, and I would like to see it upstream. About clearing the frame/traceback, it's another issue (#1565525). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 00:59:11 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Mar 2009 23:59:11 +0000 Subject: [issue4358] Segfault in stringobject.c In-Reply-To: <1227119670.36.0.570140280059.issue4358@psf.upfronthosting.co.za> Message-ID: <1237334351.26.0.742664798409.issue4358@psf.upfronthosting.co.za> STINNER Victor added the comment: farshad: Is the bug still open? If yes, can you give more informations? If you don't answer, I will have to close this issue because it's not possible find the bug with so few informations :-/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 01:04:43 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 18 Mar 2009 00:04:43 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1237334683.58.0.363704338282.issue4136@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It might not be bad. I read through the patch a saw that it uses only the most basic C APIs and already has unicode aware sections. It may be a matter of switching the PyString functions. Will look at it in more detail later this week. Fortunately, there is not a lot of C code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 01:08:34 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Wed, 18 Mar 2009 00:08:34 +0000 Subject: [issue1520662] support all of strftime(3) Message-ID: <1237334914.81.0.876038819355.issue1520662@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: I'd be happy to look at this. Would you be able to detail what is missing for me, so that it is easier for me to get to grips with what is involved? I'm not intimately familiar with all of the functionality of these modules, so if you are able to detail what is missing, then I can more quickly look at a solution. Thanks, -T ---------- nosy: +tleeuwenburg at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 01:21:49 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Mar 2009 00:21:49 +0000 Subject: [issue4194] default subprocess.Popen buffer size In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1237335709.68.0.191011316253.issue4194@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I just wanna say that buffering can be a problem when writing, but not when reading. If you read() from a buffered file, you still get the available contents immediately, you don't have to wait for the buffer to be full. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 02:16:12 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Mar 2009 01:16:12 +0000 Subject: [issue5502] io-c: TextIOWrapper is faster than BufferedReader but not protected by a lock In-Reply-To: <1237338972.64.0.602798435318.issue5502@psf.upfronthosting.co.za> Message-ID: <1237338972.64.0.602798435318.issue5502@psf.upfronthosting.co.za> New submission from STINNER Victor : TextIOWrapper.readline() is much faster (eg. 72 ms vs 95 ms) than BufferedReader.readline(). It's because BufferedReader always acquires the file lock, whereas TextIOWrapper only acquires the file lock when the buffer is empty. I would like a BufferedReader.readline() as fast as TextIOWrapper.readline(), or faster! Why BufferedReader's attributes are protected by a lock whereas TextIOWrapper's attributes are not? Does it mean that TextIOWrapper may crash if two threads calls readline() (or different methods) at the "same time"? How does Python 2.x and 3.0 fix this issue? ---------- components: Library (Lib) messages: 83724 nosy: haypo, pitrou severity: normal status: open title: io-c: TextIOWrapper is faster than BufferedReader but not protected by a lock versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 02:18:18 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Mar 2009 01:18:18 +0000 Subject: [issue4194] default subprocess.Popen buffer size In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1237339098.01.0.321102689815.issue4194@psf.upfronthosting.co.za> STINNER Victor added the comment: The strange performance between bytes/text (BufferedReader/TextIOWrapper) may be explained by the issue #5502. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 02:19:44 2009 From: report at bugs.python.org (David W. Lambert) Date: Wed, 18 Mar 2009 01:19:44 +0000 Subject: [issue1520662] support all of strftime(3) Message-ID: <1237339184.13.0.897511508525.issue1520662@psf.upfronthosting.co.za> David W. Lambert added the comment: http://linux.die.net/man/3/strftime or this link may be in USA, if you care: http://www.manpagez.com/man/3/strftime/ ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 02:36:56 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 18 Mar 2009 01:36:56 +0000 Subject: [issue5374] optparse special usage tokens conflict with formatting characters In-Reply-To: <1235657301.0.0.570372518506.issue5374@psf.upfronthosting.co.za> Message-ID: <1237340216.68.0.100182371851.issue5374@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think this patch should be applied for two reasons. First, this is just a general comment on % formatting that could apply everywhere % formatting is used (the correct place for it is in docs for % formatting). Second, it has become a non-issue with the PEP 3101 style of formatting that is the new preferred way to do it. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 02:59:34 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Mar 2009 01:59:34 +0000 Subject: [issue5502] io-c: TextIOWrapper is faster than BufferedReader but not protected by a lock In-Reply-To: <1237338972.64.0.602798435318.issue5502@psf.upfronthosting.co.za> Message-ID: <1237341574.15.0.571117961578.issue5502@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote a short script to test TextIOWrapper.readline() with 32 threads. After 5 seconds, I found this issue in Python trunk (2.7): Exception in thread Thread-26: Traceback (most recent call last): File "/home/SHARE/SVN/python-trunk/Lib/threading.py", line 522, in __bootstrap_inner self.run() File "/home/haypo/crash_textiowrapper.py", line 15, in run line = self.file.readline() File "/home/SHARE/SVN/python-trunk/Lib/io.py", line 1835, in readline self._rewind_decoded_chars(len(line) - endpos) File "/home/SHARE/SVN/python-trunk/Lib/io.py", line 1541, in _rewind_decoded_chars raise AssertionError("rewind decoded_chars out of bounds") AssertionError: rewind decoded_chars out of bounds But it looks that py3k is stronger because it doesn't crash. Is it the power of the GIL? ---------- Added file: http://bugs.python.org/file13361/crash_textiowrapper.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 03:01:21 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 18 Mar 2009 02:01:21 +0000 Subject: [issue5381] json needs object_pairs_hook In-Reply-To: <1235723876.26.0.796036500228.issue5381@psf.upfronthosting.co.za> Message-ID: <1237341681.21.0.0209317882093.issue5381@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file13244/json_ordered.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 03:16:03 2009 From: report at bugs.python.org (David W. Lambert) Date: Wed, 18 Mar 2009 02:16:03 +0000 Subject: [issue1520662] support all of strftime(3) Message-ID: <1237342563.09.0.630717957641.issue1520662@psf.upfronthosting.co.za> David W. Lambert added the comment: (with similar links for strpfime). These are reasons a patch may be worth while: x difficult to work around using ctypes module with c library. x help(strftime) advises the programmer to see the reference manual for formatting codes. x Searching bugs.python.org open issues for strftime has 31 hits, some related. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 03:17:24 2009 From: report at bugs.python.org (jq) Date: Wed, 18 Mar 2009 02:17:24 +0000 Subject: [issue5503] multiprocessing/connection.py wrong pipe name under win32 In-Reply-To: <1237342644.17.0.0547422221967.issue5503@psf.upfronthosting.co.za> Message-ID: <1237342644.17.0.0547422221967.issue5503@psf.upfronthosting.co.za> New submission from jq : def arbitrary_address(family): elif family == 'AF_PIPE': return tempfile.mktemp(prefix=r'\\.\pipe\pyc-%d-%d-' % (os.getpid(), _mmap_counter.next())) #works after removed tempfile.mktemp return r'\\.\pipe\pyc-%d-%d-' % (os.getpid(), _mmap_counter.next()) ---------- components: Library (Lib) messages: 83730 nosy: jqcn2003 severity: normal status: open title: multiprocessing/connection.py wrong pipe name under win32 versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 03:17:34 2009 From: report at bugs.python.org (David W. Lambert) Date: Wed, 18 Mar 2009 02:17:34 +0000 Subject: [issue1520662] support all of strftime(3) Message-ID: <1237342654.35.0.666488960613.issue1520662@psf.upfronthosting.co.za> David W. Lambert added the comment: (I have no clue where the servers are.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 03:21:23 2009 From: report at bugs.python.org (Brad Miller) Date: Wed, 18 Mar 2009 02:21:23 +0000 Subject: [issue5232] Setting font from preference dialog in IDLE on OS X broken In-Reply-To: <1234476506.45.0.29629224735.issue5232@psf.upfronthosting.co.za> Message-ID: <1237342883.08.0.859176947976.issue5232@psf.upfronthosting.co.za> Brad Miller added the comment: I get the same problem when I try to change the key set. This is on on intel build using Tk 8.5, and the latest 3.1 source checked out with bzr. I too changed the order of /Library/Frameworks and /System/Library/Frameworks in setup.py A simple fix for me was to add the line root.instance_dict = {} in macosxsupport.py That does not seem to have any other ill effects. ---------- nosy: +bmiller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 04:55:08 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 18 Mar 2009 03:55:08 +0000 Subject: [issue5381] json needs object_pairs_hook In-Reply-To: <1235723876.26.0.796036500228.issue5381@psf.upfronthosting.co.za> Message-ID: <1237348508.94.0.336651989544.issue5381@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Bob would you please take a look at the attached patch. ---------- assignee: rhettinger -> bob.ippolito priority: normal -> high Added file: http://bugs.python.org/file13362/json_hook.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 04:55:31 2009 From: report at bugs.python.org (Adam Goode) Date: Wed, 18 Mar 2009 03:55:31 +0000 Subject: [issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC In-Reply-To: <1237348531.28.0.513167073983.issue5504@psf.upfronthosting.co.za> Message-ID: <1237348531.28.0.513167073983.issue5504@psf.upfronthosting.co.za> New submission from Adam Goode : On Fedora systems, it is invalid to mmap something with PROT_WRITE and PROT_EXEC. libffi has been updated to support this, but ctypes has not been updated to use this new functionality. Attached is a patch which currently only works if system libffi is used. Though the embedded version of libffi is new enough, it is missing the allocation and free functions. I know how I would update the ctypes libffi/ directory (add the alloc/free files), but not sure about the other libffi directories (darwin, arm_wince, msvc, osx). I suppose those would all need to be upgraded, or perhaps even made to use the standard libffi instead of special forks of it. Note that this also eliminates the malloc_closure code. ---------- assignee: theller components: ctypes files: ctypes-newffi.patch keywords: patch messages: 83734 nosy: agoode, theller severity: normal status: open title: ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC type: crash versions: Python 2.6 Added file: http://bugs.python.org/file13363/ctypes-newffi.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 04:57:32 2009 From: report at bugs.python.org (Adam Goode) Date: Wed, 18 Mar 2009 03:57:32 +0000 Subject: [issue3265] Python-2.5.2/Modules/_ctypes/malloc_closure.c:70: error: `MAP_ANONYMOUS' undeclared In-Reply-To: <1215043666.75.0.766151712273.issue3265@psf.upfronthosting.co.za> Message-ID: <1237348652.1.0.514681147824.issue3265@psf.upfronthosting.co.za> Adam Goode added the comment: Issue #5504 shows a possibly more future proof way to fix this issue. ---------- nosy: +agoode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 10:20:34 2009 From: report at bugs.python.org (Fan Decheng) Date: Wed, 18 Mar 2009 09:20:34 +0000 Subject: [issue5505] sys.stdin.read() doesn't return after first EOF on Windows In-Reply-To: <1237368034.29.0.0565107663013.issue5505@psf.upfronthosting.co.za> Message-ID: <1237368034.29.0.0565107663013.issue5505@psf.upfronthosting.co.za> New submission from Fan Decheng : Platform: Windows Vista x64 Python version: 3.0.1 x64 When I use sys.stdin.readlines(), it correctly ends when I enter ^Z (ctrl-Z) on the console (this is the EOF on the console). However when I call sys.stdin.read(), it doesn't end when ^Z is entered. It ends when I enter the second ^Z. Repro steps: 1. Open python. 2. Type: import sys sys.stdin.read() 3. Type: Hello ^Z 4. Note the above ^Z should be followed by a Return. Result: The function call doesn't end. If I enter another ^Z, it ends. Expected result: The function call ends. ---------- components: Library (Lib) messages: 83736 nosy: r_mosaic severity: normal status: open title: sys.stdin.read() doesn't return after first EOF on Windows type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 10:57:48 2009 From: report at bugs.python.org (Tal Einat) Date: Wed, 18 Mar 2009 09:57:48 +0000 Subject: [issue1201569] allow running multiple instances of IDLE Message-ID: <1237370268.47.0.102547707382.issue1201569@psf.upfronthosting.co.za> Tal Einat added the comment: This should be dropped in favor of issue #1529142, which proposes a simpler and better solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 11:24:51 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 18 Mar 2009 10:24:51 +0000 Subject: [issue1529142] Allowing multiple instances of IDLE with sub-processes Message-ID: <1237371891.74.0.838426638179.issue1529142@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Is there anyone following this thread that thinks the weeble's patch is not ready to commit? ---------- assignee: kbk -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 11:35:39 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Mar 2009 10:35:39 +0000 Subject: [issue5502] io-c: TextIOWrapper is faster than BufferedReader but not protected by a lock In-Reply-To: <1237341574.15.0.571117961578.issue5502@psf.upfronthosting.co.za> Message-ID: <1237372611.7161.2.camel@fsol> Antoine Pitrou added the comment: > But it looks that py3k is stronger because it doesn't crash. Is it the > power of the GIL? Yes, it is. In theory, we needn't take the lock in all of BufferedReader.readline(), only when calling external code which might itself release the GIL. In practice, we didn't bother optimizing the lock-taking, for the sake of simplicity. If the lock really accounts for a significant part of the runtime cost, we can try to do better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 11:40:13 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Mar 2009 10:40:13 +0000 Subject: [issue5506] io.BytesIO doesn't support the buffer protocol In-Reply-To: <1237372813.02.0.863937398422.issue5506@psf.upfronthosting.co.za> Message-ID: <1237372813.02.0.863937398422.issue5506@psf.upfronthosting.co.za> New submission from Antoine Pitrou : It may be logical for BytesIO to support the buffer protocol (readable /and/ writable). ---------- components: Library (Lib) messages: 83740 nosy: pitrou priority: normal severity: normal stage: test needed status: open title: io.BytesIO doesn't support the buffer protocol type: feature request versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 11:49:52 2009 From: report at bugs.python.org (Andy Buckley) Date: Wed, 18 Mar 2009 10:49:52 +0000 Subject: [issue5374] optparse special usage tokens conflict with formatting characters In-Reply-To: <1235657301.0.0.570372518506.issue5374@psf.upfronthosting.co.za> Message-ID: <1237373392.31.0.426959590242.issue5374@psf.upfronthosting.co.za> Andy Buckley added the comment: I'm easy either way --- I appreciate that it is a non-issue with new formatting, but until developers can rely on the presence of Py >= 2.6, %-formatting wil continue to be widely used. Since optparse's special use of %-delimited tokens clashes with the established formatting in a way that could arguably do with clarification (I was blind enough to the solution to start this ticket), I think it could be useful to document it close to the description of %prog usage. Of course, since I now know the answer, *I* don't need it to be in the documentation, but it might be helpful to others ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 11:52:01 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Mar 2009 10:52:01 +0000 Subject: [issue5505] sys.stdin.read() doesn't return after first EOF on Windows In-Reply-To: <1237368034.29.0.0565107663013.issue5505@psf.upfronthosting.co.za> Message-ID: <1237373521.4.0.157464513574.issue5505@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (cannot reproduce under Linux) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 11:55:03 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Mar 2009 10:55:03 +0000 Subject: [issue5503] multiprocessing/connection.py wrong pipe name under win32 In-Reply-To: <1237342644.17.0.0547422221967.issue5503@psf.upfronthosting.co.za> Message-ID: <1237373703.74.0.00589698752489.issue5503@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> jnoller nosy: +jnoller priority: -> normal type: -> behavior versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 12:20:20 2009 From: report at bugs.python.org (Andreas Schawo) Date: Wed, 18 Mar 2009 11:20:20 +0000 Subject: [issue4228] struct.pack('L', -1) In-Reply-To: <1225294862.2.0.0798680271584.issue4228@psf.upfronthosting.co.za> Message-ID: <1237375220.22.0.991590455845.issue4228@psf.upfronthosting.co.za> Andreas Schawo added the comment: As I understand actually the zipfile module possibly creates damaged zip files after version 2.4 because of '\x00\x00\x00\x00' instead of '\xff\xff\xff\xff' as header offset. But without any error. I think the _struct.c should be cleaned in any case. Because we only get errors in zipfile module when damaged zip files are created. An error would be appriciated instead of a silenty damaged zip file. But, why don't boundary check the header offset in zipfile module in a short private function and returning '\xff\xff\xff\xff' in case of overflow? Maybe all longs should be boundary checked if this seems necassery. ---------- nosy: +andreas.schawo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 13:08:23 2009 From: report at bugs.python.org (Matthias Klose) Date: Wed, 18 Mar 2009 12:08:23 +0000 Subject: [issue5507] ctypes configuration fails on mips-linux (and probably Irix) In-Reply-To: <1237378102.74.0.471718601919.issue5507@psf.upfronthosting.co.za> Message-ID: <1237378102.74.0.471718601919.issue5507@psf.upfronthosting.co.za> New submission from Matthias Klose : | File "build/temp.linux-mips-2.6/libffi/fficonfig.py", line 32, in | ffi_sources += ffi_platforms['MIPS'] | KeyError: 'MIPS' however the fficonfig.py file has only MIPS_LINUX and MIPS_IRIX keys. ---------- assignee: theller components: ctypes messages: 83744 nosy: doko, theller severity: normal status: open title: ctypes configuration fails on mips-linux (and probably Irix) type: compile error versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 14:26:04 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 18 Mar 2009 13:26:04 +0000 Subject: [issue4228] struct.pack('L', -1) In-Reply-To: <1225294862.2.0.0798680271584.issue4228@psf.upfronthosting.co.za> Message-ID: <1237382764.76.0.344019590981.issue4228@psf.upfronthosting.co.za> Mark Dickinson added the comment: I don't know the zipfile module very well (i.e., at all), but as far as I can tell from looking at the source, there's no use of struct.pack('L', -1) in 2.6 onwards: it's only potentially a problem in 2.5 (and that isn't going to change, now that 2.5 is in security-fix only mode). Can anyone who understands the zipfile module better than me confirm this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 14:32:15 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 18 Mar 2009 13:32:15 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1237383135.29.0.892111532367.issue5463@psf.upfronthosting.co.za> Mark Dickinson added the comment: I think you're right about issue 4228: we should go ahead and clean up the struct module anyway. As far as I can tell, only the Python 2.5 zipfile module is using the deprecated behaviour. The _struct.c portion of your patch looks fine. I think there's still some work to do on the test_struct file: for example, removing references to PY_STRUCT_OVERFLOW_MASKING. I'd also like to remove the deprecated float handling, but it's probably better to do that in a separate patch once this patch is in. Changing title to better reflect the current patch. ---------- title: Compiler warning get_ulong is never used 3.x -> Remove deprecated features from struct module type: compile error -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 14:50:34 2009 From: report at bugs.python.org (Benny Bach) Date: Wed, 18 Mar 2009 13:50:34 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1237384234.73.0.694580640476.issue4015@psf.upfronthosting.co.za> Benny Bach added the comment: If you have to name the script with a .bat extension it is not portable to other platforms or did I misunderstand something? The point of generating the bat file is to be able to use the same script on all platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 14:57:11 2009 From: report at bugs.python.org (C. E. Ball) Date: Wed, 18 Mar 2009 13:57:11 +0000 Subject: [issue4508] distutils compiler not handling spaces in path to output/src files In-Reply-To: <1228341537.43.0.522254260997.issue4508@psf.upfronthosting.co.za> Message-ID: <1237384631.1.0.967514427812.issue4508@psf.upfronthosting.co.za> C. E. Ball added the comment: I also found this bug while using SciPy's weave on Windows XP to compile some inline c/c++ code. Thorney's distutils_compiler_quoting.patch fixed the problem for me. Here is the relevant part of the traceback (I hope): """ Found executable C:\Program Files\Topographica\python_topo\mingw\bin\g++.exe g++.exe: c:\docume~1\ceball\locals~1\temp\ceball\python25_intermediate\compiler_ 894ad5ed761bb51736c6d2b7872dc212\Release\program: No such file or directory g++.exe: files\topographica\python_topo\lib\site-packages\weave\scxx\weave_imp.o: No such file or directory """ Chris ---------- nosy: +ceball _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 15:02:14 2009 From: report at bugs.python.org (Andreas Schawo) Date: Wed, 18 Mar 2009 14:02:14 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1237384934.39.0.716609413257.issue5463@psf.upfronthosting.co.za> Andreas Schawo added the comment: I agree with you. A separate patch will do better. In the next days I'm able to provide a new patch with the test_struct cleanup. Currently all tests succeeded on Windows and Linux. So I think no other module relies on this feature explicitly. I've already checked the documentation, but there are no references to overflow masking. So there's nothing to do for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 15:05:59 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 18 Mar 2009 14:05:59 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1237385159.64.0.419967768135.issue4015@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: On posix platform, build_scripts already updates the #! line to refer to the target interpreter, and changes the file mode. On Windows, it could change the extension as well. Or does it causes problems? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 15:49:46 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 18 Mar 2009 14:49:46 +0000 Subject: [issue4474] PyUnicode_FromWideChar incorrect for characters outside the BMP (unix only) In-Reply-To: <1228071248.49.0.10094276273.issue4474@psf.upfronthosting.co.za> Message-ID: <1237387786.73.0.0250731392256.issue4474@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed to py3k, r70452. Since this is partway between a bugfix and a new feature, I suggest that it's not worth merging it to 3.0 (or 2.6). It should be backported to 2.7, however; I'll do this after verifying that the py3k buildbots are happy. ---------- versions: -Python 2.6, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 16:25:51 2009 From: report at bugs.python.org (ganges master) Date: Wed, 18 Mar 2009 15:25:51 +0000 Subject: [issue5508] maximum recursion depth exceeded in __subclasscheck__ In-Reply-To: <1237389950.95.0.980403444987.issue5508@psf.upfronthosting.co.za> Message-ID: <1237389950.95.0.980403444987.issue5508@psf.upfronthosting.co.za> New submission from ganges master : this is similar to bug #5370, but this for is a different reason. also, i have seen several sites on google that mention it, so it has happened to quite a few people. the bug is that when calling dir() on a object, it looks for __members__ and __methods__, which might not exist, thus invoking __getattr__ (if it exists). if __getattr__ fails, say, due to a never ending recusion, the exception is silently swallowed. this was the behavior in py2.5. since 2.6, it emits a warning (that looks like PyErr_WriteUnraisable) with the strangest message: Exception RuntimeError: 'maximum recursion depth exceeded in __subclasscheck__' in ignored this is very confusing. either dir() raises this exception, or silently ignore it, but displaying this message is only confusing. i haven't been able to detect why this happens: * the source of this exception, merge_list_attr, calls PyErr_Clear * nobody seems to call PyErr_WriteUnraisable here's a snippet: class Foo(object): def __getattr__(self, name): return self.x # which will recursively call __getattr__ >>> f = Foo() >>> print dir(f) Exception RuntimeError: 'maximum recursion depth exceeded in __subclasscheck__' in ignored Exception RuntimeError: 'maximum recursion depth exceeded in __subclasscheck__' in ignored ['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattr__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__'] ---------- components: Interpreter Core messages: 83752 nosy: gangesmaster, georg.brandl severity: normal status: open title: maximum recursion depth exceeded in __subclasscheck__ type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 16:43:58 2009 From: report at bugs.python.org (Brad Miller) Date: Wed, 18 Mar 2009 15:43:58 +0000 Subject: [issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0 In-Reply-To: <1230586952.45.0.591912771259.issue4773@psf.upfronthosting.co.za> Message-ID: <1237391038.11.0.362944619832.issue4773@psf.upfronthosting.co.za> Changes by Brad Miller : ---------- nosy: +bmiller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 16:50:29 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 18 Mar 2009 15:50:29 +0000 Subject: [issue1222] locale.format bug if thousand separator is space (french separator as example) In-Reply-To: <1191172668.69.0.513518274707.issue1222@psf.upfronthosting.co.za> Message-ID: <1237391429.89.0.382193891804.issue1222@psf.upfronthosting.co.za> Mark Dickinson added the comment: r70357 seems to have caused the sparc solaris py3k buildbot to start failing on test_locale: ====================================================================== FAIL: test_integer_grouping_and_padding (test.test_locale.TestNumberFormatting) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_locale.py", line 181, in test_integer_grouping_and_padding out=('4%s200' % self.sep).rjust(10)) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_locale.py", line 143, in _test_format func=locale.format, **format_opts) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_locale.py", line 139, in _test_formatfunc func(format, value, **format_opts), out) AssertionError: ' 4200' != ' 4200' Any idea what's going on here? ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 17:10:56 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 18 Mar 2009 16:10:56 +0000 Subject: [issue4474] PyUnicode_FromWideChar incorrect for characters outside the BMP (unix only) In-Reply-To: <1228071248.49.0.10094276273.issue4474@psf.upfronthosting.co.za> Message-ID: <1237392656.69.0.631040140379.issue4474@psf.upfronthosting.co.za> Mark Dickinson added the comment: Backported to the trunk in r70454. Thanks, all! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 17:47:14 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 18 Mar 2009 16:47:14 +0000 Subject: [issue5505] sys.stdin.read() doesn't return after first EOF on Windows In-Reply-To: <1237368034.29.0.0565107663013.issue5505@psf.upfronthosting.co.za> Message-ID: <1237394834.42.0.154584210108.issue5505@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I can reproduce this on coLinux(debian). But coLinux is running on windows, so its console behavior may not be same as native linux. (You need to use Ctrl+D on coLinux instead of Ctrl+Z) ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 17:55:23 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 18 Mar 2009 16:55:23 +0000 Subject: [issue5505] sys.stdin.read() doesn't return after first EOF on Windows In-Reply-To: <1237368034.29.0.0565107663013.issue5505@psf.upfronthosting.co.za> Message-ID: <1237395323.93.0.583064992345.issue5505@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: With following patch for investigation, (release30-maint) Index: Lib/io.py =================================================================== --- Lib/io.py (revision 70450) +++ Lib/io.py (working copy) @@ -57,6 +57,7 @@ import os import abc +import sys import codecs import _fileio # Import _thread instead of threading to reduce startup cost @@ -931,6 +932,7 @@ while True: # Read until EOF or until read() would block. chunk = self.raw.read() + print("============>", repr(chunk), file=sys.stderr) if chunk in empty_values: nodata_val = chunk break /////////////////////// I got this result. >>> sys.stdin.read() abc ^Z ============> b'abc\n' ^Z ============> b'' 'abc\n' To get empty chunk, we need to hit CTRL-Z twice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 18:02:32 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Mar 2009 17:02:32 +0000 Subject: [issue1222] locale.format bug if thousand separator is space (french separator as example) In-Reply-To: <1237391429.89.0.382193891804.issue1222@psf.upfronthosting.co.za> Message-ID: <1237395824.5852.1.camel@fsol> Antoine Pitrou added the comment: Hi Mark, > AssertionError: ' 4200' != ' 4200' > > Any idea what's going on here? The problem seems to be that the thousands separator on the Solaris variant of en_US is an empty string (rather than a comma) (*), and apparently it hits a bug in the padding mechanism (which perhaps assumes that the thousands separator is always a 1-character string). (*) (another reason not to use any C locale-based mechanism for localization, by the way...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 18:05:29 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Mar 2009 17:05:29 +0000 Subject: [issue1222] locale.format bug if thousand separator is space (french separator as example) In-Reply-To: <1191172668.69.0.513518274707.issue1222@psf.upfronthosting.co.za> Message-ID: <1237395929.78.0.763888195256.issue1222@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, Martin, do you have any idea why the Solaris buildbot doesn't seem to be enabled on trunk? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 18:08:13 2009 From: report at bugs.python.org (Nathaniel Troutman) Date: Wed, 18 Mar 2009 17:08:13 +0000 Subject: [issue5509] cPickle - module object has no attribute In-Reply-To: <1237396093.07.0.466180023327.issue5509@psf.upfronthosting.co.za> Message-ID: <1237396093.07.0.466180023327.issue5509@psf.upfronthosting.co.za> New submission from Nathaniel Troutman : If I define a class Foo in module A and in module A pickle out a list of Foo objects to 'foo.pkl', then in module B attempt to unpickle 'foo.pkl' I recieve the error "AttributeError: 'module' object has no attribute 'Foo'" Attached are: Foo.py which defines the class Foo and pickles out a list of objects LoadFoo.py attempts to load the list of objects pickled by Foo I'm running Vista with "Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32" ---------- components: None files: Foo.py messages: 83759 nosy: ntroutman severity: normal status: open title: cPickle - module object has no attribute versions: Python 2.5 Added file: http://bugs.python.org/file13364/Foo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 18:08:43 2009 From: report at bugs.python.org (Nathaniel Troutman) Date: Wed, 18 Mar 2009 17:08:43 +0000 Subject: [issue5509] cPickle - module object has no attribute In-Reply-To: <1237396093.07.0.466180023327.issue5509@psf.upfronthosting.co.za> Message-ID: <1237396123.24.0.215416225883.issue5509@psf.upfronthosting.co.za> Nathaniel Troutman added the comment: Why can I only attach one file at a time? ---------- Added file: http://bugs.python.org/file13365/LoadFoo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 18:11:43 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Mar 2009 17:11:43 +0000 Subject: [issue1222] locale.format bug if thousand separator is space (french separator as example) In-Reply-To: <1191172668.69.0.513518274707.issue1222@psf.upfronthosting.co.za> Message-ID: <1237396303.37.0.691474343143.issue1222@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Trying a fix in r70458. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 18:13:31 2009 From: report at bugs.python.org (Matthias Klose) Date: Wed, 18 Mar 2009 17:13:31 +0000 Subject: [issue1322] platform.dist() has unpredictable result under Linux In-Reply-To: <1193246464.1.0.269134020057.issue1322@psf.upfronthosting.co.za> Message-ID: <1237396411.15.0.309007084271.issue1322@psf.upfronthosting.co.za> Matthias Klose added the comment: MAL, please can we add zooko's patch in some form? The current implementation assumes an implementation, which doesn't exist on all platforms, and just dividing linux distributions in "unsupported" and "supported" seems to be odd. You cite some URL's in platform.py: - http://linuxmafia.com/faq/Admin/release-files.html "Linux System Base-compliant systems should have a file called /etc/lsb_release, which may be in addition to a distribution- specific file." The standard doesn't say anything like this. - http://linux.die.net/man/1/lsb_release This is one implementation, not more. The current platform.py implementation seems to require this particular implementation. The only relevant URL is missing in this file: http://refspecs.freestandards.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/lsbrelease.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 18:13:47 2009 From: report at bugs.python.org (Matthias Klose) Date: Wed, 18 Mar 2009 17:13:47 +0000 Subject: [issue1322] platform.dist() has unpredictable result under Linux In-Reply-To: <1193246464.1.0.269134020057.issue1322@psf.upfronthosting.co.za> Message-ID: <1237396427.8.0.98659322411.issue1322@psf.upfronthosting.co.za> Changes by Matthias Klose : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 18:19:07 2009 From: report at bugs.python.org (Benny Bach) Date: Wed, 18 Mar 2009 17:19:07 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1237396747.49.0.305196046262.issue4015@psf.upfronthosting.co.za> Benny Bach added the comment: Ok - I see what you mean. I can't see any problems with it. However generating a separate bat file has the advantage that you can still invoke the original script by calling python explicitly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 18:27:54 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Mar 2009 17:27:54 +0000 Subject: [issue5508] maximum recursion depth exceeded in __subclasscheck__ In-Reply-To: <1237389950.95.0.980403444987.issue5508@psf.upfronthosting.co.za> Message-ID: <1237397274.2.0.488724702253.issue5508@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is the reason. Starting from Python 2.6, classes can redefine subclass checking using a special method named __subclasscheck__. Since this method can contain arbitrary code, we have to guard against recursion when calling it. Therefore, the recursion count is incremented before doing a subclass checking. Now the problem is that when checking for an exception, we do exactly that: check whether the raised exception is a subclass of a given type. If the raised exception occurred just after a recursion overflow, it can happen that subclass checking overflows the recursion count again. However, since we don't want the newly raised exception (during exception subclass checking) to overwrite the original one, so we just write out it (using PyErr_WriteUnraisable, precisely) and then discard it. That's where these strange messages come from. (note: py3k has a slightly different recursion checking mechanism and doesn't print such messages) ---------- nosy: +amaury.forgeotdarc, loewis, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 18:36:05 2009 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Wed, 18 Mar 2009 17:36:05 +0000 Subject: [issue1322] platform.dist() has unpredictable result under Linux In-Reply-To: <1193246464.1.0.269134020057.issue1322@psf.upfronthosting.co.za> Message-ID: <1237397765.65.0.747739107874.issue1322@psf.upfronthosting.co.za> Zooko O'Whielacronx added the comment: doko: thanks for your interest encouraging more formal and generic solutions to this. For what it is worth, the current version of my patch (used in Tahoe) is here: http://allmydata.org/trac/tahoe/browser/src/allmydata/__init__.py?rev=20081125155118-92b7f-f74fc964ebd9d3c59afde68b6688c56ce20cca39#L31 I had to add a special case for Arch Linux, which gets triggered after the three main cases. The cases currently are, in order: 1. Parse /etc/lsb-release (fast, semi-de-facto-standard, generic, hopefully a future de-jure-standard). 2. Invoke the Python Standard Library's platform.dist() (pros: fast, has lots of customized special cases for different linux distros, cons: has lots of customized special cases for different linux distros, gives bogus answers for Ubuntu and Arch Linux) 3. Subprocess execute "lsb_release" (pros: a real de-jure-standard! cons: slow, and is not actually a de-facto-standard since many important Linux installations don't come by default with the package that provides the de-jure-standard "lsb_release" executable, even though they do come by default with the de-facto-semi-standard "/etc/lsb-release" file). 4. Arch Linux ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 18:38:04 2009 From: report at bugs.python.org (Nathaniel Troutman) Date: Wed, 18 Mar 2009 17:38:04 +0000 Subject: [issue5509] cPickle - module object has no attribute In-Reply-To: <1237396093.07.0.466180023327.issue5509@psf.upfronthosting.co.za> Message-ID: <1237397884.22.0.0496569021312.issue5509@psf.upfronthosting.co.za> Nathaniel Troutman added the comment: I believe I've tracked down the problem. When you run a python module directly (ie "python Foo.py") any classes defined in the module have their '__module__' attribute set to '__main__'. Which means the pickle says the class is in '__main__' of whatever module is trying to load the file. I think it would make more sense to actually include the module name, this means that an external module need simply ensure that the pickled class's module be imported with the correct name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 19:21:34 2009 From: report at bugs.python.org (Ramsey Dow) Date: Wed, 18 Mar 2009 18:21:34 +0000 Subject: [issue5510] patches for Modules/socketmodule.c for NetBSD In-Reply-To: <1237400494.47.0.163345338744.issue5510@psf.upfronthosting.co.za> Message-ID: <1237400494.47.0.163345338744.issue5510@psf.upfronthosting.co.za> New submission from Ramsey Dow : I couldn't install setuptools (required by gitosis) because Python 2.6.1 didn't install socket when I built it. A little digging and I uncommented the "_socket socketmodule.c" line in Modules/Setup. Unfortunately, the Bluetooth socket stuff in Modules/socketmodule.c was broken under NetBSD. I made this patch and tested on NetBSD 4.0.1. When researching this bug on bugs.python.org, I noticed issue5400 which, in order to get Modules/socketmodule.c compiling, disabled Bluetooth socket support entirely. That isn't necessary. I just had to ensure the various structure references made use of the proper member names (according to NetBSD's /usr/include/netbt/bluetooth.h header file). The changes I made were similar, though not precisely the same, as those for FreeBSD. After patching and building: ramsey at wizard /opt/build/runtime/Python-2.6.1$ ./python -bb -E Lib/test/regrtest.py test_socket test_socket 1 test OK. ---------- components: Build files: Python-2.6.1.patch keywords: patch messages: 83767 nosy: yesmar severity: normal status: open title: patches for Modules/socketmodule.c for NetBSD type: compile error versions: Python 2.6 Added file: http://bugs.python.org/file13366/Python-2.6.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 19:24:24 2009 From: report at bugs.python.org (J.R. Allen) Date: Wed, 18 Mar 2009 18:24:24 +0000 Subject: [issue5511] zipfile - add __exit__ attribute to make ZipFile object compatible with with_statement In-Reply-To: <1237400664.18.0.956324816364.issue5511@psf.upfronthosting.co.za> Message-ID: <1237400664.18.0.956324816364.issue5511@psf.upfronthosting.co.za> New submission from J.R. Allen : Currently the zipfile.ZipFile class has no __exit__ atribute, so it does not work with a with statement as other file objects do. Can this be implemented? ---------- components: Library (Lib) messages: 83768 nosy: petruchio severity: normal status: open title: zipfile - add __exit__ attribute to make ZipFile object compatible with with_statement type: feature request versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 19:29:52 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 18 Mar 2009 18:29:52 +0000 Subject: [issue5511] zipfile - add __exit__ attribute to make ZipFile object compatible with with_statement In-Reply-To: <1237400664.18.0.956324816364.issue5511@psf.upfronthosting.co.za> Message-ID: <1237400992.33.0.703067271013.issue5511@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- stage: -> needs patch versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 19:57:55 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 18 Mar 2009 18:57:55 +0000 Subject: [issue1222] locale.format bug if thousand separator is space (french separator as example) In-Reply-To: <1191172668.69.0.513518274707.issue1222@psf.upfronthosting.co.za> Message-ID: <1237402675.52.0.507886134248.issue1222@psf.upfronthosting.co.za> Mark Dickinson added the comment: It looks like that did the trick. Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 20:08:32 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 18 Mar 2009 19:08:32 +0000 Subject: [issue5509] cPickle - module object has no attribute In-Reply-To: <1237396093.07.0.466180023327.issue5509@psf.upfronthosting.co.za> Message-ID: <1237403312.03.0.463885346602.issue5509@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Implementing this may be difficult (the module may not be on the search path when its run and there's no way to determine that). Also, it would break compatibility. Anyway, it's usually better to define classes that will be pickled in their own permanent module. ---------- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 21:14:18 2009 From: report at bugs.python.org (Rudd-O) Date: Wed, 18 Mar 2009 20:14:18 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1237407258.26.0.781274677944.issue5482@psf.upfronthosting.co.za> Rudd-O added the comment: ahaha! I have the patch that implements this functionality. 1) it renames the RPM package name to python-%packagename-py2.4 and and its requirements as well. 2) it autooptimizes (-O1) any RPM built if no optimization has been configured in setup.cfg, so it works with any SELinux-enabled or any other MAC-enabled platforms. patch against distutils of python 2.4. works with latest setuptools just fine. ---------- keywords: +patch Added file: http://bugs.python.org/file13367/python-2.4-distutils-bdist_rpm-autonames+optimize.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 21:18:20 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 18 Mar 2009 20:18:20 +0000 Subject: [issue4258] Use 30-bit digits instead of 15-bit digits for Python integers. In-Reply-To: <1225795512.12.0.546973896448.issue4258@psf.upfronthosting.co.za> Message-ID: <1237407500.17.0.225981924467.issue4258@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed 30bit_longdigit20.patch to py3k in r70460, with some minor variations (incorporate Nick Coghlan's improved error messages for marshal, fix some comment typos, add whatsnew and Misc/NEWS entries). Thanks all for your feedback. I might get around to backporting this to 2.7 one day... ---------- priority: high -> low versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 21:19:07 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 18 Mar 2009 20:19:07 +0000 Subject: [issue4258] Use 30-bit digits instead of 15-bit digits for Python integers. In-Reply-To: <1225795512.12.0.546973896448.issue4258@psf.upfronthosting.co.za> Message-ID: <1237407547.77.0.399301673807.issue4258@psf.upfronthosting.co.za> Mark Dickinson added the comment: That should be r70459, of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 21:19:12 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Mar 2009 20:19:12 +0000 Subject: [issue4258] Use 30-bit digits instead of 15-bit digits for Python integers. In-Reply-To: <1237407500.17.0.225981924467.issue4258@psf.upfronthosting.co.za> Message-ID: <1237407622.5852.22.camel@fsol> Antoine Pitrou added the comment: Great! > Committed 30bit_longdigit20.patch to py3k in r70460, with some minor > variations (incorporate Nick Coghlan's improved error messages > for marshal, fix some comment typos, add whatsnew and Misc/NEWS entries). ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?TGFycyBHdXN0w6RiZWwgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za Wed Mar 18 21:47:59 2009 From: =?utf-8?b?TGFycyBHdXN0w6RiZWwgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za (=?utf-8?b?TGFycyBHdXN0w6RiZWwgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za) Date: Wed, 18 Mar 2009 20:47:59 +0000 Subject: [issue5500] tarfile: path problem in arcname under windows In-Reply-To: <1237304162.51.0.555320282686.issue5500@psf.upfronthosting.co.za> Message-ID: <1237409279.88.0.00650478010759.issue5500@psf.upfronthosting.co.za> Lars Gust?bel added the comment: At the moment, I am unable to reproduce the problem you describe. I tried several combinations of what I think you could have meant, but everything seems to work okay here. Could you please provide some stand-alone testcase or code to illustrate that issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 21:52:54 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 18 Mar 2009 20:52:54 +0000 Subject: [issue4034] traceback attribute error In-Reply-To: <1223076719.45.0.395696576555.issue4034@psf.upfronthosting.co.za> Message-ID: <1237409574.46.0.955254517271.issue4034@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70463. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 22:13:32 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 18 Mar 2009 21:13:32 +0000 Subject: [issue5425] 2to3 wrong for types.StringTypes In-Reply-To: <1236264531.78.0.371254009899.issue5425@psf.upfronthosting.co.za> Message-ID: <1237410812.81.0.0137234093286.issue5425@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm rejecting this patch again not because I think it's any worse than the status quo (I think they're about equally incorrect/correct), but because this is now released behavior and changing it may result in backwards incompatibility. Also, people can easily remove this ambiguity in a 2.x compatible fashion by explicitly listing the types (str,) or (str, unicode) instead of using the types module. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 22:18:14 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Wed, 18 Mar 2009 21:18:14 +0000 Subject: [issue5396] os.read not handling O_DIRECT flag In-Reply-To: <1235847751.77.0.558509867366.issue5396@psf.upfronthosting.co.za> Message-ID: <1237411094.09.0.364148605449.issue5396@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: > I think the policy is to mirror all possible O_* constants, even if they > are of no use in Python. For example, we also have os.O_DIRECTORY. Not disagreeing with the conclusion of this ticket, but I would like to point out that os.O_DIRECTORY isn't useless in Python. You need it to use with os.open if you want to open a directory (which you may wish to do in order to use with os.fsync, for example). ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 22:30:03 2009 From: report at bugs.python.org (Eric Smith) Date: Wed, 18 Mar 2009 21:30:03 +0000 Subject: [issue1222] locale.format bug if thousand separator is space (french separator as example) In-Reply-To: <1237395824.5852.1.camel@fsol> Message-ID: <49C16802.9040102@trueblade.com> Eric Smith added the comment: Antoine Pitrou wrote: > The problem seems to be that the thousands separator on the Solaris > variant of en_US is an empty string (rather than a comma) (*), and > apparently it hits a bug in the padding mechanism (which perhaps assumes > that the thousands separator is always a 1-character string). > > (*) (another reason not to use any C locale-based mechanism for > localization, by the way...) I've come to believe this, too. I'm working on cleaning up the C implementations so I can do all of the locale-based formating without using the locale functions. I'll use the localeconv values, but that's it. ---------- title: locale.format bug if thousand separator is space (french separator as example) -> locale.format bug if thousand separator is space (french separator as example) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 22:35:17 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Mar 2009 21:35:17 +0000 Subject: [issue4034] traceback attribute error In-Reply-To: <1223076719.45.0.395696576555.issue4034@psf.upfronthosting.co.za> Message-ID: <1237412117.49.0.513270910432.issue4034@psf.upfronthosting.co.za> STINNER Victor added the comment: @benjamin.peterson: Cool! Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 23:11:28 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 18 Mar 2009 22:11:28 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> New submission from Mark Dickinson : Here's a patch that streamlines the x_divrem function in Objects/longobject.c. More benchmarks are needed, but the initial results are promising: for py3k, on a 32-bit machine with 15-bit digits, Victor's pidigits benchmark runs almost twice as fast with this patch (numbers below). Patch details ============= - Normalize inputs by shifting instead of multiplying and dividing. This halves the number of divisions used in the algorithm. - Streamline innermost loop. - Save an iteration of outer loop around half the time. - Save an object allocation: only 3 allocations per x_divrem call instead of 4. - Remove special case where initial quotient estimate is >= PyLong_BASE. There's no need for this, since the 'digit' type holds values up to 2*PyLong_BASE - 1. - Make q type digit instead of type twodigits: this halves the size of the multiplication in the innermost loop. Benchmark results ================= Using the pidigits_bestof.py script that's posted in the issue 4258 discussion, on a non-debug build of py3k (r70465), on OS X 10.5.6/Core 2 Duo: Unpatched --------- Macintosh-3:py3k dickinsm$ ./python.exe ../pidigits_bestof.py 2000 performing a warm up run... running sys.int_info= sys.int_info(bits_per_digit=15, sizeof_digit=2) Time; 2234.6 ms Time; 2232.2 ms Time; 2227.9 ms Time; 2225.7 ms Time; 2229.8 ms Best Time; 2225.7 ms Patched ------- dickinsm$ ./python.exe ../pidigits_bestof.py 2000 performing a warm up run... running sys.int_info= sys.int_info(bits_per_digit=15, sizeof_digit=2) Time; 1175.6 ms Time; 1176.5 ms Time; 1177.3 ms Time; 1179.5 ms Time; 1168.5 ms Best Time; 1168.5 ms So the patch gives a speedup of around 90%. This particular benchmark is heavy on the divisions though, so I'd expect lesser speedups for other benchmarks. ---------- assignee: marketdickinson components: Interpreter Core files: faster_integer_division.patch keywords: patch messages: 83781 nosy: marketdickinson priority: normal severity: normal status: open title: Streamline integer division type: performance versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13368/faster_integer_division.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 23:17:11 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Mar 2009 22:17:11 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237414631.61.0.43457632941.issue5512@psf.upfronthosting.co.za> STINNER Victor added the comment: Would it be possible to include integer benchmark tools to upstream? I mean the "pidigit" tool (I didn't wrote this test! I just ported it to Python3) and maybe my "bench_int" tool. It could useful to reproduce the benchmark on different Python versions and different computers. We may open a new issue for each tool? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 23:26:18 2009 From: report at bugs.python.org (Mitchell Model) Date: Wed, 18 Mar 2009 22:26:18 +0000 Subject: [issue5513] "What's New" should say VERY CLEARLY that the type file is gone In-Reply-To: <1237415177.76.0.586178129986.issue5513@psf.upfronthosting.co.za> Message-ID: <1237415177.76.0.586178129986.issue5513@psf.upfronthosting.co.za> New submission from Mitchell Model : MAIN POINT The Python 3 "What's New" should SCREAM that the type file is gone, not just that people should use the function open() to open files, since that has been a recommendation for quite a while. EXPLANATION In multiple readings of the Python 3 "What's New" I blew right past the "Removed file. Use open().", since I've been using open() instead of file() for a long time. I didn't notice that unlike the preceding several lines, there were no parentheses after "file" and that this line was literally saying there was no longer a type called "file". OBSERVATIONS (1) If the line is meant to say that you can no longer call file() as a function -- which would be strange if it were still a type -- then it is missing its parentheses. (2) If the line is meant to say that there is no longer a file type, as it apparently means to say since in fact -- and to my great surprise -- there really IS no type called "file" in Python 3 (I discovered that doing a dir(file) to check whether file provided method function I thought it did instead of taking the time to look it up.) then there is a grammatical problem with the line since a (n old) type shouldn't be equated to a function call. (3) I predict that anyone who has more than a passing acquaintance with Python 2 will be similarly shocked when they find out that what they get back from open() is a _io.TextIOWrapper (and, by the way, that they have to import _io or at least _io.TextIOWrapper to be able to do a dir on it). Likewise for help(file) and help(_io.TextIOWrapper). There should be a very prominent statement that as part of the reimplementation of the io system, the type file has been replaced by _io.TextIOWrapper. RECOMMENDATION The line "Removed file. Use open()." should be replaced with: "The type file has been removed; use open() to open a file." or possibly: "The type file has been replaced by _ioTextIOWrapper; use open() to open a file; open returns an instance of _ioTextIOWrapper." ---------- assignee: georg.brandl components: Documentation messages: 83783 nosy: MLModel, georg.brandl severity: normal status: open title: "What's New" should say VERY CLEARLY that the type file is gone versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 23:30:48 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 18 Mar 2009 22:30:48 +0000 Subject: [issue5513] "What's New" should say VERY CLEARLY that the type file is gone In-Reply-To: <1237415177.76.0.586178129986.issue5513@psf.upfronthosting.co.za> Message-ID: <1237415448.73.0.888617358952.issue5513@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm working on the whatsnew updates and will make sure this is clear. ---------- assignee: georg.brandl -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 23:31:31 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 18 Mar 2009 22:31:31 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237415491.97.0.113869595633.issue5512@psf.upfronthosting.co.za> Mark Dickinson added the comment: Sounds good to me! An integer benchmark script in the Tools/ directory would be handy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 23:44:33 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Mar 2009 22:44:33 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237416273.45.0.807323623499.issue5512@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, the original code in pidigits is by me :-) (although it's not stated in the source file). I haven't tried the patch but the performance work you're doing is really impressive, Mark! ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 23:44:41 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Mar 2009 22:44:41 +0000 Subject: [issue4294] Macros for PyLong: sign, number of digits, fits in an int In-Reply-To: <1226322752.92.0.0671581209413.issue4294@psf.upfronthosting.co.za> Message-ID: <1237416281.34.0.706754064207.issue4294@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated version of my macros patch for PyLong type: - patch for Python trunk - define 3 macros: PyLong_SIGN(x), PyLong_EQUALS_ZERO(x), PyLong_NDIGITS(x) - just replace code by the equivalent macros The goal is the make the code easier to read. It would also help if we change the PyLong implementation (eg. the 2^30 base patch). My previous patch was for py3k, the new one is for Python trunk and is shorter. I only kept the most simple macros. ---------- Added file: http://bugs.python.org/file13369/pylong_macros-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 23:47:48 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Mar 2009 22:47:48 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237416468.71.0.01394490822.issue5512@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Results here (Athlon X2 3600+ with gcc in 64-bit mode with 30-bit digits), "pidigits_bestof.py 2000": - unpatched: 1644.9 ms - patched: 694.8 ms ! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 23:48:54 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Mar 2009 22:48:54 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237416534.04.0.58677699808.issue5512@psf.upfronthosting.co.za> STINNER Victor added the comment: Useful informations for an integer benchmark: - CPU type: 32 or 64 bits, endian - Memory size - Python version - Informations about how Python was compiled - Integer implementation: use int_info when it's available, otherwise base=2^15 Who has the last version of pidigit tool? Can you attach it here? :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 23:52:07 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 18 Mar 2009 22:52:07 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237416727.09.0.11577150507.issue5512@psf.upfronthosting.co.za> Mark Dickinson added the comment: [Antoine] > Well, the original code in pidigits is by me :-) Apologies for the misattribution! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 18 23:54:55 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 18 Mar 2009 22:54:55 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237416895.08.0.713349719515.issue5512@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's the version of pidigits that I was using. ---------- Added file: http://bugs.python.org/file13370/pidigits_bestof.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 00:06:55 2009 From: report at bugs.python.org (Jack Howarth) Date: Wed, 18 Mar 2009 23:06:55 +0000 Subject: [issue5514] Darwin framework libpython3.0.a is not a normal static library In-Reply-To: <1237417615.01.0.58676676944.issue5514@psf.upfronthosting.co.za> Message-ID: <1237417615.01.0.58676676944.issue5514@psf.upfronthosting.co.za> New submission from Jack Howarth : The libpython3.0.a created for Python 3.0.1 isn't a normal static library. file /System/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/c onfig/libpython3.0.a /System/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/c onfig/libpython3.0.a: Mach-O universal binary with 3 architectures /System/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/c onfig/libpython3.0.a (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 /System/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/c onfig/libpython3.0.a (for architecture i386): Mach-O dynamically linked shared library i386 /System/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/c onfig/libpython3.0.a (for architecture ppc7400): Mach-O dynamically linked shared library ppc Due to a bug in Darwin's ar, extraction the object files in this abnormal static libraries has been possible with 'ar x'. This bug in ar will be fixed in the next Xcode and the abnormal static library that python creates will no longer be able to serve as a substitute for a true static library. The libpython#.#.#.a files in config should be made into normal static libraries for all the currently supported versions of python when built as frameworks. ---------- components: Macintosh messages: 83792 nosy: jhowarth severity: normal status: open title: Darwin framework libpython3.0.a is not a normal static library type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 00:22:08 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Mar 2009 23:22:08 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237418528.79.0.24087633913.issue5512@psf.upfronthosting.co.za> STINNER Victor added the comment: New version of pidigit: - works on python 2.6, trunk and py3k - display Python version, CPU info (bits, endian), PyLong info (base, digit size) - display usage if no argument is given ---------- Added file: http://bugs.python.org/file13371/pidigits-2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 00:22:36 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Mar 2009 23:22:36 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237418556.21.0.742991212042.issue5512@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, there is no version number of the benchmark tool itself! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 00:27:22 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Mar 2009 23:27:22 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237418842.4.0.379665741187.issue5512@psf.upfronthosting.co.za> STINNER Victor added the comment: My numbers: # No patch $ ./python /home/haypo/pidigits-2.py 3000 Python 3.1a1+ (py3k:70466, Mar 18 2009, 23:56:06) [GCC 4.3.2] CPU: 64 bits, little endian PyLong: base=2^30, sizeof(digit)=32 bits (...) Best Time; 2300.2 ms # With faster_integer_division.patch (...) Best Time; 1138.1 ms Ok, it's two times faster on 64 bits CPU!!! Other notes about pidigits: - missing header (no author name, no description) - pidigit should also write the number of digits in its output to avoid mistakes in comparaisons ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 00:54:08 2009 From: report at bugs.python.org (Rudd-O) Date: Wed, 18 Mar 2009 23:54:08 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1237420448.45.0.803625012878.issue5482@psf.upfronthosting.co.za> Rudd-O added the comment: Improved version of the autonaming patch, now makes rpmbuild accept files that were installed with spaces on their names. ---------- Added file: http://bugs.python.org/file13372/python-2.4-distutils-bdist_rpm-autonames+optimize-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 01:33:58 2009 From: report at bugs.python.org (Eric Smith) Date: Thu, 19 Mar 2009 00:33:58 +0000 Subject: [issue5515] 'n' formatting for int and float handles leading zero padding poorly In-Reply-To: <1237422838.11.0.502789865949.issue5515@psf.upfronthosting.co.za> Message-ID: <1237422838.11.0.502789865949.issue5515@psf.upfronthosting.co.za> New submission from Eric Smith : I think the way leading zero padding is handled for int and float by format's 'n' code is a bug. >>> import locale >>> locale.setlocale(locale.LC_ALL, 'en_US.UTF8') 'en_US.UTF8' >>> format(12345, '010n') '000012,345' >>> format(12345, '09n') '00012,345' >>> format(12345, '08n') '0012,345' >>> format(12345, '07n') '012,345' >>> format(12345, '06n') '12,345' When 'n' support was added to Decimal, leading zeros had commas in them: >>> from decimal import Decimal >>> format(Decimal(12345), '010n') '00,012,345' >>> format(Decimal(12345), '09n') '0,012,345' >>> format(Decimal(12345), '08n') '0,012,345' >>> format(Decimal(12345), '07n') '012,345' >>> format(Decimal(12345), '06n') '12,345' Decimal also has the same support for PEP 378's ',' modifier: >>> format(Decimal(12345), '010,') '00,012,345' >>> format(Decimal(12345), '09,') '0,012,345' >>> format(Decimal(12345), '08,') '0,012,345' >>> format(Decimal(12345), '07,') '012,345' >>> format(Decimal(12345), '06,') '12,345' >>> As I'm implementing PEP 378 for int and float, I'm going to make it work the same way that Decimal works. For consistency, and because I think the current behavior is not useful, I'd like to change float and int formatting with 'n' to match Decimal and PEP 378 for the ',' modifier. Since I consider this a bug, I'd like to consider backporting it to 2.6 and 3.0, if the changes aren't too intrusive. ---------- assignee: marketdickinson components: Interpreter Core messages: 83797 nosy: eric.smith, marketdickinson, rhettinger severity: normal status: open title: 'n' formatting for int and float handles leading zero padding poorly type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 01:51:26 2009 From: report at bugs.python.org (Jess Austin) Date: Thu, 19 Mar 2009 00:51:26 +0000 Subject: [issue5516] equality not reflixive for subclasses of datetime.date and datetime.datetime In-Reply-To: <1237423886.27.0.985547007127.issue5516@psf.upfronthosting.co.za> Message-ID: <1237423886.27.0.985547007127.issue5516@psf.upfronthosting.co.za> New submission from Jess Austin : While the datetime.date and datetime.datetime classes consistently handle mixed-type comparison, their subclasses do not: >>> from datetime import date, datetime, time >>> d = date.today() >>> dt = datetime.combine(d, time()) >>> d == dt False >>> dt == d False >>> class D(date): ... pass ... >>> class DT(datetime): ... pass ... >>> d = D.today() >>> dt = DT.combine(d, time()) >>> d == dt True >>> dt == d False I think this is due to the premature "optimization" of using memcmp() in date_richcompare(). ---------- components: Library (Lib) messages: 83798 nosy: jess.austin severity: normal status: open title: equality not reflixive for subclasses of datetime.date and datetime.datetime type: behavior versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 01:51:42 2009 From: report at bugs.python.org (Jess Austin) Date: Thu, 19 Mar 2009 00:51:42 +0000 Subject: [issue5516] equality not reflexive for subclasses of datetime.date and datetime.datetime In-Reply-To: <1237423886.27.0.985547007127.issue5516@psf.upfronthosting.co.za> Message-ID: <1237423902.04.0.76438757812.issue5516@psf.upfronthosting.co.za> Changes by Jess Austin : ---------- title: equality not reflixive for subclasses of datetime.date and datetime.datetime -> equality not reflexive for subclasses of datetime.date and datetime.datetime _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 01:54:30 2009 From: report at bugs.python.org (Jess Austin) Date: Thu, 19 Mar 2009 00:54:30 +0000 Subject: [issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime In-Reply-To: <1237423886.27.0.985547007127.issue5516@psf.upfronthosting.co.za> Message-ID: <1237424070.41.0.429733140465.issue5516@psf.upfronthosting.co.za> Changes by Jess Austin : ---------- title: equality not reflexive for subclasses of datetime.date and datetime.datetime -> equality not symmetric for subclasses of datetime.date and datetime.datetime _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 02:11:09 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 19 Mar 2009 01:11:09 +0000 Subject: [issue5515] 'n' formatting for int and float handles leading zero padding poorly In-Reply-To: <1237422838.11.0.502789865949.issue5515@psf.upfronthosting.co.za> Message-ID: <1237425069.44.0.342690524085.issue5515@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with your plan. BTW, have you checked to see what Java and C# do? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 04:25:23 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Thu, 19 Mar 2009 03:25:23 +0000 Subject: [issue1520662] support all of strftime(3) In-Reply-To: <1237342654.35.0.666488960613.issue1520662@psf.upfronthosting.co.za> Message-ID: <43c8685c0903182025m62d9756dub406932fba7fa80a@mail.gmail.com> Tennessee Leeuwenburg added the comment: I might start trawling through these issues, slowly ticking them off. Thanks for the links. -T On Wed, Mar 18, 2009 at 1:17 PM, David W. Lambert wrote: > > David W. Lambert added the comment: > > (I have no clue where the servers are.) > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file13373/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- I might start trawling through these issues, slowly ticking them off. Thanks for the links.

-T

On Wed, Mar 18, 2009 at 1:17 PM, David W. Lambert <report at bugs.python.org> wrote:

David W. Lambert <lambertdw at corning.com> added the comment:

(I have no clue where the servers are.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1520662>
_______________________________________



--
--------------------------------------------------
Tennessee Leeuwenburg
http://myownhat.blogspot.com/
"Don't believe everything you think"
From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Thu Mar 19 07:26:32 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Thu, 19 Mar 2009 06:26:32 +0000 Subject: [issue5513] "What's New" should say VERY CLEARLY that the type file is gone In-Reply-To: <1237415177.76.0.586178129986.issue5513@psf.upfronthosting.co.za> Message-ID: <49C1E594.4010005@v.loewis.de> Martin v. L?wis added the comment: > The Python 3 "What's New" should SCREAM that the type file is gone I don't think the documentation should ever SCREAM. > "The type file has been replaced by _ioTextIOWrapper; use open() to > open a file; open returns an instance of _ioTextIOWrapper." That would be an incorrect statement: there are multiple types that replace the 2.x file type. See the documentation of the io module for details. ---------- nosy: +loewis title: "What's New" should say VERY CLEARLY that the type file is gone -> "What's New" should say VERY CLEARLY that the type file is gone _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 08:11:02 2009 From: report at bugs.python.org (Haoyu Bai) Date: Thu, 19 Mar 2009 07:11:02 +0000 Subject: [issue5517] 2to3 haven't convert buffer object to memoryview In-Reply-To: <1237446662.62.0.531396044064.issue5517@psf.upfronthosting.co.za> Message-ID: <1237446662.62.0.531396044064.issue5517@psf.upfronthosting.co.za> New submission from Haoyu Bai : The following example is valid in Python 2.6: a = 'abc' b = buffer(a) print([repr(c) for c in b]) After 2to3 it, the 'buffer' isn't changed to memoryview, so then it is not valid program in Python 3: Traceback (most recent call last): File "bufferobj3.py", line 2, in b = buffer(a) NameError: name 'buffer' is not defined However even it changed to memoryview the program still not valid because: >>> memoryview('a') Traceback (most recent call last): File "", line 1, in TypeError: cannot make memory view because object does not have the buffer interface I can reporduce this on both Python 3.0.1 and Python 3.1a1+ (py3k:70310). Thanks! ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 83802 nosy: bhy severity: normal status: open title: 2to3 haven't convert buffer object to memoryview type: feature request versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Thu Mar 19 10:02:31 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Thu, 19 Mar 2009 09:02:31 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1237453351.01.0.216570599878.issue5482@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Hi Rudd-O. Sorry i didn't look at your patches and idea yet, I am preparing Pycon. Make sur you write your patches against Python truk, not Python 2.4. For example the current has already -O enabled for build_rpm ---------- versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Thu Mar 19 10:04:43 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Thu, 19 Mar 2009 09:04:43 +0000 Subject: [issue5474] distutils produces invalid RPM packages of prerelease python packages In-Reply-To: <1236744919.07.0.603710480384.issue5474@psf.upfronthosting.co.za> Message-ID: <1237453483.94.0.116736721051.issue5474@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Please write your patches against the trunk. I'll start to look at them after Pycon. Regards ---------- versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 11:44:34 2009 From: report at bugs.python.org (Eric Smith) Date: Thu, 19 Mar 2009 10:44:34 +0000 Subject: [issue5515] 'n' formatting for int and float handles leading zero padding poorly In-Reply-To: <1237422838.11.0.502789865949.issue5515@psf.upfronthosting.co.za> Message-ID: <1237459474.47.0.431999759538.issue5515@psf.upfronthosting.co.za> Eric Smith added the comment: C# doesn't seem to have the issue because they don't allow any modifies when specifying locale-aware formatting. Specifying a picture seems to be the only way to get leading zeros added. Similarly, Java looks to be picture-based. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 12:44:06 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 19 Mar 2009 11:44:06 +0000 Subject: [issue5517] 2to3 haven't convert buffer object to memoryview In-Reply-To: <1237446662.62.0.531396044064.issue5517@psf.upfronthosting.co.za> Message-ID: <1237463046.61.0.472935923902.issue5517@psf.upfronthosting.co.za> Benjamin Peterson added the comment: 2to3 will convert buffer to memoryview, but not by default because as you can see, it can be wrong. (Pass "-f buffer" to 2to3.) You can only use memoryviews on bytes-like objects like b'a', and not unicode strings (This is like 2.x.). ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 13:39:56 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 19 Mar 2009 12:39:56 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237466396.95.0.605925188538.issue2170@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file13312/test_minidom.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 13:45:30 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 19 Mar 2009 12:45:30 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237466730.99.0.931559967139.issue2170@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file13352/issue2170.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 13:47:16 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 19 Mar 2009 12:47:16 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237466836.05.0.845807456417.issue2170@psf.upfronthosting.co.za> R. David Murray added the comment: Removed old patches, updated patch to remvoe the unnecessary local variable assignment (also pushed to launchpad). ---------- Added file: http://bugs.python.org/file13374/issue2170.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 14:23:57 2009 From: report at bugs.python.org (Malte Helmert) Date: Thu, 19 Mar 2009 13:23:57 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237469037.8.0.812005586234.issue2170@psf.upfronthosting.co.za> Malte Helmert added the comment: Short review: code looks good to me, patch applies cleanly to trunk, passes tests. @akuchling: I don't know if you remember, but this rewrite was originally suggested by you on a bug day some time ago. I think David's patch is ready to be applied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 15:30:24 2009 From: report at bugs.python.org (David W. Lambert) Date: Thu, 19 Mar 2009 14:30:24 +0000 Subject: [issue5513] "What's New" should say VERY CLEARLY that the type file is gone In-Reply-To: <1237415177.76.0.586178129986.issue5513@psf.upfronthosting.co.za> Message-ID: <1237473024.25.0.107412203505.issue5513@psf.upfronthosting.co.za> David W. Lambert added the comment: # With py3Krc1 it took me days to figure out how to # replace my base class file. Granted, there were # issues with io module at the time. Following met # my need. import io class File(io.TextIOWrapper): '''Open a text file with read access, providing...''' def __init__(self,name): super().__init__(open(name).buffer) ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 15:37:09 2009 From: report at bugs.python.org (Elijah Merkin) Date: Thu, 19 Mar 2009 14:37:09 +0000 Subject: [issue5500] tarfile: path problem in arcname under windows In-Reply-To: <1237304162.51.0.555320282686.issue5500@psf.upfronthosting.co.za> Message-ID: <1237473429.94.0.743388380777.issue5500@psf.upfronthosting.co.za> Elijah Merkin added the comment: Tested again under Python 2.6.1 on Windows XP (added Python 2.6 to versions). An archive I attached to the issue contains a .py file that reproduces the bug and an archive created by it. In my case I just put the .py file to C:\testtarfile\ directory and run it. When I open the file by any archive manager I have in Windows, I see. When I view the file contents in a hex viewer, I also see 'C:\\testtarfile\...', so the problem really exists. However, when uncompressing the archive on Linux (tar -xzf ...) I get 'test/testtarfile.py' as initially expected. The archive is created, and the path in the archive is 'C:\\testtarfile\\testtarfile.py', not 'test/testtarfile.py' as I would expect. ---------- versions: +Python 2.6 Added file: http://bugs.python.org/file13375/reproduce_issue5500.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 15:50:22 2009 From: report at bugs.python.org (Elijah Merkin) Date: Thu, 19 Mar 2009 14:50:22 +0000 Subject: [issue5500] tarfile: path problem in arcname under windows In-Reply-To: <1237304162.51.0.555320282686.issue5500@psf.upfronthosting.co.za> Message-ID: <1237474222.03.0.972278098056.issue5500@psf.upfronthosting.co.za> Elijah Merkin added the comment: Sorry for not explaining properly, I was distracted. 1. The absolute path really exists in the .tar.gz file when I view it in a hex editor. 2. Windows archive managers I tried see that absolute path. 3. Linux tar utility, however, somehow manages to extract the file correctly to the original relative path. That's very strange... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 16:32:36 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 19 Mar 2009 15:32:36 +0000 Subject: [issue5513] "What's New" should say VERY CLEARLY that the type file is gone In-Reply-To: Message-ID: Mitchell Model added the comment: At 11:03 AM -0400 3/19/09, Mitchell L Model wrote: >>Martin v. L?wis added the comment: >> >>> The Python 3 "What's New" should SCREAM that the type file is gone >> >>I don't think the documentation should ever SCREAM. No, of course not. I was being extreme. The problem with the laconic alternative is that it sets traps for people. It reminds me of wrestling Stroustrop's first book on C++ where all this weird behavior happened and when you went back to the book you could find one sentence whose third-level implication was consistent with the explanation. What I'm saying is that it's not enough to say to use open(). Don't you think people ever referred to the type file directly? As in help(file) or dir(file) or file.somemethod(receiver, arg)? Or even storing a file method in a dictionary for dispatch? It doesn't matter whether any of these were a good idea, I claim they were quite ingrained in Python 2 user's minds. The changes in the sequence types are quite substantial, but they are explained in detail. This isn't. In reviewing the "What's New" for the purpose of this reponse I noticed an earlier mention of sys.stdin, sys.stdout, and sys.stderr, where it says they are now instances of TextIOBase. (They are actually instances of TextIOWrapper, just like the result of open().) So why can't the documentation of open() say that it returns an instance of TextIOBase too? At least add to the paragraph of PEP 3116 that "the old file type is gone". Maybe that's better than discussing it in conjunction with open(), in which case the statement using open() instead of file should read that open replaces "file()", not "file". It just seems like a very wide trap to never mention that the whole file type is gone. It does not follow from the two facts that one should use open() instead of file() and that the IO system has been rewritten, that there is no file type. Even if whatever open returns has the same interface as the old file type. >> >> > "The type file has been replaced by _ioTextIOWrapper; use open() to >> > open a file; open returns an instance of _ioTextIOWrapper." >> >>That would be an incorrect statement: there are multiple types that >>replace the 2.x file type. See the documentation of the io module for >>details. OK, I didn't follow the technical details through and, as I said above, I hadn't noticed the earlier mention of TextIOBase for sys.stdout, etc. So just say something like "The type file is gone, replaced by classes in the IO module. Use open() to open a file." And maybe add that it returns an instance of TextIOBase or TextIOWrapper, whichever is deemed more appropriate. Whatever else it says with regard to the above comments the "What's New" really needs to explicitly say that the file type is gone. And I apologize for screaming in my entry. I was just so incredibly shocked when I figured out what was going on. -- --- Mitchell ---------- title: "What's New" should say VERY CLEARLY that the type file is gone -> "What's New" should say VERY CLEARLY that the type file is gone _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 16:36:53 2009 From: report at bugs.python.org (David W. Lambert) Date: Thu, 19 Mar 2009 15:36:53 +0000 Subject: [issue5513] "What's New" should say VERY CLEARLY that the type file is gone In-Reply-To: <1237415177.76.0.586178129986.issue5513@psf.upfronthosting.co.za> Message-ID: <1237477013.22.0.747869782517.issue5513@psf.upfronthosting.co.za> David W. Lambert added the comment: #OOPS! I forgot the subtlety. #I must also retain the stream #else it gets collected. #Nasty. import io class file(io.TextIOWrapper): '''condensing code for this list without test is a no no!''' def __init__(self,name): self.stream = open(name) # SAVE THE STREAM! super().__init__(self.stream.buffer) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 16:53:52 2009 From: report at bugs.python.org (rb) Date: Thu, 19 Mar 2009 15:53:52 +0000 Subject: [issue5518] cPickle produces inconsistent output In-Reply-To: <1237478032.19.0.310078929224.issue5518@psf.upfronthosting.co.za> Message-ID: <1237478032.19.0.310078929224.issue5518@psf.upfronthosting.co.za> New submission from rb : The documentation states that the output of pickle and cPickle may be different. However it is implied that the output of a particular module will always be consistent within itself. This expectation fails for the case below. I am using the output of cPickle in order to generate a key to use for external storage where the key is abstracted to a generic Python (immutable) object. Without consistency this breaks for me; pickle is too slow so I need to use cPickle. $ python Python 2.5.2 (r252:60911, Oct 5 2008, 19:29:17) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import cPickle >>> key = (1, u'foo') >>> cPickle.dumps(key) '(I1\nVfoo\ntp1\n.' >>> cPickle.dumps((1, u'foo')) '(I1\nVfoo\np1\ntp2\n.' PythonWin 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32. Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information. >>> import cPickle >>> key = (1,u'foo') >>> cPickle.dumps(key) '(I1\nVfoo\ntp1\n.' >>> cPickle.dumps((1,u'foo')) '(I1\nVfoo\np1\ntp2\n.' Expected results: the output of the two dumps calls should be the same. ---------- components: Library (Lib) messages: 83814 nosy: rb severity: normal status: open title: cPickle produces inconsistent output versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 18:46:09 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 19 Mar 2009 17:46:09 +0000 Subject: [issue5515] 'n' formatting for int and float handles leading zero padding poorly In-Reply-To: <1237422838.11.0.502789865949.issue5515@psf.upfronthosting.co.za> Message-ID: <1237484769.49.0.933878331653.issue5515@psf.upfronthosting.co.za> Mark Dickinson added the comment: I agree that Decimal should be consistent with int and float. I'm not sure I'd classify the current behaviour as a bug, though: presumably this behaviour was intentional at the time it was originally coded? I guess backporting *probably* won't do any harm, since it seems likely that format(x, 'n') hasn't gained wide adoption yet. +1 for changing this in 2.7 and 3.1; -0 for backporting the change. Eric, did you mean to assign this to me? I'm not sure I have time for this at the moment, though I'd be happy to review and test when the time comes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 19:01:34 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 19 Mar 2009 18:01:34 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237485694.09.0.242137072408.issue2531@psf.upfronthosting.co.za> Mark Dickinson added the comment: Making float <-> Decimal comparisons return the 'right' answer in 2.x does look attractive at first sight, but the more I think about it the more it seems a bad idea. Having the comparisons work in 2.x but not in 3.x seems especially nasty, and allowing mixed-type comparisons but not mixed-type arithmetic operations also seems somehow unclean. So -1 from me. (And no, I don't want to add full float <-> Decimal interaction: the Decimal module is quite complicated enough as it is.) Are there many cases where float <-> Decimal comparisons are useful? The only uses I can think of would also involve a need for mixed-type arithmetic. In the few cases where it's really needed I don't think it's a problem to explicitly convert one or the other type. The current bogus comparison results also suck, but they're just one aspect of a known Python 2.x gotcha. Would it be possible to raise a warning for Decimal <-> float comparisons? Does -3 already do this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 19:07:02 2009 From: report at bugs.python.org (Eric Smith) Date: Thu, 19 Mar 2009 18:07:02 +0000 Subject: [issue5515] 'n' formatting for int and float handles leading zero padding poorly In-Reply-To: <1237422838.11.0.502789865949.issue5515@psf.upfronthosting.co.za> Message-ID: <1237486022.43.0.285464517393.issue5515@psf.upfronthosting.co.za> Eric Smith added the comment: Oops, assigning it to you was an error. I was just trying to figure out what your userid is so I could add you to Nosy, and I was using "Assigned To" to find it. I've fixed that. The current behavior is an accident of the implementation. The implementation isn't based on anything else, and there was no requirement to have the output that it does. And as far as I know, there are no tests that test for the current behavior. Right now I'm +0 on backporting. What I'll do is fix it for 2.7/3.1 and see how big the patch is. I suspect it will be a pretty big, invasive patch. If so, I'll change my backport vote to -1. ---------- assignee: marketdickinson -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 19:16:02 2009 From: report at bugs.python.org (Jeremy Dunck) Date: Thu, 19 Mar 2009 18:16:02 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237486562.85.0.752825933019.issue2531@psf.upfronthosting.co.za> Jeremy Dunck added the comment: I hear you on the 2.x to 3.x transition-- I'm not really asking for mixed-mode arithmetic. I'd be perfectly happy if float > decimal raised TypeError, as float + decimal does. My complaint is that it is silently wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 19:56:57 2009 From: report at bugs.python.org (Bob Ippolito) Date: Thu, 19 Mar 2009 18:56:57 +0000 Subject: [issue5381] json needs object_pairs_hook In-Reply-To: <1235723876.26.0.796036500228.issue5381@psf.upfronthosting.co.za> Message-ID: <1237489017.09.0.92847771681.issue5381@psf.upfronthosting.co.za> Bob Ippolito added the comment: This patch looks good to me, my only comment is that the patch mixes tabs and spaces in the C code in a file that had no tabs previously ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 20:19:38 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 19 Mar 2009 19:19:38 +0000 Subject: [issue5381] json needs object_pairs_hook In-Reply-To: <1235723876.26.0.796036500228.issue5381@psf.upfronthosting.co.za> Message-ID: <1237490378.54.0.44790557779.issue5381@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for looking at this. Fixed the tab/space issue. Committed in r70471 ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 20:56:03 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 19 Mar 2009 19:56:03 +0000 Subject: [issue5519] Deletion of some statements in re documentation In-Reply-To: <1237492563.73.0.360381251415.issue5519@psf.upfronthosting.co.za> Message-ID: <1237492563.73.0.360381251415.issue5519@psf.upfronthosting.co.za> New submission from Mitchell Model : The second sentence of the re module documentation -- " The re module is always available." seems extraneous at best. What is it saying? What modules are not always available? Do other "always available" modules say that they are always available? Also, the reference to kodos should probably be removed. It hasn't been updated since 2006, and it doesn't work with PyQT4. ---------- assignee: georg.brandl components: Documentation messages: 83821 nosy: MLModel, georg.brandl severity: normal status: open title: Deletion of some statements in re documentation versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 19 21:49:53 2009 From: report at bugs.python.org (Jess Austin) Date: Thu, 19 Mar 2009 20:49:53 +0000 Subject: [issue5520] refactor test_datetime.py In-Reply-To: <1237495793.7.0.375370531619.issue5520@psf.upfronthosting.co.za> Message-ID: <1237495793.7.0.375370531619.issue5520@psf.upfronthosting.co.za> New submission from Jess Austin : I've broken out this refactoring from some of the other datetime stuff I'm doing. The patch needn't be applied until the other issues that depend on it are. ---------- components: Library (Lib) files: test_datetime.diff keywords: patch messages: 83822 nosy: jess.austin severity: normal status: open title: refactor test_datetime.py versions: Python 3.1 Added file: http://bugs.python.org/file13376/test_datetime.diff _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Thu Mar 19 23:44:56 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Thu, 19 Mar 2009 22:44:56 +0000 Subject: [issue5513] "What's New" should say VERY CLEARLY that the type file is gone In-Reply-To: Message-ID: <49C2C967.8000805@v.loewis.de> Martin v. L?wis added the comment: > Don't you think people ever referred to the type file directly? As in help(file) Yes, certainly. There is no immediate replacement for that; read the io documentation. > dir(file) Likewise > file.somemethod(receiver, arg)? No. Why would anybody want to do that? > Or even storing a file method in a dictionary for dispatch? Likewise: what's the use case? Are you sure people store unbound methods in a dictionary? Why not bound methods? > I claim they were quite ingrained in Python 2 user's minds. Partially, perhaps. It's an unfortunate mistake that file ever became a builtin - that should have been avoided (and py3k corrects it). > In reviewing the "What's New" for the purpose of this reponse I noticed an > earlier mention of sys.stdin, sys.stdout, and sys.stderr, where it says they > are now instances of TextIOBase. (They are actually instances of TextIOWrapper, > just like the result of open().) Notice that sys.stdin/stdout/stderr are indeed instances of TextIOBase: py> import sys,io py> isinstance(sys.stdout, io.TextIOBase) True > So why can't the documentation of open() say > that it returns an instance of TextIOBase too? Because it would be incorrect to say so: py> isinstance(open("/etc/passwd","rb"), io.TextIOBase) False > It just seems like a very wide trap to never mention that the whole file type is gone. Well, Raymond promised to address this issue in his rewrite. > OK, I didn't follow the technical details through and, as I said above, I hadn't > noticed the earlier mention of TextIOBase for sys.stdout, etc. So just say > something like "The type file is gone, replaced by classes in the IO module. > Use open() to open a file." That would be correct to say. We'll see what Raymond comes up with. > And maybe add that it returns an instance of > TextIOBase or TextIOWrapper, whichever is deemed more appropriate. Neither. It would be correct to say that it returns an instance of io.IOBase (which isn't really a class, but an ABC). ---------- title: "What's New" should say VERY CLEARLY that the type file is gone -> "What's New" should say VERY CLEARLY that the type file is gone _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Thu Mar 19 23:51:10 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Thu, 19 Mar 2009 22:51:10 +0000 Subject: [issue5513] "What's New" should say VERY CLEARLY that the type file is gone In-Reply-To: <1237477013.22.0.747869782517.issue5513@psf.upfronthosting.co.za> Message-ID: <49C2CB9D.3060701@v.loewis.de> Martin v. L?wis added the comment: > class file(io.TextIOWrapper): > > '''condensing code for this list without test is a no no!''' > > def __init__(self,name): > self.stream = open(name) # SAVE THE STREAM! > super().__init__(self.stream.buffer) I don't know what this is supposed to achieve, but it looks incorrect. I would write it as py> class file(io.TextIOWrapper): ... def __init__(self, name): ... super().__init__(io.BufferedReader(io.FileIO(name, "r"))) ... Your version creates a separate TextIOWrapper for no apparent reason. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 00:01:00 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Mar 2009 23:01:00 +0000 Subject: [issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths In-Reply-To: <1227071866.1.0.995372704707.issue4352@psf.upfronthosting.co.za> Message-ID: <1237503660.38.0.792137587715.issue4352@psf.upfronthosting.co.za> STINNER Victor added the comment: > Indeed. It happens when the filesystem encoding is not utf-8. How can I test it on Linux? ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Fri Mar 20 00:01:27 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Thu, 19 Mar 2009 23:01:27 +0000 Subject: [issue5518] cPickle produces inconsistent output In-Reply-To: <1237478032.19.0.310078929224.issue5518@psf.upfronthosting.co.za> Message-ID: <1237503687.97.0.0463514314043.issue5518@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'm not quite sure why you expect them to be the same. The inputs are different, after all - in one case, you have a Unicode object with a single reference to it (from the tuple), in the second case, you have a Unicode object with many more references: py> sys.getrefcount(key[1]) 2 py> sys.getrefcount((1,u'foo')[1]) 5 That makes a difference for cPickle. ---------- nosy: +loewis resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 00:07:54 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Mar 2009 23:07:54 +0000 Subject: [issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths In-Reply-To: <1227071866.1.0.995372704707.issue4352@psf.upfronthosting.co.za> Message-ID: <1237504074.22.0.387960899135.issue4352@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I found sys.setfilesystemencoding("latin-1")! But even with that, your example find_module.py works correctly with py3k trunk. The problem has maybe gone? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 00:11:51 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 19 Mar 2009 23:11:51 +0000 Subject: [issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths In-Reply-To: <1227071866.1.0.995372704707.issue4352@psf.upfronthosting.co.za> Message-ID: <1237504311.79.0.767710183701.issue4352@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Well, latin-1 can decode any arbitrary array of bytes, so of course it won't fail. :) ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 00:17:00 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 19 Mar 2009 23:17:00 +0000 Subject: [issue5513] "What's New" should say VERY CLEARLY that the type file is gone In-Reply-To: <1237415177.76.0.586178129986.issue5513@psf.upfronthosting.co.za> Message-ID: <1237504620.14.0.489773266505.issue5513@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Unassigning. This appears to have evolved beyond the original request. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 00:02:54 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 19 Mar 2009 23:02:54 +0000 Subject: [issue5513] "What's New" should say VERY CLEARLY that the type file is gone In-Reply-To: <1237415177.76.0.586178129986.issue5513@psf.upfronthosting.co.za> Message-ID: <1237503774.59.0.0618281300365.issue5513@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It might be helpful to provide a table in the open() docs saying what classes in io exactly are returned for different modes. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 01:07:59 2009 From: report at bugs.python.org (Matt Mendell) Date: Fri, 20 Mar 2009 00:07:59 +0000 Subject: [issue5521] sqlite3.h missing In-Reply-To: <1237507679.36.0.109463905227.issue5521@psf.upfronthosting.co.za> Message-ID: <1237507679.36.0.109463905227.issue5521@psf.upfronthosting.co.za> New submission from Matt Mendell : File sqlite3.h missing from Python-3.0.1. setup.py looks for this file. Is this intentional? ---------- components: None messages: 83831 nosy: mendell severity: normal status: open title: sqlite3.h missing type: compile error versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 01:25:21 2009 From: report at bugs.python.org (Joshua Kugler) Date: Fri, 20 Mar 2009 00:25:21 +0000 Subject: [issue5522] HTTPRedirectHandler documentation is wrong In-Reply-To: <1237508721.0.0.854942701546.issue5522@psf.upfronthosting.co.za> Message-ID: <1237508721.0.0.854942701546.issue5522@psf.upfronthosting.co.za> New submission from Joshua Kugler : On the page lib/http-redirect-handler.html it says the signature of redirect_request is: redirect_request( req, fp, code, msg, hdrs) It is actually: redirect_request(req, fp, code, msg, hdrs, newurl) Well, technically the signature is: redirect_request(self, req, fp, code, msg, hdrs, newurl) but it is called as the six-argument version. ---------- assignee: georg.brandl components: Documentation messages: 83832 nosy: georg.brandl, jkugler severity: normal status: open title: HTTPRedirectHandler documentation is wrong versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 01:27:28 2009 From: report at bugs.python.org (Joshua Kugler) Date: Fri, 20 Mar 2009 00:27:28 +0000 Subject: [issue5523] Python bug tracker won't let you edit your profile In-Reply-To: <1237508848.4.0.99019390166.issue5523@psf.upfronthosting.co.za> Message-ID: <1237508848.4.0.99019390166.issue5523@psf.upfronthosting.co.za> New submission from Joshua Kugler : I tried to edit my e-mail address in the python bug tracker (under "Your Details"), but when I hit submit, it tells me: You do not have permission to edit user ---------- components: None messages: 83833 nosy: jkugler severity: normal status: open title: Python bug tracker won't let you edit your profile type: behavior versions: 3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 01:37:48 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 00:37:48 +0000 Subject: [issue5006] Duplicate UTF-16 BOM if a file is open in append mode In-Reply-To: <1232407475.88.0.821271875363.issue5006@psf.upfronthosting.co.za> Message-ID: <1237509468.05.0.578962629673.issue5006@psf.upfronthosting.co.za> STINNER Victor added the comment: @pitrou: You're right, but the state have to be changed for the encoder, not the decoder. I added the following code to TextIOWrapper constructor (for the C and the Python version of io library): if self._seekable and self.writable(): position = self.buffer.tell() if position != 0: self._encoder = self._get_encoder() self._encoder.setstate(0) ---------- keywords: +patch Added file: http://bugs.python.org/file13377/append_bom.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 01:38:26 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 20 Mar 2009 00:38:26 +0000 Subject: [issue5523] Python bug tracker won't let you edit your profile In-Reply-To: <1237508848.4.0.99019390166.issue5523@psf.upfronthosting.co.za> Message-ID: <1237509506.22.0.778272879034.issue5523@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This should go on the meta-tracker, not the Python tracker. See http://psf.upfronthosting.co.za/roundup/meta ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 01:44:11 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 20 Mar 2009 00:44:11 +0000 Subject: [issue5521] sqlite3.h missing In-Reply-To: <1237507679.36.0.109463905227.issue5521@psf.upfronthosting.co.za> Message-ID: <1237509851.48.0.007187011854.issue5521@psf.upfronthosting.co.za> Benjamin Peterson added the comment: That's because it's trying to find the location of the sqlite3.h header which the sqlite3 extension links to. That's part of sqlite, so it's no included in Python. ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 01:48:06 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 00:48:06 +0000 Subject: [issue1056293] dir() should only return strings Message-ID: <1237510086.42.0.0509159213265.issue1056293@psf.upfronthosting.co.za> STINNER Victor added the comment: It's a feature request and it looks like except of Skip Montanaro in 2004, nobody requires this feature. I don't like my patch because it slows down Python just for a very rare case (this issue). I choose to close it. Reopen this issue if you think that this feature (check type of dir() result) is a must have ;-) ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:02:26 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 01:02:26 +0000 Subject: [issue1726687] Bug found in datetime for Epoch time = -1 Message-ID: <1237510946.87.0.551919537895.issue1726687@psf.upfronthosting.co.za> STINNER Victor added the comment: New version of my fix: - the test doesn't depend on _my_ local anymore: it uses localtime() to get the time tuple in the host local - ignore the test if mktime(-2) raise an OverflowError: avoid the test on Windows Is it now ok for everyone? ---------- Added file: http://bugs.python.org/file13378/fix_mktime-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:06:25 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 01:06:25 +0000 Subject: [issue4024] float(0.0) singleton In-Reply-To: <1223004306.88.0.574076862856.issue4024@psf.upfronthosting.co.za> Message-ID: <1237511185.24.0.565319734529.issue4024@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:07:50 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Mar 2009 01:07:50 +0000 Subject: [issue4024] float(0.0) singleton In-Reply-To: <1223004306.88.0.574076862856.issue4024@psf.upfronthosting.co.za> Message-ID: <1237511270.83.0.471414541295.issue4024@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:17:26 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 01:17:26 +0000 Subject: [issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open() In-Reply-To: <1222958524.04.0.862408977928.issue4016@psf.upfronthosting.co.za> Message-ID: <1237511846.01.0.701131568976.issue4016@psf.upfronthosting.co.za> STINNER Victor added the comment: @benjamin.peterson: The second version of my patch works correctly with the bootstraping. > I also think we should consider hard adding more modules > that are loaded at startup time to py3k already huge list. linecache is not loaded at startup time in py3k! I see that linecache is loaded by the warnings module, but the warnings module (Lib/warnings.py) is not loaded at startup. It was maybe the case with Python 2.x or older version of Python 3.x? With my patch, loading linecache loads 2 extra modules: tokenize and token. It only impacts code using directly linecache or the warnings module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:19:38 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 01:19:38 +0000 Subject: [issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open() In-Reply-To: <1222958524.04.0.862408977928.issue4016@psf.upfronthosting.co.za> Message-ID: <1237511978.75.0.0882902924911.issue4016@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I see that setup.py uses warnings and so linecache is loaded by setup.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:21:11 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 01:21:11 +0000 Subject: [issue4121] open(): use keyword only for arguments other than file and mode In-Reply-To: <1223982122.27.0.317312591734.issue4121@psf.upfronthosting.co.za> Message-ID: <1237512071.79.0.423195136193.issue4121@psf.upfronthosting.co.za> STINNER Victor added the comment: Guido> Beyond 3.0, I'm still rather reluctant Ok ok, let's close this bad idea. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:25:23 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 01:25:23 +0000 Subject: [issue4282] exec(unicode): invalid charset when #coding:xxx spec is used In-Reply-To: <1226112572.15.0.185589671168.issue4282@psf.upfronthosting.co.za> Message-ID: <1237512323.86.0.564888549954.issue4282@psf.upfronthosting.co.za> STINNER Victor added the comment: This bug was a duplicate of #4626 which was fixed by r70113 ;-) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:30:37 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 01:30:37 +0000 Subject: [issue4282] profile doesn't support non-UTF8 source code In-Reply-To: <1226112572.15.0.185589671168.issue4282@psf.upfronthosting.co.za> Message-ID: <1237512637.14.0.761079152996.issue4282@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, i misread this issue (wrong title!). #4626 is related, but this issue is about the profile module. The problem is that profile open the source code as text (with the default charset: UTF-8). Attached patch fixes the problem. Example: --- x.py (ISO-8859-1 text file) --- #coding: ISO-8859-1 print("h? h?") ----------------------------------- Run: python -m profile x.py Current result: (...) File ".../py3k/Lib/profile.py", line 614, in main script = fp.read() File ".../Lib/codecs.py", line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf8' codec can't decode bytes (...) With my patch, it works as expected. ---------- dependencies: +compile() doesn't ignore the source encoding when a string is passed in resolution: fixed -> status: closed -> open title: exec(unicode): invalid charset when #coding:xxx spec is used -> profile doesn't support non-UTF8 source code _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:30:45 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 01:30:45 +0000 Subject: [issue4282] profile doesn't support non-UTF8 source code In-Reply-To: <1226112572.15.0.185589671168.issue4282@psf.upfronthosting.co.za> Message-ID: <1237512645.71.0.673299561657.issue4282@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:38:47 2009 From: report at bugs.python.org (Brett Cannon) Date: Fri, 20 Mar 2009 01:38:47 +0000 Subject: [issue4282] profile doesn't support non-UTF8 source code In-Reply-To: <1226112572.15.0.185589671168.issue4282@psf.upfronthosting.co.za> Message-ID: <1237513127.07.0.420866288822.issue4282@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- keywords: -patch stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:44:45 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 01:44:45 +0000 Subject: [issue4282] profile doesn't support non-UTF8 source code In-Reply-To: <1226112572.15.0.185589671168.issue4282@psf.upfronthosting.co.za> Message-ID: <1237513485.14.0.682772320134.issue4282@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, benjamin noticed that it doesn't work with Windows end of line (\r\n). New patch reads the file encoding instead of reading file content as bytes. ---------- keywords: +patch Added file: http://bugs.python.org/file13379/profile_encoding-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:54:05 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 01:54:05 +0000 Subject: [issue5524] execfile() removed from Python3 In-Reply-To: <1237514044.93.0.31573705804.issue5524@psf.upfronthosting.co.za> Message-ID: <1237514044.93.0.31573705804.issue5524@psf.upfronthosting.co.za> New submission from STINNER Victor : In "What?s New In Python 3.0" document, I can read "Removed execfile(). Instead of execfile(fn) use exec(open(fn).read())". The new syntax has two problems: - if the file is not encoding in UTF-8, we get an unicode error. Eg. see issue #4282 - exec() doesn't support newline different than \n, see issue #4628 We need a short function which opens the Python file with the right encoding. Get Python file encoding and open it with the right encoding is a command pattern. Attached patch proposes a function open_script() to open a Python script with the correct encoding. Using it, execfile() can be replaced by exec(open_script(fn).read()) which doesn't have to two binary file problems. ---------- files: open_script.patch keywords: patch messages: 83845 nosy: haypo severity: normal status: open title: execfile() removed from Python3 versions: Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13380/open_script.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:56:58 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 01:56:58 +0000 Subject: [issue4282] profile doesn't support non-UTF8 source code In-Reply-To: <1226112572.15.0.185589671168.issue4282@psf.upfronthosting.co.za> Message-ID: <1237514218.65.0.749873647235.issue4282@psf.upfronthosting.co.za> STINNER Victor added the comment: This regression was introduced by the removal of execfile() in Python3. The proposed replacement of execfile() is wrong. I propose a generic fix in the issue #5524. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 02:58:33 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 01:58:33 +0000 Subject: [issue4628] No universal newline support for compile() when using bytes In-Reply-To: <1228978447.23.0.301216613627.issue4628@psf.upfronthosting.co.za> Message-ID: <1237514313.13.0.822722055902.issue4628@psf.upfronthosting.co.za> STINNER Victor added the comment: This problem is not new. exec() in Python 2.x doesn't accept \r\n newlines. See also related(?) issue: #5524 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 03:07:10 2009 From: report at bugs.python.org (Rudd-O) Date: Fri, 20 Mar 2009 02:07:10 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1237514830.93.0.505201558424.issue5482@psf.upfronthosting.co.za> Rudd-O added the comment: patch does what others did, plus this time it lets the specfile autodiscover the python abi so the name is correct regardless of against whichever python interpreter the package is built. ---------- Added file: http://bugs.python.org/file13381/python-2.4-distutils-bdist_rpm-autonames+optimize-v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 03:09:44 2009 From: report at bugs.python.org (Rudd-O) Date: Fri, 20 Mar 2009 02:09:44 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1237514984.26.0.36326121807.issue5482@psf.upfronthosting.co.za> Rudd-O added the comment: about python trunk... gimme some time to port them incrementally to all popular stable pythons first, then to trunk. will be glad to do this. Now, by trunk, do you mean python 3.x? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 03:09:48 2009 From: report at bugs.python.org (Rudd-O) Date: Fri, 20 Mar 2009 02:09:48 +0000 Subject: [issue5474] distutils produces invalid RPM packages of prerelease python packages In-Reply-To: <1236744919.07.0.603710480384.issue5474@psf.upfronthosting.co.za> Message-ID: <1237514988.4.0.0494904318165.issue5474@psf.upfronthosting.co.za> Rudd-O added the comment: about python trunk... gimme some time to port them incrementally to all popular stable pythons first, then to trunk. will be glad to do this. Now, by trunk, do you mean python 3.x? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 04:11:51 2009 From: report at bugs.python.org (Luca clementi) Date: Fri, 20 Mar 2009 03:11:51 +0000 Subject: [issue5525] Problem with email.MIME* library, using wrong new line In-Reply-To: <1237518711.23.0.918881027535.issue5525@psf.upfronthosting.co.za> Message-ID: <1237518711.23.0.918881027535.issue5525@psf.upfronthosting.co.za> New submission from Luca clementi : I'm running Python 2.5.2 under Ubuntu 8.10. In the file email/generator.py from the core library at line 228 in the function _handle_multipart() # delimiter transport-padding CRLF print >> self._fp, '\n--' + boundary but if this function is run under Unix it print only the LF and not the CRLF as by required by the standard. My guess is that this error is also in other part of the library. SMTP (as HTTP) requires CRLF as new line, by standard, while I see that at the beginning of the generator.py NL = '\n' Am I missing something? Luca ---------- components: Library (Lib) messages: 83851 nosy: lclement severity: normal status: open title: Problem with email.MIME* library, using wrong new line type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 04:59:50 2009 From: report at bugs.python.org (Evan Greensmith) Date: Fri, 20 Mar 2009 03:59:50 +0000 Subject: [issue5526] Local variables unavailable for operation of list comprehension when using eval() In-Reply-To: <1237521589.9.0.0850513364759.issue5526@psf.upfronthosting.co.za> Message-ID: <1237521589.9.0.0850513364759.issue5526@psf.upfronthosting.co.za> New submission from Evan Greensmith : In python 3.0 and 3.1, attempting to access a local variable from within a list comprehension in a string passed to eval() causes a NameError. Doesn't seem to be a problem in python 2.6 I have attempted to run the attached test cases (test_eval_comp.py) using the following builds of python: Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32 Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on win32 Python 3.1a1 (r31a1:70244, Mar 8 2009, 18:15:03) [MSC v.1500 32 bit (Intel)] on win32 All tests passed with Python 2.6.1. The following five tests failed with Python 3.0.1 and 3.1a1 EvalWithComprehensionTestCase.test_local_var NameError: global name 'value' is not defined EvalWithComprehensionTestCase.test_function_arg NameError: global name 'value' is not defined EvalWithComprehensionTestCase.test_self_attrib NameError: global name 'self' is not defined ExampleFromDocsTestCase.test_local_var NameError: global name 'vec1' is not defined NestedComprehensionExampleFromDocsTestCase.test_local_var NameError: global name 'mat' is not defined ---------- files: test_eval_comp.py messages: 83852 nosy: evan.greensmith severity: normal status: open title: Local variables unavailable for operation of list comprehension when using eval() versions: Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13382/test_eval_comp.py _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Fri Mar 20 06:56:23 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Fri, 20 Mar 2009 05:56:23 +0000 Subject: [issue5524] execfile() removed from Python3 In-Reply-To: <1237514044.93.0.31573705804.issue5524@psf.upfronthosting.co.za> Message-ID: <1237528583.89.0.81101576808.issue5524@psf.upfronthosting.co.za> Martin v. L?wis added the comment: -1. There is a much simpler solution to the problem: use exec(open(fn, "rb").read()) ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 07:00:52 2009 From: report at bugs.python.org (David W. Lambert) Date: Fri, 20 Mar 2009 06:00:52 +0000 Subject: [issue5513] "What's New" should say VERY CLEARLY that the type file is gone In-Reply-To: <1237415177.76.0.586178129986.issue5513@psf.upfronthosting.co.za> Message-ID: <1237528852.92.0.0328457587297.issue5513@psf.upfronthosting.co.za> David W. Lambert added the comment: My file class extends text files with seek or read through condition or pattern, providing an awk like pattern{action} task separation. If I allow a pre-existing stream into my constructor (subprocess.Popen my favorite) I still suffer the same garbage collection problem. class file(io.TextIOWrapper): 'add condition matching to a stream' def __init__(self,stream_or_name): a = stream_or_name buffer = (a.buffer if isinstance(a, io.TextIOWrapper) else io.BufferedReader(io.FileIO(a, 'r'))) super().__init__(buffer) Use this on a stream whose reference count goes to zero causes ValueError: I/O operation on closed file. Increasing stream's reference count by saving it with the object corrects it. I appreciate your considerations. Dave. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Fri Mar 20 07:10:32 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Fri, 20 Mar 2009 06:10:32 +0000 Subject: [issue5513] "What's New" should say VERY CLEARLY that the type file is gone In-Reply-To: <1237528852.92.0.0328457587297.issue5513@psf.upfronthosting.co.za> Message-ID: <49C33351.9000201@v.loewis.de> Martin v. L?wis added the comment: > I appreciate your considerations. David, this discussions is certainly out of scope for this issue (which is about the "What's new" document), so I will not consider it further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 08:09:19 2009 From: report at bugs.python.org (Roumen Petrov) Date: Fri, 20 Mar 2009 07:09:19 +0000 Subject: [issue5507] ctypes configuration fails on mips-linux (and probably Irix) In-Reply-To: <1237378102.74.0.471718601919.issue5507@psf.upfronthosting.co.za> Message-ID: <1237532959.11.0.829234961894.issue5507@psf.upfronthosting.co.za> Roumen Petrov added the comment: please find already open issue and close this one. ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 09:26:38 2009 From: report at bugs.python.org (Timothy Zhang) Date: Fri, 20 Mar 2009 08:26:38 +0000 Subject: [issue4625] IDLE won't open anymore, .idlerc unaccessible In-Reply-To: <1228966222.3.0.407670135818.issue4625@psf.upfronthosting.co.za> Message-ID: <1237537598.93.0.229594697808.issue4625@psf.upfronthosting.co.za> Timothy Zhang added the comment: I meet the same problem and have it fixed. I use Python 2.5.2 on Windows XP. This is my solution: 1. Choose "Tool->Folder Option" in your explorer menu, then click "View" tab, uncheck "use simple file sharing(recommended)". 2. Right click on "C:\Documents and Settings\\.idlerc" folder, then click "property", you got the folder property dialog 3. Click "Safety" tab, you may found there's only "System" user in the list. Click "Add" and add type your username, then click "OK". 4. Select your name in the list, enable all the permissions in the box below. Now this problem should be fixed. Hope this works. ---------- nosy: +timium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 09:53:11 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 08:53:11 +0000 Subject: [issue5524] execfile() removed from Python3 In-Reply-To: <1237528583.89.0.81101576808.issue5524@psf.upfronthosting.co.za> Message-ID: <200903200952.19707.victor.stinner@haypocalc.com> STINNER Victor added the comment: martin> There is a much simpler solution to the problem: martin> use exec(open(fn,"rb").read()) Ok... but there is the newline issue: (self quote) "exec() doesn't support newline different than \n, see issue #4628". And open_python() can be used for other usages than execfile() ;-) Note: tokenize.open_python() is maybe not the best module and/or function name. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Gerhard_H=C3=A4ring_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Fri Mar 20 12:20:27 2009 From: =?utf-8?q?Gerhard_H=C3=A4ring_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Gerhard_H=C3=A4ring_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Fri, 20 Mar 2009 11:20:27 +0000 Subject: [issue5033] setup.py crashes if sqlite version contains 'beta' In-Reply-To: <1232641406.0.0.500689225697.issue5033@psf.upfronthosting.co.za> Message-ID: <1237548027.87.0.712171107589.issue5033@psf.upfronthosting.co.za> Changes by Gerhard H?ring : ---------- assignee: -> ghaering nosy: +ghaering priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 12:46:52 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 20 Mar 2009 11:46:52 +0000 Subject: [issue5526] Local variables unavailable for operation of list comprehension when using eval() In-Reply-To: <1237521589.9.0.0850513364759.issue5526@psf.upfronthosting.co.za> Message-ID: <1237549612.26.0.971392246044.issue5526@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is a fundamental limitation of how comprehensions are implemented in Python 3 and is unlikely to change anytime soon. ---------- nosy: +benjamin.peterson resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 13:42:53 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 20 Mar 2009 12:42:53 +0000 Subject: [issue1322] platform.dist() has unpredictable result under Linux In-Reply-To: <1237396411.15.0.309007084271.issue1322@psf.upfronthosting.co.za> Message-ID: <49C38F45.6010008@egenix.com> Marc-Andre Lemburg added the comment: On 2009-03-18 18:13, Matthias Klose wrote: > Matthias Klose added the comment: > > MAL, please can we add zooko's patch in some form? The current > implementation assumes an implementation, which doesn't exist on all > platforms, and just dividing linux distributions in "unsupported" and > "supported" seems to be odd. I've already mentioned what needs to be done to make Zooko's patch suitable for platform.py (see further up on this ticket discussion). The patch still doesn't meet those requirement, so cannot be applied. Furthermore, I would prefer that piping to lsb_release only be used as fallback solution. This should not be the default mechanism. Regarding the problems on Ubuntu: That's mainly due to the way Ubuntu decided to use the LSB standard. Most other Linux platforms work just fine with the existing platform.py parser. In order to support Ubuntu as well, we'll have to parse the DISTRIB_* "variables" in /etc/lsb-release. > You cite some URL's in platform.py: > > - http://linuxmafia.com/faq/Admin/release-files.html > > "Linux System Base-compliant systems should have a file called > /etc/lsb_release, which may be in addition to a distribution- > specific file." > > The standard doesn't say anything like this. > > - http://linux.die.net/man/1/lsb_release > This is one implementation, not more. The current platform.py > implementation seems to require this particular implementation. > > The only relevant URL is missing in this file: > http://refspecs.freestandards.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/lsbrelease.html Thanks, I'll add that. Note that the link doesn't mention anything about the file format of the /etc/lsb_release file or how it should be parsed. That's why I added the other URLs. BTW: Here's what "man lsb_release" says on OpenSUSE: """ If the installation is LSB compliant, the "/etc/lsb-release" file should contain the LSB_VERSION field. The value of the field should be a colon separated list of supported module versions indicating the LSB specification modules to which the installation is com? pliant. If the installation is not compliant, the above field should not be present. Optional fields are DISTRIB_ID, DISTRIB_RELEASE, DISTRIB_CODENAME, DISTRIB_DESCRIPTION and can be used to override information which is parsed from the "/etc/distrib-release" file. If the "/etc/lsb-release.d" directory exists, it is searched for filenames which are taken as additional module-version strings to add to LSB_VERSION. The "/etc/distrib-release" file contains a description line which is parsed to get informa? tion (especially on currently non-LSB compliant systems). """ It is interesting to note that Ubuntu's /etc/lsb_release file does not contain the LSB_VERSION field. That would suggest, that Ubuntu is not LSB compliant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 14:48:52 2009 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Fri, 20 Mar 2009 13:48:52 +0000 Subject: [issue1322] platform.dist() has unpredictable result under Linux In-Reply-To: <1193246464.1.0.269134020057.issue1322@psf.upfronthosting.co.za> Message-ID: <1237556932.58.0.306761760911.issue1322@psf.upfronthosting.co.za> Zooko O'Whielacronx added the comment: I just read back through this ticket, but I didn't understand exactly what MAL wanted to have different from what this Python function currently does: http://allmydata.org/trac/tahoe/browser/src/allmydata/__init__.py?rev=20081125155118-92b7f-f74fc964ebd9d3c59afde68b6688c56ce20cca39#L31 MAL, could you please restate the changes you want? By the way I think there is some confusion about what is standardized by LSB. As far as I know this one page is the complete spec: http://refspecs.freestandards.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/lsbrelease.html and it doesn't specify the existence of any file that we can parse. So the quote you mention: "Linux System Base-compliant systems should have a file called /etc/lsb_release, which may be in addition to a distribution-specific file." is just wrong. More's the pity -- most implementations use a file named /etc/lsb-release, and we can parse that, and if we do it is much faster than executing the lsb_release executable in a subprocess. The slowness of invoking subprocess is why I was forced to back off from my original patch of merely using only what the LSB offers. A second problem with relying on LSB is, as I've mentioned, that some Linux distributions don't come (by default) with the de-facto-standard "lsb_release" executable although they do come with an /etc/lsb-release file. That's why my current strategy is: 1. Parse the de-facto-nearly-standard /etc/lsb-release file. 2. Ad-hoc techniques encoded into the Python Standard Library's platform.dist(). 3. Execute the de-jure-standard "lsb_release" in a subprocess. 4. Arch Linux ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 15:23:30 2009 From: report at bugs.python.org (rb) Date: Fri, 20 Mar 2009 14:23:30 +0000 Subject: [issue5518] cPickle produces inconsistent output In-Reply-To: <1237478032.19.0.310078929224.issue5518@psf.upfronthosting.co.za> Message-ID: <1237559010.8.0.200009208816.issue5518@psf.upfronthosting.co.za> rb added the comment: Martin, Sorry, I don't follow. I realise that the refcounts will be different; but pickling an object should surely be independent of the refcount as there is no need to include the refcount in the output? What other way (using pickle or not) can I convert a generic immutable Python object to a string to use as a key in external storage? Currently the documentation points out that the output may be different between pickle and cPickle which implies that the output will be consistent for a single module. If pickle is not required to produce consistent output for the same input (and refcount isn't really part of the input in this case; it is a side issue) than can this be documented? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 15:38:24 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 20 Mar 2009 14:38:24 +0000 Subject: [issue1726687] Bug found in datetime for Epoch time = -1 Message-ID: <1237559904.88.0.189137047479.issue1726687@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Is the "break" intended in the test function? it seems that this will skip the whole test. Isn't "continue" better? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 16:20:32 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Mar 2009 15:20:32 +0000 Subject: [issue1726687] Bug found in datetime for Epoch time = -1 Message-ID: <1237562432.72.0.765029809199.issue1726687@psf.upfronthosting.co.za> STINNER Victor added the comment: @Amaury: You wrote: << But negative time_t are still not allowed by the Microsoft CRT, the tests fail.>> So I choosed to skip mktime(-1) test if mktime(-2) fails. I don't have Windows to test my patch nor current behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 17:08:08 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 20 Mar 2009 16:08:08 +0000 Subject: [issue4258] Use 30-bit digits instead of 15-bit digits for Python integers. In-Reply-To: <1225795512.12.0.546973896448.issue4258@psf.upfronthosting.co.za> Message-ID: <1237565287.94.0.0917996501842.issue4258@psf.upfronthosting.co.za> Mark Dickinson added the comment: Backported to trunk in r70479. Mario, thanks for the long multiplication tweaks you submitted: could you possibly regenerate your Feb 19th patch against the trunk (or py3k, whichever you prefer) and attach it to issue 3944? ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 19:23:10 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 20 Mar 2009 18:23:10 +0000 Subject: [issue5518] cPickle produces inconsistent output In-Reply-To: <1237478032.19.0.310078929224.issue5518@psf.upfronthosting.co.za> Message-ID: <1237573390.53.0.358930587866.issue5518@psf.upfronthosting.co.za> Benjamin Peterson added the comment: pickle is designed to provide persistent storage, not create keys for objects. Changes to the format are fine as long as they are compatible. ---------- nosy: +benjamin.peterson status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 19:34:41 2009 From: report at bugs.python.org (Aki) Date: Fri, 20 Mar 2009 18:34:41 +0000 Subject: [issue5527] multiprocessing won't work with Tkinter (under Linux) In-Reply-To: <1237574081.02.0.0677822756927.issue5527@psf.upfronthosting.co.za> Message-ID: <1237574081.02.0.0677822756927.issue5527@psf.upfronthosting.co.za> New submission from Aki : Hello, The attached test case, which uses multiprocessing module to run Tkinter GUI process, runs flawlessly under Solaris but hung under Linux (CentOS5). The test case is a trimmed version of much larger program but it still exhibits the same problem. I got a suggestion to use a function rather than a method of a class. But it didn't make any difference. I may have overlooked something but as far as I review my code, I couldn't find anything that explains why the test case won't work (In fact, it works under Solaris). ---------- components: Library (Lib) files: tk_test.py messages: 83867 nosy: akineko severity: normal status: open title: multiprocessing won't work with Tkinter (under Linux) type: crash versions: Python 2.6 Added file: http://bugs.python.org/file13383/tk_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 22:35:11 2009 From: report at bugs.python.org (Andreas Schawo) Date: Fri, 20 Mar 2009 21:35:11 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1237584911.63.0.737279793811.issue5463@psf.upfronthosting.co.za> Andreas Schawo added the comment: Ok, heres the patch again. Passed regression tests. Should the version number increase to 0.3? Maybe to reflect there are no more deprecated features. It should then take place after FLOAT_COERCE cleanup. I'm currently trying to figure out whats about _PY_STRUCT_RANGE_CHECKING and why it is hardcoded constant in _struct.c. ---------- Added file: http://bugs.python.org/file13384/struct_overflow_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 22:43:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 21:43:02 +0000 Subject: [issue1666318] shutil.copytree doesn't preserve directory permissions Message-ID: <1237585382.2.0.0265789455199.issue1666318@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 22:43:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 21:43:50 +0000 Subject: [issue1145257] shutil.copystat() may fail... Message-ID: <1237585430.03.0.531858462817.issue1145257@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +shutil.copytree doesn't preserve directory permissions stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 22:44:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 21:44:13 +0000 Subject: [issue1119626] patches to compile for AIX 4.1.x Message-ID: <1237585453.58.0.946805060742.issue1119626@psf.upfronthosting.co.za> Daniel Diniz added the comment: Unless someone tells me that providing 'stubs for openpty in posixmodule and wgetnstr in curses module' is still a valid concern, I'll close this. ---------- components: +Build nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending versions: +Python 2.7 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 22:46:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 21:46:08 +0000 Subject: [issue1157169] csv Sniffer returns bad dialect? Message-ID: <1237585568.25.0.624554559165.issue1157169@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 22:46:53 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 21:46:53 +0000 Subject: [issue1431091] CSV Sniffer fails to report mismatch of column counts Message-ID: <1237585613.56.0.709454813187.issue1431091@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 22:48:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 21:48:52 +0000 Subject: [issue1158490] locale fails if LANGUAGE has multiple locales Message-ID: <1237585732.13.0.173013772611.issue1158490@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 22:50:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 21:50:43 +0000 Subject: [issue1223976] error locale.getlocale() with LANGUAGE=eu_ES Message-ID: <1237585843.69.0.791448103104.issue1223976@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:12:36 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:12:36 +0000 Subject: [issue1262856] fcntl.ioctl have a bit problem. Message-ID: <1237587156.28.0.663251210005.issue1262856@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:12:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:12:33 +0000 Subject: [issue1276509] 2.4.1 make fails on Solaris 10 (complexobject.c/HUGE_VAL) Message-ID: <1237587153.14.0.617539473753.issue1276509@psf.upfronthosting.co.za> Daniel Diniz added the comment: Will close as won't fix if nobody object. >From pymath.h: /* HUGE_VAL is supposed to expand to a positive double infinity. Python * uses Py_HUGE_VAL instead because some platforms are broken in this * respect. We used to embed code in pyport.h to try to worm around that, * but different platforms are broken in conflicting ways. If you're on * a platform where HUGE_VAL is defined incorrectly, fiddle your Python * config to #define Py_HUGE_VAL to something that works on your platform. */ #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif ---------- dependencies: +2.3.4 fails build on solaris 10 - complexobject.c nosy: +ajaksu2 priority: normal -> low status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:12:46 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:12:46 +0000 Subject: [issue1243730] Big speedup in email message parsing Message-ID: <1237587166.01.0.932407823181.issue1243730@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -Interpreter Core nosy: +ajaksu2 stage: -> test needed type: -> performance versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:12:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:12:54 +0000 Subject: [issue1234328] 'insufficient disk space' message wrong (msi on win xp pro) Message-ID: <1237587174.98.0.985695901896.issue1234328@psf.upfronthosting.co.za> Daniel Diniz added the comment: Will close as won't fix/lack of response unless someone wants this open. ---------- nosy: +ajaksu2 priority: normal -> low status: open -> pending type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:29:44 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 20 Mar 2009 22:29:44 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1237588184.92.0.385844216967.issue1040026@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Is this fixed in Python 2.6.1? We have encountered some problems on both OS X and FreeBSD by using 2.6.1: http://code.google.com/p/psutil/issues/detail?id=40 ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:30:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:30:26 +0000 Subject: [issue1298835] vendor-packages directory. Message-ID: <1237588226.61.0.513814877418.issue1298835@psf.upfronthosting.co.za> Daniel Diniz added the comment: Should be considered for 3.1 and 2.7. ---------- nosy: +ajaksu2 type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:30:30 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:30:30 +0000 Subject: [issue1296434] Call by object reference sometimes call by value Message-ID: <1237588230.88.0.234889655232.issue1296434@psf.upfronthosting.co.za> Daniel Diniz added the comment: Will close this unless someone offers better wording for the docs and it doesn't involve a flamewar. ---------- nosy: +ajaksu2 priority: normal -> low status: open -> pending type: -> feature request versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:30:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:30:38 +0000 Subject: [issue1295179] termios.c in qnx4.25 Message-ID: <1237588238.69.0.630053732011.issue1295179@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:30:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:30:47 +0000 Subject: [issue1294232] Error in metaclass search order Message-ID: <1237588247.35.0.631644498059.issue1294232@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> feature request versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:30:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:30:52 +0000 Subject: [issue1291169] mmap with unsigned int offset and cross build for ppc Message-ID: <1237588252.76.0.708976853599.issue1291169@psf.upfronthosting.co.za> Daniel Diniz added the comment: This is 'open' and 'out of date'... There's been some recent mmap activity, so I'll leave closing this to someone that understands mmap :) ---------- nosy: +ajaksu2 versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:31:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:31:01 +0000 Subject: [issue1284496] traceback module can return undecodable byte strings Message-ID: <1237588261.26.0.505663590213.issue1284496@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Unicode -None priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:31:07 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:31:07 +0000 Subject: [issue1283289] PyArg_ParseTupleAndKeywords gives misleading error message Message-ID: <1237588267.55.0.477094949938.issue1283289@psf.upfronthosting.co.za> Daniel Diniz added the comment: Fixed on trunk and py3k, can someone test on the release branches? Python 2.7a0 (trunk, Feb 24 2009, 10:30:17) >>> re.compile("a").match(pos=10) Traceback (most recent call last): File "", line 1, in TypeError: Required argument 'pattern' (pos 1) not found ---------- nosy: +ajaksu2 versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:33:38 2009 From: report at bugs.python.org (Chris) Date: Fri, 20 Mar 2009 22:33:38 +0000 Subject: [issue5528] Unable to launch IDLE on Windows In-Reply-To: <1237588418.03.0.370218080743.issue5528@psf.upfronthosting.co.za> Message-ID: <1237588418.03.0.370218080743.issue5528@psf.upfronthosting.co.za> New submission from Chris : I have recently installed python 2.6 and I have been successfully able to run python from a command line and from the Python command line. However, when I try to launch the IDLE, all I get is a window that flashes. I tried launching the IDLE from a command line with the following command: c:\Python26\Lib\idlelib>idle.py -n I get the following error: ************************************************ Traceback (most recent call last): File "C:\Python26\Lib\idlelib\idle.py", line 21, in idlelib.PyShell.main() File "C:\Python26\lib\idlelib\PyShell.py", line 1386, in main root = Tk(className="Idle") File "C:\Python26\lib\lib-tk\Tkinter.py", line 1643, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, want objects, useTk, sync, use) _tkinter.TclError: Can't find a usable init.tcl in the following directories: {C:\IBMTOOLS\Python22\tcl\tcl8.4} C:/IBMTOOLS/Python22/tcl/tcl8.5 C:/Python2 6/lib/tcl8.5 C:/lib/tcl8.5 C:/lib/tcl8.5 C:/library C:/library C:/tcl8.5.2/libra ry C:/tcl8.5.2/library C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl: version conflict for package "Tcl": ha ve 8.5.2, need exactly 8.4 version conflict for package "Tcl": have 8.5.2, need exactly 8.4 while executing "package require -exact Tcl 8.4" (file "C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl" line 19) invoked from within "source C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl" ("uplevel" body line 1) invoked from within "uplevel #0 [list source $tclfile]" This probably means that Tcl wasn't installed properly. ************************************************************* I tried changing the python path from c:\IBMTOOLS\Python22 to C:\Python26, but that did not work. One other note is that I do not have adminstrator priviledges on this computer. ---------- components: IDLE messages: 83877 nosy: croy severity: normal status: open title: Unable to launch IDLE on Windows versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:35:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:35:12 +0000 Subject: [issue1303673] traceback on trying to load a hotshot stats file Message-ID: <1237588512.01.0.906534979215.issue1303673@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Extension Modules -Library (Lib) dependencies: +hotshot.stats.load fails with AssertionError stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:43:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:43:03 +0000 Subject: [issue1314572] Trailing slash redirection for SimpleHTTPServer Message-ID: <1237588983.8.0.0845874639267.issue1314572@psf.upfronthosting.co.za> Daniel Diniz added the comment: Has patch. ---------- keywords: +easy nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:43:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:43:10 +0000 Subject: [issue1306484] compile() converts "filename" parameter to StringType Message-ID: <1237588990.68.0.61245330579.issue1306484@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk. ---------- nosy: +ajaksu2 stage: -> needs patch type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:43:15 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:43:15 +0000 Subject: [issue1306253] Python 2.4.2c1 fails to build on 64-bit Solaris 10 Message-ID: <1237588995.35.0.539287982903.issue1306253@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:59:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:59:04 +0000 Subject: [issue1332869] Fatal Python error: Interpreter not initialized Message-ID: <1237589944.83.0.0228642215719.issue1332869@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed title: Fatal Python error: Interpreter not initialized -> Fatal Python error: Interpreter not initialized type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:59:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:59:10 +0000 Subject: [issue1332732] Incorrect use of -L/usr/lib/termcap Message-ID: <1237589950.8.0.954492391366.issue1332732@psf.upfronthosting.co.za> Daniel Diniz added the comment: I'll close this unless someone confirms the warning is still present in supported versions. ---------- nosy: +ajaksu2 status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:59:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:59:12 +0000 Subject: [issue1326448] set.__getstate__ is not overriden Message-ID: <1237589952.65.0.431319732125.issue1326448@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed, but it's still not clear whether it should change. ---------- components: +Library (Lib) -None nosy: +ajaksu2 type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:59:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:59:33 +0000 Subject: [issue1327594] Static Windows Build fails to locate existing installation Message-ID: <1237589973.76.0.236888829284.issue1327594@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 20 23:59:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 22:59:44 +0000 Subject: [issue1326077] traceback.py formats SyntaxError differently Message-ID: <1237589984.96.0.171935843218.issue1326077@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk. ---------- nosy: +ajaksu2 stage: -> needs patch type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:00:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:00:03 +0000 Subject: [issue1324770] Adding redblack tree to collections module Message-ID: <1237590003.43.0.0839645043378.issue1324770@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:10:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:10:20 +0000 Subject: [issue1252001] Issue with telnetlib read_until not timing out Message-ID: <1237590620.52.0.143028244843.issue1252001@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +Issue with telnetlib read_until not timing out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:11:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:11:05 +0000 Subject: [issue1252001] Issue with telnetlib read_until not timing out Message-ID: <1237590665.3.0.0275728787826.issue1252001@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +telnetlib expect() and read_until() do not time out properly -Issue with telnetlib read_until not timing out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:11:35 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:11:35 +0000 Subject: [issue1360221] telnetlib expect() and read_until() do not time out properly Message-ID: <1237590695.88.0.307385727445.issue1360221@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:12:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:12:01 +0000 Subject: [issue1356969] Tix.py class HList missing info_bbox Message-ID: <1237590721.69.0.575799052721.issue1356969@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:12:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:12:10 +0000 Subject: [issue1351020] PythonD DJGPP-specific patch set for porting to DOS. Message-ID: <1237590730.13.0.300241205353.issue1351020@psf.upfronthosting.co.za> Daniel Diniz added the comment: Any news on this? ---------- nosy: +ajaksu2 priority: normal -> low status: open -> pending type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:12:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:12:11 +0000 Subject: [issue1349106] email.Generators does not separates headers with "\r\n" Message-ID: <1237590731.02.0.06629324372.issue1349106@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:12:16 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:12:16 +0000 Subject: [issue1337876] Inconsistent use of buffer interface in string and unicode Message-ID: <1237590736.17.0.755822676022.issue1337876@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Unicode stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:15:02 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Mar 2009 23:15:02 +0000 Subject: [issue4024] float(0.0) singleton In-Reply-To: <1223004306.88.0.574076862856.issue4024@psf.upfronthosting.co.za> Message-ID: <1237590902.35.0.407817158541.issue4024@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have 3 comments for future readers who might want to reopen. 1) This would have little effect on calculation with numpy. 2) According to sys.getrefcount, when '>>>' appears, 3.0.1 has 1200 duplicate references to 0 and 1 alone, and about 2000 to all of them. So so small int caching really needs to be done by the interpreter. Are there *any* duplicate internal references to 0.0 that would help justify this proposal? 3) It is? (certainly was) standard in certain Fortran circles to NAME constants as Raymond suggested. One reason given was to ease conversion between single and double precision. In Python, named constants in functions would ease conversion between, for instance, float and decimal. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Mar 21 00:27:30 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Fri, 20 Mar 2009 23:27:30 +0000 Subject: [issue5524] execfile() removed from Python3 In-Reply-To: <200903200952.19707.victor.stinner@haypocalc.com> Message-ID: <49C4265E.1010602@v.loewis.de> Martin v. L?wis added the comment: > Ok... but there is the newline issue: (self quote) "exec() doesn't support > newline different than \n, see issue #4628". So that issue should get fixed, then. > And open_python() can be used for other usages than execfile() ;-) > > Note: tokenize.open_python() is maybe not the best module and/or function > name. I remain opposed to the entire concept. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:30:06 2009 From: report at bugs.python.org (Ben Decker) Date: Fri, 20 Mar 2009 23:30:06 +0000 Subject: [issue1351020] PythonD DJGPP-specific patch set for porting to DOS. Message-ID: <1237591806.83.0.0470398604215.issue1351020@psf.upfronthosting.co.za> Ben Decker added the comment: Our next target will probably be somewhere with Python 3 ---------- components: +Interpreter Core -None versions: +Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:30:53 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:30:53 +0000 Subject: [issue1388872] Polymorphic getters / setters Message-ID: <1237591853.2.0.975027888593.issue1388872@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk and py3k, not sure it's a bug. ---------- nosy: +ajaksu2 priority: normal -> low versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:30:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:30:59 +0000 Subject: [issue1386675] _winreg specifies EnvironmentError instead of WindowsError Message-ID: <1237591859.04.0.624634051346.issue1386675@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Windows stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:31:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:31:03 +0000 Subject: [issue1379984] HP-UX: Can't shl_load() a library containing Thread Local Message-ID: <1237591863.88.0.248634989292.issue1379984@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:31:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:31:06 +0000 Subject: [issue1379804] HP-UX thread stack size needs to be increased Message-ID: <1237591866.42.0.634352690042.issue1379804@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:31:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:31:10 +0000 Subject: [issue1379416] email.Header encode() unicode P2.3xP2.4 Message-ID: <1237591870.74.0.361696716108.issue1379416@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:31:15 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:31:15 +0000 Subject: [issue1372770] email.Header should preserve original FWS Message-ID: <1237591875.24.0.0725151717987.issue1372770@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:31:25 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:31:25 +0000 Subject: [issue1368091] shutils cannot copy owner Message-ID: <1237591885.03.0.474086650339.issue1368091@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as issue 1355826 has more details. ---------- nosy: +ajaksu2 resolution: -> duplicate status: open -> closed superseder: -> shutil.move() does not preserve ownership _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:32:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:32:22 +0000 Subject: [issue1367628] use PyOS_ReadlineFunctionPointer in non-interractive input Message-ID: <1237591942.08.0.831934812344.issue1367628@psf.upfronthosting.co.za> Daniel Diniz added the comment: The snippet from "Parser/myreadline.c" is still present in trunk. ---------- nosy: +ajaksu2 stage: -> test needed title: use PyOS_ReadlineFunctionPointer in non-interractive input -> use PyOS_ReadlineFunctionPointer in non-interractive input type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:32:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:32:27 +0000 Subject: [issue1360243] Add XML-RPC Fault Interoperability to XMLRPC libraries Message-ID: <1237591947.11.0.267557834347.issue1360243@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Mar 21 00:32:52 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Fri, 20 Mar 2009 23:32:52 +0000 Subject: [issue5518] cPickle produces inconsistent output In-Reply-To: <1237559010.8.0.200009208816.issue5518@psf.upfronthosting.co.za> Message-ID: <49C4279F.3010004@v.loewis.de> Martin v. L?wis added the comment: > Sorry, I don't follow. I realise that the refcounts will be different; > but pickling an object should surely be independent of the refcount as > there is no need to include the refcount in the output? There certainly is a need to consider the refcount. Else the memo would not work. > What other way (using pickle or not) can I convert a generic immutable > Python object to a string to use as a key in external storage? You will have to come up with your own serialization function. There are MANY reasons why using a pickle cannot work. For example, in a dictionary, the order of keys is not guaranteed, and might change even though the dictionaries compare equal. > Currently the documentation points out that the output may be different > between pickle and cPickle which implies that the output will be > consistent for a single module. I doesn't imply this at all. The sentence says just what it says: don't be surprised if you pickle the same object with pickle and cPickle, and get different results. > If pickle is not required to produce consistent output for the same > input (and refcount isn't really part of the input in this case; it is > a side issue) than can this be documented? It's certainly possible to document that, yes. Can you propose a specific patch to the documentation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:38:46 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Mar 2009 23:38:46 +0000 Subject: [issue1326448] set.__getstate__ is not overriden Message-ID: <1237592326.11.0.525885176774.issue1326448@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: tim_one -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:51:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:51:02 +0000 Subject: [issue1410680] Add 'surgical editing' to ConfigParser Message-ID: <1237593062.83.0.111785264959.issue1410680@psf.upfronthosting.co.za> Daniel Diniz added the comment: Anyone interested in updating this? ---------- nosy: +ajaksu2 stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:51:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:51:06 +0000 Subject: [issue1409460] email.Utils.parseaddr() gives arcane result Message-ID: <1237593066.07.0.102903848631.issue1409460@psf.upfronthosting.co.za> Daniel Diniz added the comment: Fixed in trunk, so issue 1464708 was probably forward ported. ---------- dependencies: +fixed handling of nested comments in mail addresses nosy: +ajaksu2 resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:51:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:51:12 +0000 Subject: [issue1398781] Example in section 5.3 "Pure Embedding" doesn't work. Message-ID: <1237593072.43.0.759916104283.issue1398781@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Mar 21 00:51:19 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Fri, 20 Mar 2009 23:51:19 +0000 Subject: [issue1040026] os.times() is bogus In-Reply-To: <1237588184.92.0.385844216967.issue1040026@psf.upfronthosting.co.za> Message-ID: <49C42BF3.2050902@v.loewis.de> Martin v. L?wis added the comment: > Is this fixed in Python 2.6.1? Please try to answer this question yourself in the future. Python 2.6.1 was released on Dec 4th (http://www.python.org/download/releases/2.6.1/), and the commits were made on Dec 29 (as seen both in the time stamp on my message, and the *linked* svnview pages). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:51:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:51:28 +0000 Subject: [issue1396946] %ehrntDRT support for time.strptime Message-ID: <1237593088.53.0.442667249656.issue1396946@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review title: %ehrntDRT support for time.strptime -> %ehrntDRT support for time.strptime versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:51:36 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:51:36 +0000 Subject: [issue1396258] KeyboardInterrupt prevents return to Windows console Message-ID: <1237593096.29.0.70887724063.issue1396258@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Windows stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:52:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:52:33 +0000 Subject: [issue1395552] add support for thread function result storage Message-ID: <1237593153.43.0.290941421359.issue1395552@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 00:53:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 20 Mar 2009 23:53:04 +0000 Subject: [issue1394135] Deleting first item causes anydbm.first() to fail Message-ID: <1237593184.64.0.24225194525.issue1394135@psf.upfronthosting.co.za> Daniel Diniz added the comment: Cannot reproduce with dbhash on trunk (Linux). ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:14:35 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Mar 2009 00:14:35 +0000 Subject: [issue1324770] Adding redblack tree to collections module Message-ID: <1237594475.05.0.6453245892.issue1324770@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm curious what the use case is for this. It is not the purpose of the collections module to implement all possible storage techniques (b-trees, pairing heaps and whatnot). What problem is being solved? AFAICT, this offers a ordered dictionary style API without the restriction of hashability, instead using the typically much more expensive compare operation. Also, the big-oh times degrade from O(1) so that now we have O(log n) searches, insertions, and deletions. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:24:55 2009 From: report at bugs.python.org (Mark Hammond) Date: Sat, 21 Mar 2009 00:24:55 +0000 Subject: [issue1386675] _winreg specifies EnvironmentError instead of WindowsError Message-ID: <1237595095.12.0.94818285237.issue1386675@psf.upfronthosting.co.za> Mark Hammond added the comment: oops - this slipped off my radar. I agree with *both* Frederic and Tony :) The module promises to raise an EnvironmentError, which is does. However, the main killer from my POV is that a 'winerror' attribute is likely to be of interest, and this is only available if we promise a WindowsError. In other words, to write code which conformed to the docs, you would need to write: try: ... except WindowsError, exc: if exc.winerror==SOME_INTERESTING_CODE:... except EnvironmentError, exc: # hrmph.. The second except clause is not actually necessary based on the impl, but is according to the docs. For this reason I'd be happy to update the docs to reflect the implementation reality. ---------- assignee: mhammond -> fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:25:37 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:25:37 +0000 Subject: [issue1434090] DOM tree inconsistency in expat XML parser Message-ID: <1237595137.26.0.471880023649.issue1434090@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy, patch stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:25:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:25:44 +0000 Subject: [issue1432343] Description of file-object read() method is wrong. Message-ID: <1237595144.15.0.373077848592.issue1432343@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:25:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:25:50 +0000 Subject: [issue1425127] os.remove OSError: [Errno 13] Permission denied Message-ID: <1237595150.69.0.530874794249.issue1425127@psf.upfronthosting.co.za> Daniel Diniz added the comment: Needs confirmation with recent versions, has nice tests. ---------- components: +Windows -None nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:25:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:25:52 +0000 Subject: [issue1422094] email.MIME*.as_string removes duplicate spaces Message-ID: <1237595152.82.0.105126241591.issue1422094@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:25:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:25:56 +0000 Subject: [issue1413379] Popened file object close hangs in latest Cygwin update Message-ID: <1237595156.31.0.318913551697.issue1413379@psf.upfronthosting.co.za> Daniel Diniz added the comment: Needs confirmation for recent versions. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:26:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:26:01 +0000 Subject: [issue1412448] Compile under mingw properly Message-ID: <1237595161.94.0.836876431931.issue1412448@psf.upfronthosting.co.za> Daniel Diniz added the comment: Will close unless someone can salvage this patch for supported versions, addressing Martin's review. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> patch review status: open -> pending type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:27:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:27:33 +0000 Subject: [issue1436206] CGIHTTPServer doesn't handle path names with embeded space Message-ID: <1237595253.64.0.963014188165.issue1436206@psf.upfronthosting.co.za> Daniel Diniz added the comment: See issue 1535504 for patch. ---------- dependencies: +CGIHTTPServer doesn't handle path names with embeded space nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:31:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:31:23 +0000 Subject: [issue1535504] CGIHTTPServer doesn't handle path names with embeded space Message-ID: <1237595483.93.0.395089633444.issue1535504@psf.upfronthosting.co.za> Daniel Diniz added the comment: Issue 1681674 was closed as won't fix, so IIUC this patch won't work. ---------- dependencies: +subprocess.Popen fails with socket._fileobject on Windows nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:36:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:36:33 +0000 Subject: [issue1439312] Patch for bug 1438185: os.renames deletes junction points Message-ID: <1237595793.1.0.60829285184.issue1439312@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:36:36 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:36:36 +0000 Subject: [issue1438480] shutil.move raises OSError when copystat fails Message-ID: <1237595796.28.0.812040538167.issue1438480@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:36:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:36:41 +0000 Subject: [issue1438185] os.renames() crashes NTFS junctions Message-ID: <1237595801.07.0.687230239237.issue1438185@psf.upfronthosting.co.za> Daniel Diniz added the comment: Issue 1439312 has a patch. ---------- dependencies: +os.renames() crashes NTFS junctions nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:36:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:36:44 +0000 Subject: [issue1437051] "continue" in .pdbrc has no effect Message-ID: <1237595804.45.0.108198614273.issue1437051@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:36:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:36:50 +0000 Subject: [issue1436346] yday in datetime module Message-ID: <1237595810.44.0.240822185007.issue1436346@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:44:43 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Mar 2009 00:44:43 +0000 Subject: [issue1326448] set.__getstate__ is not overriden Message-ID: <1237596283.85.0.177791810559.issue1326448@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Am going to close this one. Subclassers have the option of overriding __reduce__ to control pickling. My reading of the docs shows no guarantees that builtin types won't use __reduce__. Since this has been out for a good while, there doesn't seem to be a way to shift away from reduce without breaking existing pickles. It's unfortunate that pickling provides so many different hooks and they don't all play nice with one another. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:45:36 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:45:36 +0000 Subject: [issue1445781] install fails on hard link Message-ID: <1237596336.41.0.834183454117.issue1445781@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:45:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:45:44 +0000 Subject: [issue1443875] email/charset.py convert() patch Message-ID: <1237596344.22.0.592227148889.issue1443875@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:45:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:45:47 +0000 Subject: [issue1443866] email 3.0+ stops parsing headers prematurely Message-ID: <1237596347.69.0.433969921792.issue1443866@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:45:51 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:45:51 +0000 Subject: [issue1442493] IDLE shell window gets very slow when displaying long lines Message-ID: <1237596351.55.0.255058550433.issue1442493@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +Squeezer - squeeze large output in the interpreter stage: -> test needed type: -> performance versions: +Python 2.6, Python 3.0 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 01:45:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 00:45:55 +0000 Subject: [issue1441984] Multiple simultaneous sendtos on AF_UNIX socket broken. Message-ID: <1237596355.32.0.886534915574.issue1441984@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 02:35:45 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 01:35:45 +0000 Subject: [issue1457119] Unifying pickle and cPickle exception class hierarchies Message-ID: <1237599345.97.0.843073452399.issue1457119@psf.upfronthosting.co.za> Daniel Diniz added the comment: Almost fooled me, still as described on trunk: >>>help(cPickle.UnpickleableError) Help on class UnpickleableError in module cPickle: class UnpickleableError(PicklingError) [...] >>> help(pickle.PicklingError) Help on class PicklingError in module pickle: class PicklingError(PickleError) >>> try: cPickle.dumps(tb) ... except pickle.PicklingError: print 1 ... Traceback (most recent call last): File "", line 1, in cPickle.UnpickleableError: Cannot pickle objects ---------- components: +Library (Lib) nosy: +ajaksu2 stage: -> test needed type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 02:35:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 01:35:50 +0000 Subject: [issue1449496] Python should use 3GB Address Space on Windows Message-ID: <1237599350.21.0.817785518561.issue1449496@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 02:35:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 01:35:54 +0000 Subject: [issue1448060] gettext.py breaks on plural-forms header (PATCH) Message-ID: <1237599354.79.0.644210020387.issue1448060@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 02:36:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 01:36:04 +0000 Subject: [issue1446619] extended slice behavior inconsistent with docs Message-ID: <1237599364.72.0.61383859987.issue1446619@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> georg.brandl components: +Documentation -None nosy: +georg.brandl stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 02:36:00 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 01:36:00 +0000 Subject: [issue1447945] Unable to stringify datetime with tzinfo Message-ID: <1237599360.62.0.66420517656.issue1447945@psf.upfronthosting.co.za> Daniel Diniz added the comment: So, won't fix? :) ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior versions: +3rd party -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:02:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:02:13 +0000 Subject: [issue1470540] XMLGenerator creates a mess with UTF-16 Message-ID: <1237600933.04.0.725629849626.issue1470540@psf.upfronthosting.co.za> Daniel Diniz added the comment: Patch on issue 1470548. ---------- dependencies: +Bugfix for #1470540 (XMLGenerator cannot output UTF-16) nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:02:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:02:41 +0000 Subject: [issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16) Message-ID: <1237600961.32.0.291714145834.issue1470548@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:02:53 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:02:53 +0000 Subject: [issue1459279] sgmllib.SGMLparser and hexadecimal numeric character refs Message-ID: <1237600973.47.0.841053652816.issue1459279@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:03:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:03:01 +0000 Subject: [issue1459867] convenient Message.as_string to use mangle_from_=unixfrom ? Message-ID: <1237600981.69.0.239498132232.issue1459867@psf.upfronthosting.co.za> Daniel Diniz added the comment: I can't understand the problem :/ ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:03:07 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:03:07 +0000 Subject: [issue1462440] socket and threading: udp multicast setsockopt fails Message-ID: <1237600987.13.0.551403607614.issue1462440@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Extension Modules stage: -> needs patch title: udp multicast setsockopt fails -> socket and threading: udp multicast setsockopt fails type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:03:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:03:11 +0000 Subject: [issue1465554] Cygwin installer should create a link to libpython2.5.dll.a Message-ID: <1237600991.68.0.00418771423607.issue1465554@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek components: +Distutils nosy: +tarek stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:03:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:03:27 +0000 Subject: [issue1465646] test_grp & test_pwd fail Message-ID: <1237601007.65.0.429125451416.issue1465646@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tests -None type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:03:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:03:33 +0000 Subject: [issue1465838] HP-UX11i: illegal combination of compilation and link flags Message-ID: <1237601013.14.0.340624964925.issue1465838@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Build stage: -> test needed type: -> crash versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:03:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:03:38 +0000 Subject: [issue1466065] base64 module ignores non-alphabet characters Message-ID: <1237601018.75.0.44063566727.issue1466065@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:03:46 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:03:46 +0000 Subject: [issue1468223] Hitting CTRL-C while in a loop closes IDLE on cygwin Message-ID: <1237601026.53.0.631561808176.issue1468223@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:03:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:03:52 +0000 Subject: [issue1469629] __dict__ = self in subclass of dict causes a memory leak? Message-ID: <1237601032.3.0.100473373134.issue1469629@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Interpreter Core -None stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:07:25 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Mar 2009 02:07:25 +0000 Subject: [issue1469629] __dict__ = self in subclass of dict causes a memory leak? Message-ID: <1237601245.91.0.267816477941.issue1469629@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:13:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:13:28 +0000 Subject: [issue1472251] pdb 'run' crashes when the it's first argument is non-string Message-ID: <1237601608.44.0.998420518358.issue1472251@psf.upfronthosting.co.za> Daniel Diniz added the comment: Issue 1472257 was rejected. ---------- dependencies: +pdb: fix for #1472251('run/runeval' commands bug) nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:13:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:13:38 +0000 Subject: [issue1471985] mimetools module getencoding error Message-ID: <1237601618.16.0.937856551028.issue1471985@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None stage: -> test needed title: mimetools module getencoding error -> mimetools module getencoding error type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:20:00 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:20:00 +0000 Subject: [issue1448060] gettext.py breaks on plural-forms header (PATCH) Message-ID: <1237602000.62.0.146397608143.issue1448060@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +patch fixing #1448060 (gettext.py bug) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:20:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:20:56 +0000 Subject: [issue1475692] replacing obj.__dict__ with a subclass of dict Message-ID: <1237602056.48.0.265748937193.issue1475692@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed, is this a valid issue? ---------- nosy: +ajaksu2 stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:21:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:21:01 +0000 Subject: [issue1475523] patch fixing #1448060 (gettext.py bug) Message-ID: <1237602061.04.0.234601169022.issue1475523@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review type: -> behavior versions: +Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:22:45 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:22:45 +0000 Subject: [issue1475397] compute/doc %z os-indep., time.asctime_tz / _TZ Message-ID: <1237602165.56.0.240473283072.issue1475397@psf.upfronthosting.co.za> Daniel Diniz added the comment: Could you provide a test case and clearer description of your feature request? ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:22:57 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:22:57 +0000 Subject: [issue1473979] test test_capi crashed -- thread.error: can't allocate lock Message-ID: <1237602177.66.0.827072709253.issue1473979@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tests stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:44:30 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:44:30 +0000 Subject: [issue1477450] test_bsddb skipped -- Failed to load on HP-UX 11.2i Message-ID: <1237603470.18.0.00695078983881.issue1477450@psf.upfronthosting.co.za> Daniel Diniz added the comment: I guess this isn't a valid issue, then? ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:44:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:44:50 +0000 Subject: [issue1479626] Uninstall does not clean registry Message-ID: <1237603490.45.0.211778179312.issue1479626@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed title: Uninstall does not clearn registry -> Uninstall does not clean registry type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:44:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:44:55 +0000 Subject: [issue1481032] patch smtplib:when SMTPDataError, rset crashes with sslerror Message-ID: <1237603495.18.0.479407095843.issue1481032@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:44:58 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:44:58 +0000 Subject: [issue1485576] Backwards compatibility support for Py_ssize_t Message-ID: <1237603498.12.0.906131655113.issue1485576@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:45:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:45:03 +0000 Subject: [issue1486713] HTMLParser : A auto-tolerant parsing mode Message-ID: <1237603503.99.0.64312569267.issue1486713@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:45:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:45:14 +0000 Subject: [issue1487481] Could BIND_FIRST be removed on HP-UX? Message-ID: <1237603514.16.0.449179637291.issue1487481@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:45:29 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:45:29 +0000 Subject: [issue1488906] endless loop in PyCFunction_Fini() Message-ID: <1237603529.26.0.176742107014.issue1488906@psf.upfronthosting.co.za> Daniel Diniz added the comment: Linked bug is closed as 'fixed by update': they were not able to reproduce this on 2.5. I'll close this unless someone opposes. ---------- nosy: +ajaksu2 priority: normal -> low status: open -> pending type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:45:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:45:38 +0000 Subject: [issue1488943] difflib.Differ() doesn't always add hints for tab characters Message-ID: <1237603538.59.0.229875117704.issue1488943@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> patch review type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:45:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:45:55 +0000 Subject: [issue1489246] 2.4.3 fails to find Tcl/Tk on Solaris 10 x86_64 Message-ID: <1237603555.27.0.453343976194.issue1489246@psf.upfronthosting.co.za> Daniel Diniz added the comment: Looks like a works for me. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed title: 2.4.3 fails to find Tcl/Tk on Solaris 10 x86_64 -> 2.4.3 fails to find Tcl/Tk on Solaris 10 x86_64 type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:46:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:46:04 +0000 Subject: [issue1491804] Simple slice support for list.sort() and .reverse() Message-ID: <1237603564.49.0.505408264594.issue1491804@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:46:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:46:21 +0000 Subject: [issue1491431] distutils.filelist.glob_to_re fails Message-ID: <1237603581.17.0.0398572370082.issue1491431@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek components: +Distutils nosy: +tarek stage: -> test needed title: glob_to_re problems -> distutils.filelist.glob_to_re fails type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:46:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:46:28 +0000 Subject: [issue1492240] Socket-object convenience function: getpeercred(). Message-ID: <1237603588.44.0.734813485204.issue1492240@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:46:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:46:38 +0000 Subject: [issue1492704] distinct error type from shutil.move() Message-ID: <1237603598.54.0.0499544180321.issue1492704@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:47:09 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:47:09 +0000 Subject: [issue1492860] Integer bit operations performance improvement. Message-ID: <1237603629.22.0.500885232651.issue1492860@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:47:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:47:19 +0000 Subject: [issue1494595] sys.getrefcount should be in gc Message-ID: <1237603639.8.0.318456239625.issue1494595@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:47:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 02:47:34 +0000 Subject: [issue1495229] W3C <-> Python DOM type mapping docs need updating Message-ID: <1237603654.68.0.229190118436.issue1495229@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low type: -> feature request versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 03:51:00 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 21 Mar 2009 02:51:00 +0000 Subject: [issue1296434] Call by object reference sometimes call by value Message-ID: <1237603860.0.0.393491819643.issue1296434@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Agreed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:10:24 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 21 Mar 2009 03:10:24 +0000 Subject: [issue1494595] sys.getrefcount should be in gc Message-ID: <1237605024.56.0.714743652979.issue1494595@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm rejecting this because the its too late to change this in Py3k. If thee was some Python-dev agreement to make an alias, then please reopen. ---------- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:22:43 2009 From: report at bugs.python.org (Brett Cannon) Date: Sat, 21 Mar 2009 03:22:43 +0000 Subject: [issue5529] Backport sys module docs involving import to 2.7 In-Reply-To: <1237605762.97.0.593625711393.issue5529@psf.upfronthosting.co.za> Message-ID: <1237605762.97.0.593625711393.issue5529@psf.upfronthosting.co.za> New submission from Brett Cannon : The updated documentation in py3k involving the sys module and imports (meta_path, path_hooks, and path_importer_cache) should get backported to trunk. Slightly involved since there are glossary term references that have not been backported. ---------- assignee: georg.brandl components: Documentation messages: 83917 nosy: brett.cannon, georg.brandl priority: low severity: normal stage: needs patch status: open title: Backport sys module docs involving import to 2.7 type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:22:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:22:56 +0000 Subject: [issue3744] make altinstall installs pydoc instead of pydoc3.0 In-Reply-To: <1220254701.93.0.57934772161.issue3744@psf.upfronthosting.co.za> Message-ID: <1237605776.89.0.511400933072.issue3744@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +make altinstall installs pydoc instead of pydoc3.0 stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:23:09 2009 From: report at bugs.python.org (Brett Cannon) Date: Sat, 21 Mar 2009 03:23:09 +0000 Subject: [issue5529] Backport sys module docs involving import to 2.7 In-Reply-To: <1237605762.97.0.593625711393.issue5529@psf.upfronthosting.co.za> Message-ID: <1237605789.48.0.942869971695.issue5529@psf.upfronthosting.co.za> Brett Cannon added the comment: Unassigning Georg as he does not need to do this if he doesn't want to. ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:24:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:24:38 +0000 Subject: [issue1495488] make altinstall installs pydoc Message-ID: <1237605878.99.0.703995747992.issue1495488@psf.upfronthosting.co.za> Daniel Diniz added the comment: Seems to have resurfaced on 3.0, see issue 3744. ---------- components: +Installation nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:25:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:25:08 +0000 Subject: [issue1467619] Header.decode_header eats up spaces Message-ID: <1237605908.93.0.117553849264.issue1467619@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:25:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:25:38 +0000 Subject: [issue1436203] getpass.getpass() should allow Unicode prompts Message-ID: <1237605938.09.0.361051016923.issue1436203@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:25:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:25:43 +0000 Subject: [issue1433886] pointer aliasing causes core dump, with workaround Message-ID: <1237605943.18.0.0832368503028.issue1433886@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> crash versions: -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:25:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:25:49 +0000 Subject: [issue1471934] Python libcrypt build problem on Solaris 8 Message-ID: <1237605949.02.0.228676875407.issue1471934@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> compile error versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:26:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:26:39 +0000 Subject: [issue1503502] Pdb doesn't call flush on its stdout file descriptor Message-ID: <1237605999.53.0.79794096326.issue1503502@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:38:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:38:43 +0000 Subject: [issue1495802] cygwin: popen3 lock up Message-ID: <1237606723.95.0.417949752674.issue1495802@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:38:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:38:49 +0000 Subject: [issue1497532] C API to retain GIL during Python Callback Message-ID: <1237606729.29.0.626670076966.issue1497532@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:38:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:38:49 +0000 Subject: [issue1498363] Improve super() objects support for implicit method calls Message-ID: <1237606729.65.0.144703863611.issue1498363@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:38:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:38:54 +0000 Subject: [issue1498930] Generate from Unicode database instead of manualy coding. Message-ID: <1237606734.2.0.630675872306.issue1498930@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:39:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:39:03 +0000 Subject: [issue1500773] wm_attributes doesn't take keyword arguments Message-ID: <1237606743.24.0.0420452068106.issue1500773@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:39:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:39:11 +0000 Subject: [issue1500504] Alternate RFC 3986 compliant URI parsing module Message-ID: <1237606751.24.0.304129932914.issue1500504@psf.upfronthosting.co.za> Daniel Diniz added the comment: I'll collect open issues that would be solved by this. ---------- components: +Library (Lib) -None nosy: +ajaksu2 stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:39:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:39:38 +0000 Subject: [issue1501108] Add write buffering to gzip Message-ID: <1237606778.79.0.927985446941.issue1501108@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +ajaksu2 stage: -> needs patch versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:40:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:40:03 +0000 Subject: [issue1502517] crash in expat when compiling with --enable-profiling Message-ID: <1237606803.14.0.217936705003.issue1502517@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> crash versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:41:15 2009 From: report at bugs.python.org (Jess Austin) Date: Sat, 21 Mar 2009 03:41:15 +0000 Subject: [issue5520] refactor test_datetime.py In-Reply-To: <1237495793.7.0.375370531619.issue5520@psf.upfronthosting.co.za> Message-ID: <1237606875.55.0.363055951534.issue5520@psf.upfronthosting.co.za> Changes by Jess Austin : Added file: http://bugs.python.org/file13385/test_datetime.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:41:39 2009 From: report at bugs.python.org (Jess Austin) Date: Sat, 21 Mar 2009 03:41:39 +0000 Subject: [issue5520] refactor test_datetime.py In-Reply-To: <1237495793.7.0.375370531619.issue5520@psf.upfronthosting.co.za> Message-ID: <1237606899.03.0.662329047531.issue5520@psf.upfronthosting.co.za> Changes by Jess Austin : Removed file: http://bugs.python.org/file13376/test_datetime.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:43:40 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:43:40 +0000 Subject: [issue1501979] syntax errors on continuation lines Message-ID: <1237607020.2.0.107418113101.issue1501979@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 04:45:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 21 Mar 2009 03:45:14 +0000 Subject: [issue1503789] Cannot write source code in UTF16 Message-ID: <1237607114.63.0.522834671404.issue1503789@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> georg.brandl components: +Unicode nosy: +georg.brandl, haypo stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 06:02:41 2009 From: report at bugs.python.org (Jess Austin) Date: Sat, 21 Mar 2009 05:02:41 +0000 Subject: [issue5530] datetime class names should obey PEP 8 CapWords convention In-Reply-To: <1237611761.05.0.556904304127.issue5530@psf.upfronthosting.co.za> Message-ID: <1237611761.05.0.556904304127.issue5530@psf.upfronthosting.co.za> New submission from Jess Austin : Class names that comply with the CapWords naming convention described in PEP 8 (http://www.python.org/dev/peps/pep-0008/) are preferred. See the recent discussion that included the BDFL's recommendations at http://mail.python.org/pipermail/python-dev/2009-March/086684.html. Per those recommendations, the attached patch updates every class to expose a CapWords name to python: datetime.timedelta --> datetime.TimeDelta datetime.date --> datetime.Date datetime.tzinfo --> datetime.TZInfo datetime.time --> datetime.Time datetime.datetime --> datetime.DateTime In addition, the old lowercase names are reproduced as derived classes, the methods of which throw PendingDeprecationWarning, and the docstrings of which advise using the new CapWords class names. The test_datetime.py unit test is updated to check for proper functionality and for the presence of the pending deprecation warnings. (This patch relies on the previously-submitted refactoring patch attached to Issue 5520, http://bugs.python.org/issue5520.) Various other tests and support files are updated to use the new CapWords class names. The current patch still fails one test in test_datetime.py, due to previously-existing Issue 5516, http://bugs.python.org/issue5516. This patch includes no documentation updates. ---------- components: Library (Lib) files: pending_dep.diff keywords: patch messages: 83921 nosy: jess.austin severity: normal status: open title: datetime class names should obey PEP 8 CapWords convention type: behavior versions: Python 3.1 Added file: http://bugs.python.org/file13386/pending_dep.diff _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Mar 21 08:46:36 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sat, 21 Mar 2009 07:46:36 +0000 Subject: [issue4911] Windows installer Quad processor issues Message-ID: <1237621596.95.0.258079172371.issue4911@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you please run the Python installer with msiexec /i python.msi /l*v python.log and compress and attach the resulting log file? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Mar 21 08:46:54 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sat, 21 Mar 2009 07:46:54 +0000 Subject: [issue4735] An error occurred during the installation of assembly In-Reply-To: <1230086140.51.0.868984437874.issue4735@psf.upfronthosting.co.za> Message-ID: <1237621614.52.0.109865746827.issue4735@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you please run the Python installer with msiexec /i python.msi /l*v python.log and compress and attach the resulting log file? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 09:58:53 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 21 Mar 2009 08:58:53 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1237625933.12.0.413112238203.issue5251@psf.upfronthosting.co.za> Nick Coghlan added the comment: Reclassifying as a documentation bug, since PEP 377 was rejected by Guido. ---------- components: +Documentation -None _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 10:40:09 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 21 Mar 2009 09:40:09 +0000 Subject: [issue1498930] Generate from Unicode database instead of manualy coding. Message-ID: <1237628409.49.0.0191517288557.issue1498930@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: You may not know it, but these functions are generated from the Unicode database. However, because these functions need to be fast and are small enough, they were not converted to the unicodetype_db approach and instead left as they were originally implemented: as switch statements for the compilers to optimize. Is there any reason why this would need to change for Unicode 5.0 ? ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 10:45:31 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 21 Mar 2009 09:45:31 +0000 Subject: [issue1337876] Inconsistent use of buffer interface in string and unicode Message-ID: <1237628731.69.0.4567024146.issue1337876@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: This looks like a useful addition for Python 2.x - not sure about 3.x, since that doesn't have the 2.x buffer interface anymore. Phil, could you update the patch for Python 2.7. ---------- nosy: +lemburg versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 10:52:37 2009 From: report at bugs.python.org (Tim Cuthbertson) Date: Sat, 21 Mar 2009 09:52:37 +0000 Subject: [issue5531] unittest: allow failures in tearDown method In-Reply-To: <1237629157.74.0.0990473218389.issue5531@psf.upfronthosting.co.za> Message-ID: <1237629157.74.0.0990473218389.issue5531@psf.upfronthosting.co.za> New submission from Tim Cuthbertson : This patch adds the behaviour that when a unittest.failureException is thrown in a TestCase's tearDown method, the test case is added to the failures list (instead of the errors list, and only when the test case body has passed successfully). In some circumstances, tests may want to assert that something happens at some point during the body of a test, and the best time to make these checks can be in the tearDown method. This is a modification I've made during development of my mocktest library (https://github.com/gfxmonk/mocktest/tree), and I believe it is beneficial to have as the default unittest behaviour. ---------- components: Extension Modules files: unittest-fail-on-teardown-0.patch keywords: patch messages: 83927 nosy: gfxmonk severity: normal status: open title: unittest: allow failures in tearDown method versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13387/unittest-fail-on-teardown-0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 10:55:36 2009 From: report at bugs.python.org (kxroberto) Date: Sat, 21 Mar 2009 09:55:36 +0000 Subject: [issue1475397] compute/doc %z os-indep., time.asctime_tz / _TZ Message-ID: <1237629336.62.0.686149244031.issue1475397@psf.upfronthosting.co.za> kxroberto added the comment: (I'm somewhat away from all that currently - and not aware if newest Python versions already solved but:) * a "time.asctime_tz([tim])" or so should deliver a full OS-indep. _world_ time string incl. numeric timezone info like "Sat Mar 21 10:33:36 2009 +0000" It should accept a 10-tuple (like urlopen_file.info().getdate_tz('date'), or a time.time() float time, or interpret a 9-tuple as GMTIME/UTC. * strftime("%z") should be supported on all OS - _constant numeric_ format "+0000" * strftime("%C",[tim]) should be like asctime_tz. it should accept as 2nd parameter a 10-tuple alternatively, or a time.time() universal float time, or interpret the 9-tuple as LOCALTIME as it were. test cases to add: * simple render a variation of constant tuples/float_times to constant result strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 10:58:25 2009 From: report at bugs.python.org (kxroberto) Date: Sat, 21 Mar 2009 09:58:25 +0000 Subject: [issue1475397] time.asctime_tz, time.strftime %z %C Message-ID: <1237629505.43.0.294790000811.issue1475397@psf.upfronthosting.co.za> Changes by kxroberto : ---------- title: compute/doc %z os-indep., time.asctime_tz / _TZ -> time.asctime_tz, time.strftime %z %C _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 11:06:05 2009 From: report at bugs.python.org (kxroberto) Date: Sat, 21 Mar 2009 10:06:05 +0000 Subject: [issue1459867] Message.as_string should use "mangle_from_=unixfrom"? Message-ID: <1237629965.86.0.105867193756.issue1459867@psf.upfronthosting.co.za> kxroberto added the comment: "g = Generator(fp,mangle_from_=unixfrom)" in that code location below? It produced exceptions often when message lines (or headerlines e.g. Subject also when I remember right) begin with the char ">" or so. --- Message.py.orig 2004-12-22 16:01:38.000000000 +0100 +++ Message.py 2006-03-28 10:59:42.000000000 +0200 @@ -126,7 +126,7 @@ """ from email.Generator import Generator fp = StringIO() - g = Generator(fp) + g = Generator(fp,mangle_from_=unixfrom) g.flatten(self, unixfrom=unixfrom) return fp.getvalue() ---------- title: convenient Message.as_string to use mangle_from_=unixfrom ? -> Message.as_string should use "mangle_from_=unixfrom"? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 11:10:17 2009 From: report at bugs.python.org (Tim Cuthbertson) Date: Sat, 21 Mar 2009 10:10:17 +0000 Subject: [issue5531] unittest: allow failures in tearDown method In-Reply-To: <1237629157.74.0.0990473218389.issue5531@psf.upfronthosting.co.za> Message-ID: <1237630217.07.0.51430170671.issue5531@psf.upfronthosting.co.za> Tim Cuthbertson added the comment: updated patch: made the test method name unique (oops), and added the specific test case where both test body and tearDown raise failure exceptions. This patch supercedes the original (v0) ---------- Added file: http://bugs.python.org/file13388/unittest-fail-on-teardown-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 11:40:41 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 21 Mar 2009 10:40:41 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1237632041.31.0.316368409107.issue5463@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks! Committed your patch in r70497. I think _PY_STRUCT_RANGE_CHECKING can also be removed from the module and the tests (treated as though it's 1 throughout). In theory there could be people using it, but it's not documented and the leading underscore in the name clearly indicates that its supposed to be private, so I think it's safe to remove. It looks like it was there just to enable some extra tests (tests that were broken with earlier versions of the struct module thanks to struct bugs). I agree that we should bump the version number once we're done here. I really appreciate this work: the struct module has been in need of cleanup for a while. Thank you again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 11:48:17 2009 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Mar 2009 10:48:17 +0000 Subject: [issue5524] execfile() removed from Python3 In-Reply-To: <1237514044.93.0.31573705804.issue5524@psf.upfronthosting.co.za> Message-ID: <1237632497.55.0.0906232653352.issue5524@psf.upfronthosting.co.za> STINNER Victor added the comment: >> Ok... but there is the newline issue: (self quote) >> "exec() doesn't support newline different than \n, >> see issue #4628". > So that issue should get fixed, then. Ok, I will work in the other other issue. If #4628 is fixed, this issue becomes meaningless ;-) ---------- dependencies: +No universal newline support for compile() when using bytes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 11:51:37 2009 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Mar 2009 10:51:37 +0000 Subject: [issue4282] profile doesn't support non-UTF8 source code In-Reply-To: <1226112572.15.0.185589671168.issue4282@psf.upfronthosting.co.za> Message-ID: <1237632697.8.0.381007686917.issue4282@psf.upfronthosting.co.za> STINNER Victor added the comment: After some discussions, I think that my first patch (profile_encoding.patch) was correct but we also have to fix #4628. ---------- dependencies: +No universal newline support for compile() when using bytes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 11:53:43 2009 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Mar 2009 10:53:43 +0000 Subject: [issue1503789] Cannot write source code in UTF16 Message-ID: <1237632823.66.0.0654775838482.issue1503789@psf.upfronthosting.co.za> STINNER Victor added the comment: Detect UTF-16 and UTF-32 is complex. I think that we can first support UTF-16LE, UTF-16BE, UTF-32LE and UTF-32BE with BOM. Most editors add a BOM (eg. notepad.exe on Windows). I will try to fix this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 12:08:03 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 21 Mar 2009 11:08:03 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237633683.45.0.60745713648.issue2531@psf.upfronthosting.co.za> Mark Dickinson added the comment: > My complaint is that it is silently wrong. I appreciate that, but I don't see any good solution. Yes, it would be nice if float <-> Decimal comparisons raised TypeError in 2.x. But Python 2.x has an '(almost) everything is comparable to everything else' comparison model, so that for example a list of arbitrary Python objects can almost always be sorted. So raising a TypeError for these comparisons has the potential to break already existing code. Of course, it *might* not cause any breakage at all, but it's difficult to see how one could ever be sure of that. I think the best we can do would be to add a warning for float <-> Decimal comparisons. Facundo, Raymond: does this seem reasonable? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 13:38:03 2009 From: report at bugs.python.org (webograph) Date: Sat, 21 Mar 2009 12:38:03 +0000 Subject: [issue2706] datetime: define division timedelta/timedelta In-Reply-To: <1236719757.32.0.275185773952.issue2706@psf.upfronthosting.co.za> Message-ID: <49C4DFA5.2090005@eml.cc> webograph added the comment: i don't think this can be solved in a way that is independent of the chosen unit, as it requires a concept of "whole time-units" (as in "whole numbers"); whether these be seconds or minutes would be completely arbitrary. (`5 minutes % 3 = 0 minutes` would be true if based on seconds because `5 minutes = 3 * 100 seconds + 0 minutes` but `5 minutes % 3 = 2 minutes` based on minutes because `5 minutes = 3 * 1 minute + 2 minutes`.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 16:05:22 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 21 Mar 2009 15:05:22 +0000 Subject: [issue1492860] Integer bit operations performance improvement. Message-ID: <1237647922.2.0.372502079011.issue1492860@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 16:52:00 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 21 Mar 2009 15:52:00 +0000 Subject: [issue1492860] Integer bit operations performance improvement. Message-ID: <1237650720.67.0.789780977182.issue1492860@psf.upfronthosting.co.za> Mark Dickinson added the comment: To see what Tim's talking about here, see the 'big switch' ("switch opcode") in function PyEval_EvalFrameEx in Python/ceval.c, and look at the "case BINARY_ADD" bit. Inlining the bitwise operators should be even easier, since there are no overflow worries. (We do have to assume that C longs are two's-complement with no trap representation, but Objects/intobject.c does that already, so it's probably okay.) This only applies to 'short' integers, so I don't think it's relevant for Python 3.x. ---------- keywords: +easy stage: test needed -> needs patch versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 17:57:59 2009 From: report at bugs.python.org (Alan G) Date: Sat, 21 Mar 2009 16:57:59 +0000 Subject: [issue1296434] Call by object reference sometimes call by value Message-ID: <1237654679.35.0.50505663374.issue1296434@psf.upfronthosting.co.za> Alan G added the comment: Lol! After four years I could hardly claim to care anymore... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 18:02:38 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 21 Mar 2009 17:02:38 +0000 Subject: [issue1296434] Call by object reference sometimes call by value Message-ID: <1237654958.79.0.842444307398.issue1296434@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> works for me status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 18:38:09 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Mar 2009 17:38:09 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237657089.04.0.176370645377.issue2531@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think "the best we can do" is return valid comparison results between floats and decimals in 2.x. It doesn't make anything worse and it does make something better. Unlike other cross-type comparisons, number-to-number is not an unreasonable thing to do. And, we not obliged to carry that over to 3.x where cross-type comparisons have to be specifically enabled. I believe this is the best solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 18:42:21 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Mar 2009 17:42:21 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237657341.9.0.0448580091797.issue2531@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The next to last sentence should have read "and, we are not obliged to carry that over to 3.x where cross-type ordering comparisons are not the norm unless a type has specifically enabled them." The gist of the idea is that in 2.x, we do have cross-type ordering comparisons so we should make them as useful and non-misleading as possible. But, in 3.x there is no default cross-type ordering comparisons so we're not obliged to return any answer at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 18:47:49 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 21 Mar 2009 17:47:49 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237657669.17.0.292431837256.issue2531@psf.upfronthosting.co.za> Mark Dickinson added the comment: What about Decimal <-> Fraction comparisons? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 18:58:48 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Mar 2009 17:58:48 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237658328.6.0.532867319186.issue2531@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It's not a priority for me though it's not an unreasonable thing to do. A basic 5th grade exercise is ordering fractions, sometimes with their decimal equivalents: Fraction(1,3) < Decimal('0.4') < Fraction(1,2). I don't care if that gets done. If you do decide to do fractions too, the responsibility should be with the fractions class (since decimals convert to fractions exactly but not vice-versa). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 19:10:46 2009 From: report at bugs.python.org (Michael Newman) Date: Sat, 21 Mar 2009 18:10:46 +0000 Subject: [issue5532] imap usage in itertools unique_justseen recipe In-Reply-To: <1237659046.24.0.591034615164.issue5532@psf.upfronthosting.co.za> Message-ID: <1237659046.24.0.591034615164.issue5532@psf.upfronthosting.co.za> New submission from Michael Newman : The recipe for "unique_justseen" listed on: http://docs.python.org/3.0/library/itertools.html uses "imap", which is not available in Python 3.0. I fixed it by changing "imap" to just "map", and I also changing "itemgetter" to "operator.itemgetter" to make the namespace usage clearer in the recipe: Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from itertools import * >>> import operator >>> def unique_justseen(iterable, key=None): ... "List unique elements, preserving order. Remember only the element just seen." ... # unique_justseen('AAAABBBCCDAABBB') --> A B C D A B ... # unique_justseen('ABBCcAD', str.lower) --> A B C A D ... return map(next, map(operator.itemgetter(1), groupby(iterable, key))) ... >>> unique_justseen('AAAABBBCCDAABBB') >>> list(unique_justseen('AAAABBBCCDAABBB')) ['A', 'B', 'C', 'D', 'A', 'B'] >>> unique_justseen('ABBCcAD', str.lower) >>> list(unique_justseen('ABBCcAD', str.lower)) ['A', 'B', 'C', 'A', 'D'] >>> ---------- assignee: georg.brandl components: Documentation messages: 83943 nosy: georg.brandl, mnewman severity: normal status: open title: imap usage in itertools unique_justseen recipe versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 19:14:05 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 21 Mar 2009 18:14:05 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237659245.56.0.714751981913.issue2531@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. I'm still not 100% convinced this is a good idea. Part of my objection is that it seems likely that these comparisons are fairly useless, in that a mixed-type comparison is probably going to be followed by a mixed-type arithmetic operation at some point (unless people are misspelling "x < 0" as "x < 0.0"). So all that's really gained is a noisy failure instead of a silent one. Still, I suppose that's something. ---------- keywords: +patch resolution: rejected -> stage: -> patch review status: closed -> open versions: +Python 2.7 -Python 2.5, Python 2.6 Added file: http://bugs.python.org/file13389/float_decimal_comparisons.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 19:16:38 2009 From: report at bugs.python.org (Aristotelis Mikropoulos) Date: Sat, 21 Mar 2009 18:16:38 +0000 Subject: [issue5533] unittest can't deal with packages In-Reply-To: <1237659397.93.0.630701014314.issue5533@psf.upfronthosting.co.za> Message-ID: <1237659397.93.0.630701014314.issue5533@psf.upfronthosting.co.za> New submission from Aristotelis Mikropoulos : There is a problem with unittest, as it cannot handle package imports. This http://dpaste.com/17315/ proves it. ---------- components: Library (Lib) messages: 83945 nosy: Indy severity: normal status: open title: unittest can't deal with packages type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 19:22:15 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Sat, 21 Mar 2009 18:22:15 +0000 Subject: [issue5533] unittest can't deal with packages In-Reply-To: <1237659397.93.0.630701014314.issue5533@psf.upfronthosting.co.za> Message-ID: <1237659735.35.0.186569869783.issue5533@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: dpaste.com will eventually discard your proof. You should include all information for a bug report on the tracker. You can include the code in a comment or attach it to the ticket as a file. ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 19:27:13 2009 From: report at bugs.python.org (Aristotelis Mikropoulos) Date: Sat, 21 Mar 2009 18:27:13 +0000 Subject: [issue5533] unittest can't deal with packages In-Reply-To: <1237659397.93.0.630701014314.issue5533@psf.upfronthosting.co.za> Message-ID: <1237660033.07.0.553621179443.issue5533@psf.upfronthosting.co.za> Aristotelis Mikropoulos added the comment: You are right, here is the file. ---------- Added file: http://bugs.python.org/file13390/test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 19:44:51 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 21 Mar 2009 18:44:51 +0000 Subject: [issue5532] imap usage in itertools unique_justseen recipe In-Reply-To: <1237659046.24.0.591034615164.issue5532@psf.upfronthosting.co.za> Message-ID: <1237661091.37.0.540749133005.issue5532@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: georg.brandl -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 20:03:40 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 21 Mar 2009 19:03:40 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237662220.05.0.959441683103.issue2531@psf.upfronthosting.co.za> Mark Dickinson added the comment: On the other hand, if it's true that mixed-type comparisons are generally followed by mixed-type arithmetic, then these comparisons just become a roundabout way to raise TypeError, which is what everybody wanted in the first place. :-) The patch still needs docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 20:10:48 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Mar 2009 19:10:48 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237662648.61.0.79599403254.issue2531@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: marketdickinson -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 20:15:20 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Mar 2009 19:15:20 +0000 Subject: [issue5532] imap usage in itertools unique_justseen recipe In-Reply-To: <1237659046.24.0.591034615164.issue5532@psf.upfronthosting.co.za> Message-ID: <1237662920.77.0.077908584325.issue5532@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Benjamin, please revert r69354 which was an incorrect merge. ---------- assignee: rhettinger -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 21:37:20 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 21 Mar 2009 20:37:20 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237667840.45.0.825973851487.issue2531@psf.upfronthosting.co.za> Mark Dickinson added the comment: Urk. That patch produces horrible results when comparing Fractions and Decimals: Python 2.7a0 (unknown, Mar 21 2009, 17:59:48) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from fractions import Fraction >>> from decimal import Decimal >>> Decimal('2.5') == Fraction(5, 2) True >>> Decimal('1.1') == Fraction(11, 10) False Either both results should be True (if comparisons between Fractions and Decimals work numerically), or both should be False (refuse to compare Fraction and Decimal). It looks like what happens is that the Fraction comparison converts the second argument to float before comparing. I'm tempted to call this a bug in Fraction.__eq__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 21:41:36 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 21 Mar 2009 20:41:36 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237668096.7.0.585585412152.issue2531@psf.upfronthosting.co.za> Mark Dickinson added the comment: One more consideration: if Decimal('2.5') == 2.5 is True, should we also be fixing the Decimal hash method so that hash(Decimal('2.5')) == hash(2.5)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 21:53:11 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Mar 2009 20:53:11 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1237668791.58.0.557712096442.issue2531@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll look at this more later today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 21 23:19:34 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 21 Mar 2009 22:19:34 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237673974.24.0.190474700384.issue5512@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch. Lots of cleanup, but only one significant change: the inner loop now uses signed arithmetic instead of unsigned arithmetic. This saves a negation and fixes a subtle bug: the previous inner loop code was incorrect when using 15-bit digits on machines with sizeof(short) == sizeof(long). Not that I know of any such machines: the Cray T3E famously has no 16-bit integer type, but there sizeof(short) is 4 and sizeof(long) is 8. A few more timings, this time from doing a single huge integer division: 10**1000000//10**500000 (so this effectively times just the inner loop, since all else will be insignificant). All timings are best-of-5, from non-debug builds of py3k, on the same system: OS X 10.5.6/2.4 GHz Core 2 Duo. Times in brackets are the approximate per-inner-loop times (remembering that there are 4 times as many iterations of the inner loop for 15-bit digits). 32-bit build, 15-bit digits, unpatched: 92382.2 ms (~7.5 ns) 32-bit build, 15-bit digits, patched: 36473.3 ms (~3.0 ns) 64-bit build, 30-bit digits, unpatched: 14581.4 ms (~4.8 ns) 64-bit build, 30-bit digits, patched: 7385.1 ms (~2.4 ns) ... and just for fun, the other combinations: 64-bit build, 15-bit digits, unpatched: 61927.5 ms (~5.1 ns) 64-bit build, 15-bit digits, patched: 43632.9 ms (~3.6 ns) 32-bit build, 30-bit digits, unpatched: 62374.1 ms (~20.3 ns) 32-bit build, 30-bit digits, patched: 26928.3 ms (~8.8 ns) Thanks for the updated pidigits script, Victor! Maybe this is too small right now to be worth including in the Tools directory, but I hope we can fatten it up with some other benchmarks. What do you think? ---------- Added file: http://bugs.python.org/file13391/faster_integer_division2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 00:14:06 2009 From: report at bugs.python.org (Luca clementi) Date: Sat, 21 Mar 2009 23:14:06 +0000 Subject: [issue5525] Problem with email.MIME* library, using wrong new line In-Reply-To: <1237518711.23.0.918881027535.issue5525@psf.upfronthosting.co.za> Message-ID: <1237677246.63.0.353071522248.issue5525@psf.upfronthosting.co.za> Luca clementi added the comment: I forgot to say that the \n should be substitute with \r\n CRLF Luca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 04:30:19 2009 From: report at bugs.python.org (Brett Cannon) Date: Sun, 22 Mar 2009 03:30:19 +0000 Subject: [issue5531] unittest: allow failures in tearDown method In-Reply-To: <1237629157.74.0.0990473218389.issue5531@psf.upfronthosting.co.za> Message-ID: <1237692619.94.0.774842210183.issue5531@psf.upfronthosting.co.za> Brett Cannon added the comment: So I disagree with this idea. The point of a tearDown method is simply to clean up, not to test for a failure. If the test failed because it didn't complete a test and clean up after itself then the test should fail explicitly, not have the tearDown do it for the test. ---------- components: +Library (Lib) -Extension Modules nosy: +brett.cannon stage: -> patch review type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 06:26:12 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 22 Mar 2009 05:26:12 +0000 Subject: [issue5531] unittest: allow failures in tearDown method In-Reply-To: <1237629157.74.0.0990473218389.issue5531@psf.upfronthosting.co.za> Message-ID: <1237699572.53.0.820697531.issue5531@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Brett. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 06:33:22 2009 From: report at bugs.python.org (Tim Cuthbertson) Date: Sun, 22 Mar 2009 05:33:22 +0000 Subject: [issue5531] unittest: allow failures in tearDown method In-Reply-To: <1237629157.74.0.0990473218389.issue5531@psf.upfronthosting.co.za> Message-ID: <1237700002.4.0.697896774504.issue5531@psf.upfronthosting.co.za> Tim Cuthbertson added the comment: I agree that this is not normally the point of tearDown methods. However, allowing it reduces repetition when you want to verify that some invariant is not violated by any test. I also think that as far as the test writer is concerned, an assertion error is a failed test - regardless of where in the code it came from. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 06:51:42 2009 From: report at bugs.python.org (Lim Chee Aun) Date: Sun, 22 Mar 2009 05:51:42 +0000 Subject: [issue5381] json needs object_pairs_hook In-Reply-To: <1235723876.26.0.796036500228.issue5381@psf.upfronthosting.co.za> Message-ID: <1237701102.02.0.449786681054.issue5381@psf.upfronthosting.co.za> Changes by Lim Chee Aun : ---------- nosy: +cheeaun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 07:35:43 2009 From: report at bugs.python.org (Donald O'Donnell) Date: Sun, 22 Mar 2009 06:35:43 +0000 Subject: [issue5534] Decimal __format__ reverses meaning of '<' and '>' alignment specs In-Reply-To: <1237703743.06.0.452434230687.issue5534@psf.upfronthosting.co.za> Message-ID: <1237703743.06.0.452434230687.issue5534@psf.upfronthosting.co.za> New submission from Donald O'Donnell : decimal.py ver 2.6: line 5474 is "if align == '<':" s/b "if align == '>':" line 5476 is "if align == '>':" s/b "if align == '<':" decimal.py ver 3.01: line 5578 is "if align == '<':" s/b "if align == '>':" line 5580 is "if align == '>':" s/b "if align == '<':" ---------- components: Library (Lib) messages: 83958 nosy: donodonnell severity: normal status: open title: Decimal __format__ reverses meaning of '<' and '>' alignment specs type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 07:57:38 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 22 Mar 2009 06:57:38 +0000 Subject: [issue5534] Decimal __format__ reverses meaning of '<' and '>' alignment specs In-Reply-To: <1237703743.06.0.452434230687.issue5534@psf.upfronthosting.co.za> Message-ID: <1237705058.9.0.176192886542.issue5534@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> marketdickinson nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 08:37:34 2009 From: report at bugs.python.org (Andrew I MacIntyre) Date: Sun, 22 Mar 2009 07:37:34 +0000 Subject: [issue4753] Faster opcode dispatch on gcc In-Reply-To: <1230325778.98.0.752974375077.issue4753@psf.upfronthosting.co.za> Message-ID: <1237707454.52.0.135908815003.issue4753@psf.upfronthosting.co.za> Andrew I MacIntyre added the comment: Out of interest, the attached patch against the py3k branch at r70516 cleans up the threaded code changes a little: - gets rid of TARGET_WITH_IMPL macro; - TARGET(op) is followed by a colon, so that it looks like a label (for editors that make use of that). On my systems (all older AMD with old versions of gcc), this patch has performance slightly better than SVN r70516, and performance is usually very close to the NO_COMPUTED_GOTOS build. ---------- nosy: +aimacintyre Added file: http://bugs.python.org/file13392/ceval.c.threadcode-tidyup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 08:40:16 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 22 Mar 2009 07:40:16 +0000 Subject: [issue5534] Decimal __format__ reverses meaning of '<' and '>' alignment specs In-Reply-To: <1237703743.06.0.452434230687.issue5534@psf.upfronthosting.co.za> Message-ID: <1237707616.95.0.0249680425601.issue5534@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Mark, can you confirm that this is out of date? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 09:03:21 2009 From: report at bugs.python.org (Lukas Lueg) Date: Sun, 22 Mar 2009 08:03:21 +0000 Subject: [issue1497532] C API to retain GIL during Python Callback Message-ID: <1237709001.4.0.394251261912.issue1497532@psf.upfronthosting.co.za> Lukas Lueg added the comment: I'm not sure if such a API is feasible. The very nature of Python makes it impossible to tell in advance what the interpreter will do when getting called. This is even true for simple functions - think of your function getting decorated... Let's consider the following scenario: - Python-Thread 1 is already running and owns a lock on some object. While it still owns the lock, it releases the GIL. - We are executing in Python-Thread 2 and call from Python to C. The C function has the GIL, "locks" it and calls back to Python. - The Python function executes in the same thread, still having the GIL. It tries to acquire the lock on the same object as Thread 1. Preventing a deadlock between those two threads, it releases the GIL and waits for the object-lock. - The GIL is "locked" to the current thread and the current thread is the only one that we can allow to unlock it again; this narrows our options down to Py_BEGIN_ALLOW_THREADS becoming a No-Op in such situations. - Py_BEGIN_ALLOW_THREADS executed in the second C-function is silently ignored. Thread 2 waits for the object-lock with Thread 1 never having a chance to release it. - The interpreter just deadlocked. AFAICS we can't guarantee not to deadlock if there are other threads running before we lock the GIL to the current thread. ---------- nosy: +ebfe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 09:03:40 2009 From: report at bugs.python.org (Pierre Hanser) Date: Sun, 22 Mar 2009 08:03:40 +0000 Subject: [issue5535] json custom encoder not fully functionnal In-Reply-To: <1237709020.89.0.211179227863.issue5535@psf.upfronthosting.co.za> Message-ID: <1237709020.89.0.211179227863.issue5535@psf.upfronthosting.co.za> New submission from Pierre Hanser : The json module provides an encoder python -> json. The encoding may be specialized by the user, using the cls parameter of the dumps function. But all simple types are always handled by the library encoder, the user encoder is only used as a last resort one, for unknown types. This is not described nor intuitive, and it prevents specifying a custom encoder for classes which inherit from simple type. in the provided example (thanks Raymond) a user defined boolean type, inheriting from int, is handled as int where you would prefer it to be handled as a json boolean through a custom encoder. problem seen on simplejson-2.0.9 or official python 2.6.1 ---------- components: Library (Lib) files: jsonCustomEncoder.py messages: 83962 nosy: phanser severity: normal status: open title: json custom encoder not fully functionnal type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file13393/jsonCustomEncoder.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 10:40:59 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 22 Mar 2009 09:40:59 +0000 Subject: [issue5534] Decimal __format__ reverses meaning of '<' and '>' alignment specs In-Reply-To: <1237703743.06.0.452434230687.issue5534@psf.upfronthosting.co.za> Message-ID: <1237714859.47.0.638721389157.issue5534@psf.upfronthosting.co.za> Mark Dickinson added the comment: Yes, it should be fixed already in the release maintenance branches. See r70430 through r70433. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 10:53:20 2009 From: report at bugs.python.org (Pernici Mario) Date: Sun, 22 Mar 2009 09:53:20 +0000 Subject: [issue3944] faster long multiplication In-Reply-To: <1222165559.78.0.447355238601.issue3944@psf.upfronthosting.co.za> Message-ID: <1237715600.83.0.235508605235.issue3944@psf.upfronthosting.co.za> Pernici Mario added the comment: This patch comes from 30bit_longdigit13+optimizations1.patch in issue4258 with modification for the case of multiplication by 0; it passes test_long.py and pidigits is a bit faster. ---------- Added file: http://bugs.python.org/file13394/longobject_diff1 _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sun Mar 22 11:20:33 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sun, 22 Mar 2009 10:20:33 +0000 Subject: [issue4688] GC optimization: don't track simple tuples and dicts In-Reply-To: <1229557269.64.0.0932795571555.issue4688@psf.upfronthosting.co.za> Message-ID: <1237717233.58.0.548038043361.issue4688@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch looks fine to me. Some documentation is missing, still: is_tracked needs to be documented in the regular documentation, and SHOW_TRACK_COUNT should be documented in SpecialBuilds.txt. I'm not sure whether you actually want to integrate SHOW_TRACK_COUNT into the code base. If yes, it should be cleaned up a little. There should be no default #undef for it, and, IMO, it should count tuples, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 11:33:53 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 22 Mar 2009 10:33:53 +0000 Subject: [issue5531] unittest: allow failures in tearDown method In-Reply-To: <1237629157.74.0.0990473218389.issue5531@psf.upfronthosting.co.za> Message-ID: <1237718033.6.0.717833523505.issue5531@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed with Brett and Raymond. Besides, I'm not sure how getting a failure rather an error changes anything in the big picture (for my non native English-speaking brain, it certainly doesn't make a difference :-)). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 11:42:03 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 22 Mar 2009 10:42:03 +0000 Subject: [issue4294] Macros for PyLong: sign, number of digits, fits in an int In-Reply-To: <1226322752.92.0.0671581209413.issue4294@psf.upfronthosting.co.za> Message-ID: <1237718523.83.0.230820220427.issue4294@psf.upfronthosting.co.za> Mark Dickinson added the comment: A few comments: I think PyLong_SIGN and PyLong_EQUALS_ZERO should go in Include/longobject.h, not Include/longintrepr.h: these 2 macros have an unambiguous meaning for *any* representation of integers. And longintrepr.h is really supposed to be private, for the use of longobject.c only. PyLong_NDIGITS should stay in longintrepr.h, though, since it's dependent on the representation. Perhaps rename PyLong_EQUALS_ZERO to PyLong_IS_ZERO? Almost all your uses of PyLong_SIGN take the form PyLong_SIGN(X) < 0. Maybe it would be better to have a PyLong_IS_NEGATIVE macro instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 11:44:16 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 22 Mar 2009 10:44:16 +0000 Subject: [issue4294] Macros for PyLong: sign, number of digits, fits in an int In-Reply-To: <1226322752.92.0.0671581209413.issue4294@psf.upfronthosting.co.za> Message-ID: <1237718656.03.0.927766940137.issue4294@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> marketdickinson components: +Interpreter Core priority: -> normal type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 12:14:34 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 22 Mar 2009 11:14:34 +0000 Subject: [issue1501108] Add write buffering to gzip Message-ID: <1237720474.24.0.7154965627.issue1501108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Although the script does not work as-is (missing import of "string", typo between "frags" and "wfrags"), I can conform the 3x ratio. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 12:16:46 2009 From: report at bugs.python.org (Tim Cuthbertson) Date: Sun, 22 Mar 2009 11:16:46 +0000 Subject: [issue5531] unittest: allow failures in tearDown method In-Reply-To: <1237629157.74.0.0990473218389.issue5531@psf.upfronthosting.co.za> Message-ID: <1237720606.09.0.107835506628.issue5531@psf.upfronthosting.co.za> Tim Cuthbertson added the comment: In my mind, an error means something is wrong. A failure just means a test case hasn't been implemented yet, or has regressed. For me it's misleading to have an AssertionError reported as a failure. It's not as if changing the reporting in this way could cause tests to succeed when they should fail (or vice versa) - so it seems like there is no downside to including this behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 13:28:55 2009 From: report at bugs.python.org (Petr Dolezal) Date: Sun, 22 Mar 2009 12:28:55 +0000 Subject: [issue5536] urllib: urlretrieve() does not close file objects on failure In-Reply-To: <1237724935.59.0.818776278278.issue5536@psf.upfronthosting.co.za> Message-ID: <1237724935.59.0.818776278278.issue5536@psf.upfronthosting.co.za> New submission from Petr Dolezal : urllib.request.urlretrieve() does not close the file object created for the retrieval when it fails during processing of the incoming data and raises an exception (e.g. on HTTP 404 response). Therefore the file remains opened until the process terminates and the OS itself closes the orphaned file handle. This behaviour may result in orphaned temporary/incomplete files. It is also not just a resource leak, but it has another bad side effect on Windows platform (at least): the file can't be deleted (due to the used creation mode) before the handle is closed. But the entire file object, including the handle, is lost due to the exception, thus nobody (including the process itself) is able to delete the file until the process terminates. Consider this code snippet demonstrating the described behaviour: import os import urllib.request FILENAME = 'nonexistent.html' try: # The host must be valid, else the address resolving fails # before the target file is even created. But existing host # and non-existent resource is exactly what's the problem. NON_EXISTENT_URL = 'http://www.python.org/nonexistent.html' urllib.request.urlretrieve(NON_EXISTENT_URL, FILENAME) except Exception: if os.path.exists(FILENAME): print('File exists! Attempting to delete.') os.unlink(FILENAME) print('Succeeded.') On Windows, following output appears: File exists! Attempting to delete. Traceback (most recent call last): File "test.py", line 6, in urllib.request.urlretrieve(NON_EXISTENT_URL, FILENAME) File "C:\Program Files\Python\lib\urllib\request.py", line 134, in urlretrieve return _urlopener.retrieve(url, filename, reporthook, data) File "C:\Program Files\Python\lib\urllib\request.py", line 1502, in retrieve block = fp.read(bs) File "C:\Program Files\Python\lib\io.py", line 572, in read self._checkClosed() File "C:\Program Files\Python\lib\io.py", line 450, in _checkClosed if msg is None else msg) ValueError: I/O operation on closed file. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "test.py", line 10, in os.unlink(FILENAME) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'nonexistent.html' As a quick fix it is possible to ensure closing both source and target file objects in finally blocks. I also assume the function should delete the target file on an exception: the file is not only incomplete, but its name is also unknown to the client code in the case of the temporary file made by urlretrieve() itself. If the client code is interested in partial downloads, I guess it should take another way to retrieve the resource as urlretrieve() interface doesn't look like supporting something like partial download. Anyway, the proposed solution is still not the optimal one: ValueError with message "I/O operation on closed handle" is really nothing I would expect as a valid error when downloading a non-existent web page. I guess a check on the source file object before reading begins would discover the problem early and raise more appropriate IOError or something like that. Note: This bug report probably applies to older versions of urllib, but I can't verify it now. I know at least I spotted it in 2.6 just before I upgraded to 3.0.1. ---------- components: Library (Lib) messages: 83970 nosy: pdolezal severity: normal status: open title: urllib: urlretrieve() does not close file objects on failure type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 14:44:35 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 22 Mar 2009 13:44:35 +0000 Subject: [issue5529] Backport sys module docs involving import to 2.7 In-Reply-To: <1237605762.97.0.593625711393.issue5529@psf.upfronthosting.co.za> Message-ID: <1237729475.29.0.670231875639.issue5529@psf.upfronthosting.co.za> Georg Brandl added the comment: Oh, it's nice to have something to do at PyCon. :) ---------- assignee: -> georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 14:46:09 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 22 Mar 2009 13:46:09 +0000 Subject: [issue5502] io-c: TextIOWrapper is faster than BufferedReader but not protected by a lock In-Reply-To: <1237338972.64.0.602798435318.issue5502@psf.upfronthosting.co.za> Message-ID: <1237729569.38.0.582470073235.issue5502@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> pitrou priority: -> normal stage: -> needs patch type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 14:46:33 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 22 Mar 2009 13:46:33 +0000 Subject: [issue5535] json custom encoder not fully functionnal In-Reply-To: <1237709020.89.0.211179227863.issue5535@psf.upfronthosting.co.za> Message-ID: <1237729593.59.0.105957444163.issue5535@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> bob.ippolito nosy: +bob.ippolito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 14:46:48 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 22 Mar 2009 13:46:48 +0000 Subject: [issue4688] GC optimization: don't track simple tuples and dicts In-Reply-To: <1229557269.64.0.0932795571555.issue4688@psf.upfronthosting.co.za> Message-ID: <1237729608.04.0.181786284939.issue4688@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> pitrou resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 16:14:18 2009 From: report at bugs.python.org (Martin von Gagern) Date: Sun, 22 Mar 2009 15:14:18 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1237734858.15.0.431231471757.issue1974@psf.upfronthosting.co.za> Changes by Martin von Gagern : ---------- nosy: +gagern _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 17:17:37 2009 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 22 Mar 2009 16:17:37 +0000 Subject: [issue5535] json custom encoder not fully functionnal In-Reply-To: <1237709020.89.0.211179227863.issue5535@psf.upfronthosting.co.za> Message-ID: <1237738657.17.0.613431991945.issue5535@psf.upfronthosting.co.za> Bob Ippolito added the comment: It is common to specify a default function but it would be terrible for performance if this function was called for every single object passed through to the decoder. If you want a serialization different from a primitive type you'll have to choose a different base class. ---------- resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 17:18:31 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 22 Mar 2009 16:18:31 +0000 Subject: [issue5535] json custom encoder not fully functionnal In-Reply-To: <1237709020.89.0.211179227863.issue5535@psf.upfronthosting.co.za> Message-ID: <1237738711.11.0.775140897354.issue5535@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 17:20:31 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 22 Mar 2009 16:20:31 +0000 Subject: [issue5531] unittest: allow failures in tearDown method In-Reply-To: <1237629157.74.0.0990473218389.issue5531@psf.upfronthosting.co.za> Message-ID: <1237738831.67.0.397283565223.issue5531@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I concur with other developers. In strict unittesting, assertions of correct behavior should only ever happen in the test not during set up or tear down. ---------- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 18:11:04 2009 From: report at bugs.python.org (Brett Cannon) Date: Sun, 22 Mar 2009 17:11:04 +0000 Subject: [issue5531] unittest: allow failures in tearDown method In-Reply-To: <1237738831.67.0.397283565223.issue5531@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: Thanks for the patch and the attempt, Tim! ---------- Added file: http://bugs.python.org/file13395/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
Thanks for the patch and the attempt, Tim!
From report at bugs.python.org Sun Mar 22 18:20:54 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 22 Mar 2009 17:20:54 +0000 Subject: [issue1034053] unittest.py patch: add skipped test functionality Message-ID: <1237742454.0.0.413772366006.issue1034053@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Ok, here's my unittest skipping patch. It supports skipping classes and expected failures and includes skipping decorators. I had to employ a little evil to make test skipping work for classes. The made a new TestSuite class called ClassTestSuite, to contain the tests for one class. It pretends to be a TestCase enough that in can be completely skipped. ---------- Added file: http://bugs.python.org/file13396/unittest_galore.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 18:22:51 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 22 Mar 2009 17:22:51 +0000 Subject: [issue5532] imap usage in itertools unique_justseen recipe In-Reply-To: <1237659046.24.0.591034615164.issue5532@psf.upfronthosting.co.za> Message-ID: <1237742571.08.0.907488153507.issue5532@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done in r70520. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 18:25:24 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 22 Mar 2009 17:25:24 +0000 Subject: [issue1034053] unittest.py patch: add skipped test functionality Message-ID: <1237742724.61.0.00349730502273.issue1034053@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's the patch on Rietveld: http://codereview.appspot.com/27095 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 18:45:22 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 22 Mar 2009 17:45:22 +0000 Subject: [issue5536] urllib: urlretrieve() does not close file objects on failure In-Reply-To: <1237724935.59.0.818776278278.issue5536@psf.upfronthosting.co.za> Message-ID: <1237743922.23.0.307307413251.issue5536@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70521. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 18:50:31 2009 From: report at bugs.python.org (Chris Hollenbeck) Date: Sun, 22 Mar 2009 17:50:31 +0000 Subject: [issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms In-Reply-To: <1237744231.54.0.279066174651.issue5537@psf.upfronthosting.co.za> Message-ID: <1237744231.54.0.279066174651.issue5537@psf.upfronthosting.co.za> New submission from Chris Hollenbeck : The LWPCookieJar can be saved on 64-bit Ubuntu, but not on 32-bit Ubuntu when the expiration year is greater than 2038. This has not been tested on any other Intel-compatible Linux platform, though it appears related to the Year 2038 bug. The MozillaCookieJar does not have a problem saving on either architecture. A sample crash is shown below: File "/home/user/xblstatus/LiveConnect.py", line 189, in connect self.cookiejar.save(self.cookieFile) File "/usr/lib/python2.5/_LWPCookieJar.py", line 89, in save f.write(self.as_lwp_str(ignore_discard, ignore_expires)) File "/usr/lib/python2.5/_LWPCookieJar.py", line 75, in as_lwp_str r.append("Set-Cookie3: %s" % lwp_cookie_str(cookie)) File "/usr/lib/python2.5/_LWPCookieJar.py", line 35, in lwp_cookie_str time2isoz(float(cookie.expires)))) File "/usr/lib/python2.5/cookielib.py", line 98, in time2isoz year, mon, mday, hour, min, sec = time.gmtime(t)[:6] ValueError: timestamp out of range for platform time_t --- The cookie jar and urllib2 integration was done with: self.cookiejar = cookielib.LWPCookieJar() self.opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookiejar)) urllib2.install_opener(self.opener) --- The code used to save the cookie after accessing the web page was: self.cookiejar.save(self.cookieFile) The cookieFile variable is simply the default location of the cookie file for saving in the program. ---------- components: Library (Lib) messages: 83979 nosy: hollec severity: normal status: open title: LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 20:49:08 2009 From: report at bugs.python.org (Pierre Hanser) Date: Sun, 22 Mar 2009 19:49:08 +0000 Subject: [issue5535] json custom encoder not fully functionnal In-Reply-To: <1237709020.89.0.211179227863.issue5535@psf.upfronthosting.co.za> Message-ID: <1237751348.7.0.00351814749378.issue5535@psf.upfronthosting.co.za> Pierre Hanser added the comment: you realize that the current handling is incorrect and also not documented? and that the described case is from the real world: it prevents using pydbus and dbus.Boolean type to send a json boolean I don't take your argument about performance: i would like to have the choice between correctness and performance ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 21:15:34 2009 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 22 Mar 2009 20:15:34 +0000 Subject: [issue5535] json custom encoder not fully functionnal In-Reply-To: <1237709020.89.0.211179227863.issue5535@psf.upfronthosting.co.za> Message-ID: <1237752934.59.0.718185233813.issue5535@psf.upfronthosting.co.za> Bob Ippolito added the comment: The documentation says "If specified, default is a function that gets called for objects that can?t otherwise be serialized. It should return a JSON encodable version of the object or raise a TypeError." *can't otherwise be serialized* means that the object must not be a subtype of something that is serializable. The implementation is correct and this behavior is documented. Documentation patches to make this more obvious are acceptable, but it's not a bug so it can't be fixed as such. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?TGFycyBHdXN0w6RiZWwgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za Sun Mar 22 21:53:51 2009 From: =?utf-8?b?TGFycyBHdXN0w6RiZWwgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za (=?utf-8?b?TGFycyBHdXN0w6RiZWwgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za) Date: Sun, 22 Mar 2009 20:53:51 +0000 Subject: [issue5068] tarfile loops forever on broken input In-Reply-To: <1232968111.2.0.128325452145.issue5068@psf.upfronthosting.co.za> Message-ID: <1237755231.69.0.346590379656.issue5068@psf.upfronthosting.co.za> Lars Gust?bel added the comment: I just checked in a fix for the problem, r70523-70527. Thank you very much for your report. ---------- resolution: -> fixed status: open -> closed versions: +Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 22:16:23 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 22 Mar 2009 21:16:23 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> New submission from Garrett Cooper : While trying to deal with some annoying issues with setting up and tearing down consoles via pexpect, I noticed that the teardown functions / methods weren't being executed via nose. After applying this change to 2.4.5 and 2.6.1, things work as expected (note: this patch only applies cleanly with 2.4.5 AFAICT -- it didn't work with 2.6.1). My expectations are: ======== I'd expect that the best fix would be for tearDown to be unconditionally called if setUp is called, s.t. testers can ensure that the operating state of the UUT and testbed are at a predefined state. So in my testcase provided, I would expect the following flow: 1. Keeping assert False in setup_module... `Calling setup_module' `Calling teardown_module' 2. Removing assert False from setup_module... `Calling setup_module' - `Calling function_setup' - `Calling function_teardown' - `Calling TestClass:setUp' - `Calling TestClass:tearDown' `Calling teardown_module' If this isn't done, it makes some operations, like tearing down consoles with pexpect _extremely_ painful to perform... ======== Please see for more details. ---------- components: Tests files: issue-blah-2.4.5.diff keywords: patch messages: 83983 nosy: yaneurabeya severity: normal status: open title: tearDown in unittest should be executed regardless of result in setUp versions: Python 2.4, Python 2.5, Python 2.6 Added file: http://bugs.python.org/file13397/issue-blah-2.4.5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 22:16:34 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 22 Mar 2009 21:16:34 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237756594.19.0.44490036917.issue5538@psf.upfronthosting.co.za> Changes by Garrett Cooper : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 22:21:34 2009 From: report at bugs.python.org (Lukas Lueg) Date: Sun, 22 Mar 2009 21:21:34 +0000 Subject: [issue1501108] Add write buffering to gzip Message-ID: <1237756894.21.0.943105856074.issue1501108@psf.upfronthosting.co.za> Lukas Lueg added the comment: This is true for all objects whose input could be concatenated. For example with hashlib: data = ['foobar']*100000 mdX = hashlib.sha1() for d in data: mdX.update(d) mdY = hashlib.sha1() mdY.update("".join(data)) mdX.digest() == mdY.digest() the second version is multiple times faster... ---------- nosy: +ebfe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 22:25:25 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 22 Mar 2009 21:25:25 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237757125.76.0.789845132773.issue5538@psf.upfronthosting.co.za> Garrett Cooper added the comment: That patch wasn't complete -_-... here's a more complete 2.4.x patch. ---------- Added file: http://bugs.python.org/file13398/issue-5538-2.4.5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 22:25:32 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 22 Mar 2009 21:25:32 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237757132.37.0.659450194812.issue5538@psf.upfronthosting.co.za> Changes by Garrett Cooper : Removed file: http://bugs.python.org/file13397/issue-blah-2.4.5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 22 22:43:07 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 22 Mar 2009 21:43:07 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237758187.57.0.297002309471.issue5538@psf.upfronthosting.co.za> Garrett Cooper added the comment: If someone will provide a link to a page with instructions on how to checkout python from cvs / svn / etc I'll gladly apply a patch to the sources on 2.x and 3.x HEAD. Thanks, -Garrett ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 00:19:48 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 22 Mar 2009 23:19:48 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237763988.55.0.510150187526.issue5538@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It's up to Steve to decide wheter to commit. I presume that he will want to stay true to JUnit and to avoid risk of breaking existing test suites. ---------- assignee: -> purcell keywords: +needs review -patch nosy: +purcell, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 00:33:31 2009 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 22 Mar 2009 23:33:31 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1237764811.45.0.185862244587.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: An additional feature that could be borrowed, though in slightly modified form, from Perl is case-changing controls in replacement strings. Roughly the idea is to add these forms to the replacement string: \g<1> provides capture group 1 \u\g<1> provides capture group 1 with the first character in uppercase \U\g<1> provides capture group 1 with all the characters in uppercase \l\g<1> provides capture group 1 with the first character in lowercase \L\g<1> provides capture group 1 with all the characters in lowercase In Perl titlecase is achieved by using both \u and \L, and the same could be done in Python: \u\L\g<1> provides capture group 1 with the first character in uppercase after putting all the characters in all lowercase although internally it would do proper titlecase. I'm suggesting restricting the action to only the following group. Note that this is actually syntactically unambiguous. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 01:08:39 2009 From: report at bugs.python.org (Robert Xiao) Date: Mon, 23 Mar 2009 00:08:39 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1237766919.65.0.980749733401.issue2636@psf.upfronthosting.co.za> Robert Xiao added the comment: Frankly, I don't really like that idea; I think it muddles up the RE syntax to have such a group-modifying operator, and seems rather unpythonic: the existing way to do this -- use .upper(), .lower() or .title() to format the groups in a match object as necessary -- seems to be much more readable and reasonable in this sense. I think the proposed changes look good, but I agree that the focus should be on breaking up the megapatch into more digestible feature additions, starting from the barebones engine. Until that's done, I doubt *anyone* will want to review it, let alone merge it into the main Python distribution. So, I think we should hold off on any new features until this raft of changes can be properly broken up, reviewed and (hopefully) merged in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 01:21:46 2009 From: report at bugs.python.org (David W. Lambert) Date: Mon, 23 Mar 2009 00:21:46 +0000 Subject: [issue5539] open documentation unclear In-Reply-To: <1237767706.4.0.494617404743.issue5539@psf.upfronthosting.co.za> Message-ID: <1237767706.4.0.494617404743.issue5539@psf.upfronthosting.co.za> New submission from David W. Lambert : See thread http://groups.google.com/group/comp.lang.python/browse_thread/thread/85e c714aa6898d84# En Sun, 22 Mar 2009 19:12:13 -0300, Benjamin Peterson escribi?: > Gabriel Genellina yahoo.com.ar> writes: >> The undocumented behavior is relying on the open() builtin to return a >> BufferedReader for a binary file. > I don't see the problem. open() will return some BufferedIOBase > implmentor, and > that's all that TextIOWrapper needs. How do you know? AFAIK, the return value of open() is completely undocumented: http://docs.python.org/3.0/library/functions.html#open And if you open the file in text mode, the return value isn't a BufferedIOBase. -- Gabriel Genellina The return value of open() is a "stream", according to http://docs.python.org/dev/py3k/library/io.html#module-io ---------- messages: 83990 nosy: LambertDW severity: normal status: open title: open documentation unclear _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 01:23:50 2009 From: report at bugs.python.org (David W. Lambert) Date: Mon, 23 Mar 2009 00:23:50 +0000 Subject: [issue5540] "file objects" in python 3 tutorial In-Reply-To: <1237767830.7.0.116685302416.issue5540@psf.upfronthosting.co.za> Message-ID: <1237767830.7.0.116685302416.issue5540@psf.upfronthosting.co.za> New submission from David W. Lambert : http://docs.python.org/dev/py3k/tutorial/inputoutput.html#methods-of- file-objects Is it proper to discuss file objects in py3K? ---------- assignee: georg.brandl components: Documentation messages: 83991 nosy: LambertDW, georg.brandl severity: normal status: open title: "file objects" in python 3 tutorial versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 01:26:01 2009 From: report at bugs.python.org (David W. Lambert) Date: Mon, 23 Mar 2009 00:26:01 +0000 Subject: [issue5539] open documentation unclear In-Reply-To: <1237767706.4.0.494617404743.issue5539@psf.upfronthosting.co.za> Message-ID: <1237767961.69.0.216256207858.issue5539@psf.upfronthosting.co.za> Changes by David W. Lambert : ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 01:57:30 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Mar 2009 00:57:30 +0000 Subject: [issue1034053] unittest.py patch: add skipped test functionality Message-ID: <1237769850.34.0.0577248199284.issue1034053@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Removed file: http://bugs.python.org/file13396/unittest_galore.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 01:58:01 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Mar 2009 00:58:01 +0000 Subject: [issue1034053] unittest.py patch: add skipped test functionality Message-ID: <1237769881.51.0.0907784101927.issue1034053@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Added file: http://bugs.python.org/file13399/unittest_galore.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 01:59:00 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Mar 2009 00:59:00 +0000 Subject: [issue1034053] unittest.py patch: add skipped test functionality Message-ID: <1237769940.12.0.261857964675.issue1034053@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I've attached a new patch which takes into account Antoine's review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 02:43:01 2009 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 23 Mar 2009 01:43:01 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1237772581.48.0.25749750398.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: Ah, too Perlish! :-) Another feature request that I've decided not to consider any further is recursive regular expressions. There are other tools available for that kind of thing, and I don't want the re module to go the way of Perl 6's rules; such things belong elsewhere, IMHO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 03:17:31 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 23 Mar 2009 02:17:31 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237774651.05.0.15254950549.issue2170@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 03:26:04 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Mar 2009 02:26:04 +0000 Subject: [issue5540] "file objects" in python 3 tutorial In-Reply-To: <1237767830.7.0.116685302416.issue5540@psf.upfronthosting.co.za> Message-ID: <1237775164.01.0.0331385934532.issue5540@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Why shouldn't it be? One of the goals of 3.x io is to present a more pythonic interface while preserving a similar interface to 2.x. Users can learn about the complete io stack later. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 03:39:10 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Mar 2009 02:39:10 +0000 Subject: [issue5539] open documentation unclear In-Reply-To: <1237767706.4.0.494617404743.issue5539@psf.upfronthosting.co.za> Message-ID: <1237775950.22.0.418175940445.issue5539@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70534. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 03:50:11 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Mar 2009 02:50:11 +0000 Subject: [issue5513] "What's New" should say VERY CLEARLY that the type file is gone In-Reply-To: <1237415177.76.0.586178129986.issue5513@psf.upfronthosting.co.za> Message-ID: <1237776611.99.0.0854095980788.issue5513@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70536. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 09:26:24 2009 From: report at bugs.python.org (Lukas Lueg) Date: Mon, 23 Mar 2009 08:26:24 +0000 Subject: [issue5541] File's current position inconsistent with 'a+' mode In-Reply-To: <1237796784.39.0.86522917715.issue5541@psf.upfronthosting.co.za> Message-ID: <1237796784.39.0.86522917715.issue5541@psf.upfronthosting.co.za> New submission from Lukas Lueg : The file pointer's behaviour after opening a file in 'a+b' mode is not consistent among platforms: The pointer is set to the beginning of the file on Linux and to the end of the file on MacOS. You have to call .seek(0) before calling .read() to get consistent behaviour on all platforms. While this is not a serious problem, it somewhat violates the rule of least surprise. Also we are not bound to this behaviour and can make sure that all file objects have their respective positions well-defined after object-creation. Thoughts? ---------- messages: 83997 nosy: ebfe severity: normal status: open title: File's current position inconsistent with 'a+' mode versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 09:48:49 2009 From: report at bugs.python.org (Steve Purcell) Date: Mon, 23 Mar 2009 08:48:49 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237798129.71.0.283999352399.issue5538@psf.upfronthosting.co.za> Steve Purcell added the comment: Indeed -- if some of the setUp code is likely to fail, that should be handled right there in setUp, by reversing any other setup code that may have executed. It's harder to write a tearDown that will work reliably for any partially successful setUp. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 10:11:12 2009 From: report at bugs.python.org (Garrett Cooper) Date: Mon, 23 Mar 2009 09:11:12 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237799472.63.0.212189182093.issue5538@psf.upfronthosting.co.za> Garrett Cooper added the comment: I agree with you guys to a certain extent, but doing so only complicates my setup procedure to the extent that I'm calling a lot of my teardown code in a dumb manner, unless I actually kept track of how far into the setup process I got before everything went awry and split it into a multistep rollback process for atomicity. This in and of itself seems like a lot to track with complicated processes like configuring a daemon interactively via pexpect, or modifying a remote VM instance with multiprocessing being used for injection, and I don't know if I can expect consumers of my test suites to get it right twice. Could you guys provide some examples of existing test suites where this may potentially break things? Thanks! -Garrett ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 10:29:11 2009 From: report at bugs.python.org (Jason Davies) Date: Mon, 23 Mar 2009 09:29:11 +0000 Subject: [issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent In-Reply-To: <1237800550.85.0.782891199129.issue5542@psf.upfronthosting.co.za> Message-ID: <1237800550.85.0.782891199129.issue5542@psf.upfronthosting.co.za> New submission from Jason Davies : I came across this bug when trying to use CouchDB-Python to PUT an attachment using HTTP authentication (using the httplib2 library). Essentially what httplib2 does is this: 1. Attempt PUT with no auth credentials 2. If a 401 response is received, try again with credentials However, CouchDB sends a 401 response as soon as it has consumed the request headers, and before the request body has been fully sent by the client. This triggers a bug in both httplib and httplib2, whereby they raise exceptions due to a broken pipe being encountered when trying to finish sending the request body. It seems that Python's httplib checks for broken pipe errors and closes the connection entirely when they occur when making a request. This is unhelpful if a legitimate response was sent and the socket was closed early by the server. The offending try/except handler is in httplib.HttpConnection.send and has a comment saying: # send the data to the server. if we get a broken pipe, then close # the socket. we want to reconnect when somebody tries to send again. This is wrong, as someone might want to read the response before closing the socket. For reference, the CouchDB-Python issue is: http://code.google.com/p/couchdb-python/issues/detail?id=68 This bug may also be related to: http://bugs.python.org/issue3566 ---------- components: Library (Lib) messages: 84000 nosy: jasondavies severity: normal status: open title: Socket is closed prematurely in httplib, if server sends response before request body has been sent versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 10:41:32 2009 From: report at bugs.python.org (Jason Davies) Date: Mon, 23 Mar 2009 09:41:32 +0000 Subject: [issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent In-Reply-To: <1237800550.85.0.782891199129.issue5542@psf.upfronthosting.co.za> Message-ID: <1237801292.81.0.93475776631.issue5542@psf.upfronthosting.co.za> Jason Davies added the comment: Note: in case I didn't make it clear, the fix is to remove the offending try/except handler and let the broken pipe error propagate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 11:01:48 2009 From: report at bugs.python.org (Alexandru V. Mosoi) Date: Mon, 23 Mar 2009 10:01:48 +0000 Subject: [issue5543] sys.last_type missing In-Reply-To: <1237802508.05.0.8782027083.issue5543@psf.upfronthosting.co.za> Message-ID: <1237802508.05.0.8782027083.issue5543@psf.upfronthosting.co.za> New submission from Alexandru V. Mosoi : `sys.last_type' is missing and thus, traceback.print_last() is not working. $ python Python 2.6.1 (r261:67515, Dec 7 2008, 18:56:39) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> try: raise Exception('asdf') ... except: print sys.last_type ... Traceback (most recent call last): File "", line 4, in AttributeError: 'module' object has no attribute 'last_type' >>> import traceback >>> try: raise Exception('asdf') ... except: traceback.print_last() ... Traceback (most recent call last): File "", line 4, in AttributeError: 'module' object has no attribute 'last_type' ---------- components: Library (Lib) messages: 84002 nosy: brtzsnr severity: normal status: open title: sys.last_type missing versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 11:12:26 2009 From: report at bugs.python.org (Jan Novak) Date: Mon, 23 Mar 2009 10:12:26 +0000 Subject: [issue1379416] email.Header encode() unicode P2.6 Message-ID: <1237803146.27.0.212514283495.issue1379416@psf.upfronthosting.co.za> Jan Novak added the comment: I made some new tests in P2.6.1 >>> import email.charset >>> c=email.charset.Charset('utf-8') >>> print c.input_charset, type(c.input_charset) utf-8 >>> print c.output_charset, type(c.output_charset) utf-8 but >>> c=email.charset.Charset('iso-8859-2') >>> print c.input_charset, type(c.input_charset) iso-8859-2 >>> print c.output_charset, type(c.output_charset) iso-8859-2 but if you use alias latin-2 it's OK >>> c=email.charset.Charset('latin-2') >>> print c.input_charset, type(c.input_charset) iso-8859-2 >>> print c.output_charset, type(c.output_charset) iso-8859-2 >>> Error is here for unicode input-charset: self.input_charset->conv->self.output_charset module email/charset.py line 219 if not conv: conv = self.input_charset for the charsets where aren't output conversions CHARSETS = { # input header enc body enc output conv 'iso-8859-1': (QP, QP, None), 'iso-8859-2': (QP, QP, None), and if you don't use alias ALIASES = { 'latin_1': 'iso-8859-1', 'latin-1': 'iso-8859-1', 'latin_2': 'iso-8859-2', 'latin-2': 'iso-8859-2', But the realy source of this error is on line 208 input_charset = unicode(input_charset, 'ascii') because this construction returns unicode >>> print type(unicode('iso-8859-2','ascii')) ---------- title: email.Header encode() unicode P2.3xP2.4 -> email.Header encode() unicode P2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 12:41:25 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Mon, 23 Mar 2009 11:41:25 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237808485.08.0.952624691101.issue5538@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Here's one: class ReactorShutdownInteraction(unittest.TestCase): """Test reactor shutdown interaction""" def setUp(self): """Start a UDP port""" self.server = Server() self.port = reactor.listenUDP(0, self.server, interface='127.0.0.1') def tearDown(self): """Stop the UDP port""" return self.port.stopListening() Perhaps a feature like trial's `addCleanup? should be added. This lets you deal with cleanup in a somewhat simpler way. For example, rewriting the above: class ReactorShutdownInteraction(unittest.TestCase): """Test reactor shutdown interaction""" def setUp(self): """Start a UDP port""" self.server = Server() self.port = reactor.listenUDP(0, self.server, interface='127.0.0.1') # Stop the UDP port after the test completes. self.addCleanup(self.port.stopListening) ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 13:42:23 2009 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 23 Mar 2009 12:42:23 +0000 Subject: [issue5178] Add context manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1237812143.02.0.463153418884.issue5178@psf.upfronthosting.co.za> Nick Coghlan added the comment: Unassigning for the moment - I'm still interested in the idea, but the referencing-globals-at-shutdown problem means it isn't going to be the straightforward review-and-commit that I original thought this patch was going to be. I'll still try to get to it before the next 3.1 alpha in a couple of weeks, but I don't want to stop anyone else from looking at it in the meantime. ---------- assignee: ncoghlan -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 15:22:17 2009 From: report at bugs.python.org (Manuel Kaufmann) Date: Mon, 23 Mar 2009 14:22:17 +0000 Subject: [issue5435] test_httpservers on Debian Testing In-Reply-To: <1236404239.81.0.966059506466.issue5435@psf.upfronthosting.co.za> Message-ID: <1237818137.61.0.31551148018.issue5435@psf.upfronthosting.co.za> Manuel Kaufmann added the comment: I downloaded py3k branch and ran the tests with a regular user. All test pass OK. SVN Revision: 70469 ---------- nosy: +humitos Added file: http://bugs.python.org/file13400/httpservers_test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 15:25:44 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 23 Mar 2009 14:25:44 +0000 Subject: [issue5435] test_httpservers on Debian Testing In-Reply-To: <1236404239.81.0.966059506466.issue5435@psf.upfronthosting.co.za> Message-ID: <1237818344.57.0.926415146617.issue5435@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Hmm, I'm using coLinux with root user. (default) Maybe that's difference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 15:41:48 2009 From: report at bugs.python.org (David W. Lambert) Date: Mon, 23 Mar 2009 14:41:48 +0000 Subject: [issue5540] "file objects" in python 3 tutorial In-Reply-To: <1237767830.7.0.116685302416.issue5540@psf.upfronthosting.co.za> Message-ID: <1237819308.14.0.800929730072.issue5540@psf.upfronthosting.co.za> David W. Lambert added the comment: File objects should not be discussed in the tutorial to emphasize that the file type is gone. File objects should be in the tutorial as a useful familiar concept. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 16:25:02 2009 From: report at bugs.python.org (Andreas Schawo) Date: Mon, 23 Mar 2009 15:25:02 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1237821902.99.0.589078052555.issue5463@psf.upfronthosting.co.za> Andreas Schawo added the comment: I removed definition of _PY_STRUCT_RANGE_CHECKING. The test_standard_integers now expects struct.errors when there are out of range values (should have been part of my last patch). So test_1229380 is now obsolete. ---------- Added file: http://bugs.python.org/file13401/cleanup_range_check_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 16:25:24 2009 From: report at bugs.python.org (Andreas Schawo) Date: Mon, 23 Mar 2009 15:25:24 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1237821924.7.0.493233669126.issue5463@psf.upfronthosting.co.za> Changes by Andreas Schawo : Removed file: http://bugs.python.org/file13304/struct_overflow_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 16:32:20 2009 From: report at bugs.python.org (Manuel Kaufmann) Date: Mon, 23 Mar 2009 15:32:20 +0000 Subject: [issue5435] test_httpservers on Debian Testing In-Reply-To: <1236404239.81.0.966059506466.issue5435@psf.upfronthosting.co.za> Message-ID: <1237822340.77.0.218005658062.issue5435@psf.upfronthosting.co.za> Manuel Kaufmann added the comment: I think it isn't a problem / bug, rather than it's a protection method to don't execute this test or cgi stuff with root user. In the middle, it change a userid to 'nobody', then if you are logged in as root, it can change the userid and then you don't have permission to write in the disk; and if you are logged in with as a regular user it can't change the userid and works OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 16:54:25 2009 From: report at bugs.python.org (Garrett Cooper) Date: Mon, 23 Mar 2009 15:54:25 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237823665.44.0.149414365365.issue5538@psf.upfronthosting.co.za> Garrett Cooper added the comment: And maybe the addCleanup components could be a stack of callable objects? This would make life easier for folks like me and would make the overall flow much cleaner / clearer as it would allow us to break things down into atomic steps which could be reverted in a LIFO order. Steve / Raymond: Do you guys like Jean-Paul's proposal? If so, I'll write up a patch sometime this coming weekend to implement that functionality. For now I'll just call tearDown blindly on Exceptions *shivers*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 16:56:44 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Mon, 23 Mar 2009 15:56:44 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237823804.98.0.973953184992.issue5538@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: > And maybe the addCleanup components could be a stack of callable objects? Yea, that's handy. My example didn't show it, but that's what trial implements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 17:01:44 2009 From: report at bugs.python.org (Steve Purcell) Date: Mon, 23 Mar 2009 16:01:44 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237824104.72.0.468393270021.issue5538@psf.upfronthosting.co.za> Steve Purcell added the comment: Sounds good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 17:03:23 2009 From: report at bugs.python.org (Garrett Cooper) Date: Mon, 23 Mar 2009 16:03:23 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237824203.82.0.580048736513.issue5538@psf.upfronthosting.co.za> Garrett Cooper added the comment: Ok, sounds good then ;). I'll open another issue with the enhancement later on this week. Cheers! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 17:07:32 2009 From: report at bugs.python.org (Andreas Schawo) Date: Mon, 23 Mar 2009 16:07:32 +0000 Subject: [issue5544] test_fileio fials on windows MSVC Assertion In-Reply-To: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> Message-ID: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> New submission from Andreas Schawo : test_fileio fails on windows with MSVC "Debug Assertion failed" message since last week. ---------- components: Tests messages: 84015 nosy: andreas.schawo, pitrou severity: normal status: open title: test_fileio fials on windows MSVC Assertion versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 17:26:55 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 23 Mar 2009 16:26:55 +0000 Subject: [issue5544] test_fileio fials on windows MSVC Assertion In-Reply-To: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> Message-ID: <1237825615.85.0.763486865036.issue5544@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Can you find out in which test case the assertion is triggered? Also, is there more information in the error message itself? ---------- components: +Library (Lib) priority: -> critical type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 17:35:04 2009 From: report at bugs.python.org (Garrett Cooper) Date: Mon, 23 Mar 2009 16:35:04 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237826104.27.0.444081201748.issue5538@psf.upfronthosting.co.za> Garrett Cooper added the comment: Before I forget though -- should the requirements for the functionality be that it be called strictly in setUp on failure, or should it be executed as a part of tearDown as well? Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 17:37:30 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Mon, 23 Mar 2009 16:37:30 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237826250.46.0.0143762473177.issue5538@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: /Any/ addCleanup that is successfully executed should cause the cleanup function to be called. Otherwise you have to define all your cleanup twice, and that's no fun. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 18:15:57 2009 From: report at bugs.python.org (Jesse Noller) Date: Mon, 23 Mar 2009 17:15:57 +0000 Subject: [issue5545] multiprocessing: switch to autoconf detection of platform values In-Reply-To: <1237828557.72.0.911819794631.issue5545@psf.upfronthosting.co.za> Message-ID: <1237828557.72.0.911819794631.issue5545@psf.upfronthosting.co.za> New submission from Jesse Noller : See mail thread: http://mail.python.org/pipermail/python-dev/2009-March/087418.html And Christian's checkin to the back port: http://code.google.com/p/python-multiprocessing/source/detail?r=64# Need to take into the account information here (for my own notes): http://bugs.python.org/issue5400 http://bugs.python.org/issue3876 http://bugs.python.org/msg83495 http://bugs.python.org/issue3110 ---------- assignee: jnoller messages: 84019 nosy: christian.heimes, jnoller priority: normal severity: normal stage: needs patch status: open title: multiprocessing: switch to autoconf detection of platform values type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 18:18:35 2009 From: report at bugs.python.org (Facundo Batista) Date: Mon, 23 Mar 2009 17:18:35 +0000 Subject: [issue5435] test_httpservers on Debian Testing In-Reply-To: <1236404239.81.0.966059506466.issue5435@psf.upfronthosting.co.za> Message-ID: <1237828715.23.0.0494863677693.issue5435@psf.upfronthosting.co.za> Facundo Batista added the comment: CGI tests shouldn't be run as root, it seems, as it breaks the inherent protection. ---------- nosy: +facundobatista resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 18:22:18 2009 From: report at bugs.python.org (Eric McRae) Date: Mon, 23 Mar 2009 17:22:18 +0000 Subject: [issue1413379] Popened file object close hangs in latest Cygwin update Message-ID: <1237828938.07.0.578885758415.issue1413379@psf.upfronthosting.co.za> Eric McRae added the comment: Had forgotten about this. Just re-ran my test and it works fine now. My current versions are Python 2.5.1 and Tk 8.4 So long and thanks for all the fish... ---------- status: open -> closed versions: +Python 2.5 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 18:56:09 2009 From: report at bugs.python.org (Christian Heimes) Date: Mon, 23 Mar 2009 17:56:09 +0000 Subject: [issue5545] multiprocessing: switch to autoconf detection of platform values In-Reply-To: <1237828557.72.0.911819794631.issue5545@psf.upfronthosting.co.za> Message-ID: <1237830969.09.0.525379014745.issue5545@psf.upfronthosting.co.za> Christian Heimes added the comment: I've correct some smaller issues and integrated the autoconf code into multiprocessing and setup.py A working patch is appended. ---------- keywords: +patch Added file: http://bugs.python.org/file13402/mp_autoconf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 19:39:44 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 23 Mar 2009 18:39:44 +0000 Subject: [issue5544] test_fileio fials on windows MSVC Assertion In-Reply-To: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> Message-ID: <1237833584.36.0.166175831684.issue5544@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I cannot test this because I don't have recent VC, but last week change to _fileio.c is this. http://svn.python.org/view/python/branches/py3k/Modules/_fileio.c?r1=70187&r2=70352 On windows, lseek was used before, but _lseeki64 in portable_lseek is used now. Maybe does following patch work? Index: Modules/_fileio.c =================================================================== --- Modules/_fileio.c (revision 70537) +++ Modules/_fileio.c (working copy) @@ -682,6 +682,9 @@ return NULL; } + if (!_PyVerify_fd(fd)) + return NULL; + Py_BEGIN_ALLOW_THREADS #if defined(MS_WIN64) || defined(MS_WINDOWS) res = _lseeki64(fd, pos, whence); ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 19:45:12 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 23 Mar 2009 18:45:12 +0000 Subject: [issue4688] GC optimization: don't track simple tuples and dicts In-Reply-To: <1229557269.64.0.0932795571555.issue4688@psf.upfronthosting.co.za> Message-ID: <1237833912.15.0.798142314788.issue4688@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've added tracking statistics for tuples, documentation for gc.is_tracked(), and changed _Py*_Optimize to _Py*_MaybeUntrack on a suggestion by Benjamin. Committed to trunk in r70546. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 19:54:20 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 23 Mar 2009 18:54:20 +0000 Subject: [issue5541] File's current position inconsistent with 'a+' mode In-Reply-To: <1237796784.39.0.86522917715.issue5541@psf.upfronthosting.co.za> Message-ID: <1237834460.96.0.816503557557.issue5541@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The right answer IMO is that the current position should be set to the end of the file, since it is opened in "append" mode. What happens actually is that, on some systems, the position is implicitly set to the end of the file on the first write() rather than when the file is open()ed. This should be different in 3.1, could you give it a try? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 19:54:41 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 23 Mar 2009 18:54:41 +0000 Subject: [issue5541] File's current position inconsistent with 'a+' mode In-Reply-To: <1237796784.39.0.86522917715.issue5541@psf.upfronthosting.co.za> Message-ID: <1237834481.61.0.361460723572.issue5541@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: -> normal type: -> behavior versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 19:59:55 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 23 Mar 2009 18:59:55 +0000 Subject: [issue4688] GC optimization: don't track simple tuples and dicts In-Reply-To: <1229557269.64.0.0932795571555.issue4688@psf.upfronthosting.co.za> Message-ID: <1237834795.51.0.29430099883.issue4688@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the review, by the way! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 21:04:50 2009 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 23 Mar 2009 20:04:50 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237838690.69.0.418130762424.issue5512@psf.upfronthosting.co.za> Mark Dickinson added the comment: Applied, r70542 and r70547. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 21:13:30 2009 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 23 Mar 2009 20:13:30 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1237839210.77.0.493503764919.issue5463@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 21:20:53 2009 From: report at bugs.python.org (Jess Austin) Date: Mon, 23 Mar 2009 20:20:53 +0000 Subject: [issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime In-Reply-To: <1237423886.27.0.985547007127.issue5516@psf.upfronthosting.co.za> Message-ID: <1237839653.51.0.0425397433722.issue5516@psf.upfronthosting.co.za> Jess Austin added the comment: The attached patch fixes this issue, and updates the tests. Contrary to my initial impression, it seems that a previous developer knew of this behavior and thought it correct; see the comment of the test I deleted. I left memcmp() in. ---------- keywords: +patch Added file: http://bugs.python.org/file13403/issue5516.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 21:29:40 2009 From: report at bugs.python.org (Andreas Schawo) Date: Mon, 23 Mar 2009 20:29:40 +0000 Subject: [issue5544] test_fileio fails on windows MSVC Assertion In-Reply-To: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> Message-ID: <1237840180.9.0.451920401011.issue5544@psf.upfronthosting.co.za> Andreas Schawo added the comment: I'm afraid your patch doesn't solve it. I got the same popup: Debug Assertion Failed! Program: .....\python_d.exe File: f:\dd\vctoools\crt_bld\self_x86\crt\src\close.c Line: 48 Expression: (_osfile(fh) & FOPEN) It failed while running testErrnoOnClose. I'm using VC 2008 Express Edition. ---------- title: test_fileio fials on windows MSVC Assertion -> test_fileio fails on windows MSVC Assertion _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 21:34:46 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 23 Mar 2009 20:34:46 +0000 Subject: [issue5544] test_fileio fails on windows MSVC Assertion In-Reply-To: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> Message-ID: <1237840486.08.0.411818032042.issue5544@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I wonder whether a magic assertion-disabling spell is needed around the call to close() in _fileio.c. Kristjan, do you have any insights on this? ---------- nosy: +krisvale, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 21:48:15 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Mar 2009 20:48:15 +0000 Subject: [issue5543] sys.last_type missing In-Reply-To: <1237802508.05.0.8782027083.issue5543@psf.upfronthosting.co.za> Message-ID: <1237841295.2.0.0837118981475.issue5543@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70552. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 21:55:30 2009 From: report at bugs.python.org (Paul Moore) Date: Mon, 23 Mar 2009 20:55:30 +0000 Subject: [issue2889] curses for windows (alternative patch) In-Reply-To: <1210919907.42.0.842256015219.issue2889@psf.upfronthosting.co.za> Message-ID: <1237841730.75.0.0703430893633.issue2889@psf.upfronthosting.co.za> Changes by Paul Moore : ---------- nosy: +pmoore _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Mon Mar 23 22:01:30 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Mon, 23 Mar 2009 21:01:30 +0000 Subject: [issue5541] File's current position inconsistent with 'a+' mode In-Reply-To: <1237796784.39.0.86522917715.issue5541@psf.upfronthosting.co.za> Message-ID: <1237842090.8.0.318090772364.issue5541@psf.upfronthosting.co.za> Martin v. L?wis added the comment: In 2.x, the mode will do whatever the C library does; this is as it ought to be. Standard C lets it explicitly implementation-defined whether the file position pointer is initially at the beginning or at the end of a file when the file is opened for append. Any write operating will automatically move the file pointer to the end of the file; switching between reading and writing must be synchronized with either a flush operation or a file positioning operation. So I'm closing this as "won't fix". ---------- nosy: +loewis resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 22:05:43 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 23 Mar 2009 21:05:43 +0000 Subject: [issue5544] test_fileio fails on windows MSVC Assertion In-Reply-To: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> Message-ID: <1237842343.93.0.620189303312.issue5544@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It is not strictly speaking "an error" which is causing the double close... It's the deliberate behaviour of a test I have added to check that errno is correctly set on the raised IOError when calling close() on a FileIO object whose handle has already been closed manually (with os.close()). In other words, since it is possible to retrieve the file descriptor of an IO object using the fileno() method (and, moreover, it is possible to give an existing file descriptor to the open() function so as to wrap it inside an IO object), access to a closed file is always possible and should be protected against (that is, it raises an IOError with the errno attribute equal to EBADF). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 22:13:37 2009 From: report at bugs.python.org (Kumar McMillan) Date: Mon, 23 Mar 2009 21:13:37 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237842817.1.0.0183421165188.issue5538@psf.upfronthosting.co.za> Kumar McMillan added the comment: fwiw, changing tearDown() so that it executes unconditionally will break a countless number of test suites. No test suite since the dawn of unittest has been designed to tearDown() what may not have been setUp() correctly. in other words, this is how [in my experience] setUp and tearDown are typically used together. Imageine this error in setUp() : def setUp(self): self.tmp_io = TempIO() # raise NameError("no such name TempIO") self.db = DataBase() def tearDown(self): self.tmp_io.destroy() self.db.destroy() With the change, you would need messy code like: def tearDown(self): if hasattr(self, 'tmp_io'): self.tmp_io.destroy() if hasattar(self, 'db'): self.db.destroy() This is just a simple example; things would get complicated fast. I think addCleanup() is a good idea though. Or what about a new hook that would act like tearDown() but execute unconditionally. alwaysTearDown() ? (I'm bad with names.) Using a different hook would solve the problem of porting test suites to this new paradigm. But besides that there are alternatives for doing cleanup. I.E. if setUp() in a class fails, then teardown_module() will still be called. ---------- nosy: +kumar303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 22:19:36 2009 From: report at bugs.python.org (Trundle) Date: Mon, 23 Mar 2009 21:19:36 +0000 Subject: [issue5543] sys.last_type missing In-Reply-To: <1237802508.05.0.8782027083.issue5543@psf.upfronthosting.co.za> Message-ID: <1237843176.56.0.950602149117.issue5543@psf.upfronthosting.co.za> Trundle added the comment: Is the fix really correct? The documentation clearly states about `sys.last_type`: "These three variables are not always defined; they are set when an exception is not handled and the interpreter prints an error message and a stack traceback." And there is already `traceback.print_exc()`, which is a shorthand for "print_exception(sys.exc_type, sys.exc_value, sys.exc_traceback, limit, file)". So, in my opinion, the previous behaviour was intended behaviour, and the OP needs to use `traceback.print_exc()`. ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 22:24:03 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Mar 2009 21:24:03 +0000 Subject: [issue5543] sys.last_type missing In-Reply-To: <1237802508.05.0.8782027083.issue5543@psf.upfronthosting.co.za> Message-ID: <1237843443.98.0.944569176001.issue5543@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Trundle, you are correct. Reverted in r697553. ---------- resolution: fixed -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 22:27:23 2009 From: report at bugs.python.org (Roumen Petrov) Date: Mon, 23 Mar 2009 21:27:23 +0000 Subject: [issue5545] multiprocessing: switch to autoconf detection of platform values In-Reply-To: <1237828557.72.0.911819794631.issue5545@psf.upfronthosting.co.za> Message-ID: <1237843643.54.0.0862539668515.issue5545@psf.upfronthosting.co.za> Roumen Petrov added the comment: What about AC_CHECK_FUNC* macros ? ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 22:35:30 2009 From: report at bugs.python.org (Garrett Cooper) Date: Mon, 23 Mar 2009 21:35:30 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237844130.36.0.442968151449.issue5538@psf.upfronthosting.co.za> Garrett Cooper added the comment: Excellent point Kumar. Here's what I'm trying to accomplish... I'm a part of a team that's testing out IOSd on an up and coming Unix foundation platform. This requires starting up a series of services, ensuring that they have come up, and then login to the IOS console, then IF the user gets their configuration correct (because I'm providing a means for the user to configure IOS) the setup stage of the testcase will be complete. IF NOT (and here comes the tricky part), the UUT is in a really questionable / funky state and I can't be sure if the system is really usable for additional tests without restarting / reinitializing it. This in and of itself is more problematic to deal with as that means I'd need to attach myself to the local console and listen for restart to complete, then issue configuration parameters to boot up the device, etc... This is being done once by another Tcl script, so I'm trying to avoid having to reinvent the wheel for known working methods. Hopefully that better illustrates the quandary that I'm dealing with :). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 22:38:36 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 23 Mar 2009 21:38:36 +0000 Subject: [issue5546] PyDict_SetItemString mentions PyString_FromString which does not exist In-Reply-To: <1237844316.22.0.714323414222.issue5546@psf.upfronthosting.co.za> Message-ID: <1237844316.22.0.714323414222.issue5546@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : The documentation for PyDict_SetItemString contains the text "The key object is created using PyString_FromString(key)". However, PyString_FromString has been removed in Python 3. Perhaps it should read PyUnicode_FromString? ---------- assignee: georg.brandl components: Documentation messages: 84041 nosy: georg.brandl, stutzbach severity: normal status: open title: PyDict_SetItemString mentions PyString_FromString which does not exist versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 22:51:08 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Mar 2009 21:51:08 +0000 Subject: [issue1034053] unittest.py patch: add skipped test functionality Message-ID: <1237845068.71.0.830619559208.issue1034053@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Committed my patch in r70555. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 22:52:16 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Mar 2009 21:52:16 +0000 Subject: [issue5546] PyDict_SetItemString mentions PyString_FromString which does not exist In-Reply-To: <1237844316.22.0.714323414222.issue5546@psf.upfronthosting.co.za> Message-ID: <1237845136.43.0.740749106449.issue5546@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70556. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 23:17:45 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 23 Mar 2009 22:17:45 +0000 Subject: [issue5547] The Py_InitModule functions no longer exist, but remain in the docs In-Reply-To: <1237846664.94.0.236567796822.issue5547@psf.upfronthosting.co.za> Message-ID: <1237846664.94.0.236567796822.issue5547@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : Py_InitModule, Py_InitModule3, etc. are mentioned in the docs (including the extending tutorial!), but no longer exist. ---------- assignee: georg.brandl components: Documentation messages: 84044 nosy: georg.brandl, stutzbach severity: normal status: open title: The Py_InitModule functions no longer exist, but remain in the docs versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 23:19:09 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 23 Mar 2009 22:19:09 +0000 Subject: [issue5548] In the tutorial, PyMODINIT_FUNC is shown as having a return type of void rather than PyObject * In-Reply-To: <1237846749.48.0.0822005616246.issue5548@psf.upfronthosting.co.za> Message-ID: <1237846749.48.0.0822005616246.issue5548@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : PyMODINIT_FUNC functions should return the module object or NULL on error. Or at least that what it looks like the core modules are doing. ;-) ---------- assignee: georg.brandl components: Documentation messages: 84045 nosy: georg.brandl, stutzbach severity: normal status: open title: In the tutorial, PyMODINIT_FUNC is shown as having a return type of void rather than PyObject * versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 23:21:09 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 23 Mar 2009 22:21:09 +0000 Subject: [issue5549] PyModule_Create and PyModuleDef are undocumented Message-ID: <1237846869.86.0.109740749085.issue5549@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : ---------- assignee: georg.brandl components: Documentation nosy: georg.brandl, stutzbach severity: normal status: open title: PyModule_Create and PyModuleDef are undocumented versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 23 23:47:54 2009 From: report at bugs.python.org (Kumar McMillan) Date: Mon, 23 Mar 2009 22:47:54 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237848474.51.0.376190776039.issue5538@psf.upfronthosting.co.za> Kumar McMillan added the comment: For the record, I too have been plagued by failing setUp's :( and the pattern you describe is not uncommon. I was just pointing out that changing the semantics of tearDown() will affect a lot of existing code. As with any backwards incompatible change the effort of porting to the new functionality should be considered. In this case my fear is that it will be hard to know that tearDown() is not behaving how it used to behave since an exception in tearDown() would be once removed from the actual exception in setUp(). More directly addressing your problem, have you considered switching to context managers? Could maybe do something like: with ConfiguredIOS(): test_something() the context manager could define __exit__() which would get called unconditionally. Also, these could be chained together as decorators to sort-of do what it seems like you were trying to do in tearDown(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 00:11:49 2009 From: report at bugs.python.org (Garrett Cooper) Date: Mon, 23 Mar 2009 23:11:49 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1237849909.56.0.129892918826.issue5538@psf.upfronthosting.co.za> Garrett Cooper added the comment: Unfortunately we're still stuck on 2.4.5 because I don't have enough buy-in from tech leads and architects to upgrade right now -_-... Good idea though :] *stores for later*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 02:36:52 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 24 Mar 2009 01:36:52 +0000 Subject: [issue5549] PyModule_Create and PyModuleDef are undocumented In-Reply-To: <1237858612.92.0.150129684185.issue5549@psf.upfronthosting.co.za> Message-ID: <1237858612.92.0.150129684185.issue5549@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Fixed in r70576. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 02:37:10 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 24 Mar 2009 01:37:10 +0000 Subject: [issue5547] The Py_InitModule functions no longer exist, but remain in the docs In-Reply-To: <1237846664.94.0.236567796822.issue5547@psf.upfronthosting.co.za> Message-ID: <1237858630.79.0.318390458144.issue5547@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70576. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 02:54:13 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 24 Mar 2009 01:54:13 +0000 Subject: [issue2266] Missing documentation about old/new-style classes In-Reply-To: <1205167505.81.0.00833692461216.issue2266@psf.upfronthosting.co.za> Message-ID: <1237859653.39.0.938780117745.issue2266@psf.upfronthosting.co.za> R. David Murray added the comment: I think this can be closed as 'out of date'. The language reference chapter has a section on old and new style classes, and in the tutorial section the reference to 'new style class' is hyperlinked to a glossary entry that in turn contains a pointer to that language reference section. ---------- nosy: +bitdancer priority: -> low status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 03:21:15 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 24 Mar 2009 02:21:15 +0000 Subject: [issue2259] Poor support other than 44.1khz, 16bit audio files? In-Reply-To: <1205075207.56.0.203597492215.issue2259@psf.upfronthosting.co.za> Message-ID: <1237861275.38.0.0163123558131.issue2259@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- keywords: +easy stage: -> test needed type: crash -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 03:25:03 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 24 Mar 2009 02:25:03 +0000 Subject: [issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim In-Reply-To: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> Message-ID: <1237861503.84.0.458612378874.issue5129@psf.upfronthosting.co.za> Guilherme Polo added the comment: I just tried it here under Windows XP (using python 2.6.1 from python.org) and the untabify dialog showed up with 8 as the default number of columns per tab (although there are at least two bugs with this dialog: i) I clicked on cancel but it still untabified the region; ii) The window shows at a place before it is properly configured and then shows up in its final place). Also, from what I remember, IDLE always assume that a tab takes 8 columns and never modifies it. But the untabify dialog doesn't use this fixed value, so it will vary depending on the code you run it (just remembering again, with your bug.py it did show 8 here). As for the real problem mentioned -- the differences in the visual, regarding the indentation, between 2.5 and 2.6, I can't comment yet. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 03:34:51 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 24 Mar 2009 02:34:51 +0000 Subject: [issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim In-Reply-To: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> Message-ID: <1237862091.92.0.406755660427.issue5129@psf.upfronthosting.co.za> Guilherme Polo added the comment: It turns out that the problem is not in differences between IDLE in 2.5 and the one in 2.6, instead it is caused by the usage of Tk 8.5 by IDLE 2.6 (included in the Windows package). Changing to Tk 8.4, IDLE 2.6 displays in the same way as 2.5 (tested on Linux where I also had the difference in visual). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 03:54:46 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 24 Mar 2009 02:54:46 +0000 Subject: [issue5540] "file objects" in python 3 tutorial In-Reply-To: <1237819308.14.0.800929730072.issue5540@psf.upfronthosting.co.za> Message-ID: <1afaf6160903231954s4864a550p8ad8501e4d861236@mail.gmail.com> Benjamin Peterson added the comment: 2009/3/23 David W. Lambert : > > David W. Lambert added the comment: > > File objects should not be discussed in the tutorial to emphasize that > the file type is gone. > > File objects should be in the tutorial as a useful familiar concept. I don't understand. These statements seem contradictory to me. What exactly do you want changed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 03:58:04 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 24 Mar 2009 02:58:04 +0000 Subject: [issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim In-Reply-To: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> Message-ID: <1237863484.33.0.43826592678.issue5129@psf.upfronthosting.co.za> Guilherme Polo added the comment: You do not need IDLE to reproduce the problem: import Tkinter text = Tkinter.Text() text.pack() text.insert('1.0', 'class C:\n\tdef m(self, c):\n ' 'if c:\n c = False\n' '\t\t\tc = False\n else:\n ' '\t\tc = True\n\t\tc = True\n') text.mainloop() Then run it with tk 8.4 and tk 8.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 04:07:38 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Tue, 24 Mar 2009 03:07:38 +0000 Subject: [issue5549] PyModule_Create and PyModuleDef are undocumented In-Reply-To: <1237858612.92.0.150129684185.issue5549@psf.upfronthosting.co.za> Message-ID: <1237864058.68.0.0408099675268.issue5549@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: That was quick! Thanks! :-) ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Mehmet_K=C3=B6se_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Tue Mar 24 04:27:56 2009 From: =?utf-8?q?Mehmet_K=C3=B6se_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Mehmet_K=C3=B6se_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Tue, 24 Mar 2009 03:27:56 +0000 Subject: [issue4630] IDLE no longer respects .Xdefaults insertOffTime In-Reply-To: <1228982754.08.0.523311497339.issue4630@psf.upfronthosting.co.za> Message-ID: <1237865276.26.0.260336585655.issue4630@psf.upfronthosting.co.za> Mehmet K?se added the comment: Would you please share that code with us. ---------- nosy: +decaf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 04:32:35 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 24 Mar 2009 03:32:35 +0000 Subject: [issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim In-Reply-To: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> Message-ID: <1237865555.25.0.124257586653.issue5129@psf.upfronthosting.co.za> Guilherme Polo added the comment: Patch attached, if someone can create a test for it then that would be very good. ---------- keywords: +patch Added file: http://bugs.python.org/file13404/fix_5129.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 05:49:02 2009 From: report at bugs.python.org (cocobear) Date: Tue, 24 Mar 2009 04:49:02 +0000 Subject: [issue5550] urllib2 use of opener.addheaders In-Reply-To: <1237870141.83.0.616869799184.issue5550@psf.upfronthosting.co.za> Message-ID: <1237870141.83.0.616869799184.issue5550@psf.upfronthosting.co.za> New submission from cocobear : take a look at following code: import urllib2 headers = [("Content-Type","application/oct-stream"),] opener = urllib2.build_opener() opener.addheaders = headers urllib2.install_opener(opener) print "after install_opener" ret = opener.open('http://www.google.com',data="word=ss") print ret.read() I got real send data by wireshark? POST / HTTP/1.1 Accept-Encoding: identity Content-Length: 7 Host: www.dict.cn Content-Type: application/x-www-form-urlencoded Connection: close word=ss I had already set HTTP header of Content-Type, but actally urllib2 change this header. I got this piece of code from urllib2.py: if request.has_data(): # POST data = request.get_data() if not request.has_header('Content-type'): request.add_unredirected_header( 'Content-type', 'application/x-www-form-urlencoded') if not request.has_header('Content-length'): request.add_unredirected_header( 'Content-length', '%d' % len(data)) scheme, sel = splittype(request.get_selector()) sel_host, sel_path = splithost(sel) if not request.has_header('Host'): request.add_unredirected_header('Host', sel_host or host) for name, value in self.parent.addheaders: name = name.capitalize() if not request.has_header(name): request.add_unredirected_header(name, value) first,urllib2 will add Content-Type if it's POST method, then it try to add headers which holded by opener, but there's already 'Content-Type', so the attribute->addheaders of opener will not append. I can use Request to add 'Content-Type' header? request = urllib2.Request(url,headers=headers,data=body) The example code that I wrote doesn't correct? or it's a problem of urllib2? ---------- components: Library (Lib) messages: 84058 nosy: cocobear severity: normal status: open title: urllib2 use of opener.addheaders type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 06:30:18 2009 From: report at bugs.python.org (Vernon Cole) Date: Tue, 24 Mar 2009 05:30:18 +0000 Subject: [issue1396258] KeyboardInterrupt prevents return to Windows console Message-ID: <1237872618.95.0.621904542178.issue1396258@psf.upfronthosting.co.za> Vernon Cole added the comment: A quick test on Vista shows that this problem is not present in Python 2.6 nor 3.0. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?IkrDvHJnZW4gQS4gRXJoYXJkIiA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?= at psf.upfronthosting.co.za Tue Mar 24 07:33:20 2009 From: =?utf-8?b?IkrDvHJnZW4gQS4gRXJoYXJkIiA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?= at psf.upfronthosting.co.za (=?utf-8?b?IkrDvHJnZW4gQS4gRXJoYXJkIiA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?= at psf.upfronthosting.co.za) Date: Tue, 24 Mar 2009 06:33:20 +0000 Subject: [issue5551] os.path.ismount take a cross-device symlink for a mountpoint In-Reply-To: <1237876400.19.0.961076831302.issue5551@psf.upfronthosting.co.za> Message-ID: <1237876400.19.0.961076831302.issue5551@psf.upfronthosting.co.za> New submission from J?rgen A. Erhard : Confirmed to exist in 2.6.1 (r261:67515) and 3.0 (r30:67503). Seems to have been introduced somewhere in the 2.5 timeline, as 2.4 doesn't show this bug. ---------- components: Library (Lib) messages: 84060 nosy: jae severity: normal status: open title: os.path.ismount take a cross-device symlink for a mountpoint type: behavior versions: Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 07:58:58 2009 From: report at bugs.python.org (Mark Summerfield) Date: Tue, 24 Mar 2009 06:58:58 +0000 Subject: [issue4630] IDLE no longer respects .Xdefaults insertOffTime In-Reply-To: <1228982754.08.0.523311497339.issue4630@psf.upfronthosting.co.za> Message-ID: <1237877938.44.0.139815866475.issue4630@psf.upfronthosting.co.za> Mark Summerfield added the comment: Py2.6: idlelib/EditorWindow.py change line 110 from: width=self.width, to: width=self.width, insertofftime=0, Py3.0 apply the same change to line 112 This will switch off cursor blink (and annoy people who want cursor blink). So really instead of setting it to 0 you should set it to a variable. On Windows the Win32 API has a function you can call to find out the user's preferred blink rate and you can use that. On Mac OS X there's no such thing so you would need to add an option to IDLE's configuration dialog. On Linux the .Xdefaults file should be read and *insertOffTime respected. But since for Mac you have to add it to the configuration dialog, it might just be easier to just do that for all platform a simple [ ] blinking cursor check box would suffice. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?IkrDvHJnZW4gQS4gRXJoYXJkIiA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?= at psf.upfronthosting.co.za Tue Mar 24 08:05:14 2009 From: =?utf-8?b?IkrDvHJnZW4gQS4gRXJoYXJkIiA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?= at psf.upfronthosting.co.za (=?utf-8?b?IkrDvHJnZW4gQS4gRXJoYXJkIiA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?= at psf.upfronthosting.co.za) Date: Tue, 24 Mar 2009 07:05:14 +0000 Subject: [issue5551] os.path.ismount takes a cross-device symlink for a mountpoint In-Reply-To: <1237876400.19.0.961076831302.issue5551@psf.upfronthosting.co.za> Message-ID: <1237878314.92.0.547065874352.issue5551@psf.upfronthosting.co.za> J?rgen A. Erhard added the comment: Microscopic typo in title fixed (stickler for details, me? ;) ---------- title: os.path.ismount take a cross-device symlink for a mountpoint -> os.path.ismount takes a cross-device symlink for a mountpoint _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 09:09:27 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 24 Mar 2009 08:09:27 +0000 Subject: [issue2259] Poor support other than 44.1khz, 16bit audio files? In-Reply-To: <1205075207.56.0.203597492215.issue2259@psf.upfronthosting.co.za> Message-ID: <1237882167.71.0.689956558062.issue2259@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- priority: -> normal versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 09:39:49 2009 From: report at bugs.python.org (Andreas Schawo) Date: Tue, 24 Mar 2009 08:39:49 +0000 Subject: [issue5544] test_fileio fails on windows MSVC Assertion In-Reply-To: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> Message-ID: <1237883989.12.0.543711449404.issue5544@psf.upfronthosting.co.za> Andreas Schawo added the comment: I stepped back to r70187 and got no assertion. An update to r70349 result in an assertion. So I reverted the changes in test_fileio.py of r70349 and got no assertion. But the test should work without assertion. I tested releases 2.6.1, 3.0.1 and current trunk with: import os f = open('test.test', 'w') os.close(f.fileno()) f.close() 2.6.1 and 3.0.1 raised an Exception with Errno 9. With current trunk I've got the MSVC assertion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 09:45:18 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 24 Mar 2009 08:45:18 +0000 Subject: [issue2245] aifc cannot handle unrecognised chunk type "CHAN" In-Reply-To: <1204822344.2.0.466596380411.issue2245@psf.upfronthosting.co.za> Message-ID: <1237884318.47.0.802922051285.issue2245@psf.upfronthosting.co.za> R. David Murray added the comment: The patch posted in issue 2259 solves this issue by deleting the skiplist entirely and simply ignoring any unknown chunk. Given the relatively long list of skipped types compared to the short list of handled types, this may be reasonable. I am recommending in that issue that the skiplist change be broken out into a separate patch and attached to this ticket as a proposed fix. An alternative fix would be to add CHAN to the skiplist and/or turn the existing error into a warning. Someone more knowledgeable about AIFF and sound files would perhaps know which would be more appropriate. ---------- keywords: +easy nosy: +bitdancer priority: -> normal stage: -> test needed type: feature request -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 09:49:13 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 24 Mar 2009 08:49:13 +0000 Subject: [issue2259] Poor support other than 44.1khz, 16bit audio files? In-Reply-To: <1205075207.56.0.203597492215.issue2259@psf.upfronthosting.co.za> Message-ID: <1237884553.59.0.758965039748.issue2259@psf.upfronthosting.co.za> R. David Murray added the comment: Killing two birds with one stone is actually a bad idea when it comes to patches. I would recommend breaking this patch into its two independent pieces, the alignment fix and the skiplist fix, and attaching the skiplist fix to issue 2245 as a proposed fix there. Both issues need tests. ---------- nosy: +bitdancer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 10:00:09 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 09:00:09 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237885209.3.0.676716408507.issue5512@psf.upfronthosting.co.za> STINNER Victor added the comment: Would it be possible to port the patch to python trunk? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 10:10:02 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 24 Mar 2009 09:10:02 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237885802.72.0.69306689151.issue5512@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hi Victor! I already applied the x_divrem patch to the trunk and to py3k. Did you mean the release branch? I'd prefer not to backport this to 2.6 or 3.0: it's not a new feature, but it's not a bugfix either and there's always some risk of breakage... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 10:12:00 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 09:12:00 +0000 Subject: [issue5512] Streamline integer division In-Reply-To: <1237414287.96.0.340893009762.issue5512@psf.upfronthosting.co.za> Message-ID: <1237885920.9.0.0822539709584.issue5512@psf.upfronthosting.co.za> STINNER Victor added the comment: > I already applied the x_divrem patch to the trunk and to py3k Oops! I taught that you applied it to py3k and release30-maint :-/ It's ok, trunk and py3k is enough ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 10:36:39 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 24 Mar 2009 09:36:39 +0000 Subject: [issue3944] faster long multiplication In-Reply-To: <1222165559.78.0.447355238601.issue3944@psf.upfronthosting.co.za> Message-ID: <1237887399.73.0.684166530869.issue3944@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks! Unfortunately, it looks like I messed this up yesterday by removing mul1 (after the division patch went in, mul1 wasn't used any more). I'll fix this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 10:44:45 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 24 Mar 2009 09:44:45 +0000 Subject: [issue5544] test_fileio fails on windows MSVC Assertion In-Reply-To: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> Message-ID: <1237887885.98.0.646556484511.issue5544@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I can definitely reproduce the problem under a Windows XP virtual machine using Visual C++ 2008 Express in debug mode. Here is a screenshot. Unfortunately, I'm not a Windows programmer and I'm not able to produce a patch for this. But the close() call in _fileio.c should certainly be protected by whatever magic is necessary. ---------- Added file: http://bugs.python.org/file13405/Capture-QEMU.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 10:58:09 2009 From: report at bugs.python.org (Sjoerd Mullender) Date: Tue, 24 Mar 2009 09:58:09 +0000 Subject: [issue2245] aifc cannot handle unrecognised chunk type "CHAN" In-Reply-To: <1204822344.2.0.466596380411.issue2245@psf.upfronthosting.co.za> Message-ID: <1237888689.79.0.846643100282.issue2245@psf.upfronthosting.co.za> Sjoerd Mullender added the comment: I wrote the module 16 years ago, but haven't done anything with AIFF files for probably at least 10, so I can't really comment on the merits of the two solutions (delete _skiplist or add CHAN to _skiplist). I'm fine with either. However, the proposed patch leaves an `else: pass' which should be removed if the patch is adopted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 11:07:48 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 24 Mar 2009 10:07:48 +0000 Subject: [issue3944] faster long multiplication In-Reply-To: <1222165559.78.0.447355238601.issue3944@psf.upfronthosting.co.za> Message-ID: <1237889268.35.0.178833733369.issue3944@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated version of longobject_diff1: - add mul1 back in - rename MAX_PARTIALS to the more descriptive BLOCK_MUL_SIZE - rewrite digits_multiply so that the call to digits_multiply_add always has b_size=BLOCK_MUL_SIZE, then hard-code this and get rid of the b_size argument. This should give the compiler some opportunities for loop-unrolling in digits_multiply_add. ---------- Added file: http://bugs.python.org/file13406/faster_long_mul.patch _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Mehmet_K=C3=B6se_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Tue Mar 24 11:37:52 2009 From: =?utf-8?q?Mehmet_K=C3=B6se_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Mehmet_K=C3=B6se_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Tue, 24 Mar 2009 10:37:52 +0000 Subject: [issue4630] IDLE no longer respects .Xdefaults insertOffTime In-Reply-To: <1228982754.08.0.523311497339.issue4630@psf.upfronthosting.co.za> Message-ID: <1237891072.21.0.813779257806.issue4630@psf.upfronthosting.co.za> Mehmet K?se added the comment: Thank you very much. It was a kind of chinese torture. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 11:47:45 2009 From: report at bugs.python.org (Mark Summerfield) Date: Tue, 24 Mar 2009 10:47:45 +0000 Subject: [issue4630] IDLE no longer respects .Xdefaults insertOffTime In-Reply-To: <1228982754.08.0.523311497339.issue4630@psf.upfronthosting.co.za> Message-ID: <1237891665.53.0.0869014101072.issue4630@psf.upfronthosting.co.za> Mark Summerfield added the comment: Yes, blinking cursors are torture for me too. Fortunately you can switch them off globally in Windows, and in most cases on Linux (which is what I use). But not on Mac OS X, and not it seems for Java apps. This site has some tips: http://www.jurta.org/en/prog/noblink ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 12:30:22 2009 From: report at bugs.python.org (M. Dietrich) Date: Tue, 24 Mar 2009 11:30:22 +0000 Subject: [issue1982] Feature: extend strftime to accept milliseconds In-Reply-To: <1201805956.67.0.436839158391.issue1982@psf.upfronthosting.co.za> Message-ID: <1237894222.15.0.37817247423.issue1982@psf.upfronthosting.co.za> M. Dietrich added the comment: i am not shure what the code snippet shall proove but shouldnt't it read from datetime import datetime a_datetime = datetime.now() a_datetime = a_datetime.replace(microsecond = 1) iso_str = a_datetime.isoformat() b_datetime = datetime.strptime(iso_str, "%Y-%m-%dT%H:%M:%S.%f") assert(a_datetime == b_datetime) ? i general i would expect for each operation a reverse if possible to be complete. so if there is a strftime, i look for a strptime, if there is a isoformat, i like a isoparse. and to be complete i need a format tag for ms if there is a microseconds member in datatime object. ---------- nosy: +mdt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 12:43:28 2009 From: report at bugs.python.org (Andreas Schawo) Date: Tue, 24 Mar 2009 11:43:28 +0000 Subject: [issue5544] test_fileio fails on windows MSVC Assertion In-Reply-To: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> Message-ID: <1237895008.01.0.221033253434.issue5544@psf.upfronthosting.co.za> Andreas Schawo added the comment: r69214 works with os.close(f.fileno());f.close() (Exception with Errno 9) r69560 does not compile r70152 test_fileio failed (different reason) MSVC Assertion with os.close(f.fileno());f.close() I was not able to use _fileio.c from r69214 in cause of other dependencies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 14:24:37 2009 From: report at bugs.python.org (Ismail Donmez) Date: Tue, 24 Mar 2009 13:24:37 +0000 Subject: [issue3402] test_nis is hanging on Solaris In-Reply-To: <1216346193.57.0.216784355152.issue3402@psf.upfronthosting.co.za> Message-ID: <1237901077.47.0.126345343548.issue3402@psf.upfronthosting.co.za> Ismail Donmez added the comment: Well the test is now skipped on _all_ platforms. This looks wrong. ---------- nosy: +cartman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 14:42:06 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 24 Mar 2009 13:42:06 +0000 Subject: [issue5552] With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows In-Reply-To: <1237902126.36.0.583275173569.issue5552@psf.upfronthosting.co.za> Message-ID: <1237902126.36.0.583275173569.issue5552@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This is a potentially annoying incompatibility between platforms. Under Linux: >>> import os >>> print(os.device_encoding(1000)) None ---------- components: Interpreter Core messages: 84079 nosy: pitrou priority: normal severity: normal status: open title: With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 14:42:37 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 24 Mar 2009 13:42:37 +0000 Subject: [issue5552] With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows In-Reply-To: <1237902126.36.0.583275173569.issue5552@psf.upfronthosting.co.za> Message-ID: <1237902157.85.0.551202017548.issue5552@psf.upfronthosting.co.za> Antoine Pitrou added the comment: And under Windows: >>> print(os.device_encoding(1000)) Traceback (most recent call last): File "", line 1, in OSError: [Errno 9] Bad file descriptor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 14:43:32 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 24 Mar 2009 13:43:32 +0000 Subject: [issue5544] test_fileio fails on windows MSVC Assertion In-Reply-To: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> Message-ID: <1237902212.38.0.828714311449.issue5544@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The fix is wrong, it doesn't raise an error when the fd is invalid... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 14:56:55 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 24 Mar 2009 13:56:55 +0000 Subject: [issue5552] With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows In-Reply-To: <1237902126.36.0.583275173569.issue5552@psf.upfronthosting.co.za> Message-ID: <1237903015.74.0.291456506161.issue5552@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This may be related to the following lines in posixmodule.c: if (!_PyVerify_fd(fd)) return posix_error(); ---------- nosy: +krisvale _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 15:02:51 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 24 Mar 2009 14:02:51 +0000 Subject: [issue5544] test_fileio fails on windows MSVC Assertion In-Reply-To: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> Message-ID: <1237903371.34.0.178836318592.issue5544@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Basically, all FileIO methods should be protected (I'm not even sure why you are asking! we can't let the interpreter crash rather than raise an exception). Someone has to write additional tests for those though, for now only close() is tested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 15:18:53 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 24 Mar 2009 14:18:53 +0000 Subject: [issue5552] With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows In-Reply-To: <1237902126.36.0.583275173569.issue5552@psf.upfronthosting.co.za> Message-ID: <1237904333.84.0.200048863204.issue5552@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 15:26:54 2009 From: report at bugs.python.org (Peter Waller) Date: Tue, 24 Mar 2009 14:26:54 +0000 Subject: [issue694374] Recursive regular expressions Message-ID: <1237904814.37.0.227061281012.issue694374@psf.upfronthosting.co.za> Peter Waller added the comment: It looks like Matthew has dropped this feature from consideration. See msg83993 . ---------- nosy: +pwaller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 15:46:19 2009 From: report at bugs.python.org (HiroakiKawai) Date: Tue, 24 Mar 2009 14:46:19 +0000 Subject: [issue2259] Poor support other than 44.1khz, 16bit audio files? In-Reply-To: <1205075207.56.0.203597492215.issue2259@psf.upfronthosting.co.za> Message-ID: <1237905979.29.0.822147874821.issue2259@psf.upfronthosting.co.za> HiroakiKawai added the comment: Killing one or two is not the point in this issue ticket. The ticket is opened per issue what one experienced. Thus there might be different tickets that needs the same patch. For this issue, the problem is "Poor support other than 44.1khz, 16bit audio files?". I posted one patch for this issue. I think the patch could not be separated, and should not be. I could not see it resonable to separate the patch into two. :( If you do really want to have separate patches, I can prepare. Or anyone can prepare. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 15:49:19 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Tue, 24 Mar 2009 14:49:19 +0000 Subject: [issue5553] Py_LOCAL_INLINE(type) doesn't actually inline except using MSC In-Reply-To: <1237906159.31.0.817735827451.issue5553@psf.upfronthosting.co.za> Message-ID: <1237906159.31.0.817735827451.issue5553@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : Below is the relevant snippet from pyport.h. There are two reasons that Py_LOCAL_INLINE doesn't actually emit the "inline" keyword (unless compiling with MSC). First, "configure" does not have code to test the compiler and define USE_INLINE if appropriate. Second, the code undefines USE_INLINE even if defined! (oops? ;) ) The snippet is replicated with slightly different names near the top of _sre.c. #undef USE_INLINE /* XXX - set via configure? */ #if defined(_MSC_VER) #if defined(PY_LOCAL_AGGRESSIVE) /* enable more aggressive optimization for visual studio */ #pragma optimize("agtw", on) #endif /* ignore warnings if the compiler decides not to inline a function */ #pragma warning(disable: 4710) /* fastest possible local call under MSVC */ #define Py_LOCAL(type) static type __fastcall #define Py_LOCAL_INLINE(type) static __inline type __fastcall #elif defined(USE_INLINE) #define Py_LOCAL(type) static type #define Py_LOCAL_INLINE(type) static inline type #else #define Py_LOCAL(type) static type #define Py_LOCAL_INLINE(type) static type #endif ---------- messages: 84089 nosy: stutzbach severity: normal status: open title: Py_LOCAL_INLINE(type) doesn't actually inline except using MSC versions: Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 15:55:42 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 24 Mar 2009 14:55:42 +0000 Subject: [issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim In-Reply-To: <1233595281.89.0.590637316754.issue5129@psf.upfronthosting.co.za> Message-ID: <1237906542.7.0.35075286091.issue5129@psf.upfronthosting.co.za> Changes by Guilherme Polo : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 15:58:26 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 24 Mar 2009 14:58:26 +0000 Subject: [issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim In-Reply-To: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> Message-ID: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> Guilherme Polo added the comment: platform: Windows XP In a file (cf attached file) with mixed tabs and spaces, the line following "else:" appears at the same level than "else:", while the file probably still works with Python 2.6. At least, IDLE 2.5 or IDLE 2.4 or vim don't have this problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 16:05:44 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 24 Mar 2009 15:05:44 +0000 Subject: [issue2259] Poor support other than 44.1khz, 16bit audio files? In-Reply-To: <1205075207.56.0.203597492215.issue2259@psf.upfronthosting.co.za> Message-ID: <1237907144.02.0.348892993604.issue2259@psf.upfronthosting.co.za> R. David Murray added the comment: The issue isn't whether the patch(es) are on one issue or not, if you want to keep them here, that's fine. This patch is so small that breaking it up isn't strictly necessary, either, though I still think it would be cleaner and more likely to get applied if you did so. (My thought after reading the developer documentation is that each patch file should consist of the minimum amount of independently testable changes, regardless of whether or not they unltimately fix a single issue.) But I could be wrong, it's just my opinion :) What we do for sure need in order to get this closer to having the devs accept it is unit (or doctest) test cases that demonstrate the problem and thereby demonstrate that the patch fixes the problem. In case you didn't see it, it was also suggested, on the other ticket, that the 'else: pass' could just be dropped. (I'm one of the people doing ticket triage, by the way, in case you wonder what my role is...my goal is to get tickets resolved, by getting tickets up to a high enough quality that the devs can easily accept or reject them.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 16:13:07 2009 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 24 Mar 2009 15:13:07 +0000 Subject: [issue694374] Recursive regular expressions Message-ID: <1237907587.39.0.07543892294.issue694374@psf.upfronthosting.co.za> Matthew Barnett added the comment: There are 2 reasons: 1. I've been told that my current patches contain too many differences from the current implementation, so basically I have to go back to the start and introduce any changes a little at a time, without knowing whether any particular change will be accepted. 2. I think that recursive regular expressions are starting to stray into the realm of pyparsing and so forth. So I might not have the time (and I don't think I have the inclination!) to implement them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 17:24:29 2009 From: report at bugs.python.org (Jean-Michel Fauth) Date: Tue, 24 Mar 2009 16:24:29 +0000 Subject: [issue4626] compile() doesn't ignore the source encoding when a string is passed in In-Reply-To: <1228976357.63.0.133847904092.issue4626@psf.upfronthosting.co.za> Message-ID: <1237911869.85.0.273559436801.issue4626@psf.upfronthosting.co.za> Jean-Michel Fauth added the comment: I'm glad to have discovered this topic. I bumped into something similar when I toyed with an interactive interpreter. from code import InteractiveInterpreter ii = InteractiveInterpreter() source = ... ii.runsource(source) What should be the encoding and/or the type (str, bytes) of the "source" string? Taking into account the encoding of the script which contains this code, I have the feeling there is always something going wrong, this can be a "non ascii" char in the source (encoded in utf-8!) or the interactive interpreter does not accept very well a byte string representing a utf-8 encoded string. IDLE is not suffering from this. Its interactive interpreter is somehow receiving "ucs-2 ready string" from tkinter. I'm a little bit confused here (win2k, winXP sp2, Python 3.0.1). ---------- nosy: +jmfauth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 17:34:50 2009 From: report at bugs.python.org (Roy H. Han) Date: Tue, 24 Mar 2009 16:34:50 +0000 Subject: [issue1598] unexpected response in imaplib In-Reply-To: <1197427257.83.0.419655228027.issue1598@psf.upfronthosting.co.za> Message-ID: <1237912490.56.0.201198315842.issue1598@psf.upfronthosting.co.za> Roy H. Han added the comment: I'm also getting the same error retrieving a message through IMAP from a Lotus Notes server. Traceback (most recent call last): File "mail.py", line 152, in if 'setup' == argument: setup() File "mail.py", line 61, in archive for message in imapBox.read(includes=includes, excludes=[mail_store_imap.folder_trash]): File "/var/www/pylons/scout/scout/lib/mail_store_imap.py", line 89, in read returnCode, data = self.server.fetch(messageIndex, '(RFC822)') File "/usr/lib/python2.5/imaplib.py", line 437, in fetch typ, dat = self._simple_command(name, message_set, message_parts) File "/usr/lib/python2.5/imaplib.py", line 1055, in _simple_command return self._command_complete(name, self._command(name, *args)) File "/usr/lib/python2.5/imaplib.py", line 887, in _command_complete raise self.abort('command: %s => %s' % (name, val)) imaplib.abort: command: FETCH => unexpected response: ')' ---------- nosy: +starsareblueandfaraway _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 18:02:02 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 24 Mar 2009 17:02:02 +0000 Subject: [issue2485] Traceback changed in 2.6 for unhashable objects In-Reply-To: <1206480481.83.0.917185709948.issue2485@psf.upfronthosting.co.za> Message-ID: <1237914122.87.0.659784767479.issue2485@psf.upfronthosting.co.za> R. David Murray added the comment: In 2.5, the fact that list was unhashable was checked in the list object, and that message was hardcoded there. In 2.6, the check for unhashableness uses generic code, and the resulting error substitutes the type name into the message. This message already existed and was used for other types, the difference between 2.5 and 2.6 is that list is now covered by the generic code and is not a special case. So, yes, this was intentional and no, it isn't going to get changed. ---------- components: +Interpreter Core nosy: +bitdancer priority: -> low resolution: -> wont fix stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 18:16:05 2009 From: report at bugs.python.org (Roy H. Han) Date: Tue, 24 Mar 2009 17:16:05 +0000 Subject: [issue1598] unexpected response in imaplib In-Reply-To: <1197427257.83.0.419655228027.issue1598@psf.upfronthosting.co.za> Message-ID: <1237914965.73.0.320195177508.issue1598@psf.upfronthosting.co.za> Roy H. Han added the comment: Using a different format, it seems the message involves cryptographic keys signed by Lotus Notes? >>> server.fetch(407, '(BODY.PEEK[HEADER] FLAGS)') To: person1 at place.com Subject: subject Message-ID: Date: Tue, 28 Oct 2008 17:53:22 -0400 From: person at place.com Content-Type: multipart/mixed; boundary="=_mixed 007839E2852574F0_=" MIME-Version: 1.0 X-Mailer: Lotus Notes Release 7.0.2 September 26, 2006 X-MIMETrack: S/MIME Sign by Notes Client on Person(Release 7.0.2|September 26, 2006) at 10/28/2008 05:53:11 PM,Serialize by Notes Client on Person(Release 7.0.2|September 26, 2006) at 10/28/2008 05:53:11 PM,Serialize complete at 10/28/2008 05:53:11 PM,S/MIME Sign failed at 10/28/2008 05:53:11 PM: The cryptographic key was not found,S/MIME Sign by Notes Client on Person(Release 7.0.2|September 26, 2006) at 10/28/2008 05:53:19 PM,Serialize by Notes Client on Person(Release 7.0.2|September 26, 2006) at 10/28/2008 05:53:19 PM,Serialize complete at 10/28/2008 05:53:20 PM,S/MIME Sign failed at 10/28/2008 05:53:20 PM: The cryptographic key was not found ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 18:22:19 2009 From: report at bugs.python.org (intgr) Date: Tue, 24 Mar 2009 17:22:19 +0000 Subject: [issue4690] asyncore calls handle_write() on closed sockets when use_poll=True In-Reply-To: <1229560322.27.0.660252722227.issue4690@psf.upfronthosting.co.za> Message-ID: <1237915339.1.0.671611719352.issue4690@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 18:24:22 2009 From: report at bugs.python.org (Christian Heimes) Date: Tue, 24 Mar 2009 17:24:22 +0000 Subject: [issue5545] multiprocessing: switch to autoconf detection of platform values In-Reply-To: <1237828557.72.0.911819794631.issue5545@psf.upfronthosting.co.za> Message-ID: <1237915462.68.0.783791208851.issue5545@psf.upfronthosting.co.za> Christian Heimes added the comment: AC_CHECK_FUNC works only for trivial checks that do not require additional headers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 18:24:57 2009 From: report at bugs.python.org (Ultrasick) Date: Tue, 24 Mar 2009 17:24:57 +0000 Subject: [issue5554] file.read() doesn't read the whole file In-Reply-To: <1237915497.04.0.963901802383.issue5554@psf.upfronthosting.co.za> Message-ID: <1237915497.04.0.963901802383.issue5554@psf.upfronthosting.co.za> New submission from Ultrasick : -------------------------------------------------------- # open the file file = open('F:/test.bmp', 'r') # read the content content = file.read() # close the file file.close() print "len(content): " + str(len(content)) -------------------------------------------------------- Returns len(content): 1522 on my computer. But it should be something like len(content): 1248858 ---------- components: Interpreter Core files: test.bmp messages: 84098 nosy: Ultrasick severity: normal status: open title: file.read() doesn't read the whole file type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file13407/test.bmp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 18:25:57 2009 From: report at bugs.python.org (Ultrasick) Date: Tue, 24 Mar 2009 17:25:57 +0000 Subject: [issue5554] file.read() doesn't read the whole file In-Reply-To: <1237915497.04.0.963901802383.issue5554@psf.upfronthosting.co.za> Message-ID: <1237915557.28.0.234032742629.issue5554@psf.upfronthosting.co.za> Ultrasick added the comment: tested with python 2.6.1, Windows 2k ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 18:27:06 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 17:27:06 +0000 Subject: [issue5554] file.read() doesn't read the whole file In-Reply-To: <1237915497.04.0.963901802383.issue5554@psf.upfronthosting.co.za> Message-ID: <1237915626.21.0.521197209001.issue5554@psf.upfronthosting.co.za> STINNER Victor added the comment: Retry in binary mode: open('F:/test.bmp', 'rb'). It's not a bug :-) http://docs.python.org/library/functions.html#open ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 18:27:15 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 17:27:15 +0000 Subject: [issue5554] file.read() doesn't read the whole file In-Reply-To: <1237915497.04.0.963901802383.issue5554@psf.upfronthosting.co.za> Message-ID: <1237915635.83.0.164628446836.issue5554@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 18:35:56 2009 From: report at bugs.python.org (Ultrasick) Date: Tue, 24 Mar 2009 17:35:56 +0000 Subject: [issue5554] file.read() doesn't read the whole file In-Reply-To: <1237915497.04.0.963901802383.issue5554@psf.upfronthosting.co.za> Message-ID: <1237916156.63.0.269747727552.issue5554@psf.upfronthosting.co.za> Ultrasick added the comment: ok thanks, sorry ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 18:59:04 2009 From: report at bugs.python.org (Phil Thompson) Date: Tue, 24 Mar 2009 17:59:04 +0000 Subject: [issue1337876] Inconsistent use of buffer interface in string and unicode Message-ID: <1237917544.51.0.758763923738.issue1337876@psf.upfronthosting.co.za> Phil Thompson added the comment: Yes I can update the patch, but it might be a while before I get the time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 19:01:15 2009 From: report at bugs.python.org (Aaron Sherman) Date: Tue, 24 Mar 2009 18:01:15 +0000 Subject: [issue5555] optparse In-Reply-To: <1237917675.54.0.817122476849.issue5555@psf.upfronthosting.co.za> Message-ID: <1237917675.54.0.817122476849.issue5555@psf.upfronthosting.co.za> New submission from Aaron Sherman : First off, I want to be clear that this isn't a request for changes to functionality, nor for debate over decisions which have already been made. This is purely a request for correction to mis-statements about the nature and origins of optparse's handling in its documentation. This is an edited-down excerpt form the optparse documentation from: http://docs.python.org/library/optparse.html "... the traditional Unix syntax is a hyphen (?-?) followed by a single letter [...] Some other option syntaxes that the world has seen include: * a hyphen followed by a few letters, e.g. "-pf" [...] [...] These option syntaxes are not supported by optparse, and they never will be. This is deliberate: the first three are non-standard on any environment[...]" While, obviously, optparse is free to choose whatever model of option parsing the developers like, the above text should be removed or corrected. Traditional Unix command-line usage is detailed in the POSIX specification's definition of various utilities and the optparse C function as documented here: http://www.opengroup.org/onlinepubs/009695399/functions/getopt.html which lays out this example: "This code accepts any of the following as equivalent: cmd -ao arg path path cmd -a -o arg path path" Note that the concatenation of single-character arguments is, in fact, in conformance to the POSIX standard, GNU coding conventions, and Unix best-practices since at least the mid-1980s. This clearly contradicts the statement from Python's documentation. For further reference, see: any Unix or Unix-like system's "man 3 getopt" http://www.faqs.org/docs/artu/ch10s05.html http://www.gnu.org/prep/standards/standards.html#Command_002dLine-Interfaces (which refers back to the "POSIX guidelines for the command-line options of a program") any Unix or Unix-like system's man pages for a plethora of core utilities such as rm(1), ls(1), sh(1), cp(1), etc. A more accurate statement would be: "optparse has chosen to implement a subset of the GNU coding standard's command line interface guidelines, allowing for both long and short options, but not the POSIX-style concatenation of short options." A rationale for that decision may or may not be included, but I won't presume to write it since I'm not actually privy to that decision-making process. ---------- assignee: georg.brandl components: Documentation messages: 84103 nosy: ajs, georg.brandl severity: normal status: open title: optparse type: behavior versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 19:24:45 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 24 Mar 2009 18:24:45 +0000 Subject: [issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped In-Reply-To: <1236557215.68.0.756624952877.issue5450@psf.upfronthosting.co.za> Message-ID: <1237919085.66.0.146949409548.issue5450@psf.upfronthosting.co.za> Guilherme Polo added the comment: Uhm, I don't agree with this TkinterTest name since it is only doing a minor test on _tkinter._flatten. This same class is indicated in tests_gui but it doesn't require gui to run, it should be indicated only in tests_nogui. Then there is TclTest which I also don't agree with the name, it is only testing tk loading so a different name would be better here. And finally the file is named test_tcl.py which to me suggests something that won't require gui, but that is exactly what it does by doing test_support.requires('gui'). Any chance you can improve these names ? ---------- assignee: -> gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 19:32:12 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 24 Mar 2009 18:32:12 +0000 Subject: [issue3451] Asymptotically faster divmod and str(long) In-Reply-To: <1217121065.64.0.642253571203.issue3451@psf.upfronthosting.co.za> Message-ID: <1237919532.31.0.244952118606.issue3451@psf.upfronthosting.co.za> Mark Dickinson added the comment: The longobject2.diff patch probably doesn't apply cleanly any more. Anyone interested in updating it? I think this patch looks like a promising beginning, but there's still quite a lot of work to do. The main concerns at the moment are: (1) the huge numbers of Py_DECREFs and Py_XDECREFs. Some refactoring might help here ("goto" isn't all bad: it's fairly common to use lots of "goto error" statements in Python's source code). (2) I suspect that many of the operations could be turned into in-place operations on digit vectors, thus saving lots of object allocations and deallocations. This should also help out with (1). I'm not yet 100% sold on getting subquadratic division into Python---it remains to be seen how much complexity it adds. If it makes it easy to implement subquadratic integer <-> string conversions that would be a big plus. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 19:39:56 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 24 Mar 2009 18:39:56 +0000 Subject: [issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped In-Reply-To: <1237919085.66.0.146949409548.issue5450@psf.upfronthosting.co.za> Message-ID: R. David Murray added the comment: On Tue, 24 Mar 2009 at 18:24, Guilherme Polo wrote: > Any chance you can improve these names ? Absolutely. I agree with you; I was trying to stay parallel to the original names, but it felt wrong. And since I don't know TCL/TK/tkinter, I didn't know what flatten was testing. I'll make it non-gui. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 20:32:02 2009 From: report at bugs.python.org (Jean-Michel Fauth) Date: Tue, 24 Mar 2009 19:32:02 +0000 Subject: [issue5556] interactive interpreter, source encoding In-Reply-To: <1237923122.0.0.0658736950329.issue5556@psf.upfronthosting.co.za> Message-ID: <1237923122.0.0.0658736950329.issue5556@psf.upfronthosting.co.za> New submission from Jean-Michel Fauth : A few hours ago I sent a comment to the issue #4626. I didn't notice the issue was closed. So I repeat it here. I'm interested in comments because I have the feeling it is still a pending annoying isssue. --- I'm glad to have discovered this topic. I bumped into something similar when I toyed with an interactive interpreter. from code import InteractiveInterpreter ii = InteractiveInterpreter() source = ... ii.runsource(source) What should be the encoding and/or the type (str, bytes) of the "source" string? Taking into account the encoding of the script which contains this code, I have the feeling there is always something going wrong, this can be a "non ascii" char in the source (encoded in utf-8!) or the interactive interpreter does not accept very well a byte string representing a utf-8 encoded string. IDLE is not suffering from this. Its interactive interpreter is somehow receiving "ucs-2 ready string" from tkinter. I'm a little bit confused here (win2k, winXP sp2, Python 3.0.1). ---------- components: Interpreter Core messages: 84107 nosy: jmfauth severity: normal status: open title: interactive interpreter, source encoding type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 20:48:44 2009 From: report at bugs.python.org (Tom Goddard) Date: Tue, 24 Mar 2009 19:48:44 +0000 Subject: [issue5557] Byte-code compilation uses excessive memory In-Reply-To: <1237924124.82.0.478709056921.issue5557@psf.upfronthosting.co.za> Message-ID: <1237924124.82.0.478709056921.issue5557@psf.upfronthosting.co.za> New submission from Tom Goddard : Bytecode compiling large Python files uses an unexpectedly large amount of memory. For example, compiling a file containing a list of 5 million integers uses about 2 Gbytes of memory while the Python file size is about 40 Mbytes. The memory used is 50 times the file size. The resulting list in Python consumes about 400 Mbytes of memory, so compiling the byte codes uses about 5 times the memory of the list object. Can the byte-code compilation can be made more memory efficient? The application that creates simlilarly large Python files is a molecular graphics program called UCSF Chimera that my lab develops. It writes session files which are Python code. Sessions of reasonable size for Chimera for a given amount of physical memory cannot be byte-compiled without thrashing, crippling the interactivity of all software running on the machine. Here is Python code to produce the test file test.py containing a list of 5 million integers: print >>open('test.py','w'), 'x = ', repr(range(5000000)) I tried importing the test.py file with Python 2.5, 2.6.1 and 3.0.1 on Mac OS 10.5.6. In each case when the test.pyc file is not present the python process as monitored by the unix "top" command took about 1.7 Gb RSS and 2.2 Gb VSZ on a MacBook Pro which has 2 Gb of memory. ---------- components: Interpreter Core messages: 84108 nosy: goddard severity: normal status: open title: Byte-code compilation uses excessive memory type: performance versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 21:14:32 2009 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 24 Mar 2009 20:14:32 +0000 Subject: [issue5530] datetime class names should obey PEP 8 CapWords convention In-Reply-To: <1237611761.05.0.556904304127.issue5530@psf.upfronthosting.co.za> Message-ID: <1237925672.22.0.61136384924.issue5530@psf.upfronthosting.co.za> Guido van Rossum added the comment: Please don't do this. We need stable APIs. Trying to switch the entire community to use CapWord APIs for something as commonly used as datetime sounds like wasting a lot of cycles with no reason except the mythical "PEP 8 conformance". As I said, it's a pity we didn't change this at the 3.0 point, but I think going forward we should try to be more committed to slow change. Additions of new functionality are of course fine. But renamings (even if the old names remain available) are just noise. ---------- nosy: +gvanrossum resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Mar 24 21:19:34 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 24 Mar 2009 20:19:34 +0000 Subject: [issue5557] Byte-code compilation uses excessive memory In-Reply-To: <1237924124.82.0.478709056921.issue5557@psf.upfronthosting.co.za> Message-ID: <1237925974.4.0.0936872326152.issue5557@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It might be possible to make it more efficient. However, the primary purpose of source code is to support hand-written code, and such code should never run into such problems. So lowering the priority. If you want this resolved, it might be best if you provide a patch. ---------- nosy: +loewis priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 21:21:29 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 24 Mar 2009 20:21:29 +0000 Subject: [issue2485] Traceback changed in 2.6 for unhashable objects In-Reply-To: <1206480481.83.0.917185709948.issue2485@psf.upfronthosting.co.za> Message-ID: <1237926089.38.0.571805661158.issue2485@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Error messages are not part of the API. ---------- nosy: +benjamin.peterson resolution: wont fix -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 21:25:11 2009 From: report at bugs.python.org (Trundle) Date: Tue, 24 Mar 2009 20:25:11 +0000 Subject: [issue5322] Python 2.6 object.__new__ argument calling autodetection faulty In-Reply-To: <1235075665.37.0.301694124748.issue5322@psf.upfronthosting.co.za> Message-ID: <1237926311.17.0.276886542625.issue5322@psf.upfronthosting.co.za> Trundle added the comment: I think the real problem here is `update_one_slot` and not `object_new`. It is impossible to set "__new__" to a PyCFunction inside Python code, which may be a feature, but is in fact very irritating. For example the following snippet: >>> class Dict(dict): __new__ = object.__new__ ... >>> Dict.__new__ is object.__new__ True >>> Dict() {} I would rather expect this behaviour (or at least that Dict.__new__ is not object.__new__): >>> Dict.__new__ is object.__new__ True >>> Dict() Traceback (most recent call last): File "", line 1, in TypeError: object.__new__(Dict) is not safe, use dict.__new__() The attached patch leads to that behaviour, which also fixes the argument calling autodetection of `object.__new__`. ---------- keywords: +patch nosy: +Trundle Added file: http://bugs.python.org/file13408/update_one_slot.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 21:28:48 2009 From: report at bugs.python.org (Jess Austin) Date: Tue, 24 Mar 2009 20:28:48 +0000 Subject: [issue5520] refactor test_datetime.py In-Reply-To: <1237495793.7.0.375370531619.issue5520@psf.upfronthosting.co.za> Message-ID: <1237926528.86.0.733939098412.issue5520@psf.upfronthosting.co.za> Jess Austin added the comment: I don't see a point to this one since Issue 5530 was rejected. If someone else wants this they can reopen it. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 21:33:06 2009 From: report at bugs.python.org (Jess Austin) Date: Tue, 24 Mar 2009 20:33:06 +0000 Subject: [issue5434] datetime.monthdelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1237926786.55.0.934327918086.issue5434@psf.upfronthosting.co.za> Jess Austin added the comment: With the rejection of Issue 5530, it seems best for the name of this class to remain lowercase. Mixing casing schemes within the same module would be perverse. ---------- title: datetime.MonthDelta -> datetime.monthdelta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 23:00:17 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 22:00:17 +0000 Subject: [issue1503789] Cannot write source code in UTF16 Message-ID: <1237932017.68.0.639132292951.issue1503789@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached patch is a partial fix: support UTF-16-LE, UTF-16-BE and UTF-32-LE. Some remarks about my patch: * UTF-32-BE is not supported because I'm too lazy tonigh to finish the patch and because such file begins with 0x00 0x00 whereas the parser doesn't like nul bytes * I disabled the cookie check if the file starts with a BOM (the cookie is ignored) because the charset name is not normalized and so if the cookie is not exactly the same as the hardcoded charset name (eg. "UTF-16LE"), the test will fail. Eg "utf-16le" != "UTF-16LE" :-( * compile() would require much more effort to support UTF-16-* and UTF-32-* because compile() simply rejects any string with nul byte. It's beause it uses functions like strlen() :-/ That's why I use subprocess([sys.executable, ...]) in the unit test and not simply compile() Support UTF-{16,32}-{LE,BE} would be nice but it requires to hack to parser (especially compile() builtin function) to support nul bytes... ---------- keywords: +patch Added file: http://bugs.python.org/file13409/tokenizer_bom.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 23:09:24 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 22:09:24 +0000 Subject: [issue5557] Byte-code compilation uses excessive memory In-Reply-To: <1237924124.82.0.478709056921.issue5557@psf.upfronthosting.co.za> Message-ID: <1237932564.95.0.457671772902.issue5557@psf.upfronthosting.co.za> STINNER Victor added the comment: Python uses inefficent memory structure for integers. You should use a 3rd part library like numpy to manipulate large integer vectors. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 23:19:35 2009 From: report at bugs.python.org (Sebastian Ramacher) Date: Tue, 24 Mar 2009 22:19:35 +0000 Subject: [issue5322] Python 2.6 object.__new__ argument calling autodetection faulty In-Reply-To: <1235075665.37.0.301694124748.issue5322@psf.upfronthosting.co.za> Message-ID: <1237933175.3.0.716645377975.issue5322@psf.upfronthosting.co.za> Changes by Sebastian Ramacher : ---------- nosy: +sebastinas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 23:25:41 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 24 Mar 2009 22:25:41 +0000 Subject: [issue2123] ctypes pointer not always keeping target alive In-Reply-To: <1203085504.98.0.560350426708.issue2123@psf.upfronthosting.co.za> Message-ID: <1237933541.47.0.736343648578.issue2123@psf.upfronthosting.co.za> R. David Murray added the comment: Thomas, do you accept this as a bug or should the issue be closed as invalid? ---------- nosy: +bitdancer priority: -> normal type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 24 23:30:35 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 24 Mar 2009 22:30:35 +0000 Subject: [issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open() In-Reply-To: <1222958524.04.0.862408977928.issue4016@psf.upfronthosting.co.za> Message-ID: <1237933835.02.0.472911738997.issue4016@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Applied in r70587. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:01:39 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:01:39 +0000 Subject: [issue1068268] subprocess is not EINTR-safe Message-ID: <1237935699.55.0.392771036187.issue1068268@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:02:13 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:02:13 +0000 Subject: [issue1027206] unicode DNS names in socket, urllib, urlopen Message-ID: <1237935733.06.0.847785477412.issue1027206@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:02:25 2009 From: report at bugs.python.org (xdcdx) Date: Tue, 24 Mar 2009 23:02:25 +0000 Subject: [issue5558] Python 3.0.1 doesn't install correctly on Mac Os X 10.5.6. with xCode 3.1.2 In-Reply-To: <1237935745.17.0.299901472709.issue5558@psf.upfronthosting.co.za> Message-ID: <1237935745.17.0.299901472709.issue5558@psf.upfronthosting.co.za> New submission from xdcdx : The Python 3.0.1 Mac OS X installer image doesn't generate correct links for Python3.0 binary interpreter on /usr/local/bin (as the ReadMe says it will do). I'm using Mac Os X 10.5.6 (Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386). Otherwise, Python 3.0 framework files seem to be correctly installed in /Library/Frameworks/Python.framework/Versions/3.0/, and running the interpreter from there works fine. Additionally, Python 2.5 and 2.3 are installed on /System/Library/Frameworks/Python.framework/Versions, and linked from /usr/bin/python. I'm not sure where did these come from, but I suspect they were installed with Xcode 3.1.2. Find the Python 3.0.1 install log attached (I tried to install it twice, disregard the second time). If you need more info, just ask. ---------- files: install.log.0.bz2 messages: 84119 nosy: xdcdx severity: normal status: open title: Python 3.0.1 doesn't install correctly on Mac Os X 10.5.6. with xCode 3.1.2 Added file: http://bugs.python.org/file13410/install.log.0.bz2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:03:05 2009 From: report at bugs.python.org (xdcdx) Date: Tue, 24 Mar 2009 23:03:05 +0000 Subject: [issue5558] Python 3.0.1 doesn't install correctly on Mac Os X 10.5.6. with xCode 3.1.2 In-Reply-To: <1237935745.17.0.299901472709.issue5558@psf.upfronthosting.co.za> Message-ID: <1237935785.93.0.883210509096.issue5558@psf.upfronthosting.co.za> Changes by xdcdx : ---------- components: +Installation type: -> behavior versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:04:11 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:04:11 +0000 Subject: [issue1195571] simple callback system for Py_FatalError Message-ID: <1237935851.08.0.157096388873.issue1195571@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:05:10 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:05:10 +0000 Subject: [issue1681984] unittest documentation is incomplete Message-ID: <1237935910.22.0.737238821258.issue1681984@psf.upfronthosting.co.za> STINNER Victor added the comment: > I don't see the need to document TestProgram or TextTestRunner Ok. And I don't want (have time/motivation) to document them. So I prefer to close this issue. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:07:27 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:07:27 +0000 Subject: [issue2504] Add gettext.pgettext() and variants support In-Reply-To: <1206756624.13.0.664664048525.issue2504@psf.upfronthosting.co.za> Message-ID: <1237936047.92.0.822195681448.issue2504@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:09:56 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:09:56 +0000 Subject: [issue3392] subprocess fails in select when descriptors are large In-Reply-To: <1216293940.59.0.136491841956.issue3392@psf.upfronthosting.co.za> Message-ID: <1237936196.15.0.19847212865.issue3392@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:28:30 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:28:30 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1237937310.19.0.957488796154.issue3982@psf.upfronthosting.co.za> STINNER Victor added the comment: loewis> That's indeed exactly what I had proposed loewis> - only that you shouldn't repeat the .encode('ascii') loewis> all over the place, (...) If you can only use bytes 0..127, it can not used for binary protocols and so I don't think that it's really useful. If your protocol is ASCII text, use explicit conversion to ASCII. I also not fan on functions having different result type (format->bytes or str, it depends...). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:31:47 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:31:47 +0000 Subject: [issue4208] Make multiprocessing compatible with Python 2.4 and 2.5 In-Reply-To: <1225034474.82.0.458838457625.issue4208@psf.upfronthosting.co.za> Message-ID: <1237937507.65.0.821736716472.issue4208@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 2.4 and 2.5 only accepts security fixes now. Since there is now an external port of multiprocessing for Python 2.4/2.5, I think that we can close this issue. http://code.google.com/p/python-multiprocessing/ Feel free to reopen this issue if I'm wrong ;-) ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:33:25 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:33:25 +0000 Subject: [issue4216] subprocess.Popen hangs at communicate() when child exits In-Reply-To: <1225151867.64.0.844146967045.issue4216@psf.upfronthosting.co.za> Message-ID: <1237937605.91.0.223420406704.issue4216@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:37:08 2009 From: report at bugs.python.org (Eric Smith) Date: Tue, 24 Mar 2009 23:37:08 +0000 Subject: [issue3982] support .format for bytes In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za> Message-ID: <1237937828.38.0.0972799876337.issue3982@psf.upfronthosting.co.za> Eric Smith added the comment: > I also not fan on functions having different result type > (format->bytes or str, it depends...). In 3.x, str.format() and bytes.format() would be two different methods on two different objects. I don't think there's any expectation that they have the same return type. There's no such expectation for str.strip() and bytes.strip() either. Similarly, in 2.6, str.format() has a different return type than unicode.format(). Now the builtin format() function is another issue. In 2.6 the return type does depend on the types of the arguments. In 3.x, I'd suggest leaving it as unicode and you won't be allowed to pass in bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:37:24 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:37:24 +0000 Subject: [issue4358] Segfault in stringobject.c In-Reply-To: <1227119670.36.0.570140280059.issue4358@psf.upfronthosting.co.za> Message-ID: <1237937844.08.0.855447052296.issue4358@psf.upfronthosting.co.za> STINNER Victor added the comment: There are not enough informations to reproduce the issue or understand the problem. Since farshad didn't answer since 4 months, I choose to close the bug. Reopen the bug if you have new informations! ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:40:14 2009 From: report at bugs.python.org (Brett Cannon) Date: Tue, 24 Mar 2009 23:40:14 +0000 Subject: [issue4626] compile() doesn't ignore the source encoding when a string is passed in In-Reply-To: <1237911869.85.0.273559436801.issue4626@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Tue, Mar 24, 2009 at 09:24, Jean-Michel Fauth wrote: > > Jean-Michel Fauth added the comment: > > I'm glad to have discovered this topic. I bumped into something similar > when I toyed with an interactive interpreter. > > from code import InteractiveInterpreter > > ii = InteractiveInterpreter() > source = ... > ii.runsource(source) > > What should be the encoding and/or the type (str, bytes) of the "source" > string? Off the top of my head it should be UTF-8. Otherwise it can probably be bytes as long as it has universal newlines. ---------- Added file: http://bugs.python.org/file13411/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

On Tue, Mar 24, 2009 at 09:24, Jean-Michel Fauth <report at bugs.python.org> wrote:

Jean-Michel Fauth <wxjmfauth at gmail.com> added the comment:

I'm glad to have discovered this topic. I bumped into something similar
when I toyed with an interactive interpreter.

from code import InteractiveInterpreter

ii = InteractiveInterpreter()
source = ...
ii.runsource(source)

What should be the encoding and/or the type (str, bytes) of the "source"
string?

Off the top of my head it should be UTF-8. Otherwise it can probably be bytes as long as it has universal newlines.

From report at bugs.python.org Wed Mar 25 00:44:07 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:44:07 +0000 Subject: [issue4377] tokenize.detect_encoding() and Mac newline In-Reply-To: <1227270739.29.0.218620905737.issue4377@psf.upfronthosting.co.za> Message-ID: <1237938247.84.0.120504635846.issue4377@psf.upfronthosting.co.za> STINNER Victor added the comment: See also related issue: #4628 (No universal newline support for compile() when using bytes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:44:29 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:44:29 +0000 Subject: [issue4628] No universal newline support for compile() when using bytes In-Reply-To: <1228978447.23.0.301216613627.issue4628@psf.upfronthosting.co.za> Message-ID: <1237938269.43.0.177292550097.issue4628@psf.upfronthosting.co.za> STINNER Victor added the comment: See also related issue: #4377 (tokenize.detect_encoding() and Mac newline). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:46:09 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:46:09 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1237938369.91.0.909336848595.issue4591@psf.upfronthosting.co.za> STINNER Victor added the comment: Anyone available for a patch review? Do you need anything else: tests, documentation updates, etc.? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 00:51:44 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Mar 2009 23:51:44 +0000 Subject: [issue4601] directory permission error with make install in 3.0 In-Reply-To: <1228771673.82.0.0596697860689.issue4601@psf.upfronthosting.co.za> Message-ID: <1237938704.71.0.535017945839.issue4601@psf.upfronthosting.co.za> STINNER Victor added the comment: amaury> The patch is fine. Cool :-) Anyone to commit the fix? Maybe, tarek? amaury> If it were me, I'd change os.walk to accept amaury> keyword-only arguments: amaury> def walk(top, *, topdown=True, onerror=None, amaury> followlinks=False): amaury> ... I like the idea but it should be proposed in a new issue :-) I proposed an API change for open() (issue #4121) but it was rejected by Guido: "(...) Beyond 3.0, I'm still rather reluctant -- I expect most users will be wise and use keyword args anyway; I'm not sure what we buy by forcing this. (...)" But walk() is a different case than open(). ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:03:08 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 25 Mar 2009 00:03:08 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1237939388.91.0.367360816586.issue4591@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The documentation for PyArg_ParseTuple states that the "I" code doesn't do any overflow checking. Does it mean the input parameters can be silently truncated? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:04:24 2009 From: report at bugs.python.org (Jess Austin) Date: Wed, 25 Mar 2009 00:04:24 +0000 Subject: [issue2706] datetime: define division timedelta/timedelta In-Reply-To: <1209330247.56.0.71148380164.issue2706@psf.upfronthosting.co.za> Message-ID: <1237939464.57.0.053130167769.issue2706@psf.upfronthosting.co.za> Jess Austin added the comment: A comment on the two most recent patches... For both of these, we can do the following: >>> from datetime import timedelta >>> td = timedelta(12) >>> td datetime.timedelta(12) >>> td //= 3 >>> td datetime.timedelta(4) >>> td //= timedelta(2) >>> td 2 # CHANGED VARIABLE TYPE! I think the last operation will trap unsuspecting programmers, and provide no benefit for the savvy. There really is no reason to allow an in-place operation like this to change the type of the variable so drastically. (That is, I realize a similar thing could happen with ints and floats, but it seems worse with timedeltas and ints.) I feel the last operation should raise a TypeError, even though it would be quite valid for a non-in-place operation. ---------- nosy: +jess.austin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:06:59 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Mar 2009 00:06:59 +0000 Subject: [issue4762] PyFile_FromFd() doesn't set the file name In-Reply-To: <1230483429.96.0.00901303311895.issue4762@psf.upfronthosting.co.za> Message-ID: <1237939619.69.0.0223005409131.issue4762@psf.upfronthosting.co.za> STINNER Victor added the comment: In py3k, standard streams' names are now correct (since the io-c merge): Python 3.1a1+ (py3k:70589M, Mar 25 2009, 01:01:13) >>> import sys >>> sys.stdin.name, sys.stdout.name, sys.stderr.name ('', '', '') The last problem occurs with imp.find_module(). But imp.find_module() also returns a "filename" argument, so I don't think that the issue really matters. Let's close it ;-) ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:26:02 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 25 Mar 2009 00:26:02 +0000 Subject: [issue5557] Byte-code compilation uses excessive memory In-Reply-To: <1237924124.82.0.478709056921.issue5557@psf.upfronthosting.co.za> Message-ID: <1237940762.3.0.651393826784.issue5557@psf.upfronthosting.co.za> Antoine Pitrou added the comment: When compiling a source file to bytecode, Python first builds a syntax tree in memory. It is very likely that the memory consumption you observe is due to the size of the syntax tree. It is also unlikely that someone else than you will want to modifying the parsing code to accomodate such an extreme usage scenario :-) For persistence of large data structures, I suggest using cPickle or a similar mechanism. You can even embed the pickles in literal strings if you still need your sessions to be Python source code: >>> import cPickle >>> f = open("test.py", "w") >>> f.write("import cPickle\n") >>> f.write("x = cPickle.loads(%s)" % repr(cPickle.dumps(range(5000000), protocol=-1))) >>> f.close() >>> import test >>> len(test.x) 5000000 ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:34:53 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Mar 2009 00:34:53 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1237941293.24.0.742587119029.issue4591@psf.upfronthosting.co.za> STINNER Victor added the comment: pitrou> The documentation for PyArg_ParseTuple states that the pitrou> "I" code doesn't do any overflow checking. Does it mean pitrou> the input parameters can be silently truncated? I'm sorry, but you're right :-) My patch was wrong. New patch introduces functions parse_uid() and parse_gid() doing the right thing to get an unsigned uid and gid. I reused the parsing code from posix_setgroups(). ---------- Added file: http://bugs.python.org/file13412/posix_unsigned_uid-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:34:58 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Mar 2009 00:34:58 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1237941298.7.0.982210906601.issue4591@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file12301/posix_unsigned_uid.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:35:34 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Mar 2009 00:35:34 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1237941334.09.0.548806707418.issue4591@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file13413/posix_unsigned_uid-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:35:37 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Mar 2009 00:35:37 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1237941337.72.0.98331327942.issue4591@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file13412/posix_unsigned_uid-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:36:08 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Mar 2009 00:36:08 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1237941368.16.0.73293510563.issue4591@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file13413/posix_unsigned_uid-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:36:34 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Mar 2009 00:36:34 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1237941394.3.0.144649497149.issue4591@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, i forgot to ignore space changes in my diff... new patch. ---------- Added file: http://bugs.python.org/file13414/posix_unsigned_uid-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:51:19 2009 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 25 Mar 2009 00:51:19 +0000 Subject: [issue1157169] csv Sniffer returns bad dialect? Message-ID: <1237942279.06.0.574975812298.issue1157169@psf.upfronthosting.co.za> Skip Montanaro added the comment: I'm closing this. It's my own fault that it languished for so long, but the current trunk version of Python doesn't demonstrate the behavior Neil documented four years ago. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:52:47 2009 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 25 Mar 2009 00:52:47 +0000 Subject: [issue1431091] CSV Sniffer fails to report mismatch of column counts Message-ID: <1237942367.64.0.0799857763884.issue1431091@psf.upfronthosting.co.za> Skip Montanaro added the comment: (I did try to clarify the return type of the iterator a bit better.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:52:55 2009 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 25 Mar 2009 00:52:55 +0000 Subject: [issue1431091] CSV Sniffer fails to report mismatch of column counts Message-ID: <1237942375.75.0.335718214603.issue1431091@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 01:59:39 2009 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 25 Mar 2009 00:59:39 +0000 Subject: [issue1431091] CSV Sniffer fails to report mismatch of column counts Message-ID: <1237942779.81.0.0903060253083.issue1431091@psf.upfronthosting.co.za> Skip Montanaro added the comment: Closing as won't fix. There are bound to be limits to how the Sniffer class works. I'm not sure it's worth the effort necessary to fix this corner case. (Andrew, reopen if you want to tackle this.) ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 02:02:21 2009 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 25 Mar 2009 01:02:21 +0000 Subject: [issue1157169] csv Sniffer returns bad dialect? In-Reply-To: <1237942279.06.0.574975812298.issue1157169@psf.upfronthosting.co.za> Message-ID: <18889.33427.33893.390064@montanaro.dyndns.org> Skip Montanaro added the comment: (I did try to clarify the return value of the next/__next__ method a bit.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 02:27:01 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Mar 2009 01:27:01 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1237944421.34.0.933142803443.issue4591@psf.upfronthosting.co.za> STINNER Victor added the comment: New patch using PyNumber_Index()+PyLong_AsLong() for parse_uid() and parse_gid() as proposed by antoine (on IRC). Changes between python trunk and posix_unsigned_uid-3.patch: - os.chown() and os.fchown() accepts uid and gid > 2^31: identifiers can be in [-1; 2^32-1] (-1 means: don't change uid/gid) - fix os.*stat(): st_uid and st_gid are unsigned long integers (in [0; 2^32-1]) instead of signed integers - os.chown(), os.fchown() and os.setgroups() accepts any objects implementing __index__() method (instead of just int/long) and display the valid range on error ("group id is to big" => "group id is not in range [-1; 2^32-1]") ---------- Added file: http://bugs.python.org/file13415/posix_unsigned_uid-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 03:09:57 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 25 Mar 2009 02:09:57 +0000 Subject: [issue834351] Mouse wheel crashes program Message-ID: <1237946997.02.0.192270749136.issue834351@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 3.0.1, WinXP, with two 3.0 revisions: from tkinter import * def _onMouseWheel(event): print(event) root = Tk() root.bind('',_onMouseWheel) In IDLE shell, nothing changes, wheel works normally. In interpreter window, wheel continues to work normally. After click on tk window, wheel generates messages in interpreter window. Unless someone can verify that there is a problem in 2.6.1, or in 3.0.1 on other hardware, we should close this. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 04:22:52 2009 From: report at bugs.python.org (Claudio Canepa) Date: Wed, 25 Mar 2009 03:22:52 +0000 Subject: [issue5559] IDLE Output Window 's goto fails when path has spaces In-Reply-To: <1237951372.91.0.474657570766.issue5559@psf.upfronthosting.co.za> Message-ID: <1237951372.91.0.474657570766.issue5559@psf.upfronthosting.co.za> New submission from Claudio Canepa : in windows XP, python 2.6.1, 2.6 , python 2.4 1. do an Edit | 'Find in files' [ it pop ups the Output Window with result] 2. Right click over one of the target lines found, click the 'goto file \line' pop up If the path in the target line has spaces, it will popup a window with title 'No special line' and message 'the line you point at doenst look like a valid file name followed by a line number' posible fix: in idlelib/OutputWindow.py replace the literal r'([^\s]+):\s*(\d+):' with r'([^\t\n\r\f\v]+):\s*(\d+):' fair warning: seems to work in windows XP, dont know about other OSes ---------- components: IDLE messages: 84142 nosy: ccanepa severity: normal status: open title: IDLE Output Window 's goto fails when path has spaces type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 06:16:12 2009 From: report at bugs.python.org (geremy condra) Date: Wed, 25 Mar 2009 05:16:12 +0000 Subject: [issue5560] help() no longer reports module docstrings In-Reply-To: <1237958171.84.0.78612071906.issue5560@psf.upfronthosting.co.za> Message-ID: <1237958171.84.0.78612071906.issue5560@psf.upfronthosting.co.za> New submission from geremy condra : In 2.x, help(module) reported the docstrings from name when invoked. In 3.0, it simply reports the location of that module. pydoc3.0 invoked at the commandline behaves identically. ---------- components: Library (Lib) messages: 84143 nosy: debatem1 severity: normal status: open title: help() no longer reports module docstrings type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 06:57:01 2009 From: report at bugs.python.org (intgr) Date: Wed, 25 Mar 2009 05:57:01 +0000 Subject: [issue2006] asyncore loop lacks timers and work tasks In-Reply-To: <1202104327.86.0.976441820339.issue2006@psf.upfronthosting.co.za> Message-ID: <1237960621.02.0.63479072399.issue2006@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 07:04:07 2009 From: report at bugs.python.org (intgr) Date: Wed, 25 Mar 2009 06:04:07 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1237961046.74.0.083067387831.issue1641@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 07:06:34 2009 From: report at bugs.python.org (intgr) Date: Wed, 25 Mar 2009 06:06:34 +0000 Subject: [issue1657] [patch] epoll and kqueue wrappers for the select module In-Reply-To: <1198057263.13.0.0951432296357.issue1657@psf.upfronthosting.co.za> Message-ID: <1237961194.0.0.418658268325.issue1657@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 07:29:04 2009 From: report at bugs.python.org (intgr) Date: Wed, 25 Mar 2009 06:29:04 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1237962544.95.0.658542955626.issue1641@psf.upfronthosting.co.za> Changes by intgr : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 08:02:50 2009 From: report at bugs.python.org (Tom Goddard) Date: Wed, 25 Mar 2009 07:02:50 +0000 Subject: [issue5557] Byte-code compilation uses excessive memory In-Reply-To: <1237924124.82.0.478709056921.issue5557@psf.upfronthosting.co.za> Message-ID: <1237964570.86.0.959754236313.issue5557@psf.upfronthosting.co.za> Tom Goddard added the comment: I agree that having such large Python code files is a rare circumstance and optimizing the byte-code compiler for that should be a low priority. Thanks for the cpickle suggestion. The Chimera session file Python code is mostly large nested dictionaries and sequences. I tested cPickle and repr() to embed data structures in the Python code getting rather larger file size because the 8-bit characters became 4 bytes in the text file string (e.g. "\xe8"). Using cPickle, and base64 encoding dropped the file size by about a factor of 2.5 and cPickle, bzip2 or zlib compression, and base64 dropped the size another factor of 2. The big win is that the byte code compilation used 150 Mbytes and 5 seconds instead of 2 Gbytes and 15 minutes of thrashing for a 40 Mbyte python file. I think our reason for not using pickled data originally in the session files was because we like users to be able to look at and edit the session files in a text editor. (This is research software where such hacks sometimes are handy.) But the especially large data structures in the sessions can't reasonably be meddled with by users so pickling should be fine. Pickling adds about 15% to the session save time, and reduces session opening by about the same amount. Compression slows the save down another 15% and probably is not worth the factor of 2 reduction in file size in our case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 08:33:02 2009 From: report at bugs.python.org (Fan Decheng) Date: Wed, 25 Mar 2009 07:33:02 +0000 Subject: [issue5505] sys.stdin.read() doesn't return after first EOF on Windows In-Reply-To: <1237368034.29.0.0565107663013.issue5505@psf.upfronthosting.co.za> Message-ID: <1237966382.75.0.596060765458.issue5505@psf.upfronthosting.co.za> Fan Decheng added the comment: Perhaps using just one read() is enough? I mean perhaps no loop is necessary? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 08:38:39 2009 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 25 Mar 2009 07:38:39 +0000 Subject: [issue2057] difflib: add patch capability In-Reply-To: <1202628772.22.0.236434867196.issue2057@psf.upfronthosting.co.za> Message-ID: <1237966719.15.0.129367103012.issue2057@psf.upfronthosting.co.za> anatoly techtonik added the comment: Tool is ready. diff/patch lib is not. http://code.google.com/p/python-patch/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 08:48:59 2009 From: report at bugs.python.org (Joram Agten) Date: Wed, 25 Mar 2009 07:48:59 +0000 Subject: [issue1425127] os.remove OSError: [Errno 13] Permission denied Message-ID: <1237967339.63.0.0557218171492.issue1425127@psf.upfronthosting.co.za> Joram Agten added the comment: Tested with Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on win32 (windows xp sp2) os.remove.py still gives the same error Exception in thread Thread-4: Traceback (most recent call last): File "c:\Python30\lib\threading.py", line 507, in _bootstrap_inner self.run() File "os.remove.py", line 25, in run os.remove(filename) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\docume~1\\agtenjo\\locals~1\\temp\\tmpcwbddg' os.remove2.py still gives the same error c:\docume~1\agtenjo\locals~1\temp\tmpa3plim The process cannot access the file because it is being used by another process. ---------- nosy: +cheops Added file: http://bugs.python.org/file13416/os.remove3_py30.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 08:50:49 2009 From: report at bugs.python.org (Joram Agten) Date: Wed, 25 Mar 2009 07:50:49 +0000 Subject: [issue1425127] os.remove OSError: [Errno 13] Permission denied Message-ID: <1237967449.77.0.547798512299.issue1425127@psf.upfronthosting.co.za> Joram Agten added the comment: Tested with Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on win32 (windows xp sp2) (pywin 213) os.remove2_py30.py gives no error os.remove_winpy30.py gives no error ---------- Added file: http://bugs.python.org/file13417/os.remove_win_py30.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 08:51:59 2009 From: report at bugs.python.org (Joram Agten) Date: Wed, 25 Mar 2009 07:51:59 +0000 Subject: [issue1425127] os.remove OSError: [Errno 13] Permission denied Message-ID: <1237967519.04.0.409527154172.issue1425127@psf.upfronthosting.co.za> Joram Agten added the comment: os.remove2_py30.py gives no error should be os.remove3_py30.py gives no error ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 08:55:58 2009 From: report at bugs.python.org (Joram Agten) Date: Wed, 25 Mar 2009 07:55:58 +0000 Subject: [issue1425127] os.remove OSError: [Errno 13] Permission denied Message-ID: <1237967758.26.0.378881081309.issue1425127@psf.upfronthosting.co.za> Joram Agten added the comment: touch.exe can be found here: http://www.helge.mynetcologne.de/touch/index.htm#download ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 09:45:11 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 25 Mar 2009 08:45:11 +0000 Subject: [issue2706] datetime: define division timedelta/timedelta In-Reply-To: <1209330247.56.0.71148380164.issue2706@psf.upfronthosting.co.za> Message-ID: <1237970711.0.0.965189378834.issue2706@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Well, this already happen with other types: >>> a = 100 >>> a //= 2.0 >>> a 50.0 >>> d = datetime.datetime.now() >>> d -= datetime.datetime.now() >>> d datetime.timedelta(-1, 86391, 609000) See http://docs.python.org/reference/datamodel.html#object.__iadd__ "... return the result (which could be, but does not have to be, self) ..." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 10:23:37 2009 From: report at bugs.python.org (Ned Deily) Date: Wed, 25 Mar 2009 09:23:37 +0000 Subject: [issue5558] Python 3.0.1 doesn't install correctly on Mac Os X 10.5.6. with xCode 3.1.2 In-Reply-To: <1237935745.17.0.299901472709.issue5558@psf.upfronthosting.co.za> Message-ID: <1237973017.94.0.640964279203.issue5558@psf.upfronthosting.co.za> Ned Deily added the comment: The ReadMe is not quite correct. For 3.x, the OS X installers do not by default install links in /usr/local. Note that the installer's Welcome screen correctly notes this. To install the /usr/local/ links, you need to go back to the Installer, select Customize, and then select the "UNIX command-line tools" package. The python files in /System/Library are supplied by Apple in OSX 10.5 and, as with everything else in /System/Library, should not be disturbed. None of this has anything to do with Xcode. ---------- nosy: +nad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 10:54:42 2009 From: report at bugs.python.org (Jean-Michel Fauth) Date: Wed, 25 Mar 2009 09:54:42 +0000 Subject: [issue4626] compile() doesn't ignore the source encoding when a string is passed in In-Reply-To: <1228976357.63.0.133847904092.issue4626@psf.upfronthosting.co.za> Message-ID: <1237974882.95.0.904832877135.issue4626@psf.upfronthosting.co.za> Jean-Michel Fauth added the comment: When I was preparing some test examples to be submitted here. I noticed the module codeop.py used by the InteractiveInterpreter, does not like byte strings very much. IDLE, Python 3.0.1, winxp sp2 >>> source = b'print(999)' >>> compile(source, '', 'exec') at 0x00AA5CC8, file "", line 1> >>> r = compile(source, '', 'exec') >>> exec(r) 999 >>> from code import InteractiveInterpreter >>> ii = InteractiveInterpreter() >>> ii.runsource(source) Traceback (most recent call last): File "", line 1, in ii.runsource(source) File "C:\Python30\lib\code.py", line 63, in runsource code = self.compile(source, filename, symbol) File "C:\Python30\lib\codeop.py", line 168, in __call__ return _maybe_compile(self.compiler, source, filename, symbol) File "C:\Python30\lib\codeop.py", line 70, in _maybe_compile for line in source.split("\n"): TypeError: Type str doesn't support the buffer API >>> >>> source = 'print(999)' >>> ii.runsource(source) 999 False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 11:02:34 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Mar 2009 10:02:34 +0000 Subject: [issue4626] compile() doesn't ignore the source encoding when a string is passed in In-Reply-To: <1228976357.63.0.133847904092.issue4626@psf.upfronthosting.co.za> Message-ID: <1237975354.27.0.238022570007.issue4626@psf.upfronthosting.co.za> STINNER Victor added the comment: @jmfauth: Can you open a different issue for the IDLE issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 11:20:03 2009 From: report at bugs.python.org (xdcdx) Date: Wed, 25 Mar 2009 10:20:03 +0000 Subject: [issue5558] Python 3.0.1 Mac OS X install image ReadMe is incorrect In-Reply-To: <1237935745.17.0.299901472709.issue5558@psf.upfronthosting.co.za> Message-ID: <1237976403.23.0.0239848406619.issue5558@psf.upfronthosting.co.za> xdcdx added the comment: nad: Thanks for your nice clarifications. I am changing the subject of this issue to reflect that the ReadMe file needs correction. ---------- title: Python 3.0.1 doesn't install correctly on Mac Os X 10.5.6. with xCode 3.1.2 -> Python 3.0.1 Mac OS X install image ReadMe is incorrect _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 11:20:08 2009 From: report at bugs.python.org (xdcdx) Date: Wed, 25 Mar 2009 10:20:08 +0000 Subject: [issue5558] Python 3.0.1 Mac OS X install image ReadMe is incorrect In-Reply-To: <1237935745.17.0.299901472709.issue5558@psf.upfronthosting.co.za> Message-ID: <1237976408.18.0.851993573389.issue5558@psf.upfronthosting.co.za> Changes by xdcdx : Removed file: http://bugs.python.org/file13410/install.log.0.bz2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 11:21:06 2009 From: report at bugs.python.org (xdcdx) Date: Wed, 25 Mar 2009 10:21:06 +0000 Subject: [issue5558] Python 3.0.1 Mac OS X install image ReadMe file is incorrect In-Reply-To: <1237935745.17.0.299901472709.issue5558@psf.upfronthosting.co.za> Message-ID: <1237976466.67.0.953983791114.issue5558@psf.upfronthosting.co.za> Changes by xdcdx : ---------- title: Python 3.0.1 Mac OS X install image ReadMe is incorrect -> Python 3.0.1 Mac OS X install image ReadMe file is incorrect _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 11:38:01 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 25 Mar 2009 10:38:01 +0000 Subject: [issue5557] Byte-code compilation uses excessive memory In-Reply-To: <1237924124.82.0.478709056921.issue5557@psf.upfronthosting.co.za> Message-ID: <1237977481.47.0.501292276524.issue5557@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If you want editable data, you could use json instead of pickle. The simplejson library has very fast encoding/decoding (faster than cPickle according to its author). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 11:58:51 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 25 Mar 2009 10:58:51 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1237978731.54.0.5162402023.issue4591@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure hardcoding "2^32 - 1" in the error message is a good idea. I also think it would be nice to have tests for the "-1" special value: - check that chown(-1, current_gid) succeeds (and leaves the uid intact) - check that chown(current_uid, -1) succeeds (and leaves the gid intact) ---------- versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 13:14:54 2009 From: report at bugs.python.org (Guilherme Polo) Date: Wed, 25 Mar 2009 12:14:54 +0000 Subject: [issue5559] IDLE Output Window 's goto fails when path has spaces In-Reply-To: <1237951372.91.0.474657570766.issue5559@psf.upfronthosting.co.za> Message-ID: <1237983294.67.0.129757450792.issue5559@psf.upfronthosting.co.za> Guilherme Polo added the comment: I see this occurring everywhere, but the proposed solution may not be enough. I can still create a directory with a tab on it and it will fail too. The proper solution (in my head) would involve changing the interaction of GrepDialog with OutupWindow, but then OutputWindow wouldn't really be an OutputWindow. But I believe the better way to fix this right now is to define a more correct regex, and test it :) ---------- nosy: +gpolo resolution: -> accepted versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 13:20:45 2009 From: report at bugs.python.org (R. David Murray) Date: Wed, 25 Mar 2009 12:20:45 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1237983645.18.0.229938567285.issue2170@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 13:57:51 2009 From: report at bugs.python.org (Sascha Silbe) Date: Wed, 25 Mar 2009 12:57:51 +0000 Subject: [issue1488934] file.write + closed pipe = no error Message-ID: <1237985871.36.0.249529501855.issue1488934@psf.upfronthosting.co.za> Changes by Sascha Silbe : ---------- nosy: +sascha_silbe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 15:56:50 2009 From: report at bugs.python.org (Jean-Michel Fauth) Date: Wed, 25 Mar 2009 14:56:50 +0000 Subject: [issue4626] compile() doesn't ignore the source encoding when a string is passed in In-Reply-To: <1228976357.63.0.133847904092.issue4626@psf.upfronthosting.co.za> Message-ID: <1237993010.71.0.488597004993.issue4626@psf.upfronthosting.co.za> Jean-Michel Fauth added the comment: > Victor Yes, I could, but I think this is not an IDLE issue, I'm just using IDLE to illustrate the problem. I got the same when I'm working from within an editor or with my interactive interpreter I wrote for the fun. Code in the editor: # -*- coding: cp1252 -*- # Python 3.0.1, winxp sp2 from code import InteractiveInterpreter ii = InteractiveInterpreter() source = b'print(999)' ii.runsource(source) Output: >c:\python30\pythonw -u "uuu.py" Traceback (most recent call last): File "uuu.py", line 8, in ii.runsource(source) File "c:\python30\lib\code.py", line 63, in runsource code = self.compile(source, filename, symbol) File "c:\python30\lib\codeop.py", line 168, in __call__ return _maybe_compile(self.compiler, source, filename, symbol) File "c:\python30\lib\codeop.py", line 70, in _maybe_compile for line in source.split("\n"): TypeError: Type str doesn't support the buffer API >Exit code: 1 My interactive interpreter >>> --- from code import InteractiveInterpreter >>> --- ii = InteractiveInterpreter() >>> --- source = b'print(999)' >>> --- ii.runsource(source) Traceback (most recent call last): File "", line 1, in File "c:\Python30\lib\code.py", line 63, in runsource code = self.compile(source, filename, symbol) File "c:\Python30\lib\codeop.py", line 168, in __call__ return _maybe_compile(self.compiler, source, filename, symbol) File "c:\Python30\lib\codeop.py", line 70, in _maybe_compile for line in source.split("\n"): TypeError: Type str doesn't support the buffer API >>> --- ======================= I realised and missed the fact the str() function is now accepting an encoding argument (very good). With it, the above code works. Code in the editor: # -*- coding: cp1252 -*- # Python 3.0.1, winxp sp2 from code import InteractiveInterpreter ii = InteractiveInterpreter() source = b'print(999)' source = str(source, 'cp1252') #<<<<<<<<<< ii.runsource(source) Output: (ok) >c:\python30\pythonw -u "uuu.py" 999 >Exit code: 0 ======================= In a few words, my empirical understanding of the story. 1) Things are in good shape, but Python, itsself and its components (compile, interactiveinterpreter module, runsource(), exec(), ...) are lacking in consistency, the all accept miscellanous arguments type or they are not strict enough in their arguments acceptance. When they accept a str, which encoding is accepted? 2) Python 3 is now using unicode as str. Of course, this is welcome, but the caveat is that there are now two encodings in use. Code source defaults to utf-8, but the str in code defaults to ucs-2/4 (eg. in IDLE). 3) Maybe a solution is to have an optional encoding argument as we now have everywhere eg. str(), open(), which defaults to one encoding. compile(source, filename, encodings='utf-8', ...) (Problem: BOM, coding cookies?). I suspect the miscellaneous discussions one finds from people attempting to write a "correct" execfile() for Python 3 are coming from this. Regards. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 16:23:18 2009 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Mar 2009 15:23:18 +0000 Subject: [issue4626] compile() doesn't ignore the source encoding when a string is passed in In-Reply-To: <1237993010.71.0.488597004993.issue4626@psf.upfronthosting.co.za> Message-ID: <200903251622.02527.victor.stinner@haypocalc.com> STINNER Victor added the comment: > Yes, I could, but I think this is not an IDLE issue > (...) > File "uuu.py", line 8, in > ii.runsource(source) > (...) > File "c:\python30\lib\codeop.py", line 70, in _maybe_compile > for line in source.split("\n"): > TypeError: Type str doesn't support the buffer API compile() works as expected. Your problem is related to InteractiveInterpreter().runsource(source) which is part of IDLE. runsource() is not compatible with bytes, only 'str' type is accepted. The error comes from bytes.split(str): _maybe_compile() should use source.split(b'\n') if source type is bytes. Or runsource() should reject bytes directly. > source = str(source, 'cp1252') #<<<<<<<<<< > ii.runsource(source) > > Output: (ok) Yes, runsource() (only) works with the str type. > I suspect the miscellaneous discussions one finds from people attempting > to write a "correct" execfile() for Python 3 are coming from this. Please see issues: - issue #5524: execfile() removed from Python3 - issue #4628: No universal newline support for compile() when using bytes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 17:26:15 2009 From: report at bugs.python.org (Larry Hastings) Date: Wed, 25 Mar 2009 16:26:15 +0000 Subject: [issue5561] platform.python_version_tuple returns tuple of ints, should be strings In-Reply-To: <1237998375.74.0.567262091679.issue5561@psf.upfronthosting.co.za> Message-ID: <1237998375.74.0.567262091679.issue5561@psf.upfronthosting.co.za> New submission from Larry Hastings : The documentation for platform.python_version_tuple() says: "Returns the Python version as tuple (major, minor, patchlevel) of strings." In 2.4 and 2.5 it correctly returned a tuple of strings. In 2.6 it returns a tuple of ints. In 2.4 and 2.5 the implementation was this: return string.split(_sys_version()[0], '.') In 2.6 it changed to this: if hasattr(sys, 'version_info'): return sys.version_info[:3] return tuple(string.split(_sys_version()[1], '.')) The fields used from sys.version_info are ints, and always have been. I am mystified as to why the "if hasattr" lines were added; they broke it, and it's not like that's superior information somehow. I suggest modernizing it slightly when you fix the bug; use the .split() method on strings. Like so: return tuple(_sys_version()[1].split('.')) ---------- components: Library (Lib) messages: 84161 nosy: Larry Hastings severity: normal status: open title: platform.python_version_tuple returns tuple of ints, should be strings versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 17:46:02 2009 From: report at bugs.python.org (Kevin Watters) Date: Wed, 25 Mar 2009 16:46:02 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1237999562.03.0.880208379915.issue1641@psf.upfronthosting.co.za> Changes by Kevin Watters : ---------- nosy: +kevinwatters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 19:23:13 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 25 Mar 2009 18:23:13 +0000 Subject: [issue5561] platform.python_version_tuple returns tuple of ints, should be strings In-Reply-To: <1237998375.74.0.567262091679.issue5561@psf.upfronthosting.co.za> Message-ID: <1238005393.49.0.21523241667.issue5561@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> lemburg nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 19:51:25 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 25 Mar 2009 18:51:25 +0000 Subject: [issue5561] platform.python_version_tuple returns tuple of ints, should be strings In-Reply-To: <1237998375.74.0.567262091679.issue5561@psf.upfronthosting.co.za> Message-ID: <1238007085.86.0.0281113578153.issue5561@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Thanks, that's clearly a bug. Note that the module is still compatible with Python 1.5.2, so using string methods is not possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 20:46:19 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 25 Mar 2009 19:46:19 +0000 Subject: [issue5562] Locale-based date formatting crashes on non-ASCII data In-Reply-To: <1238010378.87.0.1611631381.issue5562@psf.upfronthosting.co.za> Message-ID: <1238010378.87.0.1611631381.issue5562@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Locale-based date formatting in py3k (using strftime) crashes when asked to format a month name (or day, I assume) containing non-ASCII characters: >>> import time >>> import locale >>> time.strftime("%B", (2009,2,1,0,0,0,0,0,0)) 'February' >>> locale.setlocale(locale.LC_TIME, "fr_FR") 'fr_FR' >>> time.strftime("%B", (2009,2,1,0,0,0,0,0,0)) Traceback (most recent call last): File "", line 1, in UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1-3: invalid data It works if I specify the encoding explicitly in the locale name so as to coincide with the encoding specified in the error message above (but that's assuming the given encoding-specific locale *is* installed): >>> locale.setlocale(locale.LC_TIME, "fr_FR.UTF-8") 'fr_FR.UTF-8' >>> time.strftime("%B", (2009,2,1,0,0,0,0,0,0)) 'f?vrier' ---------- components: Library (Lib) messages: 84163 nosy: pitrou priority: high severity: normal status: open title: Locale-based date formatting crashes on non-ASCII data type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 20:48:18 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 25 Mar 2009 19:48:18 +0000 Subject: [issue5562] Locale-based date formatting crashes on non-ASCII data In-Reply-To: <1238010378.87.0.1611631381.issue5562@psf.upfronthosting.co.za> Message-ID: <1238010498.55.0.614521874379.issue5562@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (if I explicitly set another encoding, it doesn't work however: >>> locale.setlocale(locale.LC_TIME, "fr_FR.ISO-8859-1") 'fr_FR.ISO-8859-1' >>> time.strftime("%B", (2009,2,1,0,0,0,0,0,0)) Traceback (most recent call last): File "", line 1, in UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1-3: invalid data ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 20:52:41 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 25 Mar 2009 19:52:41 +0000 Subject: [issue5561] platform.python_version_tuple returns tuple of ints, should be strings In-Reply-To: <1237998375.74.0.567262091679.issue5561@psf.upfronthosting.co.za> Message-ID: <1238010761.2.0.465687105221.issue5561@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Checked in a fix for Python 2.7 and 2.6 (r70594:70596). ---------- status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 25 21:49:26 2009 From: report at bugs.python.org (cassava) Date: Wed, 25 Mar 2009 20:49:26 +0000 Subject: [issue5505] sys.stdin.read() doesn't return after first EOF on Windows In-Reply-To: <1237368034.29.0.0565107663013.issue5505@psf.upfronthosting.co.za> Message-ID: <1238014166.11.0.679359376598.issue5505@psf.upfronthosting.co.za> cassava added the comment: This is happening on Arch Linux as well: Python 3.0.1 (r301:69556, Feb 22 2009, 02:43:30) [GCC 4.3.3] on linux2 I tried python2.6 and it ends with one Ctrl+D I tried python3.0.1 and it needs two Ctrl+D before it ends ---------- nosy: +cassava _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 00:20:09 2009 From: report at bugs.python.org (John Machin) Date: Wed, 25 Mar 2009 23:20:09 +0000 Subject: [issue5095] msi missing from "bdist --help-formats" In-Reply-To: <1233198350.56.0.182108150047.issue5095@psf.upfronthosting.co.za> Message-ID: <1238023209.7.0.637934534736.issue5095@psf.upfronthosting.co.za> John Machin added the comment: The 2.6.1 documentation consists of a *single* line: "distutils.command.bdist_msi ? Build a Microsoft Installer binary package". AFAICT this is the *only* mention of "msi" in the docs (outside the msilib module). I heard about it only by word-of-mouth. Docs should explain why a packager might want to use it instead of wininst, and why the output msi is specific to the creating version of python. ---------- nosy: +sjmachin _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Thu Mar 26 00:20:14 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Wed, 25 Mar 2009 23:20:14 +0000 Subject: [issue834351] Mouse wheel crashes program Message-ID: <1238023214.15.0.806585169491.issue834351@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 00:32:59 2009 From: report at bugs.python.org (Steven Bethard) Date: Wed, 25 Mar 2009 23:32:59 +0000 Subject: [issue5563] Document bdist_msi In-Reply-To: <1238023978.65.0.898272761153.issue5563@psf.upfronthosting.co.za> Message-ID: <1238023978.65.0.898272761153.issue5563@psf.upfronthosting.co.za> New submission from Steven Bethard : [Suggested in issue5095 by John Machin] The 2.6.1 documentation consists of a *single* line: "distutils.command.bdist_msi ? Build a Microsoft Installer binary package". The docs should explain briefly what an msi file is, and why a packager might want to use it instead of wininst. ---------- assignee: georg.brandl components: Documentation messages: 84168 nosy: bethard, georg.brandl severity: normal status: open title: Document bdist_msi type: feature request versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 00:36:12 2009 From: report at bugs.python.org (Steven Bethard) Date: Wed, 25 Mar 2009 23:36:12 +0000 Subject: [issue5095] msi missing from "bdist --help-formats" In-Reply-To: <1233198350.56.0.182108150047.issue5095@psf.upfronthosting.co.za> Message-ID: <1238024172.76.0.695215304417.issue5095@psf.upfronthosting.co.za> Steven Bethard added the comment: You're right that the msi feature could use some more documentation. I created a documentation feature request: issue5563. As to why the .msi is specific to the creating version of Python, it's because no one has written the code necessary to be version agnostic - see issue5311. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Thu Mar 26 01:43:23 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Thu, 26 Mar 2009 00:43:23 +0000 Subject: [issue5562] Locale-based date formatting crashes on non-ASCII data In-Reply-To: <1238010378.87.0.1611631381.issue5562@psf.upfronthosting.co.za> Message-ID: <1238028203.93.0.357743797777.issue5562@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think the problem is that creation of the Unicode string defaults to UTF-8. It should instead use the locale's encoding. You are right that it could be an issue that there is no Python codec for the locale's encoding. To be robust against this case, I think the locale's mbcs->wcs routines should be used (i.e. mbstowcs). Better yet, use wcsftime in the first place. AFAICT, wcsftime is C99, so not all systems might support it. However, it appears that MSVC has it, so we could assume it exists and wait until someone complains. One issue apparently is that some implementations of wcsftime expect the format as char* (and again, I would defer dealing with that until somebody complains). In either case, you end up with a wchar_t. In principle, the locale might use a non-Unicode wide charset for wchar_t, but these got out of use some time ago, and Python had always assumed that wchar_t is Unicode. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 01:52:13 2009 From: report at bugs.python.org (Adam Olsen) Date: Thu, 26 Mar 2009 00:52:13 +0000 Subject: [issue5564] os.symlink/os.link docs should say old/new, not src/dst In-Reply-To: <1238028733.0.0.712487268611.issue5564@psf.upfronthosting.co.za> Message-ID: <1238028733.0.0.712487268611.issue5564@psf.upfronthosting.co.za> New submission from Adam Olsen : "destination" is ambiguous. It means opposite things, depending on if it's the symlink creation operation or if it's the symlink itself. In contrast, "old" is clearly what existed before the operation, and "new" is what the operation creates. This terminology is already in use by os.rename. ---------- assignee: georg.brandl components: Documentation messages: 84171 nosy: Rhamphoryncus, georg.brandl severity: normal status: open title: os.symlink/os.link docs should say old/new, not src/dst _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Thu Mar 26 02:06:10 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Thu, 26 Mar 2009 01:06:10 +0000 Subject: [issue5563] Document bdist_msi In-Reply-To: <1238023978.65.0.898272761153.issue5563@psf.upfronthosting.co.za> Message-ID: <1238029570.28.0.147888178157.issue5563@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you propose specific wording? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 02:19:09 2009 From: report at bugs.python.org (Steven Bethard) Date: Thu, 26 Mar 2009 01:19:09 +0000 Subject: [issue5563] Document bdist_msi In-Reply-To: <1238023978.65.0.898272761153.issue5563@psf.upfronthosting.co.za> Message-ID: <1238030349.19.0.615557184894.issue5563@psf.upfronthosting.co.za> Steven Bethard added the comment: If no one beats me to it, I plan to do this at PyCon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 06:39:31 2009 From: report at bugs.python.org (Senthil) Date: Thu, 26 Mar 2009 05:39:31 +0000 Subject: [issue5560] help() no longer reports module docstrings In-Reply-To: <1237958171.84.0.78612071906.issue5560@psf.upfronthosting.co.za> Message-ID: <7c42eba10903252239q4712876ana8d63afe807d7b71@mail.gmail.com> Senthil added the comment: Confirming this bug. It seems to be the case with the code in py3k trunk also. ---------- nosy: +orsenthil Added file: http://bugs.python.org/file13418/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Confirming this bug. It seems to be the case with the code in py3k trunk also.

From =?utf-8?b?UGhpbGlwcCBUw7Zsa2UgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za Thu Mar 26 08:12:25 2009 From: =?utf-8?b?UGhpbGlwcCBUw7Zsa2UgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za (=?utf-8?b?UGhpbGlwcCBUw7Zsa2UgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za) Date: Thu, 26 Mar 2009 07:12:25 +0000 Subject: [issue5565] Strange behavior when I logout() with IMAP4_SSL In-Reply-To: <1238051545.58.0.380777960062.issue5565@psf.upfronthosting.co.za> Message-ID: <1238051545.58.0.380777960062.issue5565@psf.upfronthosting.co.za> New submission from Philipp T?lke : While researching some strange logs from out firewall and narrowing it down to a biff-like imap-client written in python we found the following: To reproduce: Start a network-sniffer like wireshark on the loopback-interface In one shell start some network-listener: $ nc -l -p 12345 In python, connect to it and send some data: >>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>> s.connect(("127.0.0.1", 12345)) >>> s.send("Hallo\n"); 6 The other shell now looks like: $ nc -l -p 12345 Hallo Type in anything and press to send. Then quit the nc with C-c. Then: >>> s.close() What I see here is the following: The two messages are exchanged and nc sends his FIN-Package when quitting. Python ACKnowledges this package (though intrestingly enough, with a ack-number one to far (8 instead of 7 in my example)). At the Moment of the s.close(), it sends another package, containing the same ACK-Number, the same SEQ-Number(!) and this time the RST-Flag as well. If I understand correctly, it sends RST, because not everything from the connection was read by python. Why does it resend the ACK? Why is the ACK-Number one to high? Why does it reuse the SEQ-Number? And now to imaplib.IMAP4_SSL. The behavior here seems to me even more strange: If I invoke .logout(), the server sends his "BYE" message and after that a FIN, which python ACKnowledges. At the moment, that the IMAP4_SSL-object gets out of scope, a RST/ACK-Package is send, that again re-ACKs the FIN and has the same sequence-number, that the ACK package had! Why does .logout() not send a FIN? Why does it not read the complete Buffer, so that the Socket could close with FIN? And, why does it wait until getting out of scope with sending this RST? (I assume, that is when the Object is garbage-collected) Thank you! ---------- components: Library (Lib) messages: 84175 nosy: toelke severity: normal status: open title: Strange behavior when I logout() with IMAP4_SSL versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 08:42:05 2009 From: report at bugs.python.org (Senthil) Date: Thu, 26 Mar 2009 07:42:05 +0000 Subject: [issue5560] help() no longer reports module docstrings In-Reply-To: <1237958171.84.0.78612071906.issue5560@psf.upfronthosting.co.za> Message-ID: <1238053325.43.0.387334252211.issue5560@psf.upfronthosting.co.za> Changes by Senthil : Removed file: http://bugs.python.org/file13418/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 09:04:46 2009 From: report at bugs.python.org (Senthil) Date: Thu, 26 Mar 2009 08:04:46 +0000 Subject: [issue5560] help() no longer reports module docstrings In-Reply-To: <1237958171.84.0.78612071906.issue5560@psf.upfronthosting.co.za> Message-ID: <1238054686.05.0.182682448119.issue5560@psf.upfronthosting.co.za> Senthil added the comment: This is issue is FIXED in the trunk code. Please ignore my previous comment. The problem area is in between line 350-352 in the Python 3.0:pydoc.py module. 348 docloc = os.environ.get("PYTHONDOCS", 349 "http://docs.python.org/library") 350 docdir = '/usr/share/doc/python%s/html/library' % sys.version[:3] 351 if not os.environ.has_key("PYTHONDOCS") and os.path.isdir(docdir): 352 docloc = docdir Setting the PYTHONDOCS environment variable still wont work becaues in Python3k, os.environ does not have has_key attribute, will throw an exception which is caught somewhere and the module location is returned instead of its help file,which pydoc uses to display help. I see that its fixed in trunk where in the lines 350-352 is removed and pydoc.help() is gathered from local help files if PYTHONDOCS is set or from the docs.python.org/library location. This works properly with Python3.1 and this issue can be Closed as Fixed in 3.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 12:05:50 2009 From: report at bugs.python.org (Cournapeau David) Date: Thu, 26 Mar 2009 11:05:50 +0000 Subject: [issue4709] Mingw-w64 and python on windows x64 In-Reply-To: <1229849614.64.0.683517411932.issue4709@psf.upfronthosting.co.za> Message-ID: <1238065550.62.0.495570822257.issue4709@psf.upfronthosting.co.za> Cournapeau David added the comment: Is there any change to see this integrated soon ? The patch is only a couple of lines long, thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 12:28:02 2009 From: report at bugs.python.org (Haoyu Bai) Date: Thu, 26 Mar 2009 11:28:02 +0000 Subject: [issue5566] Minor error in document of PyLong_AsSsize_t In-Reply-To: <1238066882.54.0.64237594344.issue5566@psf.upfronthosting.co.za> Message-ID: <1238066882.54.0.64237594344.issue5566@psf.upfronthosting.co.za> New submission from Haoyu Bai : In 2.6 and 2.7 development document, PyLong_AsSsize_t is said "New in version 2.5". It is not correct because I checked Python 2.5.4 and there's only _PyLong_AsSsize_t(). You can check it here: http://docs.python.org/dev/c-api/long.html#PyLong_AsSsize_t In 3.0 and 3.1 development document, PyLong_AsSsize_t is appeared twice, there must be one duplicated. Check it here: http://docs.python.org/dev/py3k/c-api/long.html#PyLong_AsSsize_t Thanks! ---------- assignee: georg.brandl components: Documentation messages: 84178 nosy: bhy, georg.brandl severity: normal status: open title: Minor error in document of PyLong_AsSsize_t versions: Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 13:12:06 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 26 Mar 2009 12:12:06 +0000 Subject: [issue5560] help() no longer reports module docstrings In-Reply-To: <1237958171.84.0.78612071906.issue5560@psf.upfronthosting.co.za> Message-ID: <1238069526.17.0.174589739142.issue5560@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The code you show was never part of the python project; But I found that it can come from a customized version for some Linux distributions: http://patches.ubuntu.com/by-release/extracted/ubuntu/p/python3.0/3.0~b3+20080915-0ubuntu1/deb-locations.dpatch This patch is wrong, as you noticed, and should be corrected by their authors. ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 15:17:49 2009 From: report at bugs.python.org (Martin Gfeller Martin Gfeller) Date: Thu, 26 Mar 2009 14:17:49 +0000 Subject: [issue1497532] C API to retain GIL during Python Callback Message-ID: <1238077069.02.0.349739438807.issue1497532@psf.upfronthosting.co.za> Martin Gfeller Martin Gfeller added the comment: Lukas, I'm afraid to admit you're right :-;. Assuming that the Python code called under the "not release the GIL" regime would not do anything that could be potentially blocking is probably dangerous and could result in an unstable interpreter. So I withdraw my feature request and thank you for your efforts and interest. Best regards, Martin ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 15:43:19 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 26 Mar 2009 14:43:19 +0000 Subject: [issue1497532] C API to retain GIL during Python Callback Message-ID: <1238078599.75.0.750893234322.issue1497532@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 16:48:18 2009 From: report at bugs.python.org (Marek Kubica) Date: Thu, 26 Mar 2009 15:48:18 +0000 Subject: [issue5567] Operators in operator module don't work with keyword arguments In-Reply-To: <1238082498.01.0.463671336038.issue5567@psf.upfronthosting.co.za> Message-ID: <1238082498.01.0.463671336038.issue5567@psf.upfronthosting.co.za> New submission from Marek Kubica : When calling operators from the ``operator``-module, they refuse to accept keyword arguments: operator.add(a=1, b=2) TypeError: add() takes no keyword arguments Operators with keyword arguments are important when one wants to create partial functions with non-positional arguments. Take for example ``operator.mod`` where the order of the arguments matters: This works: map(lambda x: x % 2, range(5)) This does not work, since ``operator.mod`` does not support keyword arguments: map(functools.partial(operator.mod, b=2), range(5)) So there are two solutions: define one's own add(), mod(), contains() etc. but then the ``operator`` module is rather useless or make them accept keyword arguments. With ``partial`` in the Stdlib this solution would be a whole lot nicer. ---------- components: Library (Lib) messages: 84181 nosy: leonidas severity: normal status: open title: Operators in operator module don't work with keyword arguments type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 17:21:07 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 26 Mar 2009 16:21:07 +0000 Subject: [issue5528] Unable to launch IDLE on Windows In-Reply-To: <1237588418.03.0.370218080743.issue5528@psf.upfronthosting.co.za> Message-ID: <1238084467.69.0.0247692719309.issue5528@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Do you happen to have a TCL_LIBRARY environment variable? If yes, I suggest to remove it. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 17:44:03 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 26 Mar 2009 16:44:03 +0000 Subject: [issue5126] Space character returns false from isprintable() method In-Reply-To: <1233522128.92.0.321891922918.issue5126@psf.upfronthosting.co.za> Message-ID: <1238085843.89.0.0813845340485.issue5126@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The patch seems good. ---------- nosy: +amaury.forgeotdarc resolution: -> accepted stage: test needed -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 17:51:11 2009 From: report at bugs.python.org (Jack Diederich) Date: Thu, 26 Mar 2009 16:51:11 +0000 Subject: [issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime In-Reply-To: <1237423886.27.0.985547007127.issue5516@psf.upfronthosting.co.za> Message-ID: <1238086271.91.0.0395310478022.issue5516@psf.upfronthosting.co.za> Jack Diederich added the comment: +1 Patch and tests work for me. Uploaded a patch that is identical except the file paths are fixed. Was the old behavior stable across compilers anyway? It memcmpared two different structs and IIRC only the first item of each struct is guaranteed to be at the start of the memory location. No? With this patch only same-struct objects are memcmpared. ---------- nosy: +jackdied Added file: http://bugs.python.org/file13419/issue5516_trunk.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 17:55:38 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 26 Mar 2009 16:55:38 +0000 Subject: [issue5006] Duplicate UTF-16 BOM if a file is open in append mode In-Reply-To: <1232407475.88.0.821271875363.issue5006@psf.upfronthosting.co.za> Message-ID: <1238086538.14.0.649193116499.issue5006@psf.upfronthosting.co.za> Antoine Pitrou added the comment: As for the C version of the patch: - I'm not sure why you make self->ok handling more complicated than it was - encodefunc should not be forced to NULL, otherwise it will yield a big decrease in write() performance ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 17:59:10 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 26 Mar 2009 16:59:10 +0000 Subject: [issue5567] Operators in operator module don't work with keyword arguments In-Reply-To: <1238082498.01.0.463671336038.issue5567@psf.upfronthosting.co.za> Message-ID: <1238086750.36.0.950131188854.issue5567@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 18:02:13 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 26 Mar 2009 17:02:13 +0000 Subject: [issue1080387] Making IDLE Themes and Keys Config more Robust Message-ID: <1238086933.52.0.683861809766.issue1080387@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This issue seems identical to issue2665: IDLE prints a lot of warnings, and this can block the program after some amount of text, probably on the first flush() because stderr is not connected to anything when pythonw.exe is used. issue2665 was fixed by not blocking the program, now IDLE can start. The original problem remain, though. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 18:16:05 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 26 Mar 2009 17:16:05 +0000 Subject: [issue5126] Space character returns false from isprintable() method In-Reply-To: <1233522128.92.0.321891922918.issue5126@psf.upfronthosting.co.za> Message-ID: <1238087765.16.0.771772194032.issue5126@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70610. ---------- nosy: +benjamin.peterson resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 18:26:30 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Mar 2009 17:26:30 +0000 Subject: [issue5006] Duplicate UTF-16 BOM if a file is open in append mode In-Reply-To: <1238086538.14.0.649193116499.issue5006@psf.upfronthosting.co.za> Message-ID: <200903261826.18853.victor.stinner@haypocalc.com> STINNER Victor added the comment: > - I'm not sure why you make self->ok handling more complicated than it was tell() requires self->ok=1. I choosed to reset self->ok to zero on error, but it's maybe useless. > - encodefunc should not be forced to NULL, otherwise it will yield a big > decrease in write() performance self>encodefunc value have to be changed because .setstate() changes the encoding function: UTF-16 => UTF-16-LE or UTF-16-BE. I don't know how to get the new value of self>encodefunc. I will try to write another patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 18:27:44 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 26 Mar 2009 17:27:44 +0000 Subject: [issue5567] Operators in operator module don't work with keyword arguments In-Reply-To: <1238082498.01.0.463671336038.issue5567@psf.upfronthosting.co.za> Message-ID: <1238088464.23.0.909520611179.issue5567@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sounds like what you're really looking for is a version of partial() that lets you bind positional arguments in any position. Something like: partial(operator.mod, (1,2)) that pre-binds 2 to argument position 1. Changing the language to match the existing partial() function instead of changing partial() to fit the language seems like "the tail wagging the dog". FWIW, I don't think partial actually buys you anything useful. It's implementation isn't as flexible as a lambda, nor is it any faster. I think it mainly serves those who have an aversion to lambda, perhaps because of its name. Also, I don't think it's a good idea to assign arbitrary keywords to the operator functions unless those keywords have some meaning that makes programs more readable. The names "a" and "b" are only mildly useful a position placeholders. Names like "divisor" and "dividend" are more descriptive, but that is overkill. Overall, am -1 on the proposal. ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 18:35:12 2009 From: report at bugs.python.org (Jim Olson) Date: Thu, 26 Mar 2009 17:35:12 +0000 Subject: [issue5568] self.writer.closed() extraneous parens in BufferedRWPair of io module In-Reply-To: <1238088912.5.0.880041716832.issue5568@psf.upfronthosting.co.za> Message-ID: <1238088912.5.0.880041716832.issue5568@psf.upfronthosting.co.za> New submission from Jim Olson : import io # Corrected a typo in Python261/Lib/io.py at line 1167 # return self.writer.closed() ==> return self.writer.closed # in # @property # def closed(self): # return self.writer.closed #also: shouldn't ascii strings still work in Python 2.6.1 for #StringIO and TextIO? As shown below, writes only work with unicode strings. #Python 3 changes default encoding to utf-8 but 2.6.1 is still ascii: #>>> import sys #>>> sys.getdefaultencoding() #'ascii' # Sorry if I am wrong about this. ba = buffer('circle') s = io.StringIO(ba) print s.getvalue() #ascii string doesn't work in Python 2.6.1 -- print s.write('square') print s.write(u'square') print s.read() print s.getvalue(), '\n\n' f = io.FileIO('ioex.txt', 'a+') r = io.BufferedReader(f) w = io.BufferedWriter(f) p = io.BufferedRWPair(r, w) t = io.TextIOWrapper(p, line_buffering=True) print t.read(3) print t.read() print f.write('julius ceaser\n') lines = ['william', 'shakespeare', '\n'] f.writelines(' '.join(lines)) #ascii string doesn't work in Python 2.6.1 -- print t.write('marc anthony\n') print t.write(u'marc anthony\n') ---------- files: ioex.py messages: 84190 nosy: jimo555 severity: normal status: open title: self.writer.closed() extraneous parens in BufferedRWPair of io module type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file13420/ioex.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 18:38:33 2009 From: report at bugs.python.org (Chris) Date: Thu, 26 Mar 2009 17:38:33 +0000 Subject: [issue5528] Unable to launch IDLE on Windows In-Reply-To: <1238084467.69.0.0247692719309.issue5528@psf.upfronthosting.co.za> Message-ID: <719132.19282.qm@web110604.mail.gq1.yahoo.com> Chris added the comment: Amaury, ?? That worked, the variable was for IBMTools, so I am a little concerned that some other program may have issues.? If I do have problems, I will just add the variable back. ?? Thanks for getting back to me. - Chris ----- Original Message ---- From: Amaury Forgeot d'Arc To: chrisaroy at yahoo.com Sent: Thursday, March 26, 2009 11:21:08 AM Subject: [issue5528] Unable to launch IDLE on Windows Amaury Forgeot d'Arc added the comment: Do you happen to have a TCL_LIBRARY environment variable? If yes, I suggest to remove it. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 18:41:32 2009 From: report at bugs.python.org (Marek Kubica) Date: Thu, 26 Mar 2009 17:41:32 +0000 Subject: [issue5567] Operators in operator module don't work with keyword arguments In-Reply-To: <1238082498.01.0.463671336038.issue5567@psf.upfronthosting.co.za> Message-ID: <1238089292.22.0.853150192968.issue5567@psf.upfronthosting.co.za> Marek Kubica added the comment: Well, some Schemes have an CURRYR variant which creates partial functions with positional arguments from the right but the current solution with partial accepting keywords is way more flexible since I can pre-set any arguments I like in such a function in any order. Doing so by using keyword arguments looks cleaner than by using the position of the argument. Compare ``partial(operator.mod, (2, 2))`` with ``partial(operator.mod, divisor=2)`` and at least to me, it is clearer what is happening in the second case. Even ``partial(operator.mod, b=2)`` looks simpler, albeit the name ``b`` is not particularly descriptive. The names ``a`` and ``b`` as used in many operators are indeed not very useful but renaming them wouldn't be a problem since nobody currently depends on ``a`` or ``b`` in their code; just in the order. That said, ``a`` and ``b`` are not so bad actually, because I couldn't think of better names for ``a`` and ``b`` in ``operator.contains(a, b)``. The nice thing now is, that partial can indeed replace many lambdas so not allowing partial to use operator seems just a random restriction. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 18:41:35 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 26 Mar 2009 17:41:35 +0000 Subject: [issue5006] Duplicate UTF-16 BOM if a file is open in append mode In-Reply-To: <200903261826.18853.victor.stinner@haypocalc.com> Message-ID: <1238089369.8107.16.camel@fsol> Antoine Pitrou added the comment: Le jeudi 26 mars 2009 ? 17:26 +0000, STINNER Victor a ?crit : > STINNER Victor added the comment: > > > - I'm not sure why you make self->ok handling more complicated than it was > > tell() requires self->ok=1. I choosed to reset self->ok to zero on error, but > it's maybe useless. You are calling tell() on the underlying binary buffer, not on the TextIOWrapper object. So self->ok should have no impact. Am I missing something? > self>encodefunc value have to be changed because .setstate() changes > the encoding function: UTF-16 => UTF-16-LE or UTF-16-BE. I know, but then the logic should probably be changed and use an additional struct member to signal that the start of file has been skipped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 18:47:45 2009 From: report at bugs.python.org (Jim Olson) Date: Thu, 26 Mar 2009 17:47:45 +0000 Subject: [issue5568] self.writer.closed() extraneous parens in BufferedRWPair of io module In-Reply-To: <1238088912.5.0.880041716832.issue5568@psf.upfronthosting.co.za> Message-ID: <1238089665.42.0.243452645858.issue5568@psf.upfronthosting.co.za> Changes by Jim Olson : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 18:52:41 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Mar 2009 17:52:41 +0000 Subject: [issue5006] Duplicate UTF-16 BOM if a file is open in append mode In-Reply-To: <1232407475.88.0.821271875363.issue5006@psf.upfronthosting.co.za> Message-ID: <1238089961.81.0.442638822523.issue5006@psf.upfronthosting.co.za> STINNER Victor added the comment: Faster patch! - add fast encoder for UTF-32, UTF-32-LE and UTF-32-BE (copy/paste of utf16 functions) - move utf-8 before utf-16-* because utf8 more popular than utf16 :-p - don't set self->encodefunc=NULL (loose all the encoder optimisation), but only fix self->encodefunc for two special cases: utf16=>utf16le or utf16be and utf32=>utf32le or utf32be - remove self->ok: it was may be usefull for an older version of my patch, but it's not more needed ---------- Added file: http://bugs.python.org/file13421/append_bom-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 18:52:52 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Mar 2009 17:52:52 +0000 Subject: [issue5006] Duplicate UTF-16 BOM if a file is open in append mode In-Reply-To: <1232407475.88.0.821271875363.issue5006@psf.upfronthosting.co.za> Message-ID: <1238089972.16.0.730730646795.issue5006@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file13377/append_bom.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 18:57:50 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Mar 2009 17:57:50 +0000 Subject: [issue5006] Duplicate UTF-16 BOM if a file is open in append mode In-Reply-To: <1238089961.81.0.442638822523.issue5006@psf.upfronthosting.co.za> Message-ID: <200903261857.40793.victor.stinner@haypocalc.com> STINNER Victor added the comment: Hum, it's a detail, but is it a good idea to keep the reference the int(0)? Or would it be better to release it at exit? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 19:47:07 2009 From: report at bugs.python.org (Yogendra Mohan) Date: Thu, 26 Mar 2009 18:47:07 +0000 Subject: [issue5569] Issue in transparency in top level tk window(python) on MAC In-Reply-To: <1238093226.99.0.851453746263.issue5569@psf.upfronthosting.co.za> Message-ID: <1238093226.99.0.851453746263.issue5569@psf.upfronthosting.co.za> New submission from Yogendra Mohan : Hello All, OS - MAC 10.5.1 Python 2.5.1 Tk - 8.5.6 I am using the wm_attributes for transparency of top level window. But unable to do the same. The Tk wm attributes command takes option arguments self.top=Toplevel(master=self.parent) self.top.wm_attributes(alpha=0.0) Let me know can I do on MAC system or Not? If not then please let me know what all changes are required into tkinter. Thanks in advance. Yogendra Mohan ---------- components: Tkinter messages: 84196 nosy: YMohan severity: normal status: open title: Issue in transparency in top level tk window(python) on MAC type: crash versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:08:51 2009 From: report at bugs.python.org (Allister MacLeod) Date: Thu, 26 Mar 2009 19:08:51 +0000 Subject: [issue5570] Bus error when calling .poll() on a closed Connection from multiprocessing.Pipe() In-Reply-To: <1238094531.54.0.874632618778.issue5570@psf.upfronthosting.co.za> Message-ID: <1238094531.54.0.874632618778.issue5570@psf.upfronthosting.co.za> New submission from Allister MacLeod : Python 2.6.1 (r261:67515, Mar 26 2009, 14:44:39) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from multiprocessing import Pipe >>> a, b = Pipe() >>> a.close() >>> a.poll() Bus error amacleod at cthulhu:~$ uname -a Linux cthulhu 2.6.24-23-generic #1 SMP Mon Jan 26 01:04:16 UTC 2009 x86_64 GNU/Linux I'm running Ubuntu 8.04 LTS, and just installed Python 2.6.1, compiling from source. ---------- components: Library (Lib) messages: 84197 nosy: amacleod severity: normal status: open title: Bus error when calling .poll() on a closed Connection from multiprocessing.Pipe() versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:10:16 2009 From: report at bugs.python.org (Glyph Lefkowitz) Date: Thu, 26 Mar 2009 19:10:16 +0000 Subject: [issue5571] new "TestCase.skip" method causes all tests to skip under trial (Twisted's test runner) In-Reply-To: <1238094616.02.0.646494355716.issue5571@psf.upfronthosting.co.za> Message-ID: <1238094616.02.0.646494355716.issue5571@psf.upfronthosting.co.za> New submission from Glyph Lefkowitz : c.f. this Twisted ticket: http://twistedmatrix.com/trac/ticket/3703 Twisted's test tool has an extended TestCase which uses the 'skip' attribute, on both tests and methods, to determine whether to skip them. You can see the implementation here: http://twistedmatrix.com/trac/browser/trunk/twisted/trial/unittest.py?rev=26043#L655 The addition of the new 'skip' method in unittest.py therefore causes trial, twisted's test tool, to unconditionally skip all tests. I've set the priority to release blocker because I'd like it to be determined whether this is really python's fault, or twisted's fault for subclassing TestCase. If the new 'skip' method of TestCase is renamed to something else, say skipTest, this won't be a problem. While I understand that this is technically a compatible change (the addition of an attribute) I'd appreciate it if this changed on Python's side of things, because leaving it up to Twisted means we need to go through a deprecation cycle on a long-standing, stable public interface that a lot of test code is using. ---------- assignee: benjamin.peterson components: Library (Lib) messages: 84198 nosy: benjamin.peterson, glyph priority: release blocker severity: normal status: open title: new "TestCase.skip" method causes all tests to skip under trial (Twisted's test runner) type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:16:54 2009 From: report at bugs.python.org (Collin Winter) Date: Thu, 26 Mar 2009 19:16:54 +0000 Subject: [issue5572] distutils ignores the LIBS configure env var In-Reply-To: <1238095013.07.0.627782689433.issue5572@psf.upfronthosting.co.za> Message-ID: <1238095013.07.0.627782689433.issue5572@psf.upfronthosting.co.za> New submission from Collin Winter : If you pass LIBS to ./configure (as in "LIBS=-lgcov ./configure"), distutils ignores this when building extension modules, which breaks when using certain gcc options which require certain libraries (I'm thinking of -fprofile-generate). The attached patch remedies this. ---------- assignee: tarek components: Distutils files: distutils_libs.patch keywords: needs review, patch, patch messages: 84199 nosy: collinwinter, jyasskin, tarek severity: normal stage: patch review status: open title: distutils ignores the LIBS configure env var type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file13422/distutils_libs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:23:25 2009 From: report at bugs.python.org (Vaibhav Mallya) Date: Thu, 26 Mar 2009 19:23:25 +0000 Subject: [issue5570] Bus error when calling .poll() on a closed Connection from multiprocessing.Pipe() In-Reply-To: <1238094531.54.0.874632618778.issue5570@psf.upfronthosting.co.za> Message-ID: <1238095405.64.0.946525090781.issue5570@psf.upfronthosting.co.za> Vaibhav Mallya added the comment: Python 2.6.1 (r261:67515, Mar 22 2009, 05:39:39) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from multiprocessing import Pipe >>> a, b = Pipe() >>> a.close() >>> a.poll() Segmentation fault Seems like this should raise an exception. uname -a: Linux mememy 2.6.24-23-generic #1 SMP Thu Feb 5 15:00:25 UTC 2009 i686 GNU/Linux Compiled Python 2.6.1 from source. ---------- components: +Extension Modules -Library (Lib) nosy: +mallyvai _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:25:19 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 26 Mar 2009 19:25:19 +0000 Subject: [issue5570] Bus error when calling .poll() on a closed Connection from multiprocessing.Pipe() In-Reply-To: <1238094531.54.0.874632618778.issue5570@psf.upfronthosting.co.za> Message-ID: <1238095519.45.0.0247927273354.issue5570@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> jnoller nosy: +jnoller priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:30:11 2009 From: report at bugs.python.org (Jack Diederich) Date: Thu, 26 Mar 2009 19:30:11 +0000 Subject: [issue5387] mmap.move crashes by integer overflow In-Reply-To: <1235756718.87.0.0651298987866.issue5387@psf.upfronthosting.co.za> Message-ID: <1238095811.08.0.397874452781.issue5387@psf.upfronthosting.co.za> Jack Diederich added the comment: Here is a more verbose patch. It checks to see if the first two arguments stand-alone as well. It also updates NEWS and ACKs and adds some assertRaises for various bounds checks. ---------- nosy: +jackdied Added file: http://bugs.python.org/file13423/issue_5387.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:35:56 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 26 Mar 2009 19:35:56 +0000 Subject: [issue5570] Bus error when calling .poll() on a closed Connection from multiprocessing.Pipe() In-Reply-To: <1238094531.54.0.874632618778.issue5570@psf.upfronthosting.co.za> Message-ID: <1238096156.41.0.0968353717832.issue5570@psf.upfronthosting.co.za> Jesse Noller added the comment: See also: http://svn.python.org/view?view=rev&revision=68768 http://bugs.python.org/issue3311 This was checked into trunk, I don't know if it was merged to 2.6.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:38:00 2009 From: report at bugs.python.org (Jack Diederich) Date: Thu, 26 Mar 2009 19:38:00 +0000 Subject: [issue5188] telnetlib process_rawq buffer handling is confused In-Reply-To: <1234131372.15.0.372715702734.issue5188@psf.upfronthosting.co.za> Message-ID: <1238096280.91.0.187584097022.issue5188@psf.upfronthosting.co.za> Jack Diederich added the comment: I assigned this to me. I'll be sprinting on telnetlib. ---------- assignee: -> jackdied nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:38:33 2009 From: report at bugs.python.org (Vaibhav Mallya) Date: Thu, 26 Mar 2009 19:38:33 +0000 Subject: [issue5573] multiprocessing Pipe poll() and recv() semantics. In-Reply-To: <1238096312.97.0.564685442594.issue5573@psf.upfronthosting.co.za> Message-ID: <1238096312.97.0.564685442594.issue5573@psf.upfronthosting.co.za> New submission from Vaibhav Mallya : Python 2.6.1 (r261:67515, Mar 22 2009, 05:39:39) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from multiprocessing import Pipe >>> parent, child = Pipe() >>> parent.send(1) >>> parent.close() >>> print child.recv() 1 >>> print child.poll() True >>> print child.recv() Traceback (most recent call last): File "", line 1, in EOFError We have to use both poll() and recv() to determine whether or not the connection was actually closed. Better behavior might be returning True on poll() only if the next recv() on that end of the pipe will work without an error. There may not be a way to guarantee this, but it would be useful if the documentation was clarified either way. uname -a: Linux mememy 2.6.24-23-generic #1 SMP Thu Feb 5 15:00:25 UTC 2009 i686 GNU/Linux Compiled Python 2.6.1 from source. ---------- assignee: georg.brandl components: Documentation, Library (Lib) messages: 84204 nosy: georg.brandl, mallyvai severity: normal status: open title: multiprocessing Pipe poll() and recv() semantics. type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:43:58 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 26 Mar 2009 19:43:58 +0000 Subject: [issue5570] Bus error when calling .poll() on a closed Connection from multiprocessing.Pipe() In-Reply-To: <1238094531.54.0.874632618778.issue5570@psf.upfronthosting.co.za> Message-ID: <1238096638.8.0.402347086866.issue5570@psf.upfronthosting.co.za> Jesse Noller added the comment: OS/X, Python Trunk: >>> from multiprocessing import Pipe >>> a, b = Pipe() >>> a.close() >>> a.poll() Traceback (most recent call last): File "", line 1, in IOError: handle out of range in select() >>> 2.6.1 Does not have the fix (I can segfault it here too). Ben, are we planning a 2.6.2? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:44:00 2009 From: report at bugs.python.org (Vaibhav Mallya) Date: Thu, 26 Mar 2009 19:44:00 +0000 Subject: [issue5573] multiprocessing Pipe poll() and recv() semantics. In-Reply-To: <1238096312.97.0.564685442594.issue5573@psf.upfronthosting.co.za> Message-ID: <1238096640.16.0.126463052052.issue5573@psf.upfronthosting.co.za> Changes by Vaibhav Mallya : ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:44:59 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 26 Mar 2009 19:44:59 +0000 Subject: [issue5573] multiprocessing Pipe poll() and recv() semantics. In-Reply-To: <1238096312.97.0.564685442594.issue5573@psf.upfronthosting.co.za> Message-ID: <1238096699.23.0.94117489369.issue5573@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: georg.brandl -> jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:47:49 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 26 Mar 2009 19:47:49 +0000 Subject: [issue5570] Bus error when calling .poll() on a closed Connection from multiprocessing.Pipe() In-Reply-To: <1238096638.8.0.402347086866.issue5570@psf.upfronthosting.co.za> Message-ID: <1afaf6160903261247m60b3015bk55e0cf592fe1977@mail.gmail.com> Benjamin Peterson added the comment: 2009/3/26 Jesse Noller : > 2.6.1 Does not have the fix (I can segfault it here too). Ben, are we > planning a 2.6.2? Yes, I think around 3.1's release, but you'll have to ask Barry for sure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 20:51:36 2009 From: report at bugs.python.org (Jack Diederich) Date: Thu, 26 Mar 2009 19:51:36 +0000 Subject: [issue5148] gzip.open breaks with 'U' flag In-Reply-To: <1233709542.39.0.638969424034.issue5148@psf.upfronthosting.co.za> Message-ID: <1238097096.89.0.238519665776.issue5148@psf.upfronthosting.co.za> Jack Diederich added the comment: Unfortunately universal newlines are more complicated than replace() can handle. See io.py, you may be able to use one of those classes to the the universal new line handling on the cheap (or at least easy). ---------- nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 21:01:25 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 26 Mar 2009 20:01:25 +0000 Subject: [issue4242] Classify language vs. impl-detail tests, step 1 In-Reply-To: <1225386180.53.0.475585271298.issue4242@psf.upfronthosting.co.za> Message-ID: <1238097685.49.0.40556557983.issue4242@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Ok, I applied part of Armin's patch in r70615 modified to work with unittest's new test skipping ability. I think I will apply the test_descr part later. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Thu Mar 26 21:04:15 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Thu, 26 Mar 2009 20:04:15 +0000 Subject: [issue4709] Mingw-w64 and python on windows x64 In-Reply-To: <1229849614.64.0.683517411932.issue4709@psf.upfronthosting.co.za> Message-ID: <1238097855.07.0.371909026533.issue4709@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you please provide some setup instructions for mingw-w64? What URLs should I install in what order, so that I can compile Python? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 21:06:19 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 26 Mar 2009 20:06:19 +0000 Subject: [issue5571] new "TestCase.skip" method causes all tests to skip under trial (Twisted's test runner) In-Reply-To: <1238094616.02.0.646494355716.issue5571@psf.upfronthosting.co.za> Message-ID: <1238097979.73.0.968581793742.issue5571@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Renamed to skipTest in r60616. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 21:17:42 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 26 Mar 2009 20:17:42 +0000 Subject: [issue4242] Classify language vs. impl-detail tests, step 1 In-Reply-To: <1225386180.53.0.475585271298.issue4242@psf.upfronthosting.co.za> Message-ID: <1238098662.37.0.294682151532.issue4242@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Second patch applied in r70617. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 21:27:29 2009 From: report at bugs.python.org (Vaibhav Mallya) Date: Thu, 26 Mar 2009 20:27:29 +0000 Subject: [issue5574] multiprocessing queues.py doesn't include JoinableQueue in its __all__ list In-Reply-To: <1238099248.59.0.559630696158.issue5574@psf.upfronthosting.co.za> Message-ID: <1238099248.59.0.559630696158.issue5574@psf.upfronthosting.co.za> New submission from Vaibhav Mallya : Should __all__ = ['Queue', 'SimpleQueue'] in queues.py have JoinableQueue as part of the list as well? Also, multiprocessing's __init__.py does not appear to have SimpleQueue as part of its __all__ - is this expected? SimpleQueue does not appear in the multiprocessing docs; is it meant to be avoided by user code then? ---------- assignee: georg.brandl components: Documentation, Library (Lib) messages: 84212 nosy: georg.brandl, jnoller, mallyvai severity: normal status: open title: multiprocessing queues.py doesn't include JoinableQueue in its __all__ list type: feature request versions: Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 21:28:33 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 26 Mar 2009 20:28:33 +0000 Subject: [issue5574] multiprocessing queues.py doesn't include JoinableQueue in its __all__ list In-Reply-To: <1238099248.59.0.559630696158.issue5574@psf.upfronthosting.co.za> Message-ID: <1238099313.29.0.599106334425.issue5574@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: georg.brandl -> jnoller nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 21:34:27 2009 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 26 Mar 2009 20:34:27 +0000 Subject: [issue5572] distutils ignores the LIBS configure env var In-Reply-To: <1238095013.07.0.627782689433.issue5572@psf.upfronthosting.co.za> Message-ID: <1238099667.57.0.959661932647.issue5572@psf.upfronthosting.co.za> Roumen Petrov added the comment: issue 5060 address this ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 21:39:36 2009 From: report at bugs.python.org (Collin Winter) Date: Thu, 26 Mar 2009 20:39:36 +0000 Subject: [issue5572] distutils ignores the LIBS configure env var In-Reply-To: <1238095013.07.0.627782689433.issue5572@psf.upfronthosting.co.za> Message-ID: <1238099976.62.0.047399428199.issue5572@psf.upfronthosting.co.za> Collin Winter added the comment: The patch attached to issue 5060 seems very tightly focused on a problem with gcc FDO. This is a more general patch that solves the problem of distutils ignoring LIBS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 21:49:57 2009 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 26 Mar 2009 20:49:57 +0000 Subject: [issue5572] distutils ignores the LIBS configure env var In-Reply-To: <1238095013.07.0.627782689433.issue5572@psf.upfronthosting.co.za> Message-ID: <1238100597.2.0.169822223267.issue5572@psf.upfronthosting.co.za> Roumen Petrov added the comment: The LIBS contain all module dependent libraries, libpython is linked with LIBS, modules are linked with libpython. May be I miss something but I could not found why distutils has to use LIBS to link a module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 21:57:51 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Thu, 26 Mar 2009 20:57:51 +0000 Subject: [issue5468] urlencode does not handle "bytes", and could easily handle alternate encodings In-Reply-To: <1236696316.6.0.478633045289.issue5468@psf.upfronthosting.co.za> Message-ID: <1238101071.23.0.315592625717.issue5468@psf.upfronthosting.co.za> Jeremy Hylton added the comment: I'm not sure I understand the part of the code that deals with binary strings. I agree the current behavior is odd. RFC 2396 says that non-ascii characters must be encoded as utf-8 and then percent escaped. In the test case you started with, you encoded b'\xa0\x24'. It doesn't seem like this should be allowed, since it is not valid utf-8. ---------- nosy: +jhylton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 22:03:47 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Thu, 26 Mar 2009 21:03:47 +0000 Subject: [issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0 In-Reply-To: <1230586952.45.0.591912771259.issue4773@psf.upfronthosting.co.za> Message-ID: <1238101427.36.0.294199819055.issue4773@psf.upfronthosting.co.za> Jeremy Hylton added the comment: No deep thought was given to the HTTPMessage API. Here's the extent of the discussion that I can find. I've changed the names, but you can find the full discussion at http://bugs.python.org/issue2848 A: mimetools.Message is compatible with email.message.Message, right? B: I don't know how compatible it is. C: The APIs are bit different, but it should be possible to migrate from the old to the new. ---------- nosy: +jhylton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 22:04:30 2009 From: report at bugs.python.org (Thomas Heller) Date: Thu, 26 Mar 2009 21:04:30 +0000 Subject: [issue2123] ctypes pointer not always keeping target alive In-Reply-To: <1203085504.98.0.560350426708.issue2123@psf.upfronthosting.co.za> Message-ID: <1238101470.2.0.375985260205.issue2123@psf.upfronthosting.co.za> Thomas Heller added the comment: I accept this as a bug; however I don't have time now to work on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 22:04:36 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Thu, 26 Mar 2009 21:04:36 +0000 Subject: [issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0 In-Reply-To: <1230586952.45.0.591912771259.issue4773@psf.upfronthosting.co.za> Message-ID: <1238101476.94.0.149576051501.issue4773@psf.upfronthosting.co.za> Jeremy Hylton added the comment: A plausible solution is to pick some core set of functionality that we think people need and document that API. We can modify one or both of the current implementations to include that functionality. What do we need? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 22:08:00 2009 From: report at bugs.python.org (Collin Winter) Date: Thu, 26 Mar 2009 21:08:00 +0000 Subject: [issue5575] Add env vars for controlling building sqlite, hashlib and ssl In-Reply-To: <1238101680.27.0.350099709898.issue5575@psf.upfronthosting.co.za> Message-ID: <1238101680.27.0.350099709898.issue5575@psf.upfronthosting.co.za> New submission from Collin Winter : This patch adds SSL_ROOT, SQLITE_INC and SQLITE_LIB environment variables used to inject additional libraries/headers for building the sqlite, hashlib and ssl modules. We've found this very useful for building these modules against their dependencies statically for deployment purposes. This may well not be useful for most CPython users, but I figured it would be nice to have a record here. ---------- components: Build files: setup_env_vars.patch keywords: needs review, patch, patch messages: 84220 nosy: collinwinter severity: normal stage: patch review status: open title: Add env vars for controlling building sqlite, hashlib and ssl versions: Python 2.7 Added file: http://bugs.python.org/file13424/setup_env_vars.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 22:09:30 2009 From: report at bugs.python.org (Jack Diederich) Date: Thu, 26 Mar 2009 21:09:30 +0000 Subject: [issue5131] pprint doesn't know how to print a set or a defaultdict In-Reply-To: <1233592442.21.0.0563262599933.issue5131@psf.upfronthosting.co.za> Message-ID: <1238101770.2.0.50352128103.issue5131@psf.upfronthosting.co.za> Jack Diederich added the comment: sets and frozensets have already been updated to format like lists. This patch formats defaultdicts like dicts. ---------- keywords: +patch nosy: +jackdied Added file: http://bugs.python.org/file13425/issue_5131.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 22:21:09 2009 From: report at bugs.python.org (Jack Diederich) Date: Thu, 26 Mar 2009 21:21:09 +0000 Subject: [issue5028] tokenize.generate_tokens doesn't always return logical line In-Reply-To: <1232588343.15.0.723713394492.issue5028@psf.upfronthosting.co.za> Message-ID: <1238102469.59.0.0987050705851.issue5028@psf.upfronthosting.co.za> Jack Diederich added the comment: +1 for a docbug. The last item is always the physical line and not the logical line. Some other examples: if True and \ False: pass if (True and False): pass ---------- nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 22:29:58 2009 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 26 Mar 2009 21:29:58 +0000 Subject: [issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0 In-Reply-To: <1230586952.45.0.591912771259.issue4773@psf.upfronthosting.co.za> Message-ID: <1238102998.89.0.811302132243.issue4773@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I propose that you only document the getitem header access API. I.e. the thing that info() gives you can be used to access the message headers via message['content-type']. That's an API common to both rfc822.Messages (the ultimate base class of mimetools.Message) and email.message.Message. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 22:30:57 2009 From: report at bugs.python.org (Jack Diederich) Date: Thu, 26 Mar 2009 21:30:57 +0000 Subject: [issue4889] difflib In-Reply-To: <1231480179.7.0.0322918194746.issue4889@psf.upfronthosting.co.za> Message-ID: <1238103057.11.0.075245528916.issue4889@psf.upfronthosting.co.za> Jack Diederich added the comment: closing, Garbriel's explanation is sufficient. ---------- nosy: +jackdied resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 22:32:52 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Thu, 26 Mar 2009 21:32:52 +0000 Subject: [issue5418] urllib.response.addinfourl does not support __exit__ In-Reply-To: <1236214720.46.0.00736247638438.issue5418@psf.upfronthosting.co.za> Message-ID: <1238103172.16.0.586303651391.issue5418@psf.upfronthosting.co.za> Changes by Jeremy Hylton : ---------- assignee: -> jhylton nosy: +jhylton resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 22:34:44 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Thu, 26 Mar 2009 21:34:44 +0000 Subject: [issue5418] urllib.response.addinfourl does not support __exit__ In-Reply-To: <1236214720.46.0.00736247638438.issue5418@psf.upfronthosting.co.za> Message-ID: <1238103284.44.0.928723506721.issue5418@psf.upfronthosting.co.za> Jeremy Hylton added the comment: Makes sense to me. Committed revision 70625. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 22:57:17 2009 From: report at bugs.python.org (Jack Diederich) Date: Thu, 26 Mar 2009 21:57:17 +0000 Subject: [issue3266] Python-2.5.2/Modules/mmapmodule.c:915: error: `O_RDWR' undeclared In-Reply-To: <1215044054.48.0.722645405249.issue3266@psf.upfronthosting.co.za> Message-ID: <1238104637.63.0.365339838445.issue3266@psf.upfronthosting.co.za> Jack Diederich added the comment: survey of other modules that use O_RDRW The following include sys/type.h and fcntl.h unconditionally: bsdmodule.c, dbmmoudle.c, _fileio.c posixmodule.c includes them after doing an #ifdef check mmapmodule.c currently (2.7 trunk) includes sys/types.h with an ifdef check, but fcntl.h not at all. ---------- nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 22:58:24 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Thu, 26 Mar 2009 21:58:24 +0000 Subject: [issue5314] http client error In-Reply-To: <1235034302.73.0.497047240099.issue5314@psf.upfronthosting.co.za> Message-ID: <1238104704.34.0.771297891758.issue5314@psf.upfronthosting.co.za> Jeremy Hylton added the comment: I'm not sure what to do here. I guess changing to utf-8 is safe insofar as the current code only accepts ascii, so the only code that breaks will be code that depends on the encode() call raising an exception. It seems like the client out to specify the encoding, though. We could fix that via documentation. ---------- nosy: +jhylton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 23:00:20 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Mar 2009 22:00:20 +0000 Subject: [issue5188] telnetlib process_rawq buffer handling is confused In-Reply-To: <1234131372.15.0.372715702734.issue5188@psf.upfronthosting.co.za> Message-ID: <1238104820.06.0.856873111289.issue5188@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 23:27:23 2009 From: report at bugs.python.org (Dan Mahn) Date: Thu, 26 Mar 2009 22:27:23 +0000 Subject: [issue5468] urlencode does not handle "bytes", and could easily handle alternate encodings In-Reply-To: <1238101071.23.0.315592625717.issue5468@psf.upfronthosting.co.za> Message-ID: <49CC0131.7090803@digidescorp.com> Dan Mahn added the comment: Hello. Thanks for the feedback. With regards to RFC 2396, I see this: http://www.ietf.org/rfc/rfc2396.txt ==== There is a second translation for some resources: the sequence of octets defined by a component of the URI is subsequently used to represent a sequence of characters. A 'charset' defines this mapping. There are many charsets in use in Internet protocols. For example, UTF-8 [UTF-8] defines a mapping from sequences of octets to sequences of characters in the repertoire of ISO 10646. ==== To me, that text does not indicate that URLs are always encoded in UTF-8. It indicates that URL information may be encoded in character sets ('charset') other than ASCII, and when it is, the values must be sent as escaped values. Here, I note the specific words "many charsets in use" and "For example", before the reference to UTF-8. I have also done a few tests, and have found that in practice, browsers do not always encode URLs as UTF-8. This actually seems to differ as to what part of the URL is being encoded. For instance, my Firefox will encode the path portion of a URL as UTF-8, but encode the query string as Latin-1. I think that the general idea is ... URL data must be encoded into ASCII, but as to what the data is that is being encoded ... That may be of some "charset" which may be application-defined. And in the most general sense, I would argue that the data could simply be binary data. (Actually, Latin-1 pretty much uses all the codes from 0 to 255, so it's very much like plain binary data anyway.) I hope that clarifies what I am reading in RFC 2396. In addition, quote_plus() already handles all the cases I placed into urlencode(). I suppose the actual test cases may be debatable, but I did specifically choose tests with data which would be recognized as something other then UTF-8. Jeremy Hylton wrote: > Jeremy Hylton added the comment: > > I'm not sure I understand the part of the code that deals with binary > strings. I agree the current behavior is odd. RFC 2396 says that > non-ascii characters must be encoded as utf-8 and then percent escaped. > In the test case you started with, you encoded b'\xa0\x24'. It doesn't > seem like this should be allowed, since it is not valid utf-8. > > ---------- > nosy: +jhylton > > _______________________________________ > Python tracker > > _______________________________________ ---------- title: urlencode does not handle "bytes", and could easily handle alternate encodings -> urlencode does not handle "bytes", and could easily handle alternate encodings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 23:35:21 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Mar 2009 22:35:21 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1238106921.39.0.920674613886.issue5391@psf.upfronthosting.co.za> STINNER Victor added the comment: martin> However, your list of alternatives is incomplete: we martin> *could* also change the "c" code to accept and produce martin> int - then mmapmodule would not need to change at all. That's extactly the idea that I proposed in issue #5499 ;-) I prefer to have strict getarg('c') and getarg('C') than fixing each module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 26 23:51:55 2009 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 26 Mar 2009 22:51:55 +0000 Subject: [issue5545] multiprocessing: switch to autoconf detection of platform values In-Reply-To: <1237828557.72.0.911819794631.issue5545@psf.upfronthosting.co.za> Message-ID: <1238107915.04.0.136442673904.issue5545@psf.upfronthosting.co.za> Roumen Petrov added the comment: AC_CHECK_FUNC* check for function . AC_CHECK_DECL check for declaration . The check for functions sem_xxx() is incorrect in proposed patch. It has to check for function. I didn't review next part of the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 00:36:33 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Mar 2009 23:36:33 +0000 Subject: [issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1 In-Reply-To: <1235679869.5.0.97489087981.issue5377@psf.upfronthosting.co.za> Message-ID: <1238110593.78.0.524370896287.issue5377@psf.upfronthosting.co.za> STINNER Victor added the comment: > The general machinery for implementing the built-in int function > should check any result of type long to see if it fits in an int, > and convert if so. Attached patch try to convert long to int, and so it fix the intial problem: assert isinstance(int(Decimal(-sys.maxint-1), int). I used benchmark tools dedicated to test integers: Unpatched: pidigit.py: 4612.0 ms bench_int.py: 2743.5 ms Patched: pidigit.py: 4623.8 ms (0.26% slower) bench_int.py: 2754.5 ms (0.40% slower) So for intensive integer operations, the overhead is low. Using a more generic benchmark tool (pybench?), you might not be able to see the difference ;-) I'm +0 for this patch because it fixes a very rare case: 1 case on (sys.maxint + 1) ? 2 0.00000002% with maxint=2^31 ---------- keywords: +patch Added file: http://bugs.python.org/file13426/force_int.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 00:39:07 2009 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 26 Mar 2009 23:39:07 +0000 Subject: [issue4985] Idle hangs when given a nonexistent filename. In-Reply-To: <1232256473.01.0.852239057685.issue4985@psf.upfronthosting.co.za> Message-ID: <1238110747.78.0.171439776343.issue4985@psf.upfronthosting.co.za> Guilherme Polo added the comment: I tried it here but it didn't hang. But I did notice the editor window was created and then disappeared, differently from what happens in python-trunk. I don't believe creating new files is a good solution, idle on python-trunk doesn't need to do this to work normally. ---------- nosy: +gpolo versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 00:39:12 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Mar 2009 23:39:12 +0000 Subject: [issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1 In-Reply-To: <1235679869.5.0.97489087981.issue5377@psf.upfronthosting.co.za> Message-ID: <1238110752.56.0.238092406033.issue5377@psf.upfronthosting.co.za> STINNER Victor added the comment: I added the two benchmark tools to my own public SVN: http://haypo.hachoir.org/trac/browser/misc/bench_int.py (improved version of the script attached to issue #4294) http://haypo.hachoir.org/trac/browser/misc/pidigits.py (improved version of the script attached to issue #5512) If you know a better place to these benchmarks, feel free to reupload them somewhere else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 00:57:59 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Mar 2009 23:57:59 +0000 Subject: [issue4294] Macros for PyLong: sign, number of digits, fits in an int In-Reply-To: <1226322752.92.0.0671581209413.issue4294@psf.upfronthosting.co.za> Message-ID: <1238111879.24.0.444942566073.issue4294@psf.upfronthosting.co.za> STINNER Victor added the comment: > I think PyLong_SIGN and PyLong_EQUALS_ZERO should go in > Include/longobject.h, not Include/longintrepr.h Yeah, it's better for 3rd party modules. > PyLong_NDIGITS should stay in longintrepr.h, though, > since it's dependent on the representation. I don't understand why. PyLong_SIGN() and PyLong_EQUALS_ZERO() do also depend on the PyLong implementation. Eg. if we choose to store zero in a PyLong of 1 digit (digits={0}), PyLong_SIGN() have also to be changed. I think that PyLong_SIGN() can also be moved to longobject.h (not done in my patch v3). > Perhaps rename PyLong_EQUALS_ZERO to PyLong_IS_ZERO? Done. > Almost all your uses of PyLong_SIGN take the form > PyLong_SIGN(X) < 0. Maybe it would be better to have a > PyLong_IS_NEGATIVE macro instead? Not "almost all", just "all" :-) So I also changed the macro name. ---------- Added file: http://bugs.python.org/file13427/pylong_macros-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 00:58:12 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Mar 2009 23:58:12 +0000 Subject: [issue4294] Macros for PyLong: sign, number of digits, fits in an int In-Reply-To: <1226322752.92.0.0671581209413.issue4294@psf.upfronthosting.co.za> Message-ID: <1238111892.37.0.145733832651.issue4294@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11975/pylong_macros.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 00:58:53 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Mar 2009 23:58:53 +0000 Subject: [issue4294] Macros for PyLong: sign, number of digits, fits in an int In-Reply-To: <1226322752.92.0.0671581209413.issue4294@psf.upfronthosting.co.za> Message-ID: <1238111933.38.0.506952006276.issue4294@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file13369/pylong_macros-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 01:00:26 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 00:00:26 +0000 Subject: [issue4294] Macros for PyLong: sign, number of digits, fits in an int In-Reply-To: <1226322752.92.0.0671581209413.issue4294@psf.upfronthosting.co.za> Message-ID: <1238112026.7.0.833136895478.issue4294@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11977/pylong_optimize.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 01:00:43 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 00:00:43 +0000 Subject: [issue4294] Macros for PyLong: sign, number of digits, fits in an int In-Reply-To: <1226322752.92.0.0671581209413.issue4294@psf.upfronthosting.co.za> Message-ID: <1238112043.58.0.692208482895.issue4294@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11980/pylong_shift.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 01:00:58 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 00:00:58 +0000 Subject: [issue4294] Macros for PyLong: sign, number of digits, fits in an int In-Reply-To: <1226322752.92.0.0671581209413.issue4294@psf.upfronthosting.co.za> Message-ID: <1238112058.31.0.80123852185.issue4294@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11981/bench_int.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 01:01:56 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 00:01:56 +0000 Subject: [issue4294] Macros for PyLong: sign, number of digits, fits in an int In-Reply-To: <1226322752.92.0.0671581209413.issue4294@psf.upfronthosting.co.za> Message-ID: <1238112116.77.0.0227226638854.issue4294@psf.upfronthosting.co.za> STINNER Victor added the comment: I removed my "optimization" patches: there were useless (no or low speedup). I also removed bench_int.py: I moved it to my own public SVN: http://haypo.hachoir.org/trac/browser/misc/bench_int.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 01:23:23 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 00:23:23 +0000 Subject: [issue5576] Don't use PyLong_SHIFT with _PyLong_AsScaledDouble() In-Reply-To: <1238113402.96.0.541162373186.issue5576@psf.upfronthosting.co.za> Message-ID: <1238113402.96.0.541162373186.issue5576@psf.upfronthosting.co.za> New submission from STINNER Victor : _PyLong_AsScaledDouble() writes the exponent in a int which have to be multiplied by PyLong_SHIFT to give the power of 2. I proposed to multiply the exponent by PyLong_SHIFT in _PyLong_AsScaledDouble() to directly get the power of 2. It avoids complex code to test integer overflow in code using _PyLong_AsScaledDouble() (the test is only done once, in _PyLong_AsScaledDouble). I also propose to change exponent type from "int*" to "unsigned int*". Previous maximum exponent was INT_MAX//PyLong_SHIFT (eg. 143165576 for PyLong using base 2^15). The new maximum is now UINT_MAX//PyLong_SHIFT, the double ;-) And since issue #4258 is commited (Use 30-bit digits instead of 15-bit digits for Python integers), PyLong_SHIFT value may be different depending on the compiler option. Using my patch, the long implement will be a little bit more hidden. The function _PyLong_AsScaledDouble() should be private because the name starts with "_". But I see it in Include/longobject.h. In Python, it's used in longobject.c and mathmodule.c. ---------- components: Interpreter Core files: pylong_asscaleddouble-2.patch keywords: patch messages: 84236 nosy: haypo severity: normal status: open title: Don't use PyLong_SHIFT with _PyLong_AsScaledDouble() versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13428/pylong_asscaleddouble-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 01:23:54 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 00:23:54 +0000 Subject: [issue5576] Don't use PyLong_SHIFT with _PyLong_AsScaledDouble() In-Reply-To: <1238113402.96.0.541162373186.issue5576@psf.upfronthosting.co.za> Message-ID: <1238113434.92.0.741919064129.issue5576@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 01:24:43 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 00:24:43 +0000 Subject: [issue4294] Macros for PyLong: sign, number of digits, fits in an int In-Reply-To: <1226322752.92.0.0671581209413.issue4294@psf.upfronthosting.co.za> Message-ID: <1238113483.19.0.575688807999.issue4294@psf.upfronthosting.co.za> STINNER Victor added the comment: I created a decicated issue for my last unrelated patch: #5576: Don't use PyLong_SHIFT with _PyLong_AsScaledDouble() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 01:24:47 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 00:24:47 +0000 Subject: [issue4294] Macros for PyLong: sign, number of digits, fits in an int In-Reply-To: <1226322752.92.0.0671581209413.issue4294@psf.upfronthosting.co.za> Message-ID: <1238113487.09.0.661349127191.issue4294@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11979/pylong_asscaleddouble.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 01:41:17 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 00:41:17 +0000 Subject: [issue5016] FileIO.seekable() can return False In-Reply-To: <1232494718.16.0.105569040712.issue5016@psf.upfronthosting.co.za> Message-ID: <1238114477.04.0.745167292074.issue5016@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file12848/fileio_seekable.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 01:43:00 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 00:43:00 +0000 Subject: [issue5016] FileIO.seekable() can return False In-Reply-To: <1232494718.16.0.105569040712.issue5016@psf.upfronthosting.co.za> Message-ID: <1238114580.22.0.893749026022.issue5016@psf.upfronthosting.co.za> STINNER Victor added the comment: > Needs backport to trunk and 2.6, if someone is interested. I'm interrested by a backport at least in trunk. I updated the patch to trunk: - test directly _file._FileIO() instead of using open() because in Python trunk, a file has no seekable() method :-/ - use contextlib.closing() because _FileIO doesn't implement context API (not __exit__() method) ---------- Added file: http://bugs.python.org/file13429/fileio_seekable-trunk.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 01:45:35 2009 From: report at bugs.python.org (Christian Heimes) Date: Fri, 27 Mar 2009 00:45:35 +0000 Subject: [issue5545] multiprocessing: switch to autoconf detection of platform values In-Reply-To: <1237828557.72.0.911819794631.issue5545@psf.upfronthosting.co.za> Message-ID: <1238114735.46.0.289975427317.issue5545@psf.upfronthosting.co.za> Christian Heimes added the comment: Dear Roumen, please do my a favor and stop throwing in random ideas and accusations. I appreciate any help but your replies don't help at all. They are just causing frustration on either side. I know about AC_CHECK_DECL and AC_CHECK_FUNC. As I already said I can't use AC_CHECK_FUNC because I can't easily include the necessary header file. AC_CHECK_DECL emits almost the same code as my check for sem_open and sem_timedwait. However I'm planing to add more sanity checks for exotic platforms in the future. My check for sem_open does exactly what it suppose to do (and exactly what AC_CHECK_DECL does, by the way). Why do you think it's not right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 01:46:36 2009 From: report at bugs.python.org (Christian Heimes) Date: Fri, 27 Mar 2009 00:46:36 +0000 Subject: [issue5545] multiprocessing: switch to autoconf detection of platform values In-Reply-To: <1237828557.72.0.911819794631.issue5545@psf.upfronthosting.co.za> Message-ID: <1238114796.78.0.811831252638.issue5545@psf.upfronthosting.co.za> Christian Heimes added the comment: Jesse, have fun with svn+ssh://pythondev at svn.python.org/python/branches/multiprocessing-autoconf during the sprint. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 01:49:34 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 27 Mar 2009 00:49:34 +0000 Subject: [issue5016] FileIO.seekable() can return False In-Reply-To: <1232494718.16.0.105569040712.issue5016@psf.upfronthosting.co.za> Message-ID: <1238114974.97.0.346018961106.issue5016@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You can use io.open() instead of open()... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 02:00:08 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 01:00:08 +0000 Subject: [issue5035] Compilation --without-threads fails In-Reply-To: <1232659462.88.0.743482431545.issue5035@psf.upfronthosting.co.za> Message-ID: <1238115608.57.0.158983386318.issue5035@psf.upfronthosting.co.za> STINNER Victor added the comment: Python trunk is still broken --without-threads. The multiprocessing issue (#3807) is now closed, so can someone review (or apply?) my patches? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 02:00:27 2009 From: report at bugs.python.org (Brad Miller) Date: Fri, 27 Mar 2009 01:00:27 +0000 Subject: [issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0 In-Reply-To: <1238102998.89.0.811302132243.issue4773@psf.upfronthosting.co.za> Message-ID: Brad Miller added the comment: On Thu, Mar 26, 2009 at 4:29 PM, Barry A. Warsaw wrote: > > Barry A. Warsaw added the comment: > > I propose that you only document the getitem header access API. I.e. > the thing that info() gives you can be used to access the message > headers via message['content-type']. That's an API common to both > rfc822.Messages (the ultimate base class of mimetools.Message) and > email.message.Message. > As I've found myself in the awkward position of having to explain the new 3.0 api to my students I've thought about this and have some ideas/questions. I'm also willing to help with the documentation or any enhancements. Traceback (most recent call last): File "", line 1, in TypeError: 'addinfourl' object is unsubscriptable I wish I new what an addinfourl object was. 'Fri, 27 Mar 2009 00:41:34 GMT' 'Fri, 27 Mar 2009 00:41:34 GMT' ['Date', 'Server', 'Last-Modified', 'ETag', 'Accept-Ranges', 'Content-Length', 'Connection', 'Content-Type'] Using x.headers over x.info() makes the most sense to me, but I don't know that I can give any good rationale. Which would we want to document? 'text/html; charset=ISO-8859-1' I guess technically this is correct since the charset is part of the Content-Type header in HTTP but it does make life difficult for what I think will be a pretty common use case in this new urllib: read from the url (as bytes) and then decode them into a string using the appropriate character set. As you follow this road, you have the confusing option of these three calls: 'iso-8859-1' >>> x.headers.get_charsets() ['iso-8859-1'] I think it should be a bug that get_charset() does not return anything in this case. It is not at all clear why get_content_charset() and get_charset() should have different behavior. Brad > > ---------- > nosy: +barry > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file13430/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

On Thu, Mar 26, 2009 at 4:29 PM, Barry A. Warsaw <report at bugs.python.org> wrote:

Barry A. Warsaw <barry at python.org> added the comment:

I propose that you only document the getitem header access API. ??I.e.
the thing that info() gives you can be used to access the message
headers via message['content-type']. ??That's an API common to both
rfc822.Messages (the ultimate base class of mimetools.Message) and
email.message.Message.

As I've found myself in the awkward position of having to explain the new 3.0 api to my students I've thought about this and have some ideas/questions.

I'm also willing to help with the documentation or any enhancements.

>>> x = urllib.request.urlopen('http://knuth.luther.edu/python/test.html')
>>> x['Date']
Traceback (most recent call last):
????File "<stdin>", line 1, in <module>
TypeError: 'addinfourl' object is unsubscriptable

I wish I new what an addinfourl object was.

>>> x.info()['Date']
'Fri, 27 Mar 2009 00:41:34 GMT'

>>> x.headers['Date']
'Fri, 27 Mar 2009 00:41:34 GMT'

>>> x.headers.keys()
['Date', 'Server', 'Last-Modified', 'ETag', 'Accept-Ranges', 'Content-Length', 'Connection', 'Content-Type']

Using x.headers over x.info() ??makes the most sense to me, but I don't know that I can give any good rationale. ??Which would we want to document?

>>> x.headers['Content-Type']
'text/html; charset=ISO-8859-1'

I guess technically this is correct since the charset is part of the Content-Type header in HTTP but it does make life difficult for what I think will be a pretty common use case in this new urllib: ??read from the url (as bytes) and then decode them into a string using the appropriate character set.

As you follow this road, you have the confusing option of these three calls:

>>> x.headers.get_charset()
>>> x.headers.get_content_charset()
'iso-8859-1'
>>> x.headers.get_charsets()
['iso-8859-1']

I think it should be a bug that get_charset() does not return anything in this case. ??It is not at all clear why get_content_charset() and get_charset() should have different behavior.

Brad

??

----------
nosy: +barry

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4773>
_______________________________________



--
Brad Miller
Assistant Professor, Computer Science
Luther College
From report at bugs.python.org Fri Mar 27 02:01:09 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 01:01:09 +0000 Subject: [issue5035] Compilation --without-threads fails In-Reply-To: <1232659462.88.0.743482431545.issue5035@psf.upfronthosting.co.za> Message-ID: <1238115669.05.0.567882047871.issue5035@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file12839/_sqlite_nothread.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 02:01:35 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 01:01:35 +0000 Subject: [issue5035] Compilation --without-threads fails In-Reply-To: <1232659462.88.0.743482431545.issue5035@psf.upfronthosting.co.za> Message-ID: <1238115695.49.0.0806882289596.issue5035@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated and completed patch for _sqlite module (python trunk). ---------- Added file: http://bugs.python.org/file13431/_sqlite_nothread-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 02:02:22 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 01:02:22 +0000 Subject: [issue5035] Compilation --without-threads fails In-Reply-To: <1232659462.88.0.743482431545.issue5035@psf.upfronthosting.co.za> Message-ID: <1238115742.54.0.907292845111.issue5035@psf.upfronthosting.co.za> STINNER Victor added the comment: New patch _tkinter_nothread.patch: fix gcc warnings in _tkinter. ---------- Added file: http://bugs.python.org/file13432/_tkinter_nothread.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 02:21:35 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 01:21:35 +0000 Subject: [issue5016] FileIO.seekable() can return False In-Reply-To: <1232494718.16.0.105569040712.issue5016@psf.upfronthosting.co.za> Message-ID: <1238116895.04.0.0522477262837.issue5016@psf.upfronthosting.co.za> STINNER Victor added the comment: > You can use io.open() instead of open()... Alright, it's much easier with io.open() :-) ---------- Added file: http://bugs.python.org/file13433/fileio_seekable-trunk-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 02:21:40 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 01:21:40 +0000 Subject: [issue5016] FileIO.seekable() can return False In-Reply-To: <1232494718.16.0.105569040712.issue5016@psf.upfronthosting.co.za> Message-ID: <1238116900.86.0.329260260137.issue5016@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file13429/fileio_seekable-trunk.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 02:28:57 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 01:28:57 +0000 Subject: [issue4629] getopt should not accept no_argument that ends with '=' In-Reply-To: <1228978458.01.0.0804138423997.issue4629@psf.upfronthosting.co.za> Message-ID: <1238117337.81.0.720091808679.issue4629@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated patch with a regression test. ---------- Added file: http://bugs.python.org/file13434/getopt-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 02:34:14 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 01:34:14 +0000 Subject: [issue5110] Printing Unicode chars from the interpreter in a non-UTF8 terminal raises an error (Py3) In-Reply-To: <1233329209.55.0.55287436123.issue5110@psf.upfronthosting.co.za> Message-ID: <1238117654.37.0.915676317508.issue5110@psf.upfronthosting.co.za> STINNER Victor added the comment: martin> IIUC, this patch breaks PEP3138, martin> so it clearly must be rejected. After reading the PEP3138, it's clear that this issue is not bug, and that we can not accept any patch fixing the issue without breaking the PEP. Windows user who want to get the Python2 behaviour can use my display hook proposed in Message80823. We can not fix this issue, so I choose to close it. If anyone wants to change the PEP, start a discussion on python-dev first. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 02:38:35 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 01:38:35 +0000 Subject: [issue5145] struct.calcsize('cd') returns 16 instead of 9 In-Reply-To: <1233687223.75.0.372489916628.issue5145@psf.upfronthosting.co.za> Message-ID: <1238117915.24.0.929726272048.issue5145@psf.upfronthosting.co.za> STINNER Victor added the comment: Sorry, but I don't see this issue as a bug because it's related to memory alignment as explained in the documentation. I choose to close this issue. If you think that the documentation should be improved, please suggest an updated doc. http://docs.python.org/library/struct.html#struct.calcsize ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 02:44:45 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 01:44:45 +0000 Subject: [issue5214] Add KOI8-RU as a known encoding In-Reply-To: <1234335818.61.0.321610259153.issue5214@psf.upfronthosting.co.za> Message-ID: <1238118285.78.0.703286924099.issue5214@psf.upfronthosting.co.za> STINNER Victor added the comment: > @lemburg: I can't comment on the status of the standard. > I would assume that like most 8 bit encodings that these > are falling away and being replaced by Unicode. Can I close this issue? Or do we have enough KOI8-RU users to include this charset in Python? I think that iconv is enough for people who need to convert their old files to UTF-8 (or anything else). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 03:06:35 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 27 Mar 2009 02:06:35 +0000 Subject: [issue5528] Unable to launch IDLE on Windows In-Reply-To: <1237588418.03.0.370218080743.issue5528@psf.upfronthosting.co.za> Message-ID: <1238119595.03.0.495182991522.issue5528@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 06:05:11 2009 From: report at bugs.python.org (Rob Renaud) Date: Fri, 27 Mar 2009 05:05:11 +0000 Subject: [issue1551113] random.choice(setinstance) fails Message-ID: <1238130311.89.0.448912635438.issue1551113@psf.upfronthosting.co.za> Rob Renaud added the comment: I found this via google search when disappointed that random.choice raised an exception rather than returned a random item in the set. It's quite easy to implement random.choice for sets/dicts in O(1) expected time from the C implementation as long as the set/dict implementation guarantees minimal constant density. Simply generate random indices in the set object until one with an object is found . This has will work in expected O(1/density) probes. I suppose making random.choice work for sets/dicts isn't worth a C implementation (as happy as it would have made me a few hours ago...)? ---------- nosy: +rrenaud _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 06:06:02 2009 From: report at bugs.python.org (Cournapeau David) Date: Fri, 27 Mar 2009 05:06:02 +0000 Subject: [issue4709] Mingw-w64 and python on windows x64 In-Reply-To: <1229849614.64.0.683517411932.issue4709@psf.upfronthosting.co.za> Message-ID: <1238130362.62.0.059462460856.issue4709@psf.upfronthosting.co.za> Cournapeau David added the comment: I think compiling python itself with it would be quite difficult - I have never attempted it. My 'scenario' is building extensions against the official python for amd64 on windows. The quickest way to test the patch would be as follows: - take a native toolchain (by native, I mean runs on and target 64 bits windows subsystem - I have not tested cross compilation, or even using 32 bits toolchain on WoW). The one from equations.com is recent and runs well: http://www.equation.com/servlet/equation.cmd?call=fortran - builds a hello-world like python extension from the command line: http://projects.scipy.org/numpy/wiki/MicrosoftToolchainSupport (I am sorry, the wiki page is bit messy, I will clean it up). Since we use our own distutils extensions in numpy, I don't know how much is needed for support at the stdlib distutils level. If that's something which sounds interesting to python itself, I am willing to add support in python proper for mingw-w64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 06:26:04 2009 From: report at bugs.python.org (Tim Peters) Date: Fri, 27 Mar 2009 05:26:04 +0000 Subject: [issue1551113] random.choice(setinstance) fails Message-ID: <1238131564.55.0.00206844375404.issue1551113@psf.upfronthosting.co.za> Tim Peters added the comment: The CPython set/dict implementation does not guarantee "minimal constant density", so "quite easy" doesn't apply in reality. For example, a set that once contained a million elements may still contain a million /slots/ for elements after all but one of the elements has been removed. And in that case, the only way to find the sole occupied slot is to search over the million allocated slots. In short, all the comments in this item from 2006 still apply without change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 06:26:33 2009 From: report at bugs.python.org (Tim Peters) Date: Fri, 27 Mar 2009 05:26:33 +0000 Subject: [issue1551113] random.choice(setinstance) fails Message-ID: <1238131593.57.0.518589028822.issue1551113@psf.upfronthosting.co.za> Tim Peters added the comment: The CPython set/dict implementation does not guarantee "minimal constant density", so "quite easy" doesn't apply in reality. For example, a set that once contained a million elements may still contain a million /slots/ for elements after all but one of the elements has been removed. And in that case, the only way to find the sole occupied slot is to search over the million allocated slots. In short, all the comments in this item from 2006 still apply without change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 06:27:12 2009 From: report at bugs.python.org (Tim Peters) Date: Fri, 27 Mar 2009 05:27:12 +0000 Subject: [issue1551113] random.choice(setinstance) fails Message-ID: <1238131632.6.0.740635079501.issue1551113@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 06:53:40 2009 From: report at bugs.python.org (Collin Winter) Date: Fri, 27 Mar 2009 05:53:40 +0000 Subject: [issue5557] Byte-code compilation uses excessive memory In-Reply-To: <1237924124.82.0.478709056921.issue5557@psf.upfronthosting.co.za> Message-ID: <1238133219.88.0.536475197168.issue5557@psf.upfronthosting.co.za> Changes by Collin Winter : ---------- nosy: +collinwinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 07:59:08 2009 From: report at bugs.python.org (Vaibhav Mallya) Date: Fri, 27 Mar 2009 06:59:08 +0000 Subject: [issue5573] multiprocessing Pipe poll() and recv() semantics. In-Reply-To: <1238096312.97.0.564685442594.issue5573@psf.upfronthosting.co.za> Message-ID: <1238137148.14.0.116021983523.issue5573@psf.upfronthosting.co.za> Vaibhav Mallya added the comment: On second thought, it seems like it shouldn't make sense. This forces a destructive check. Suppose we do child.poll() and then child.recv() but it's legitimate data; that data will be removed from the queue even if we just wanted to check if the pipe was alive. This seems like it shouldn't have to happen. I'm unfamiliar with the lower level workings of sockets; is this destructive checking behavior forced by the socket internals? Is it standard? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 10:50:22 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 27 Mar 2009 09:50:22 +0000 Subject: [issue5214] Add KOI8-RU as a known encoding In-Reply-To: <1234335818.61.0.321610259153.issue5214@psf.upfronthosting.co.za> Message-ID: <1238147422.87.0.432220975846.issue5214@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Viktor, I found this reference which has some background information regarding koi8-ru and other cyrillic encodings: http://segfault.kiev.ua/cyrillic-encodings/ "This charset wasn't supported by Ukrainian Internet community due to political reasons; KOI8-U was invented as opposition to KOI8-RU." Provided that resource is correct, it also appears that its inventor Yuri Demchenko now switched to KOI8-U as well: http://staff.science.uva.nl/~demch/ So I guess, we can close this request and leave the codec attached to the ticket for interested parties to download and install if they need it. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 13:25:15 2009 From: report at bugs.python.org (qwjqwj) Date: Fri, 27 Mar 2009 12:25:15 +0000 Subject: [issue5577] yield in iterators In-Reply-To: <1238156715.07.0.356189133984.issue5577@psf.upfronthosting.co.za> Message-ID: <1238156715.07.0.356189133984.issue5577@psf.upfronthosting.co.za> New submission from qwjqwj : In Python 3.0,3.1a1: >>> def f(): [(yield i) for i in range(10)] >>> f() >>> f() is None True >>> def f(): ((yield i) for i in range(10)) >>> f() >>> f() is None True However it is correct in Python 2.5,2.6 >>> def f(): ... [(yield i) for i in range(10)] ... >>> f() ---------- components: Interpreter Core messages: 84257 nosy: qwjqwj severity: normal status: open title: yield in iterators type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 14:47:38 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 27 Mar 2009 13:47:38 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1238161658.9.0.621534209637.issue5463@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the patch. A couple of questions and comments: (1) at line 300-ish of test_struct, should (struct.error, TypeError) be (struct.error, OverflowError)? I don't think out-of-range values should be raising TypeError. If they are, perhaps we should change that. (2) It looks like the deprecated_err function isn't needed any more (yay!); let's remove it. (3) I'd prefer to keep the test_1229380 bit, but just replace the deprecated_err with an assertRaises, just like you already did further up. As far as I can see those tests aren't entirely duplicated by others, and one can never have too many tests... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 15:40:57 2009 From: report at bugs.python.org (Maciek Fijalkowski) Date: Fri, 27 Mar 2009 14:40:57 +0000 Subject: [issue5578] unqualified exec in class body In-Reply-To: <1238164857.67.0.53034733648.issue5578@psf.upfronthosting.co.za> Message-ID: <1238164857.67.0.53034733648.issue5578@psf.upfronthosting.co.za> New submission from Maciek Fijalkowski : A patch and a test. The problem is a bit broader - what about import * etc? Patch fixes that, but without a test. ---------- components: Interpreter Core files: out.diff keywords: patch messages: 84259 nosy: fijal severity: normal status: open title: unqualified exec in class body versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7 Added file: http://bugs.python.org/file13435/out.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 15:50:57 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Fri, 27 Mar 2009 14:50:57 +0000 Subject: [issue5468] urlencode does not handle "bytes", and could easily handle alternate encodings In-Reply-To: <1236696316.6.0.478633045289.issue5468@psf.upfronthosting.co.za> Message-ID: <1238165457.43.0.269176969831.issue5468@psf.upfronthosting.co.za> Jeremy Hylton added the comment: Indeed, I think I confused some other character encoding issues related to HTTP with the URI issue. The discussion in RFC 3986 is length and only occasionally clarifying for this issue. That is, it doesn't say anything definitive like applications are free to use any character encoding when decoding a URI. But I think it agrees with your assessment that an application is free to interpret the binary data however it wants, e.g. http://tools.ietf.org/html/rfc3986#section-2.1 ---------- assignee: -> jhylton resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 15:54:19 2009 From: report at bugs.python.org (Todd Weiler) Date: Fri, 27 Mar 2009 14:54:19 +0000 Subject: [issue5579] Display for OrderedDict In-Reply-To: <1238165659.22.0.188261777341.issue5579@psf.upfronthosting.co.za> Message-ID: <1238165659.22.0.188261777341.issue5579@psf.upfronthosting.co.za> New submission from Todd Weiler : Now that python has an ordered dictionary it would be great to have a display sytax for creating them. To create a dict I just use the dict display syntax: newdict = {'fred':'flintstone', 'barney':'rubble', 'dino':'thedinosaur'} I'd like to be able to create an OrderedDict in the same way - I realize that a list of tuples would do the trick, but I find the dict display more convenient and readable. Back in the archives there is probably a whole discussion of why dict displays are useful. My reason for liking displays is that I like to put dictionaries inside dictionaries - the display format spread out over several lines makes this easy to read. Possible solutions: 1. maybe use ^{ for OrderedDicts newdict = ^{'fred':'flintstone', 'barney':'rubble', 'dino':'thedinosaur'} 2. have OrdredDict accept a dictionary display string newodict = OrderedDict("{'fred':'flintstone', 'barney':'rubble', 'dino':'thedinosaur'}"} ---------- messages: 84261 nosy: tweiler severity: normal status: open title: Display for OrderedDict type: feature request versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 15:55:00 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 27 Mar 2009 14:55:00 +0000 Subject: [issue5578] unqualified exec in class body In-Reply-To: <1238164857.67.0.53034733648.issue5578@psf.upfronthosting.co.za> Message-ID: <1238165700.56.0.699287618769.issue5578@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Why should this code fail? I cannot see the problem you try to solve. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 16:21:39 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 27 Mar 2009 15:21:39 +0000 Subject: [issue5568] self.writer.closed() extraneous parens in BufferedRWPair of io module In-Reply-To: <1238088912.5.0.880041716832.issue5568@psf.upfronthosting.co.za> Message-ID: <1238167299.86.0.193868269238.issue5568@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The wrong closed() call was corrected with r67923. Then, the io module is by design very picky about the distinction between bytes and unicode. This is different from the philosophy of other parts of the library, but io comes from python 3.0... StringIO only accepts and return unicode strings; its "default encoding" of StringIO is an implementation (how the text is stored in memory) and is even not used anymore in python 3.0 ---------- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 16:35:58 2009 From: report at bugs.python.org (Andrii V. Mishkovskyi) Date: Fri, 27 Mar 2009 15:35:58 +0000 Subject: [issue5580] Strange error message in Python/getargs.c In-Reply-To: <1238168158.76.0.166850509675.issue5580@psf.upfronthosting.co.za> Message-ID: <1238168158.76.0.166850509675.issue5580@psf.upfronthosting.co.za> New submission from Andrii V. Mishkovskyi : I think the following message is a little bit confusing: Python 2.7a0 (trunk, Mar 17 2009, 12:06:19) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> open('abc\x00') Traceback (most recent call last): File "", line 1, in TypeError: file() argument 1 must be (encoded string without NULL bytes), not str This message could be much more better if unneeded parentheses were removed. :) The message on line 861 in Python/getargs.c reads much better: "string without null bytes" Would it be appropriate to change the message in topic to something like this? ---------- messages: 84264 nosy: mishok13 severity: normal status: open title: Strange error message in Python/getargs.c versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 16:38:34 2009 From: report at bugs.python.org (dchud) Date: Fri, 27 Mar 2009 15:38:34 +0000 Subject: [issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler) Message-ID: <1238168314.41.0.459802619532.issue1544339@psf.upfronthosting.co.za> Changes by dchud : ---------- nosy: +dchud _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 16:46:37 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 27 Mar 2009 15:46:37 +0000 Subject: [issue5569] Issue in transparency in top level tk window(python) on MAC In-Reply-To: <1238093226.99.0.851453746263.issue5569@psf.upfronthosting.co.za> Message-ID: <1238168797.45.0.521183754995.issue5569@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: wm_attributes does not take keyword arguments. See issue1500773. something like this should work, though: self.top=Toplevel(master=self.parent) self.top.wm_attributes('-alpha', 0.8) ---------- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 16:48:27 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 27 Mar 2009 15:48:27 +0000 Subject: [issue5090] import tkinter library Visual C++ Concepts:C Run-Time Error R6034 when embeded python in c++ In-Reply-To: <1233151525.44.0.43046590394.issue5090@psf.upfronthosting.co.za> Message-ID: <1238168907.88.0.741110835214.issue5090@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The issue seems fixed now. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 16:48:53 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 27 Mar 2009 15:48:53 +0000 Subject: [issue5577] yield in iterators In-Reply-To: <1238156715.07.0.356189133984.issue5577@psf.upfronthosting.co.za> Message-ID: <1238168933.24.0.820578444278.issue5577@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Perhaps you forgot to return the value. In 3.1: >>> def f(): ... return [(yield i) for i in range(10)] ... >>> f() at 0x7f9bcc2257d0> ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 16:53:34 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 27 Mar 2009 15:53:34 +0000 Subject: [issue5577] yield in iterators In-Reply-To: <1238156715.07.0.356189133984.issue5577@psf.upfronthosting.co.za> Message-ID: <1238169214.9.0.822488295005.issue5577@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It's true, however, that there is a difference in behaviour between 2.x and 3.x here. In 2.x, the function containing the list comprehension is a generator. In 3.x, it's the list comprehension itself which becomes a generator. I'm not sure which one is more useful. Also, it's likely that this won't be changed, because it's due to the compilation model of list comprehensions (which are compiled as a separate code object in 3.x). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 17:07:12 2009 From: report at bugs.python.org (Tuure Laurinolli) Date: Fri, 27 Mar 2009 16:07:12 +0000 Subject: [issue3138] Hang when calling get() on an empty queue in the queue module In-Reply-To: <1213862897.02.0.570715389583.issue3138@psf.upfronthosting.co.za> Message-ID: <1238170032.36.0.0813821316145.issue3138@psf.upfronthosting.co.za> Tuure Laurinolli added the comment: Is it also intended that Queue.get() eats SIGINTs, requiring one to kill the process with something heavier? ---------- nosy: +tazle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 17:12:13 2009 From: report at bugs.python.org (qwjqwj) Date: Fri, 27 Mar 2009 16:12:13 +0000 Subject: [issue5577] yield in iterators In-Reply-To: <1238156715.07.0.356189133984.issue5577@psf.upfronthosting.co.za> Message-ID: <1238170333.25.0.506965706743.issue5577@psf.upfronthosting.co.za> qwjqwj added the comment: Why should yield can be put inside the iterator? The behavior here is very weired. >>> x = [(yield i) for i in range(10)] >>> print(list(x)) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, [None, None, None, None, None, None, None, None, None, None]] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 17:13:03 2009 From: report at bugs.python.org (qwjqwj) Date: Fri, 27 Mar 2009 16:13:03 +0000 Subject: [issue5577] yield in iterators In-Reply-To: <1238156715.07.0.356189133984.issue5577@psf.upfronthosting.co.za> Message-ID: <1238170383.12.0.114750385219.issue5577@psf.upfronthosting.co.za> qwjqwj added the comment: >>> x = ((yield i) for i in range(10)) >>> list(x) [0, None, 1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 17:14:45 2009 From: report at bugs.python.org (qwjqwj) Date: Fri, 27 Mar 2009 16:14:45 +0000 Subject: [issue5577] yield in iterators In-Reply-To: <1238156715.07.0.356189133984.issue5577@psf.upfronthosting.co.za> Message-ID: <1238170485.6.0.588215034952.issue5577@psf.upfronthosting.co.za> qwjqwj added the comment: >>> x = {(yield i) for i in range(10)} >>> x at 0x02A453F0> >>> list(x) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, {None}] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 17:33:28 2009 From: report at bugs.python.org (qwjqwj) Date: Fri, 27 Mar 2009 16:33:28 +0000 Subject: [issue5577] yield in iterators In-Reply-To: <1238156715.07.0.356189133984.issue5577@psf.upfronthosting.co.za> Message-ID: <1238171608.03.0.996800305712.issue5577@psf.upfronthosting.co.za> qwjqwj added the comment: More experiments: The tuple pair (10,20) don't correspond to (i,i*i) The yield order is distorted >>> x = (((yield i),(yield i*i)) for i in range(3)) >>> x.__next__() 0 >>> x.send(10) 0 >>> x.send(20) (10, 20) >>> x.send(30) 1 >>> x.send(40) 1 >>> x.send(60) (40, 60) >>> x.send(70) 2 >>> x.send(80) 4 >>> x.send(90) (80, 90) >>> x.send(100) Traceback (most recent call last): File "", line 1, in x.send(100) StopIteration ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 17:41:38 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 27 Mar 2009 16:41:38 +0000 Subject: [issue5577] yield in iterators In-Reply-To: <1238171608.03.0.996800305712.issue5577@psf.upfronthosting.co.za> Message-ID: <1238172178.6929.28.camel@fsol> Antoine Pitrou added the comment: > More experiments: > The tuple pair (10,20) don't correspond to (i,i*i) This is normal, since it corresponds to ((yield i), (yield i*i)). The value of a yield expression is what the caller puts into send(), not what is yielded to the caller. And since you sent 10 then 20, the resulting tuple is (10, 20). > The yield order is distorted It is quite logical actually. The generator first has to yield two values before being able to produce a third one (the tuple consisting of the value of two "yield" expressions). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 17:52:22 2009 From: report at bugs.python.org (qwjqwj) Date: Fri, 27 Mar 2009 16:52:22 +0000 Subject: [issue5577] yield in iterators In-Reply-To: <1238156715.07.0.356189133984.issue5577@psf.upfronthosting.co.za> Message-ID: <1238172742.56.0.406156464826.issue5577@psf.upfronthosting.co.za> qwjqwj added the comment: Ok, I see. Thanks. However, I don't think yield should be consumed at the iterator's level. It may be more useful for the outside function to consume the yield. For example, some function want to change some data with another "thread". def f(): ...fetch data... x = [yield i for i in data] It should be written as belowed in Python 3.1 now def f(): x = [] for i in data: x.append((yield i)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 18:04:12 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 27 Mar 2009 17:04:12 +0000 Subject: [issue4629] getopt should not accept no_argument that ends with '=' In-Reply-To: <1228978458.01.0.0804138423997.issue4629@psf.upfronthosting.co.za> Message-ID: <1238173452.17.0.168433086529.issue4629@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The patch is good. ---------- nosy: +amaury.forgeotdarc resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 19:38:31 2009 From: report at bugs.python.org (Devin Jeanpierre) Date: Fri, 27 Mar 2009 18:38:31 +0000 Subject: [issue5581] abc.abstractproperty() docs list fget as required; fget is not required by abc.abstractproperty() In-Reply-To: <1238179111.83.0.887852993055.issue5581@psf.upfronthosting.co.za> Message-ID: <1238179111.83.0.887852993055.issue5581@psf.upfronthosting.co.za> New submission from Devin Jeanpierre : The documentation uses the function signature `abc.abstractproperty(fget[, fset[, fdel[, doc]]])`, implying that fget is mandatory, and all other arguments are optional. The correct version would be `abc.abstractproperty([fget[, fset[, fdel[, doc]]]])`, or else to change abc.abstractproperty() to require fget (I have not compiled 2.7+ to test if this is the case, I only know that the docs in trunk continue to use this signature). I initially suspected that I misunderstood the signature syntax, but other functions use it as I would assume-- for instance, the Built-In Functions documentation lists `property([fget[, fset[, fdel[, doc]]]])`. ---------- assignee: georg.brandl components: Documentation messages: 84277 nosy: Devin Jeanpierre, georg.brandl severity: normal status: open title: abc.abstractproperty() docs list fget as required; fget is not required by abc.abstractproperty() versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 19:58:30 2009 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 27 Mar 2009 18:58:30 +0000 Subject: [issue5577] yield in iterators In-Reply-To: <1238156715.07.0.356189133984.issue5577@psf.upfronthosting.co.za> Message-ID: <1238180310.11.0.104270688074.issue5577@psf.upfronthosting.co.za> Guido van Rossum added the comment: Can anyone think of a *reason* to put a yield inside a generator expression? ISTM we could just forbid this syntactically. It seems insane and hard to read so if someone has a reason they should write it out using an explicit for-statement. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 20:08:30 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Fri, 27 Mar 2009 19:08:30 +0000 Subject: [issue5314] http client error In-Reply-To: <1235034302.73.0.497047240099.issue5314@psf.upfronthosting.co.za> Message-ID: <1238180910.89.0.267597614717.issue5314@psf.upfronthosting.co.za> Jeremy Hylton added the comment: The documentation is pretty vague on this point. If you send something other than plain ascii, it gets a bit tricky to figure out what other headers need to be added. It would be safer for the client to pick an encoding (e.g. utf-8) and encode the string before calling request(). It affects the content-length and presumably also the content-type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 21:22:48 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Fri, 27 Mar 2009 20:22:48 +0000 Subject: [issue5314] http client error In-Reply-To: <1235034302.73.0.497047240099.issue5314@psf.upfronthosting.co.za> Message-ID: <1238185368.04.0.558996684668.issue5314@psf.upfronthosting.co.za> Jeremy Hylton added the comment: Ok. Discovered that RFC 2616 says that iso-8859-1 is the default charset, so I will use that to encode strings instead of ascii. If you want utf-8, you could encode the string yourself before calling request(). Presumably, you should also add a content-type that explains the charset. I'll clarified this in the docs. ---------- assignee: -> jhylton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 21:40:00 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 27 Mar 2009 20:40:00 +0000 Subject: [issue5035] Compilation --without-threads fails In-Reply-To: <1232659462.88.0.743482431545.issue5035@psf.upfronthosting.co.za> Message-ID: <1238186400.32.0.235502934509.issue5035@psf.upfronthosting.co.za> Changes by Guilherme Polo : ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 21:50:57 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 27 Mar 2009 20:50:57 +0000 Subject: [issue4958] email/header.py ecre regular expression issue In-Reply-To: <1232062389.84.0.560697403346.issue4958@psf.upfronthosting.co.za> Message-ID: <1238187057.77.0.861989254607.issue4958@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- resolution: -> duplicate status: open -> closed superseder: -> decode_header does not follow RFC 2047 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 22:20:33 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Fri, 27 Mar 2009 21:20:33 +0000 Subject: [issue5314] http client error In-Reply-To: <1235034302.73.0.497047240099.issue5314@psf.upfronthosting.co.za> Message-ID: <1238188833.92.0.247894466635.issue5314@psf.upfronthosting.co.za> Jeremy Hylton added the comment: Committed revision 70638. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 22:29:10 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 27 Mar 2009 21:29:10 +0000 Subject: [issue5468] urlencode does not handle "bytes", and could easily handle alternate encodings In-Reply-To: <1236696316.6.0.478633045289.issue5468@psf.upfronthosting.co.za> Message-ID: <1238189350.43.0.230455340657.issue5468@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 22:44:40 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 27 Mar 2009 21:44:40 +0000 Subject: [issue5035] Compilation --without-threads fails In-Reply-To: <1232659462.88.0.743482431545.issue5035@psf.upfronthosting.co.za> Message-ID: <1238190280.76.0.468565046456.issue5035@psf.upfronthosting.co.za> Guilherme Polo added the comment: Victor, I have changed your tkinter patch a bit and applied on r70641. The issue is marking only python 2.7 right now, aren't these changes supposed to be applied 26-maint, py3k and 30-maint too ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 22:47:50 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Fri, 27 Mar 2009 21:47:50 +0000 Subject: [issue5571] new "TestCase.skip" method causes all tests to skip under trial (Twisted's test runner) In-Reply-To: <1238094616.02.0.646494355716.issue5571@psf.upfronthosting.co.za> Message-ID: <1238190470.87.0.49584752542.issue5571@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Hi Benjamin, Thanks for this fix. :) I noticed the revision in your comment doesn't seem to be the one that contains the fix though. ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 23:14:35 2009 From: report at bugs.python.org (Glyph Lefkowitz) Date: Fri, 27 Mar 2009 22:14:35 +0000 Subject: [issue5571] new "TestCase.skip" method causes all tests to skip under trial (Twisted's test runner) In-Reply-To: <1238094616.02.0.646494355716.issue5571@psf.upfronthosting.co.za> Message-ID: <1238192075.37.0.535372464346.issue5571@psf.upfronthosting.co.za> Glyph Lefkowitz added the comment: I went to the trouble of tracking it down and then I forgot to attach a comment: I'm pretty sure Benjamin meant r70616. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 27 23:25:54 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 27 Mar 2009 22:25:54 +0000 Subject: [issue4630] IDLE no longer respects .Xdefaults insertOffTime In-Reply-To: <1228982754.08.0.523311497339.issue4630@psf.upfronthosting.co.za> Message-ID: <1238192754.56.0.195170118523.issue4630@psf.upfronthosting.co.za> Guilherme Polo added the comment: Maybe we can agree on the feature being added ? I don't see much use for controlling how much time the insertion cursor is on and how much time it is off, but maybe just choosing between blink and no-blink would be good to have. I would prefer to just get an option inside the "General" tab that would affect the Text widget creation, instead of depending on how each platform changes the behaviour. I personally didn't have any issue with seeing the cursor blinking (I think I never watched it blinking carefully), but now that you say this it does annoy me if I watch it :) ---------- nosy: +gpolo type: -> feature request versions: +Python 2.7, Python 3.1 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 00:16:02 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Fri, 27 Mar 2009 23:16:02 +0000 Subject: [issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent In-Reply-To: <1237800550.85.0.782891199129.issue5542@psf.upfronthosting.co.za> Message-ID: <1238195762.37.0.279844059942.issue5542@psf.upfronthosting.co.za> Changes by Jeremy Hylton : ---------- assignee: -> jhylton nosy: +jhylton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 00:23:38 2009 From: report at bugs.python.org (acummings) Date: Fri, 27 Mar 2009 23:23:38 +0000 Subject: [issue5582] Incorrect DST transition on Windows In-Reply-To: <1238196218.64.0.426344630758.issue5582@psf.upfronthosting.co.za> Message-ID: <1238196218.64.0.426344630758.issue5582@psf.upfronthosting.co.za> New submission from acummings : On Windows, the calculation of when DST starts is incorrect. Windows OS seems to be fully patched, and correctly changed to DST on 3-8-2009. However, datetime.now() is 1 hour less then Windows displayed time. I even tried setting the TZ environment variable to PST8PDT,M3.2.0,M11.1.0 to fully specify the date change. Below you can see that today (3-27-08) is marked as standard time, while July 1st is DST and Jan 1st is Standard, if I understand the meaning of the 9th element of the timetuple: ON WINDOWS, with windows reporting the time as 3:59pm: >>> july1 = datetime(2009, 7, 1) >>> jan1 = datetime(2009, 1, 1) >>> time.localtime(time.mktime(july1.timetuple())) (2009, 7, 1, 0, 0, 0, 2, 182, 1) >>> time.localtime(time.mktime(jan1.timetuple())) (2009, 1, 1, 0, 0, 0, 3, 1, 0) >>> time.localtime(time.mktime(datetime.now().timetuple())) (2009, 3, 27, 14, 59, 46, 4, 86, 0) It worked correctly on Linux, though: >>> july1 = datetime(2009,7,1) >>> jan1 = datetime(2009,1,1) >>> time.localtime(time.mktime(july1.timetuple())) (2009, 7, 1, 0, 0, 0, 2, 182, 1) >>> time.localtime(time.mktime(jan1.timetuple())) (2009, 1, 1, 0, 0, 0, 3, 1, 0) >>> time.localtime(time.mktime(datetime.now().timetuple())) (2009, 3, 27, 15, 57, 2, 4, 86, 1) ---------- components: Windows messages: 84286 nosy: acummings severity: normal status: open title: Incorrect DST transition on Windows versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 00:29:09 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 27 Mar 2009 23:29:09 +0000 Subject: [issue1517993] IDLE: config-main.def contains windows-specific settings Message-ID: <1238196549.25.0.901448917548.issue1517993@psf.upfronthosting.co.za> Guilherme Polo added the comment: For config-extensions.def: What do you think about moving all shortcuts to config-keys and then always use the name of the shorcut in config-extensions instead of the shorcut ? For config-main.def: For the [Keys] section I believe it would be better to rename the "default" option to "custom". If custom is true, then idle uses the key set defined by the name option, otherwise it uses the one that fits better the platform. If the user changes the key set that supposedly fits better his platform through the "Configure IDLE" dialog then we set custom to True (independently of this new key set being a custom one or a default one but that is not the default for his platform) and set the name option to the name of the key set. Any thoughts ? ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 00:29:11 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 27 Mar 2009 23:29:11 +0000 Subject: [issue5577] yield in iterators In-Reply-To: <1238156715.07.0.356189133984.issue5577@psf.upfronthosting.co.za> Message-ID: <1238196551.56.0.182811730133.issue5577@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think this should just be closed. The original implied claim that 3.0 is not correct is not correct. The change of behavior is a clear side effect of and intended and documented change in the semantics of comprehensions. As near as I can tell, the results of the experiments are all correct according to the doc for yield. Python-list or the python-ideas list is more appropriate than the tracker to discuss a semantic change. In any case, comprehensions are function expressions, like lambda expressions, and expressions therein should act much the same as the expression in a lambda expression. Even if unclear, slightly insane, and not very useful, I do not think yield should be prohibited in generators expression because 1) it would introduce a back-incompatibility in 3.1; 2) it would slightly break the parallelism with other comprehensions; 3) it would slightly break the parallelism with the expanded for-form; 4) such use is unlikely in real practice; and 5) it would raise the question of where else to prohibit yield. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 00:30:51 2009 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 27 Mar 2009 23:30:51 +0000 Subject: [issue5577] yield in iterators In-Reply-To: <1238156715.07.0.356189133984.issue5577@psf.upfronthosting.co.za> Message-ID: <1238196651.27.0.526406867835.issue5577@psf.upfronthosting.co.za> Guido van Rossum added the comment: Fine! ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 00:31:17 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Fri, 27 Mar 2009 23:31:17 +0000 Subject: [issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent In-Reply-To: <1237800550.85.0.782891199129.issue5542@psf.upfronthosting.co.za> Message-ID: <1238196677.88.0.123036694075.issue5542@psf.upfronthosting.co.za> Jeremy Hylton added the comment: Wow! Old issue. This behavior was present in Greg's original version of the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 00:38:00 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 27 Mar 2009 23:38:00 +0000 Subject: [issue1562092] IDLE: Dedent with Italian keyboard Message-ID: <1238197080.53.0.421513315943.issue1562092@psf.upfronthosting.co.za> Guilherme Polo added the comment: Shift+Tab does look better to me too. But, one can change the default shortcut like Kurt mentioned. Are IDLE users ready to have the default dedent shortcut changed ? ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 00:42:37 2009 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Mar 2009 23:42:37 +0000 Subject: [issue5035] Compilation --without-threads fails In-Reply-To: <1238190280.76.0.468565046456.issue5035@psf.upfronthosting.co.za> Message-ID: <200903280042.24634.victor.stinner@haypocalc.com> STINNER Victor added the comment: gpolo> Victor, I have changed your tkinter patch a bit and applied on r70641. Ok, thanks. gpolo> The issue is marking only python 2.7 right now, aren't these changes gpolo> supposed to be applied 26-maint, py3k and 30-maint too ? Since it only fixes warnings, we don't have to "fix" *-maint versions. But I would like to see your fix in py3k (I think that trunk and py3k should be as close as possible). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 01:42:42 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 28 Mar 2009 00:42:42 +0000 Subject: [issue5583] Optional extensions in setup.py In-Reply-To: <1238200962.29.0.771243104654.issue5583@psf.upfronthosting.co.za> Message-ID: <1238200962.29.0.771243104654.issue5583@psf.upfronthosting.co.za> New submission from Georg Brandl : Adds a new kwarg to the Extension constructor that does what Python's own /setup.py does to ignore build failure in an extension with a warning. I'm not sure if that's everything that's needed, but it seems to work in a simple test case. ---------- assignee: tarek components: Distutils files: opt-ext.diff keywords: patch messages: 84293 nosy: georg.brandl, tarek severity: normal status: open title: Optional extensions in setup.py versions: Python 2.7 Added file: http://bugs.python.org/file13436/opt-ext.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 02:07:53 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 28 Mar 2009 01:07:53 +0000 Subject: [issue1468223] Hitting CTRL-C while in a loop closes IDLE on cygwin Message-ID: <1238202473.62.0.741684930903.issue1468223@psf.upfronthosting.co.za> Guilherme Polo added the comment: I have just tried it using Python 2.5.2 under cygwin 1.5.25 and that did not happen. This looks like to be an issue with the cygwin you were using, not python or idle. If you (Miki) are still around, please retry with a newer cygwin and report it here, otherwise I can just see this being closed. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 02:38:36 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 28 Mar 2009 01:38:36 +0000 Subject: [issue786827] IDLE starts with no menus (Cygwin) Message-ID: <1238204316.56.0.280110841724.issue786827@psf.upfronthosting.co.za> Guilherme Polo added the comment: I just tried idle here under cygwin and menus are not shown. This cygwin includes python 2.5.2, btw. But I verified what Daniel Joyce said and I see the problem is no longer there, so it has to be tracked down again. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 05:03:28 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 28 Mar 2009 04:03:28 +0000 Subject: [issue1174606] Reading /dev/zero causes SystemError Message-ID: <1238213008.56.0.435505148343.issue1174606@psf.upfronthosting.co.za> R. David Murray added the comment: I applied the patch against the trunk, and 'make' failed: .... File "/home/rdmurray/python/Issue1174606/Lib/platform.py", line 932, in _syscmd_uname output = string.strip(f.read()) OverflowError: requested number of bytes is more than a Python string can hold I can confirm that the issue still exists on the trunk. Py3k doesn't benefit from the linux /dev/zero optimization because it has its own I/O layer, so it takes it a _lot_ longer to get to the failure point...which is more pathological than the py2 behavior: rdmurray at partner:~/python/py3k>./python -c 'open("/dev/zero").read()' zsh: segmentation fault ./python -c 'open("/dev/zero").read()' Which I think makes this a 'crash' bug on py3k. ---------- nosy: +benjamin.peterson, bitdancer stage: -> needs patch type: -> crash versions: +Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 05:22:06 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Mar 2009 04:22:06 +0000 Subject: [issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1 In-Reply-To: <1235679869.5.0.97489087981.issue5377@psf.upfronthosting.co.za> Message-ID: <1238214126.8.0.75073675188.issue5377@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the patch, Victor. I think this is the right thing to do, though I'm still not sure why anyone would care about getting longs instead of ints back from int(x). Comments and questions: (0) Please could you add some tests! (1) Shouldn't the first line you added include a check for res == NULL? (2) It looks as though the patched code ends up calling PyLong_Check twice when __int__ returns a long. Can you find a clear rewrite that avoids this duplication? By the way, I realized after posting my last comment that the issue with Fraction has nothing to do with extreme int values. For example, with the current trunk (not including Victor's patch): >>> int(Fraction(2L)) 2L >>> int(int(Fraction(2L))) 2 I don't think should be considered a bug in Fraction---I think Victor's solution of making the int() machinery always return int when possible is the right one here. The need to call int(int(x)) if you *really* want an int seems a little ugly. ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 05:34:35 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Sat, 28 Mar 2009 04:34:35 +0000 Subject: [issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent In-Reply-To: <1237800550.85.0.782891199129.issue5542@psf.upfronthosting.co.za> Message-ID: <1238214875.65.0.753612063201.issue5542@psf.upfronthosting.co.za> Jeremy Hylton added the comment: I think it makes sense to leave the socket open in this case. (In general, I think httplib is too aggressive about closing the socket.) I'm checking in a version for py3k, and will get around to backporting it later. Committed revision 70643. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 06:53:36 2009 From: report at bugs.python.org (Bob Ippolito) Date: Sat, 28 Mar 2009 05:53:36 +0000 Subject: [issue5584] json.loads(u'3.14') fails unexpectedly (minor scanner bug) In-Reply-To: <1238219615.73.0.707210951472.issue5584@psf.upfronthosting.co.za> Message-ID: <1238219615.73.0.707210951472.issue5584@psf.upfronthosting.co.za> New submission from Bob Ippolito : http://code.google.com/p/simplejson/issues/detail?id=43 Need a <= where there's a < in the unicode float scanner. problem only exists when decoding a unicode float that is not in any sort of container (e.g. array or object). ---------- assignee: bob.ippolito keywords: easy messages: 84299 nosy: bob.ippolito severity: normal stage: needs patch status: open title: json.loads(u'3.14') fails unexpectedly (minor scanner bug) type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 06:54:01 2009 From: report at bugs.python.org (Bob Ippolito) Date: Sat, 28 Mar 2009 05:54:01 +0000 Subject: [issue5584] json.loads(u'3.14') fails unexpectedly (minor scanner bug) In-Reply-To: <1238219615.73.0.707210951472.issue5584@psf.upfronthosting.co.za> Message-ID: <1238219641.23.0.906825181638.issue5584@psf.upfronthosting.co.za> Changes by Bob Ippolito : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 07:44:24 2009 From: report at bugs.python.org (Yogendra Mohan) Date: Sat, 28 Mar 2009 06:44:24 +0000 Subject: [issue5569] Issue in transparency in top level tk window(python) on MAC In-Reply-To: <1238093226.99.0.851453746263.issue5569@psf.upfronthosting.co.za> Message-ID: <1238222664.83.0.347428454245.issue5569@psf.upfronthosting.co.za> Yogendra Mohan added the comment: Hello Amaury Forgeot, Thanks for reply. As you said 'wm_attributes does not take keyword arguments' I have taken that pach from issue1500773 and updated the same. Still I am not able to run with Python 2.5.1 on MAC 10.5.1. Please let me know if anything else I have to do. Regards Yogendra Mohan ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 11:22:11 2009 From: report at bugs.python.org (Artur Frysiak) Date: Sat, 28 Mar 2009 10:22:11 +0000 Subject: [issue5369] __ppc__ macro checking is incorrect In-Reply-To: <1235589968.39.0.392818865305.issue5369@psf.upfronthosting.co.za> Message-ID: <1238235730.83.0.44788105198.issue5369@psf.upfronthosting.co.za> Artur Frysiak added the comment: __ppc__ is defined on MacOS X, __powerpc__ on Linux. Only place when need check for both is Python/ceval.c ---------- keywords: +patch nosy: +wiget Added file: http://bugs.python.org/file13437/3.0-issue5369.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 11:26:38 2009 From: report at bugs.python.org (Artur Frysiak) Date: Sat, 28 Mar 2009 10:26:38 +0000 Subject: [issue5369] __ppc__ macro checking is incorrect In-Reply-To: <1235589968.39.0.392818865305.issue5369@psf.upfronthosting.co.za> Message-ID: <1238235998.5.0.912367040708.issue5369@psf.upfronthosting.co.za> Changes by Artur Frysiak : ---------- versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 12:16:27 2009 From: report at bugs.python.org (lekma) Date: Sat, 28 Mar 2009 11:16:27 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> New submission from lekma : It would be useful to have the ability to run arbitrary code before a manager's server subprocess is started (I'd use this feature to install signal handlers for example). ---------- components: Library (Lib) messages: 84302 nosy: lekma severity: normal status: open title: implement initializer for multiprocessing.BaseManager.start() type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 12:22:07 2009 From: report at bugs.python.org (lekma) Date: Sat, 28 Mar 2009 11:22:07 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238239327.77.0.00432294286501.issue5585@psf.upfronthosting.co.za> lekma added the comment: here is a patch doing just that (against trunk). ps: this is my first bug report and contribution to Python, please, be gentle :) ---------- keywords: +patch Added file: http://bugs.python.org/file13438/Issue5585.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:12:22 2009 From: report at bugs.python.org (intgr) Date: Sat, 28 Mar 2009 12:12:22 +0000 Subject: [issue4501] asyncore's urgent data management and connection closed events are broken when using poll() In-Reply-To: <1228266655.05.0.188613442109.issue4501@psf.upfronthosting.co.za> Message-ID: <1238242342.33.0.659013032878.issue4501@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:13:53 2009 From: report at bugs.python.org (intgr) Date: Sat, 28 Mar 2009 12:13:53 +0000 Subject: [issue2944] asyncore doesn't handle connection refused correctly In-Reply-To: <1211462641.02.0.497686644895.issue2944@psf.upfronthosting.co.za> Message-ID: <1238242433.44.0.64727381727.issue2944@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:14:54 2009 From: report at bugs.python.org (intgr) Date: Sat, 28 Mar 2009 12:14:54 +0000 Subject: [issue4277] asynchat's handle_error inconsistency In-Reply-To: <1226060153.34.0.769481825348.issue4277@psf.upfronthosting.co.za> Message-ID: <1238242494.52.0.606938334223.issue4277@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:17:27 2009 From: report at bugs.python.org (intgr) Date: Sat, 28 Mar 2009 12:17:27 +0000 Subject: [issue1563] asyncore and asynchat incompatible with Py3k str and bytes In-Reply-To: <1196967051.24.0.955219786763.issue1563@psf.upfronthosting.co.za> Message-ID: <1238242647.57.0.850856846324.issue1563@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:18:28 2009 From: report at bugs.python.org (intgr) Date: Sat, 28 Mar 2009 12:18:28 +0000 Subject: [issue777588] asyncore is broken for windows if connection is refused Message-ID: <1238242708.77.0.743691772009.issue777588@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:20:31 2009 From: report at bugs.python.org (intgr) Date: Sat, 28 Mar 2009 12:20:31 +0000 Subject: [issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size) In-Reply-To: <1202768252.75.0.386707250967.issue2073@psf.upfronthosting.co.za> Message-ID: <1238242831.04.0.791940580984.issue2073@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:21:09 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Sat, 28 Mar 2009 12:21:09 +0000 Subject: [issue3243] Support iterable bodies in httplib In-Reply-To: <1214848938.76.0.928668674728.issue3243@psf.upfronthosting.co.za> Message-ID: <1238242869.66.0.814519496608.issue3243@psf.upfronthosting.co.za> Jeremy Hylton added the comment: Seems like a reasonable feature request. I'm going to apply a variant of the patch in 3.1 first. ---------- assignee: -> jhylton nosy: +jhylton resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:22:27 2009 From: report at bugs.python.org (intgr) Date: Sat, 28 Mar 2009 12:22:27 +0000 Subject: [issue1736190] asyncore/asynchat patches Message-ID: <1238242947.3.0.738050464196.issue1736190@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:22:48 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Mar 2009 12:22:48 +0000 Subject: [issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1 In-Reply-To: <1235679869.5.0.97489087981.issue5377@psf.upfronthosting.co.za> Message-ID: <1238242968.79.0.569897015371.issue5377@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> marketdickinson priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:22:59 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Mar 2009 12:22:59 +0000 Subject: [issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1 In-Reply-To: <1235679869.5.0.97489087981.issue5377@psf.upfronthosting.co.za> Message-ID: <1238242979.13.0.0352849004386.issue5377@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- components: +Interpreter Core -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:23:04 2009 From: report at bugs.python.org (intgr) Date: Sat, 28 Mar 2009 12:23:04 +0000 Subject: [issue658749] asyncore connect() and winsock errors Message-ID: <1238242984.91.0.14281357597.issue658749@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:24:11 2009 From: report at bugs.python.org (intgr) Date: Sat, 28 Mar 2009 12:24:11 +0000 Subject: [issue1370380] async_chat.push() can trigger handle_error(). undocumented. Message-ID: <1238243051.46.0.344361683858.issue1370380@psf.upfronthosting.co.za> Changes by intgr : ---------- nosy: +intgr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:24:55 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Sat, 28 Mar 2009 12:24:55 +0000 Subject: [issue1153027] http_error_302() crashes with 'HTTP/1.1 400 Bad Request Message-ID: <1238243095.48.0.374824134383.issue1153027@psf.upfronthosting.co.za> Changes by Jeremy Hylton : ---------- nosy: +jhylton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 13:25:13 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Sat, 28 Mar 2009 12:25:13 +0000 Subject: [issue918368] urllib doesn't correct server returned urls Message-ID: <1238243113.44.0.199852162261.issue918368@psf.upfronthosting.co.za> Changes by Jeremy Hylton : ---------- nosy: +jhylton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 15:16:32 2009 From: report at bugs.python.org (Mher Movsisyan) Date: Sat, 28 Mar 2009 14:16:32 +0000 Subject: [issue5586] The documentation of os.makedirs is misleading In-Reply-To: <1238249792.26.0.0616878005738.issue5586@psf.upfronthosting.co.za> Message-ID: <1238249792.26.0.0616878005738.issue5586@psf.upfronthosting.co.za> New submission from Mher Movsisyan : The documentation of os.makedirs (http://docs.python.org/library/os.html? highlight=makedirs#os.makedirs) is misleading. It states that os.makedirs raises an exception if the leaf directory already exists but it doesn't. Lib/os.py: 136 def makedirs(name, mode=0777): 137 """makedirs(path [, mode=0777]) 138 139 Super-mkdir; create a leaf directory and all intermediate ones. 140 Works like mkdir, except that any intermediate path segment (not 141 just the rightmost) will be created if it does not exist. This is 142 recursive. 143 144 """ 145 head, tail = path.split(name) 146 if not tail: 147 head, tail = path.split(head) 148 if head and tail and not path.exists(head): 149 try: 150 makedirs(head, mode) 151 except OSError, e: 152 # be happy if someone already created the path 153 if e.errno != errno.EEXIST: 154 raise 155 if tail == curdir: # xxx/newdir/. exists if xxx/newdir exists 156 return 157 mkdir(name, mode) The attachment is a patch of the documentation (trunk, revision 70643). ---------- assignee: georg.brandl components: Documentation files: makedirs.diff keywords: patch messages: 84305 nosy: georg.brandl, mher severity: normal status: open title: The documentation of os.makedirs is misleading versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file13439/makedirs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 15:26:43 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 28 Mar 2009 14:26:43 +0000 Subject: [issue989712] Support using Tk without a mainloop Message-ID: <1238250403.17.0.563585250226.issue989712@psf.upfronthosting.co.za> Guilherme Polo added the comment: I've changed the patch a bit and give it a quick try on the python-trunk. I didn't understand the need to verify for _tkinter while IDLE is already running, also, _tkinter.dooneevent is gone in py3k so I'm not using the module function (these are the differences in this patch). I find it nice to use Tkinter interactively on IDLE, is someone against this ? ---------- nosy: +gpolo Added file: http://bugs.python.org/file13440/issue989712.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 16:16:16 2009 From: report at bugs.python.org (Tim Golden) Date: Sat, 28 Mar 2009 15:16:16 +0000 Subject: [issue5261] with lock fails on multiprocessing In-Reply-To: <1234637534.63.0.0578864534082.issue5261@psf.upfronthosting.co.za> Message-ID: <1238253376.1.0.606824063309.issue5261@psf.upfronthosting.co.za> Tim Golden added the comment: Can I nudge this one a bit? It causes an interpreter crash and the patch seems good (subject to someone else's review). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 16:20:18 2009 From: report at bugs.python.org (Jesse Noller) Date: Sat, 28 Mar 2009 15:20:18 +0000 Subject: [issue5261] with lock fails on multiprocessing In-Reply-To: <1234637534.63.0.0578864534082.issue5261@psf.upfronthosting.co.za> Message-ID: <1238253618.91.0.299534734981.issue5261@psf.upfronthosting.co.za> Jesse Noller added the comment: I will be addressing all of the MP bugs during the pycon sprints starting sunday ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 17:01:59 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Mar 2009 16:01:59 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1238256119.25.0.491653368117.issue5463@psf.upfronthosting.co.za> Mark Dickinson added the comment: I've messed with your patch a bit more. :) Here's the latest version. Apart from the things I mentioned earlier, test_struct was failing on 64-bit machines with your original patch; I think that's fixed now. I also updated the docs. Does this version look okay to you? Still the float coercion to get rid of. I'd also like to replace the various struct.error exceptions with something more appropriate (e.g., OverflowError for out-of-range values, TypeError for floats passed to integer formats), but that probably needs a short python-dev discussion first. ---------- Added file: http://bugs.python.org/file13441/cleanup_range_check_patch2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 17:02:53 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 28 Mar 2009 16:02:53 +0000 Subject: [issue5040] Bug of CGIXMLRPCRequestHandler In-Reply-To: <1232792394.35.0.81811153867.issue5040@psf.upfronthosting.co.za> Message-ID: <1238256173.68.0.876981056093.issue5040@psf.upfronthosting.co.za> Brian Quinlan added the comment: It turns out that there are a bunch of issues with the py3k XML-RPC client and server. Attached as some tests that demonstrate them. ---------- keywords: +patch nosy: +bquinlan Added file: http://bugs.python.org/file13442/xmlrpc-test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 17:09:52 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Mar 2009 16:09:52 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1238256592.59.0.890332739629.issue5463@psf.upfronthosting.co.za> Mark Dickinson added the comment: Oops. Out-of-date version of the diff. Here's the right one. ---------- Added file: http://bugs.python.org/file13443/cleanup_range_check_patch2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 17:09:57 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Mar 2009 16:09:57 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1238256597.86.0.72696725485.issue5463@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file13441/cleanup_range_check_patch2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 17:24:50 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Mar 2009 16:24:50 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1238257490.29.0.793442805859.issue5463@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- priority: -> normal stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 17:25:44 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 28 Mar 2009 16:25:44 +0000 Subject: [issue5040] Bug of CGIXMLRPCRequestHandler In-Reply-To: <1232792394.35.0.81811153867.issue5040@psf.upfronthosting.co.za> Message-ID: <1238257544.66.0.800092899963.issue5040@psf.upfronthosting.co.za> Changes by Brian Quinlan : Added file: http://bugs.python.org/file13444/xmlrpc-fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 17:29:52 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 28 Mar 2009 16:29:52 +0000 Subject: [issue5040] Bug of CGIXMLRPCRequestHandler In-Reply-To: <1232792394.35.0.81811153867.issue5040@psf.upfronthosting.co.za> Message-ID: <1238257792.68.0.35133541329.issue5040@psf.upfronthosting.co.za> Changes by Brian Quinlan : ---------- type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 17:36:23 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Mar 2009 16:36:23 +0000 Subject: [issue4294] Macros for PyLong: sign, number of digits, fits in an int In-Reply-To: <1226322752.92.0.0671581209413.issue4294@psf.upfronthosting.co.za> Message-ID: <1238258183.04.0.651521950457.issue4294@psf.upfronthosting.co.za> Mark Dickinson added the comment: [Mark] > PyLong_NDIGITS should stay in longintrepr.h, though, > since it's dependent on the representation. [Victor] >I don't understand why. [...] I expressed myself badly. I guess my point was that PyLong_SIGN and PyLong_EQUALS_ZERO (and PyLong_IS_NEGATIVE) have an obvious meaning for integers themselves, regardless of the particular implementation chosen. But there could be representations of integers for which PyLong_NDIGITS doesn't even make sense, or is ambiguous. Furthermore, if the implementation of long integers changes then the meanings of PyLong_SIGN and PyLong_EQUALS_ZERO won't change, but the meaning of PyLong_NDIGITS might well do. So it seems to me that PyLong_NDIGITS is only really a useful macro for *this particular* implementation of integers---it's something that should be internal to Objects/longobject.c and Include/longintrepr.h, and not exposed to the rest of Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 17:38:40 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 28 Mar 2009 16:38:40 +0000 Subject: [issue5569] Issue in transparency in top level tk window(python) on MAC In-Reply-To: <1238093226.99.0.851453746263.issue5569@psf.upfronthosting.co.za> Message-ID: <1238258320.57.0.958299137069.issue5569@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Please revert that patch, it is not correct! Did you try the commands I suggested in my previous post? And please, be more specific than "I am not able to run". Do you get an error message? If yes, copy its content here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 17:41:13 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Mar 2009 16:41:13 +0000 Subject: [issue5576] Don't use PyLong_SHIFT with _PyLong_AsScaledDouble() In-Reply-To: <1238113402.96.0.541162373186.issue5576@psf.upfronthosting.co.za> Message-ID: <1238258473.69.0.298385114754.issue5576@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for this. I'll take a look. How about making the exponent type size_t or Py_ssize_t, rather than [unsigned] int? It seems to me that that fits better with the usual size in digits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 17:43:23 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Mar 2009 16:43:23 +0000 Subject: [issue5576] Don't use PyLong_SHIFT with _PyLong_AsScaledDouble() In-Reply-To: <1238113402.96.0.541162373186.issue5576@psf.upfronthosting.co.za> Message-ID: <1238258603.82.0.228267128312.issue5576@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> marketdickinson priority: -> normal stage: -> patch review type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 18:08:42 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 28 Mar 2009 17:08:42 +0000 Subject: [issue5587] vars() no longer has a use __repr__ In-Reply-To: <1238260121.89.0.108446240417.issue5587@psf.upfronthosting.co.za> Message-ID: <1238260121.89.0.108446240417.issue5587@psf.upfronthosting.co.za> New submission from Raymond Hettinger : The vars() builtin now returns a hard to view object. Formerly, it had a useful __repr__. Python 3.1a1 >>> class A: pass >>> vars(A) IDLE 2.6.1 >>> class A: pass >>> vars(A) {'__module__': '__main__', '__doc__': None} ---------- components: Interpreter Core messages: 84315 nosy: rhettinger severity: normal status: open title: vars() no longer has a use __repr__ versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 18:15:57 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 28 Mar 2009 17:15:57 +0000 Subject: [issue5569] Issue in transparency in top level tk window(python) on MAC In-Reply-To: <1238093226.99.0.851453746263.issue5569@psf.upfronthosting.co.za> Message-ID: <1238260557.5.0.0816811972752.issue5569@psf.upfronthosting.co.za> Guilherme Polo added the comment: Amaury, can you be more specific on how it is not correct ? What patch should be reverted ? I'm closing this as invalid now. Although this, in some way, can be considered a duplicate of issue1500773, I don't see it that way. I'm just seeing an incorrect usage of wm_attributes, not a request to change how it works, besides the question being asked ("can I do on MAC system or Not?") should be moved to a proper mail list. ---------- nosy: +gpolo resolution: duplicate -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 18:44:33 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 28 Mar 2009 17:44:33 +0000 Subject: [issue5569] Issue in transparency in top level tk window(python) on MAC In-Reply-To: <1238093226.99.0.851453746263.issue5569@psf.upfronthosting.co.za> Message-ID: <1238262273.89.0.547769535211.issue5569@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Guilherme, you are right. I think I looked at the wrong patch, sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 19:06:42 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 28 Mar 2009 18:06:42 +0000 Subject: [issue1757057] IDLE + BeautifulSoup = Error Message-ID: <1238263602.1.0.997951353381.issue1757057@psf.upfronthosting.co.za> Guilherme Polo added the comment: I can't seem to reproduce this here. I've tried both python 2.4.5 and 2.5.2 using beautifulsoup 3.0.7. I also used the sample html attached in that email as well part of the code that is supposed to cause the problem, and I can also run pickle on the body's contents without getting a RuntimeError. Any chance you can retry it ? And if you do reproduce it then include the instructions here instead of pointing to a mail list, please. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 19:07:15 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Mar 2009 18:07:15 +0000 Subject: [issue5006] Duplicate UTF-16 BOM if a file is open in append mode In-Reply-To: <1232407475.88.0.821271875363.issue5006@psf.upfronthosting.co.za> Message-ID: <1238263635.16.0.693851464006.issue5006@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It's better now, although I think it's not good to duplicate the encoding switch logic. It would be better to have a separate flag indicate whether it's the start of stream or not. I'm gonna produce a new patch, unless you beat me to it. Also, I'm adding Amaury to the nosy list so that he tells us whether he thinks the approach is sound. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 19:26:16 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 28 Mar 2009 18:26:16 +0000 Subject: [issue2995] Idle, some Linuxes, cannot position Cursor by mouseclick In-Reply-To: <1211995180.72.0.174580651078.issue2995@psf.upfronthosting.co.za> Message-ID: <1238264776.19.0.277455815329.issue2995@psf.upfronthosting.co.za> Guilherme Polo added the comment: I'm downloading Mandriva 2009.0 to hopefully reproduce the problem, but I'm afraid it won't happen. Apparently people that have this issue also reproduce it in different platforms, someone said on http://dev.laptop.org/ticket/7661 that this occurs both on a olpc as well on his mac. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 19:53:12 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Mar 2009 18:53:12 +0000 Subject: [issue5006] Duplicate UTF-16 BOM if a file is open in append mode In-Reply-To: <1232407475.88.0.821271875363.issue5006@psf.upfronthosting.co.za> Message-ID: <1238266392.89.0.315251768132.issue5006@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a new patch catering to more cases (seek()) in addition to just opening in append mode. ---------- Added file: http://bugs.python.org/file13445/append_bom-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 19:58:12 2009 From: report at bugs.python.org (Collin Winter) Date: Sat, 28 Mar 2009 18:58:12 +0000 Subject: [issue5588] Add --randseed to regrtest In-Reply-To: <1238266691.91.0.7889256249.issue5588@psf.upfronthosting.co.za> Message-ID: <1238266691.91.0.7889256249.issue5588@psf.upfronthosting.co.za> New submission from Collin Winter : Add the ability to control the random seed used by regrtest.py -r. This patch adds a --randseed option, and makes regrtest.py -r indicate what random seed it's using so that that value can later be fed back to --randseed. This option is useful for tracking down test order-related issues found by make buildbottest, for example. ---------- components: Tests files: randseed.patch keywords: needs review, patch messages: 84322 nosy: collinwinter severity: normal stage: patch review status: open title: Add --randseed to regrtest type: feature request versions: Python 2.7 Added file: http://bugs.python.org/file13446/randseed.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 19:58:36 2009 From: report at bugs.python.org (Sebastian Billaudelle) Date: Sat, 28 Mar 2009 18:58:36 +0000 Subject: [issue5589] Wrong dump of floats In-Reply-To: <1238266716.08.0.597393543227.issue5589@psf.upfronthosting.co.za> Message-ID: <1238266716.08.0.597393543227.issue5589@psf.upfronthosting.co.za> New submission from Sebastian Billaudelle : Hi there, I just recognized a weird behaviour of the json module... Dumpig a float like 0.1 I get some crazy output. Here is an example: >>> import json >>> json.dumps([.1]) '[0.10000000000000001]' Very simple to reproduce;) - Sebastian ---------- components: Library (Lib) messages: 84323 nosy: stein severity: normal status: open title: Wrong dump of floats type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 19:59:40 2009 From: report at bugs.python.org (Jesse Noller) Date: Sat, 28 Mar 2009 18:59:40 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238266780.49.0.429409436982.issue5585@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: -> jnoller keywords: +needs review -patch nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 20:06:56 2009 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 28 Mar 2009 19:06:56 +0000 Subject: [issue5589] Wrong dump of floats In-Reply-To: <1238266716.08.0.597393543227.issue5589@psf.upfronthosting.co.za> Message-ID: <1238267216.38.0.975572601153.issue5589@psf.upfronthosting.co.za> Ezio Melotti added the comment: >>> .1 0.10000000000000001 Read http://docs.python.org/tutorial/floatingpoint.html ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 20:13:40 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 28 Mar 2009 19:13:40 +0000 Subject: [issue5324] __subclasses__ undocumented In-Reply-To: <1235083126.41.0.90704738838.issue5324@psf.upfronthosting.co.za> Message-ID: <1238267620.24.0.106603097024.issue5324@psf.upfronthosting.co.za> Georg Brandl added the comment: Documented in r70648, r70649 (3k). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 20:15:27 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 28 Mar 2009 19:15:27 +0000 Subject: [issue5337] Scanner class in re module undocumented In-Reply-To: <1235235366.45.0.579114073683.issue5337@psf.upfronthosting.co.za> Message-ID: <1238267727.74.0.370489489901.issue5337@psf.upfronthosting.co.za> Georg Brandl added the comment: The class is commented as being "experimental", and the interface probably could use improvement (it's a bit awkward to subclass Scanner), but since it's been around for so long, I guess enough people will be using it that we have to keep it that way and document it. Opinions? ---------- assignee: effbot -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 20:16:13 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 28 Mar 2009 19:16:13 +0000 Subject: [issue5589] Wrong dump of floats In-Reply-To: <1238266716.08.0.597393543227.issue5589@psf.upfronthosting.co.za> Message-ID: <1238267773.71.0.122031225328.issue5589@psf.upfronthosting.co.za> R. David Murray added the comment: As Ezio points out, this is correct Python behavior. ---------- components: +Interpreter Core -Library (Lib) nosy: +bitdancer resolution: -> invalid stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 20:16:55 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 28 Mar 2009 19:16:55 +0000 Subject: [issue5564] os.symlink/os.link docs should say old/new, not src/dst In-Reply-To: <1238028733.0.0.712487268611.issue5564@psf.upfronthosting.co.za> Message-ID: <1238267815.74.0.420841645354.issue5564@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70650. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 20:18:22 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 28 Mar 2009 19:18:22 +0000 Subject: [issue5589] Wrong dump of floats In-Reply-To: <1238266716.08.0.597393543227.issue5589@psf.upfronthosting.co.za> Message-ID: <1238267902.59.0.752007764287.issue5589@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 20:25:37 2009 From: report at bugs.python.org (Miki Tebeka) Date: Sat, 28 Mar 2009 19:25:37 +0000 Subject: [issue1468223] Hitting CTRL-C while in a loop closes IDLE on cygwin Message-ID: <1238268337.7.0.0677773165296.issue1468223@psf.upfronthosting.co.za> Miki Tebeka added the comment: Happily(?) I don't use Windows anymore. Closing it. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 20:41:21 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 28 Mar 2009 19:41:21 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238269281.75.0.669073119446.issue5585@psf.upfronthosting.co.za> R. David Murray added the comment: Note that the Multiprocessing docs say that the Process "follows the API of threading.Thread," and this would represent a (minor) divergence. I also note that the patch does not contain any tests. ---------- assignee: jnoller -> keywords: +patch nosy: +bitdancer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 21:03:05 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 28 Mar 2009 20:03:05 +0000 Subject: [issue941262] List with Canvas.create_line Option arrow=LAST Broke Message-ID: <1238270585.18.0.12542808156.issue941262@psf.upfronthosting.co.za> Guilherme Polo added the comment: Hi Brian (hope you are still there), the code in 31_8.tcl is not complete so I didn't bother looking into it. The tkdraw.py is not really correct, here is a cleaned up version that works: from Tkinter import Tk, Canvas, LAST, ROUND def StrokeBegin(event): print "clicked at", event.x, event.y del stroke[:] tuple = (event.x, event.y) stroke.append(tuple) def Stroke(event): tuple = (event.x, event.y) coords = stroke[len(stroke)-1] + tuple stroke.append(tuple) canvas.create_line(coords, tag='segments') def StrokeEnd(event): canvas.delete('segments') if len(stroke) < 2: # Just a click happened return canvas.create_line(stroke, tag='line', arrow=LAST, joinstyle=ROUND, smooth=1) stroke = [] root = Tk() canvas = Canvas(root, height=400, width=500) canvas.bind("", StrokeBegin) canvas.bind("", Stroke) canvas.bind("", StrokeEnd) canvas.pack() root.mainloop() ---------- nosy: +gpolo resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 21:05:37 2009 From: report at bugs.python.org (Brett Cannon) Date: Sat, 28 Mar 2009 20:05:37 +0000 Subject: [issue4011] Create DAG for PEP 101 In-Reply-To: <1222896665.95.0.381960877122.issue4011@psf.upfronthosting.co.za> Message-ID: <1238270737.18.0.680934491779.issue4011@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 21:08:18 2009 From: report at bugs.python.org (Brett Cannon) Date: Sat, 28 Mar 2009 20:08:18 +0000 Subject: [issue2972] arguments and default path not set in site.py and sitecustomize.py In-Reply-To: <1211818636.32.0.584139114136.issue2972@psf.upfronthosting.co.za> Message-ID: <1238270898.26.0.0448216826037.issue2972@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 22:48:47 2009 From: report at bugs.python.org (Matthias Klose) Date: Sat, 28 Mar 2009 21:48:47 +0000 Subject: [issue3102] ctypes defines global symbols In-Reply-To: <1213343694.16.0.290726791228.issue3102@psf.upfronthosting.co.za> Message-ID: <1238276927.83.0.00720963083399.issue3102@psf.upfronthosting.co.za> Matthias Klose added the comment: These are the symbols on the trunk (20090328). There are *very* general names as well. How should this be resolved? Introduce macros for the old names, or just rename these? module_methods probably could be static. AllocFunctionCallback ArrayType_Type Array_Type CData_AtAddress CData_FromBaseObj CData_Type CData_get CData_set CField_FromDesc CField_Type CFuncPtrType_Type CFuncPtr_Type CThunk_Type CreateArrayType Extend_Error_Info FreeClosure GetType IsSimpleSubType MallocClosure PointerType_Type Pointer_Type _pagesize _pointer_type_cache alloc_format_string conversion_mode_encoding conversion_mode_errors get_error_object getentry init_callbacks_in_module module_methods new_CArgObject Note there's a patch to get rid of FreeClosure: http://cvs.fedoraproject.org/viewvc/devel/python/python-2.6-ctypes-noexecmem.patch?view=markup ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 22:53:47 2009 From: report at bugs.python.org (Matthias Klose) Date: Sat, 28 Mar 2009 21:53:47 +0000 Subject: [issue5590] pyexpat defines global symbol template_string In-Reply-To: <1238277227.85.0.219241873183.issue5590@psf.upfronthosting.co.za> Message-ID: <1238277227.85.0.219241873183.issue5590@psf.upfronthosting.co.za> New submission from Matthias Klose : pyexpat.c defines the global symbol template_string polluting the global namespace, which isn't used in the module. Is it ok to remove this definition altogether? ---------- messages: 84333 nosy: doko severity: normal status: open title: pyexpat defines global symbol template_string _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 22:57:05 2009 From: report at bugs.python.org (Matthias Klose) Date: Sat, 28 Mar 2009 21:57:05 +0000 Subject: [issue5591] global symbols in shared libpython not prefixed with Py or _Py In-Reply-To: <1238277425.36.0.0359778681116.issue5591@psf.upfronthosting.co.za> Message-ID: <1238277425.36.0.0359778681116.issue5591@psf.upfronthosting.co.za> New submission from Matthias Klose : There are four global symbols in libpython, which have are globally defined, and don't have a Py prefix. Would it be possible to define those with a _Py prefix instead? ---------- messages: 84334 nosy: doko severity: normal status: open title: global symbols in shared libpython not prefixed with Py or _Py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 22:59:06 2009 From: report at bugs.python.org (Matthias Klose) Date: Sat, 28 Mar 2009 21:59:06 +0000 Subject: [issue5592] Modules/_textio.c defines global symbol encodefuncs In-Reply-To: <1238277546.75.0.294864873348.issue5592@psf.upfronthosting.co.za> Message-ID: <1238277546.75.0.294864873348.issue5592@psf.upfronthosting.co.za> New submission from Matthias Klose : encodefuncs is only used locally. ok to make this variable static? ---------- messages: 84335 nosy: doko severity: normal status: open title: Modules/_textio.c defines global symbol encodefuncs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 23:06:27 2009 From: report at bugs.python.org (Matthias Klose) Date: Sat, 28 Mar 2009 22:06:27 +0000 Subject: [issue4434] Embedding into a shared library fails In-Reply-To: <1227690819.98.0.0359225476492.issue4434@psf.upfronthosting.co.za> Message-ID: <1238277987.36.0.61753918928.issue4434@psf.upfronthosting.co.za> Matthias Klose added the comment: > I'm sure it does work, but what is the point of linking statically > to libpython.a but then having other dependencies, for example on > lib-dynload/time.so? Why not just link to libpython2.5.so in the > first place? speed. Using a python executable with a statically linked libpython is about 10% faster on ix86, plus with some compilers on linux profile based optimization can be used on static objects, which doesn't work with shared libraries (at least on linux using gcc). ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 23:13:45 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Mar 2009 22:13:45 +0000 Subject: [issue5592] Modules/_textio.c defines global symbol encodefuncs In-Reply-To: <1238277546.75.0.294864873348.issue5592@psf.upfronthosting.co.za> Message-ID: <1238278425.47.0.942461607858.issue5592@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, ok. ---------- assignee: -> pitrou components: +Library (Lib) nosy: +pitrou priority: -> normal stage: -> needs patch type: -> behavior versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 23:17:34 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Mar 2009 22:17:34 +0000 Subject: [issue5592] Modules/_textio.c defines global symbol encodefuncs In-Reply-To: <1238277546.75.0.294864873348.issue5592@psf.upfronthosting.co.za> Message-ID: <1238278654.32.0.109095315898.issue5592@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Fixed in r70663, thanks! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 23:18:16 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Mar 2009 22:18:16 +0000 Subject: [issue5591] global symbols in shared libpython not prefixed with Py or _Py In-Reply-To: <1238277425.36.0.0359778681116.issue5591@psf.upfronthosting.co.za> Message-ID: <1238278696.81.0.762958624488.issue5591@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What are those symbols? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 23:50:15 2009 From: report at bugs.python.org (Jesse Noller) Date: Sat, 28 Mar 2009 22:50:15 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238280615.83.0.858503135348.issue5585@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: -> jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 23:51:14 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 28 Mar 2009 22:51:14 +0000 Subject: [issue2522] locale.format() problems with decimal separator In-Reply-To: <1206983289.11.0.844443108334.issue2522@psf.upfronthosting.co.za> Message-ID: <1238280674.91.0.843234300135.issue2522@psf.upfronthosting.co.za> R. David Murray added the comment: This bug is more subtle than it first appears. As far as I've been able to figure out, there is in fact no way to reliably detect that there is non-format text after the format specifier short of completely parsing the format specifier. I went through several possibilities and found a counter example for each that shows it would introduce new bugs: See if last character of formatted string is different from last char of formatter: format('%s', 'things') would then incorrectly be an error. Make sure last character of format string is a valid format character: format('%fx', a) would be valid, but it has a 'x' on the end which is not part of the format string. (The suggested patch has a false negative in this case as well.) Check for a decimal in the formatted string and if it didn't get transformed, complain: format('%s', '1.234') would fail incorrectly. One could argue that at least \n and \r should be checked for since the output from those cases is least obviously "wrong", but I don't think that is a strong argument. The extra control character is almost as "visible" in the output as the trailing 'x' would be in the above example, and the effects of the trailing x are equally mysterious. To fix this correctly would require reimplementing format parsing in the locale module, which would be a maintenance headache. I'm inclined to close this "won't fix", unless someone can come up with a heuristic that won't give false positives or false negatives. ---------- nosy: +bitdancer resolution: -> wont fix stage: -> committed/rejected status: open -> pending versions: +Python 2.7, Python 3.0, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 28 23:52:05 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Mar 2009 22:52:05 +0000 Subject: [issue5588] Add --randseed to regrtest In-Reply-To: <1238266691.91.0.7889256249.issue5588@psf.upfronthosting.co.za> Message-ID: <1238280725.0.0.0508027291133.issue5588@psf.upfronthosting.co.za> Mark Dickinson added the comment: +1 on the idea. I'm not sure I understand the patch, though. If the line: random_seed = int(1000000 * random.random()) produces a random_seed of 0 (or if randseed=0 is supplied as an option), it looks as though random.seed is never called; is this intentional? Also, not that it really matters, but why do you use the expression above instead of the simpler random.randrange(1000000)? ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 00:03:07 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 28 Mar 2009 23:03:07 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238281387.61.0.143098851972.issue2578@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Attaching a patch that adds Google's unittest.TestCase assertFooEqual() extensions and automatically uses rich comparisons in assertEqual() with nicely formatted failure messages for list, tuple, dict, set, frozenset. The following are added by this patch: + def assertSequenceEqual(self, seq1, seq2, msg=None, seq_type=None): + def assertListEqual(self, list1, list2, msg=None): + def assertTupleEqual(self, tuple1, tuple2, msg=None): + def assertSetEqual(self, set1, set2, msg=None): + def assertIn(self, a, b, msg=None): + def assertNotIn(self, a, b, msg=None): + def assertDictEqual(self, d1, d2, msg=None): + def assertDictContainsSubset(self, expected, actual, msg=None): + def assertSameElements(self, expected_seq, actual_seq, msg=None): + def assertMultiLineEqual(self, first, second, msg=None): + def assertLess(self, a, b, msg=None): + def assertLessEqual(self, a, b, msg=None): + def assertGreater(self, a, b, msg=None): + def assertGreaterEqual(self, a, b, msg=None): + def assertIsNone(self, obj, msg=None): + def assertIsNotNone(self, obj, msg='unexpectedly None'): + def assertRaisesWithRegexpMatch(self, expected_exception, expected_regexp, As I said in the dev summit, I'll get some stats on how often each of these are used relative to others from a large code base which has had access to them for some time as an indicator of what may or may not be worth making standard. I did not include assertCommandSucceeds or assertCommandFails as those are more difficult to do the right thing for everyone on cross platform and our internal implementations use some other messy and not integration-worthy internal libraries at the moment. ---------- Added file: http://bugs.python.org/file13447/unittest-new-asserts-gps01.diff.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 00:03:20 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Mar 2009 23:03:20 +0000 Subject: [issue2522] locale.format() problems with decimal separator In-Reply-To: <1206983289.11.0.844443108334.issue2522@psf.upfronthosting.co.za> Message-ID: <1238281400.92.0.65282803357.issue2522@psf.upfronthosting.co.za> Antoine Pitrou added the comment: AFAIK, locale.format() is supposed to be used with a single format specifier, not a complete format string. It's up to you to concatenate the various parts afterwards. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 00:04:09 2009 From: report at bugs.python.org (Collin Winter) Date: Sat, 28 Mar 2009 23:04:09 +0000 Subject: [issue5588] Add --randseed to regrtest In-Reply-To: <1238266691.91.0.7889256249.issue5588@psf.upfronthosting.co.za> Message-ID: <1238281449.61.0.694217067109.issue5588@psf.upfronthosting.co.za> Collin Winter added the comment: The "if rand_seed:" bit was a relic from a previous iteration; fixed. The only reason I didn't use randrange() is that I didn't see it; fixed. ---------- Added file: http://bugs.python.org/file13448/randseed.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 00:04:15 2009 From: report at bugs.python.org (Collin Winter) Date: Sat, 28 Mar 2009 23:04:15 +0000 Subject: [issue5588] Add --randseed to regrtest In-Reply-To: <1238266691.91.0.7889256249.issue5588@psf.upfronthosting.co.za> Message-ID: <1238281455.87.0.0748514899986.issue5588@psf.upfronthosting.co.za> Changes by Collin Winter : Removed file: http://bugs.python.org/file13446/randseed.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 00:04:27 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Mar 2009 23:04:27 +0000 Subject: [issue5588] Add --randseed to regrtest In-Reply-To: <1238266691.91.0.7889256249.issue5588@psf.upfronthosting.co.za> Message-ID: <1238281467.6.0.984743852028.issue5588@psf.upfronthosting.co.za> Antoine Pitrou added the comment: +1 here too. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 00:05:14 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 28 Mar 2009 23:05:14 +0000 Subject: [issue1174606] Reading /dev/zero causes SystemError Message-ID: <1238281514.12.0.240683835716.issue1174606@psf.upfronthosting.co.za> R. David Murray added the comment: Antoine, I added you to the nosy list for this because it turns out the new io.c segfaults in this case. ---------- keywords: -patch nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 00:08:56 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 28 Mar 2009 23:08:56 +0000 Subject: [issue2522] locale.format() problems with decimal separator In-Reply-To: <1238281400.92.0.65282803357.issue2522@psf.upfronthosting.co.za> Message-ID: R. David Murray added the comment: That is true, however the code contains the comment "this is only for one-percent-specifier strings and this should be checked", implying that the intent is to make sure only a single format specifier has been passed. I don't think it is reasonable to perfect that check, however. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 00:10:09 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Mar 2009 23:10:09 +0000 Subject: [issue5588] Add --randseed to regrtest In-Reply-To: <1238266691.91.0.7889256249.issue5588@psf.upfronthosting.co.za> Message-ID: <1238281809.2.0.275951197697.issue5588@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 00:29:09 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Mar 2009 23:29:09 +0000 Subject: [issue1174606] Reading /dev/zero causes SystemError Message-ID: <1238282949.2.0.832573893107.issue1174606@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The reason py3k is a lot longer to crash is because of a slight bug in _fileio.c :-) I'm gonna correct this one first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 01:44:35 2009 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 29 Mar 2009 00:44:35 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1238287475.64.0.03005506071.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: Patch issue2636-patch-1.diff contains a stripped down version of my regex engine and the other changes that are necessary to make it work. ---------- Added file: http://bugs.python.org/file13449/issue2636-patch-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 01:46:19 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 00:46:19 +0000 Subject: [issue1174606] Reading /dev/zero causes SystemError Message-ID: <1238287579.95.0.0564052918618.issue1174606@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A fix for py3k was committed in r70664. ---------- versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 01:49:58 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 Mar 2009 00:49:58 +0000 Subject: [issue2497] stdbool support In-Reply-To: <1206628632.31.0.556646353118.issue2497@psf.upfronthosting.co.za> Message-ID: <1238287798.26.0.230393448452.issue2497@psf.upfronthosting.co.za> R. David Murray added the comment: Since Martin said this should be rejected, I'm closing it rejected. ---------- nosy: +bitdancer resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 01:56:37 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 Mar 2009 00:56:37 +0000 Subject: [issue2570] backport 3.0-style \u/\U processing in raw strings when unicode_literals is imported from __future__ In-Reply-To: <1207592942.81.0.864010115323.issue2570@psf.upfronthosting.co.za> Message-ID: <1238288197.88.0.629634351969.issue2570@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- priority: -> normal stage: -> test needed type: -> behavior versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 03:02:26 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 01:02:26 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238288546.31.0.69520075091.issue2578@psf.upfronthosting.co.za> Antoine Pitrou added the comment: With all due respect, I find the presence of numerous type specific functions (assertListEqual, etc.) awful. I don't understand why the type isn't simply cased in the standard assertEqual function. I also don't think adding so many assert methods makes the API easy to remember and pleasant to use. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 03:07:42 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 01:07:42 +0000 Subject: [issue5593] test_math.testFsum failure on release30-maint In-Reply-To: <1238288862.5.0.344212782108.issue5593@psf.upfronthosting.co.za> Message-ID: <1238288862.5.0.344212782108.issue5593@psf.upfronthosting.co.za> New submission from Antoine Pitrou : I started getting this in release30-maint (not in py3k). ====================================================================== FAIL: testFsum (test.test_math.MathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/30/Lib/test/test_math.py", line 443, in testFsum self.assertEqual(actual, expected) AssertionError: 1.1102230246251565e-16 != 0.0 ---------------------------------------------------------------------- ---------- components: Interpreter Core messages: 84354 nosy: marketdickinson, pitrou priority: normal severity: normal status: open title: test_math.testFsum failure on release30-maint type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 03:14:07 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 01:14:07 +0000 Subject: [issue5593] test_math.testFsum failure on release30-maint In-Reply-To: <1238288862.5.0.344212782108.issue5593@psf.upfronthosting.co.za> Message-ID: <1238289246.93.0.421898306825.issue5593@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It only seems to happen on a 32-bit build on a 64-bit system. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 03:16:48 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 01:16:48 +0000 Subject: [issue5593] test_math.testFsum failure on release30-maint In-Reply-To: <1238288862.5.0.344212782108.issue5593@psf.upfronthosting.co.za> Message-ID: <1238289408.2.0.465133774315.issue5593@psf.upfronthosting.co.za> Antoine Pitrou added the comment: And it actually also happens in py3k (but only in 32-bit mode, too). ---------- versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 03:28:56 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 Mar 2009 01:28:56 +0000 Subject: [issue2570] backport 3.0-style \u/\U processing in raw strings when unicode_literals is imported from __future__ In-Reply-To: <1207592942.81.0.864010115323.issue2570@psf.upfronthosting.co.za> Message-ID: <1238290136.16.0.653129274645.issue2570@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- keywords: +patch stage: test needed -> needs patch Added file: http://bugs.python.org/file13450/issue2570-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 03:35:38 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 29 Mar 2009 01:35:38 +0000 Subject: [issue2995] Idle, some Linuxes, cannot position Cursor by mouseclick In-Reply-To: <1211995180.72.0.174580651078.issue2995@psf.upfronthosting.co.za> Message-ID: <1238290538.64.0.802365629089.issue2995@psf.upfronthosting.co.za> Guilherme Polo added the comment: Whoa, it went better than I expected. It failed on Mandriva just like it was mentioned, but I still haven't verified what is causing this problem. And while running IOBinding.py doesn't demonstrate the problem, running EditorWindow.py does. ---------- versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 03:39:35 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 Mar 2009 01:39:35 +0000 Subject: [issue2577] cmd.py should track input file objects so macros with submacros can be easily written In-Reply-To: <1207610022.93.0.150736529438.issue2577@psf.upfronthosting.co.za> Message-ID: <1238290775.68.0.513799603333.issue2577@psf.upfronthosting.co.za> R. David Murray added the comment: Since it's been almost a year and the OP hasn't responded with an updated patch, I'm closing this as out of date. ---------- nosy: +bitdancer resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 03:46:52 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 29 Mar 2009 01:46:52 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238291212.4.0.487859611052.issue2578@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Some statistics from our large code base as to which of the assert methods get used relative to the others: These percentages are relative to the count of assertEqual(s) uses being 100% and cover python code written by a crazy large number of engineers. assertListEqual 4.61% assertNotEqual(s) 1.91% assertDictEqual 1.90% assertIn 1.75% assertSameElements 1.08% assertIsNone 0.47% assertGreater 0.37% assertMultiLineEqual 0.36% assertNotIn 0.36% assertLess 0.24% assertRaisesWithRegexpMatch 0.23% assertIsNotNone 0.20% assertSetEqual 0.16% assertGreaterEqual 0.11% assertLessEqual 0.09% assertTupleEqual 0.04% assertSequenceEqual 0.04% assertDictContainsSubset 0.02% assertSequenceEqual is used by the List and Tuple equal functions so its stand alone use isn't that relevant. DictContainsSubset does not appear to be used much. I -did- add casing for the type to the main assertEqual method so it may make sense to make the new type specific methods private so that they're not part of the public API (ie: I agree with pitrou that it seems pointless). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 03:52:02 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 29 Mar 2009 01:52:02 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238291522.72.0.82656201884.issue2578@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Oh for reference, i left these out but they may interest people for completeness sake. assert_ 15% assertTrue 9% assertFalse 5% We don't currently have the auto type checking in assertEqual in our internal codebase, direct use of the type specific methods has been encouraged in the past but that doesn't mean it is the right thing for Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 04:13:38 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 Mar 2009 02:13:38 +0000 Subject: [issue2599] allow field_name in format strings to default to next positional argument (e.g., "{}") In-Reply-To: <1207684265.4.0.956293084225.issue2599@psf.upfronthosting.co.za> Message-ID: <1238292818.91.0.690469096865.issue2599@psf.upfronthosting.co.za> R. David Murray added the comment: This was proposed on python-ideas, discussed, approved, and implemented for 2.7 and 3.1. Note that although this wasn't discussed, the internationalization issue is answered by the fact that when internationalizing, you are rewriting the string. At that time if you need a different order of the subsitutions you can specify it, so requiring non-default numbering in the original string doesn't really buy you anything for internationalization. ---------- nosy: +bitdancer resolution: -> accepted stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.1 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 04:55:56 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 Mar 2009 02:55:56 +0000 Subject: [issue2568] Seconds range in time unit In-Reply-To: <1207551193.66.0.586350051723.issue2568@psf.upfronthosting.co.za> Message-ID: <1238295356.18.0.163078657974.issue2568@psf.upfronthosting.co.za> R. David Murray added the comment: The 'double leap second' issue has been around a long time and is part of the Posix standard (for some background see http://www.ucolick.org/~sla/leapsecs/onlinebib.html, specifically the section named 'Unix system time and the POSIX standard'). This document notes that the double leap second was still in the standard in 1997, and according to Wikipedia that is after the last revision of the standard, so presumably it is still there. Therefore the time documentation of strftime is correct, since my understanding is that time is a wrapper around the Posix time functions. The datetime docs, on the other hand, are misleading in the strftime documentation. I've attached a doc patch to have the note clarify that datetime does not consume or produce leap seconds. ---------- keywords: +easy, patch nosy: +bitdancer priority: -> low stage: -> patch review versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13451/issue2568-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 05:02:09 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 Mar 2009 03:02:09 +0000 Subject: [issue1174606] Reading /dev/zero causes SystemError Message-ID: <1238295729.44.0.610533359866.issue1174606@psf.upfronthosting.co.za> R. David Murray added the comment: Antoine, since your fix also goes into the io module in 2.6, and the buggish behavior even of the old code is more cosmetic than problematic, I'm thinking we can just close this as accepted. Do you concur? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 05:14:08 2009 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 29 Mar 2009 03:14:08 +0000 Subject: [issue2591] ErrorHandler buffer overflow in ?unused? SGI extension module almodule.c In-Reply-To: <1207671213.37.0.514219749989.issue2591@psf.upfronthosting.co.za> Message-ID: <1238296448.05.0.972047584643.issue2591@psf.upfronthosting.co.za> Guido van Rossum added the comment: (Almost) nobody uses these any more, so let's close as won't fix. The SGI modules are removed from 3.0. The few people who still have Irix could probably care less about the buffer overflows, but they *might* care about the modules (otherwise they wouldn't be on Irix :-). ---------- nosy: +gvanrossum resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 06:05:41 2009 From: report at bugs.python.org (Collin Winter) Date: Sun, 29 Mar 2009 04:05:41 +0000 Subject: [issue5588] Add --randseed to regrtest In-Reply-To: <1238266691.91.0.7889256249.issue5588@psf.upfronthosting.co.za> Message-ID: <1238299541.8.0.602275334703.issue5588@psf.upfronthosting.co.za> Collin Winter added the comment: Committed as r70672 (trunk) and r70673 (py3k). Thanks for the quick review. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 09:08:49 2009 From: report at bugs.python.org (Mark Summerfield) Date: Sun, 29 Mar 2009 07:08:49 +0000 Subject: [issue4630] IDLE no longer respects .Xdefaults insertOffTime In-Reply-To: <1228982754.08.0.523311497339.issue4630@psf.upfronthosting.co.za> Message-ID: <1238310529.67.0.293734816815.issue4630@psf.upfronthosting.co.za> Mark Summerfield added the comment: I agree that control of the blink _rate_ isn't needed. I would certainly welcome a "[X] blinking cursor" checkbox that defaulted to being checked so that existing behaviour is unchanged, but at the same time offering an easier solution (i.e., no blinking if the user unchecks & of course saving and restoring this setting with the other IDLE settings) for those of us who can't work with cursor blink instead of forcing us to edit EditWindow.py for every version of Python we install on all our partitions & machines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 09:20:10 2009 From: report at bugs.python.org (Mark Summerfield) Date: Sun, 29 Mar 2009 07:20:10 +0000 Subject: [issue5594] IDLE startup configuration In-Reply-To: <1238311210.52.0.532490988344.issue5594@psf.upfronthosting.co.za> Message-ID: <1238311210.52.0.532490988344.issue5594@psf.upfronthosting.co.za> New submission from Mark Summerfield : My suggestion is to add somewhere in the configuration dialog when users can enter a block of Python code to be executed at startup and whenever Restart Shell is executed. Use case: for people who use IDLE for calculations/experiments they might like to always have certain module imported. For me personally, it would be: import os import re import sys from math import * but of course the whole point is that people can write any code they like. (Some people might want to do various from __future__ imports in Python 2.6 to get various Python 3 features for example.) I know that you can use the -c option, but that only works at startup, not every time you Restart Shell. ---------- components: IDLE messages: 84367 nosy: mark severity: normal status: open title: IDLE startup configuration type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 10:55:57 2009 From: report at bugs.python.org (lekma) Date: Sun, 29 Mar 2009 08:55:57 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238316957.27.0.287943760222.issue5585@psf.upfronthosting.co.za> lekma added the comment: AFAIK there is no equivalent to the managers api in threading. As for the tests, what kind of tests would you like to see? Jesse, some thoughts on that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 11:43:10 2009 From: report at bugs.python.org (Rodolpho Eckhardt) Date: Sun, 29 Mar 2009 09:43:10 +0000 Subject: [issue3427] urllib documentation: urlopen().info() return type In-Reply-To: <1216746335.31.0.451776222673.issue3427@psf.upfronthosting.co.za> Message-ID: <1238319790.16.0.395150165292.issue3427@psf.upfronthosting.co.za> Rodolpho Eckhardt added the comment: I'm including 2.7, as it also has this documentation problem. The rest of the documentation is correct. I know there is still work to be done on Issue 4773, which might affect this doc. ---------- keywords: +patch nosy: +rodolpho versions: +Python 2.7 Added file: http://bugs.python.org/file13452/urllib_doc_2.6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 11:43:35 2009 From: report at bugs.python.org (Rodolpho Eckhardt) Date: Sun, 29 Mar 2009 09:43:35 +0000 Subject: [issue3427] urllib documentation: urlopen().info() return type In-Reply-To: <1216746335.31.0.451776222673.issue3427@psf.upfronthosting.co.za> Message-ID: <1238319815.31.0.475036834328.issue3427@psf.upfronthosting.co.za> Rodolpho Eckhardt added the comment: Patch for 2.7. ---------- Added file: http://bugs.python.org/file13453/urllib_doc_2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 12:40:28 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 29 Mar 2009 10:40:28 +0000 Subject: [issue4630] IDLE no longer respects .Xdefaults insertOffTime In-Reply-To: <1228982754.08.0.523311497339.issue4630@psf.upfronthosting.co.za> Message-ID: <1238323228.7.0.0156628879342.issue4630@psf.upfronthosting.co.za> Guilherme Polo added the comment: Here is a patch. But I'm not feeling comfortable with the option "display": Cursor blink ( ) No blink ( ) Blink Those are radiobuttons. If I opted for a checkbutton then it would be different from everything on the "General" config, still.. ---------- keywords: +patch Added file: http://bugs.python.org/file13454/issue_4630.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 12:52:03 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 29 Mar 2009 10:52:03 +0000 Subject: [issue5576] Don't use PyLong_SHIFT with _PyLong_AsScaledDouble() In-Reply-To: <1238113402.96.0.541162373186.issue5576@psf.upfronthosting.co.za> Message-ID: <1238323923.36.0.349990444103.issue5576@psf.upfronthosting.co.za> STINNER Victor added the comment: Long double (80 bits) exponent is in range [-16382; 16383] and so would fits in an int, unsigned int, size_t or Py_ssize_t. I don't know if a signed or unsigned number is better. I know only one operation on exponents: a-b in PyLong_AsDouble. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 12:58:09 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 29 Mar 2009 10:58:09 +0000 Subject: [issue5006] Duplicate UTF-16 BOM if a file is open in append mode In-Reply-To: <1232407475.88.0.821271875363.issue5006@psf.upfronthosting.co.za> Message-ID: <1238324289.0.0.923146719677.issue5006@psf.upfronthosting.co.za> STINNER Victor added the comment: seek() has also the problem? It's really hard to encode UTF-16/32 correctly... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 13:17:26 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 29 Mar 2009 11:17:26 +0000 Subject: [issue3681] Cannot read saved csv file in a single run In-Reply-To: <1219700325.8.0.911345891687.issue3681@psf.upfronthosting.co.za> Message-ID: <1238325446.47.0.785423684889.issue3681@psf.upfronthosting.co.za> Guilherme Polo added the comment: Closing for lack of interest. Rahul, the bug tracker is a place to provide help not to obtain help. So if you still have the problem mentioned, consider posting to a proper mail list and if you can confirm it is really a bug then create a new issue. ---------- nosy: +gpolo resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 13:21:23 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 29 Mar 2009 11:21:23 +0000 Subject: [issue934418] nametowidget throws TypeError for Tcl_Objs Message-ID: <1238325683.02.0.864304905128.issue934418@psf.upfronthosting.co.za> Guilherme Polo added the comment: This is a duplicate of issue799428, which is already fixed. ---------- nosy: +gpolo resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 13:31:08 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 29 Mar 2009 11:31:08 +0000 Subject: [issue1757831] Allow opening just an editor window Message-ID: <1238326268.07.0.612076810314.issue1757831@psf.upfronthosting.co.za> Changes by Guilherme Polo : ---------- versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 13:38:43 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 29 Mar 2009 11:38:43 +0000 Subject: [issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1 In-Reply-To: <1235679869.5.0.97489087981.issue5377@psf.upfronthosting.co.za> Message-ID: <1238326723.54.0.306166260793.issue5377@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'm still not sure why anyone would care about getting longs > instead of ints back from int(x) It's strange that sometimes we need to write int(int(obj)) to get an integer :-/ I usually use int(x) to convert x to an integer (type 'int' and not 'long'). > (0) Please could you add some tests! done > (1) Shouldn't the first line you added include a check > for res == NULL? segfault... ooops :-) fixed > (2) It looks as though the patched code ends up calling > PyLong_Check twice (...) done See updated patch. ---------- Added file: http://bugs.python.org/file13455/force_int-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 13:39:17 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 29 Mar 2009 11:39:17 +0000 Subject: [issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1 In-Reply-To: <1235679869.5.0.97489087981.issue5377@psf.upfronthosting.co.za> Message-ID: <1238326757.44.0.301488214365.issue5377@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file13455/force_int-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 13:42:15 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 29 Mar 2009 11:42:15 +0000 Subject: [issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1 In-Reply-To: <1235679869.5.0.97489087981.issue5377@psf.upfronthosting.co.za> Message-ID: <1238326935.56.0.712173213811.issue5377@psf.upfronthosting.co.za> STINNER Victor added the comment: (oops, my patch v2 includes an unrelated change) ---------- Added file: http://bugs.python.org/file13456/force_int-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 13:42:19 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 29 Mar 2009 11:42:19 +0000 Subject: [issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1 In-Reply-To: <1235679869.5.0.97489087981.issue5377@psf.upfronthosting.co.za> Message-ID: <1238326939.46.0.150751661953.issue5377@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file13426/force_int.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 13:56:49 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Mar 2009 11:56:49 +0000 Subject: [issue5593] test_math.testFsum failure on release30-maint In-Reply-To: <1238288862.5.0.344212782108.issue5593@psf.upfronthosting.co.za> Message-ID: <1238327809.48.0.238786166455.issue5593@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hmm. I can't reproduce this. Is this a failure that just started happening recently on this particular platform, or is this the first time you ran the math test with this setup? I can't see any recent checkins that could have precipitated this. Could you attach the output of the configure script (just the stdout output, not the config.log)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 14:00:11 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 12:00:11 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1238291212.4.0.487859611052.issue2578@psf.upfronthosting.co.za> Message-ID: <1238328091.6448.2.camel@fsol> Antoine Pitrou added the comment: > I -did- add casing for the type to the main assertEqual method so it may > make sense to make the new type specific methods private so that they're > not part of the public API (ie: I agree with pitrou that it seems > pointless). Well, that's my own aesthetical feeling. Others may disagree :) But I think the public API should stay reasonably compact, so that unit testing doesn't incur a lot of cognitive overhead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 14:01:45 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 12:01:45 +0000 Subject: [issue1174606] Reading /dev/zero causes SystemError Message-ID: <1238328105.64.0.0894205209143.issue1174606@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, it should be backported to 2.6 first, then. (which is not necessarily trivial since a lot of bug fixes in 3.0/3.1 weren't backported to the 2.6/2.7 "io" module, AFAIK) ---------- resolution: -> accepted stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 14:18:35 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 12:18:35 +0000 Subject: [issue5593] test_math.testFsum failure on release30-maint In-Reply-To: <1238288862.5.0.344212782108.issue5593@psf.upfronthosting.co.za> Message-ID: <1238329115.12.0.129818919223.issue5593@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yikes. I can't reproduce it anymore. Perhaps "make distclean" is really necessary when switching a working copy from a 64-bit to a 32-bit build... Sorry for the noise. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 14:39:53 2009 From: report at bugs.python.org (Michael Newman) Date: Sun, 29 Mar 2009 12:39:53 +0000 Subject: [issue5595] os.path.ismount (ntpath) gives UnboundLocalError for any input In-Reply-To: <1238330393.67.0.063983564768.issue5595@psf.upfronthosting.co.za> Message-ID: <1238330393.67.0.063983564768.issue5595@psf.upfronthosting.co.za> New submission from Michael Newman : os.path.ismount gives UnboundLocalError for any input in Python 3.0: Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os.path >>> os.path UnboundLocalError: local variable 'p' referenced before assignment >>> os.path.ismount("C:\\") Traceback (most recent call last): File "", line 1, in File "C:\python30\lib\ntpath.py", line 260, in ismount seps = _get_bothseps(p) UnboundLocalError: local variable 'p' referenced before assignment >>> os.path.ismount("C:\\windows") Traceback (most recent call last): File "", line 1, in File "C:\python30\lib\ntpath.py", line 260, in ismount seps = _get_bothseps(p) UnboundLocalError: local variable 'p' referenced before assignment It works fine in Python 2.6: Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os.path >>> os.path >>> os.path.ismount("C:\\") True >>> os.path.ismount("C:\\windows") False ---------- components: Library (Lib) messages: 84382 nosy: mnewman severity: normal status: open title: os.path.ismount (ntpath) gives UnboundLocalError for any input versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 14:55:35 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Mar 2009 12:55:35 +0000 Subject: [issue5593] test_math.testFsum failure on release30-maint In-Reply-To: <1238288862.5.0.344212782108.issue5593@psf.upfronthosting.co.za> Message-ID: <1238331335.56.0.0635794313121.issue5593@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Sorry for the noise. Not noise. I'd still be interested in understanding where this is coming from; I seem to recall someone else having exactly the same experience (reported bug, then found that it disappeared after a clean compile). My best guess is that you somehow ended up in a situation where the math module was using the x87 FPU for floating-point, while the interpreter core was using SSE2. Is this possible? Explanation: the x87 FPU has problems with double rounding (because it uses 80-bit extended precision registers internally) while SSE2 doesn't. fsum is a bit broken on systems with double rounding problems. So there's a pair of lines in testFsum that look like: if 1e16+2.0 != 1e16+2.9999: return These lines are supposed to skip all these tests on platforms with the double rounding problem. But if the core is using SSE2 then the test will fail and all the fsum tests will be executed, which is a problem if fsum is using x87. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 14:56:28 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 29 Mar 2009 12:56:28 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1238331388.52.0.921217500482.issue2953@psf.upfronthosting.co.za> Georg Brandl added the comment: I can't find a reference to _zip_directory_cache in distutils. Do you mean setuptools? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 14:57:25 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 29 Mar 2009 12:57:25 +0000 Subject: [issue2966] pydoc doesnt show 'from module import identifier' in the docs In-Reply-To: <1211710902.46.0.335827912868.issue2966@psf.upfronthosting.co.za> Message-ID: <1238331445.53.0.733081840482.issue2966@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 14:58:49 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Mar 2009 12:58:49 +0000 Subject: [issue5593] test_math.testFsum failure on release30-maint In-Reply-To: <1238288862.5.0.344212782108.issue5593@psf.upfronthosting.co.za> Message-ID: <1238331529.1.0.440261958445.issue5593@psf.upfronthosting.co.za> Mark Dickinson added the comment: Found the other report of this: see issue 3421. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 14:59:20 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 29 Mar 2009 12:59:20 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1238331560.19.0.958221628125.issue2986@psf.upfronthosting.co.za> Georg Brandl added the comment: Tim, I think you've had some enlightening comments about difflib issues in the past. ---------- assignee: -> tim_one nosy: +georg.brandl, tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 15:00:42 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Mar 2009 13:00:42 +0000 Subject: [issue3421] Test failure in test_math::testSum In-Reply-To: <1216593413.69.0.163323698649.issue3421@psf.upfronthosting.co.za> Message-ID: <1238331642.73.0.0950697732333.issue3421@psf.upfronthosting.co.za> Mark Dickinson added the comment: See also issue 5593. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 15:02:55 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Mar 2009 13:02:55 +0000 Subject: [issue5593] test_math.testFsum failure on release30-maint In-Reply-To: <1238288862.5.0.344212782108.issue5593@psf.upfronthosting.co.za> Message-ID: <1238331775.83.0.23337702669.issue5593@psf.upfronthosting.co.za> Mark Dickinson added the comment: > My best guess is that you somehow ended up in a situation where the math > module was using the x87 FPU for floating-point, while the interpreter > core was using SSE2. Is this possible? I should also have said that this would fit with the 32-bit/64-bit stuff: I *think* it's true that for gcc on Linux, in the absence of compiler flags, a 64-bit build defaults to using SSE2 while a 32-bit build defaults to x87. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 15:04:06 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 29 Mar 2009 13:04:06 +0000 Subject: [issue5595] os.path.ismount (ntpath) gives UnboundLocalError for any input In-Reply-To: <1238330393.67.0.063983564768.issue5595@psf.upfronthosting.co.za> Message-ID: <1238331846.84.0.00587971607047.issue5595@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70676. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 15:09:14 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 13:09:14 +0000 Subject: [issue5593] test_math.testFsum failure on release30-maint In-Reply-To: <1238288862.5.0.344212782108.issue5593@psf.upfronthosting.co.za> Message-ID: <1238332154.63.0.603448548442.issue5593@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > My best guess is that you somehow ended up in a situation where the math > module was using the x87 FPU for floating-point, while the interpreter > core was using SSE2. Is this possible? > That would be the reverse, since this occurred on a 32-bit build, i.e. the interpreter core was using x87. But I don't understand how a 64-bit module could be loaded by a 32-bit executable (I did check that sys.maxsize was 2**31 - 1). > fsum is a bit broken on systems with double rounding problems. So there's > a pair of lines in testFsum that look like: > > if 1e16+2.0 != 1e16+2.9999: > return Wouldn't it be a problem with stale pyc files then? The result of each addition is stored as a constant when the code is compiled. Note how the constants arrays differ: 64-bit: >>> def f(): ... return 1e16+2.9999 ... >>> dis.dis(f) 2 0 LOAD_CONST 3 (10000000000000002.0) 3 RETURN_VALUE >>> zlib.crc32(marshal.dumps(f.__code__.co_consts)) 2292868100 32-bit: >>> def f(): ... return 1e16+2.9999 ... >>> dis.dis(f) 2 0 LOAD_CONST 3 (10000000000000004.0) 3 RETURN_VALUE >>> zlib.crc32(marshal.dumps(f.__code__.co_consts)) 103113703 ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 15:15:04 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 29 Mar 2009 13:15:04 +0000 Subject: [issue694339] Dedenting with Shift+Tab Message-ID: <1238332504.68.0.21201729358.issue694339@psf.upfronthosting.co.za> Guilherme Polo added the comment: Patch added for allowing, and defining, Shift-Tab as the default binding for dedenting. The problem is that dedent-region may do more than one would expect. ---------- keywords: +patch nosy: +gpolo versions: +Python 2.7, Python 3.1 -Python 2.6 Added file: http://bugs.python.org/file13457/common_dedent.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 15:16:11 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 29 Mar 2009 13:16:11 +0000 Subject: [issue1562092] IDLE: Dedent with Italian keyboard Message-ID: <1238332571.29.0.545192652873.issue1562092@psf.upfronthosting.co.za> Guilherme Polo added the comment: Closing in favour of 694339. ---------- resolution: -> duplicate status: open -> closed superseder: -> Dedenting with Shift+Tab _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 15:20:42 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Mar 2009 13:20:42 +0000 Subject: [issue5593] test_math.testFsum failure on release30-maint In-Reply-To: <1238288862.5.0.344212782108.issue5593@psf.upfronthosting.co.za> Message-ID: <1238332842.25.0.83399575823.issue5593@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Wouldn't it be a problem with stale pyc files then? Hah! Yes! That seems entirely likely. So what sequence of moves does one have to go through to reproduce this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 15:25:53 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Mar 2009 13:25:53 +0000 Subject: [issue5588] Add --randseed to regrtest In-Reply-To: <1238266691.91.0.7889256249.issue5588@psf.upfronthosting.co.za> Message-ID: <1238333153.38.0.611033385757.issue5588@psf.upfronthosting.co.za> Mark Dickinson added the comment: Should this get a Misc/NEWS entry? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 15:36:49 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 13:36:49 +0000 Subject: [issue5593] test_math.testFsum failure on release30-maint In-Reply-To: <1238332842.25.0.83399575823.issue5593@psf.upfronthosting.co.za> Message-ID: <1238333889.6448.55.camel@fsol> Antoine Pitrou added the comment: > > Wouldn't it be a problem with stale pyc files then? > > Hah! Yes! That seems entirely likely. > > So what sequence of moves does one have to go through > to reproduce this? I suppose: first run "-m test.regrtest -v test_math" in 64-bit mode, then rebuild in 32-bit mode (*) without doing "make (dist)clean", then run "-m test.regrtest -v test_math" again (in 32-bit mode). (*) CC="gcc -m32" ./configure ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 15:46:55 2009 From: report at bugs.python.org (Maciek Fijalkowski) Date: Sun, 29 Mar 2009 13:46:55 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1238334415.94.0.0184709019818.issue2953@psf.upfronthosting.co.za> Maciek Fijalkowski added the comment: Seems I meant setuptools indeed. Note that brett's importlib contains some tests for _zip_directory_cache. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:00:06 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 Mar 2009 14:00:06 +0000 Subject: [issue2593] alp_ReadFrames() integer overflow leads to buffer overflow In-Reply-To: <1207671509.18.0.228221414786.issue2593@psf.upfronthosting.co.za> Message-ID: <1238335206.62.0.389011388651.issue2593@psf.upfronthosting.co.za> R. David Murray added the comment: Closed per comments in issue2591. ---------- nosy: +bitdancer resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:01:32 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 Mar 2009 14:01:32 +0000 Subject: [issue2594] alp_readsamps() overflow leads to memory corruption in ?unused? SGI extension module almodule.c In-Reply-To: <1207672303.58.0.550731547679.issue2594@psf.upfronthosting.co.za> Message-ID: <1238335292.03.0.555275575398.issue2594@psf.upfronthosting.co.za> R. David Murray added the comment: closed per comments in issue2591. ---------- nosy: +bitdancer resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:02:46 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 29 Mar 2009 14:02:46 +0000 Subject: [issue2995] Idle, some Linuxes, cannot position Cursor by mouseclick In-Reply-To: <1211995180.72.0.174580651078.issue2995@psf.upfronthosting.co.za> Message-ID: <1238335366.31.0.708739204518.issue2995@psf.upfronthosting.co.za> Guilherme Polo added the comment: Uhm, I have compiled python-trunk in this Mandriva 2009 now and it works! I didn't change tcl/tk version, just installed the dev packages in order to compile _tkinter. I still don't know how what kind of changes were done by Mandriva in order to achieve this problem, but I believe this is an issue that will not be solved here. Given this bug is not so old, I expect some of the initial posters to still be around. Any chance you can ask someone at Sugar to try compiling python from source and test if the bug persists ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:11:20 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Mar 2009 14:11:20 +0000 Subject: [issue5593] test_math.testFsum failure on release30-maint In-Reply-To: <1238288862.5.0.344212782108.issue5593@psf.upfronthosting.co.za> Message-ID: <1238335880.27.0.570661092551.issue5593@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks, Antoine! Yes, I can now reproduce the testFsum failure on my MacBook Pro (OS X 10.5.6/x86_64, with Apple's gcc 4.0.1) using the following sequence of commands: (I tested this for the trunk, but I py3k should be just the same). make distclean CC="gcc -arch x86_64" ./configure && make ./python.exe -m test.regrtest -v test_math rm Parser/*.o CC="gcc -mfpmath=387" ./configure && make ./python.exe -m test.regrtest -v test_math (the rm is necessary to avoid a 'wrong architecture' build failure). It might be worth making the tests a bit more robust here; I'll take a look. On the other hand, there are plans to replace fsum with a double-rounding-friendly version. ---------- assignee: -> marketdickinson components: +Extension Modules -Interpreter Core stage: -> needs patch versions: +Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:15:47 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 14:15:47 +0000 Subject: [issue5593] test_math.testFsum failure on release30-maint In-Reply-To: <1238288862.5.0.344212782108.issue5593@psf.upfronthosting.co.za> Message-ID: <1238336147.68.0.440864505168.issue5593@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think it would be sufficient to invoke the addition through a helper function, that is: def add(x, y): return x + y if add(1e16, 2.0) != add(1e16, 2.9999): return Also, instead of "return", you might use the new "raise unittest.SkipTest('some message')". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:19:48 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 14:19:48 +0000 Subject: [issue5596] memory leaks in 3.1 In-Reply-To: <1238336388.84.0.581148968517.issue5596@psf.upfronthosting.co.za> Message-ID: <1238336388.84.0.581148968517.issue5596@psf.upfronthosting.co.za> New submission from Antoine Pitrou : A couple of tests exhibit some memory leaks in the py3k branch (when invoked with "-R 3:2"). test_asyncore leaked [-78, 0] references, sum=-78 test_fileio leaked [1, 1] references, sum=2 test_httpservers leaked [-210, 157] references, sum=-53 test_socket leaked [8, 210] references, sum=218 test_urllib2 leaked [227, 227] references, sum=454 test_urllib2_localnet leaked [5, 4] references, sum=9 I'm filing this as critical so that we keep track of it, but it doesn't look severe in itself (ISTR we actually had more leaks in 3.0). ---------- components: Extension Modules, Interpreter Core messages: 84403 nosy: pitrou priority: critical severity: normal stage: needs patch status: open title: memory leaks in 3.1 type: resource usage versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:21:21 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 Mar 2009 14:21:21 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238336481.73.0.974928993169.issue5585@psf.upfronthosting.co.za> R. David Murray added the comment: Right, it's just the Thread/Process API equivalance. I'm not saying it's a stopper, but the docs would probably need to be modified accordingly. As for tests, even just one that would prove that the method will be called and do something trivial would be a good thing to have, IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:23:33 2009 From: report at bugs.python.org (Matthias Klose) Date: Sun, 29 Mar 2009 14:23:33 +0000 Subject: [issue5591] global symbols in shared libpython not prefixed with Py or _Py In-Reply-To: <1238277425.36.0.0359778681116.issue5591@psf.upfronthosting.co.za> Message-ID: <1238336613.54.0.274031531351.issue5591@psf.upfronthosting.co.za> Matthias Klose added the comment: sorry, forgot to add these ... _add_one_to_index_C _add_one_to_index_F asdl_int_seq_new asdl_seq_new ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:32:48 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 Mar 2009 14:32:48 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238337168.02.0.810504246854.issue5585@psf.upfronthosting.co.za> R. David Murray added the comment: By the way, in case it isn't clear, I defer to Jesse on whether or not it makes sense to accept this :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:33:01 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 14:33:01 +0000 Subject: [issue5591] global symbols in shared libpython not prefixed with Py or _Py In-Reply-To: <1238277425.36.0.0359778681116.issue5591@psf.upfronthosting.co.za> Message-ID: <1238337181.6.0.83491861574.issue5591@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks like this is a duplicate of #4555 actually :) ---------- resolution: -> duplicate status: open -> closed superseder: -> Smelly exports _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:33:27 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 14:33:27 +0000 Subject: [issue4555] Smelly exports In-Reply-To: <1228526950.62.0.716618083363.issue4555@psf.upfronthosting.co.za> Message-ID: <1238337207.05.0.0223970588251.issue4555@psf.upfronthosting.co.za> Antoine Pitrou added the comment: #5591 is a duplicate of this. ---------- nosy: +doko, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:33:38 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 14:33:38 +0000 Subject: [issue3101] global function _add_one_to_index_C In-Reply-To: <1213342220.87.0.7161073703.issue3101@psf.upfronthosting.co.za> Message-ID: <1238337218.48.0.97163890004.issue3101@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:33:43 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 14:33:43 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238337223.91.0.52393033386.issue5585@psf.upfronthosting.co.za> Jesse Noller added the comment: I know, but tests (like the ones you outlined) would also make it more compelling ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:35:00 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 14:35:00 +0000 Subject: [issue5261] with lock fails on multiprocessing In-Reply-To: <1234637534.63.0.0578864534082.issue5261@psf.upfronthosting.co.za> Message-ID: <1238337300.37.0.0702867521324.issue5261@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:35:15 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 14:35:15 +0000 Subject: [issue5573] multiprocessing Pipe poll() and recv() semantics. In-Reply-To: <1238096312.97.0.564685442594.issue5573@psf.upfronthosting.co.za> Message-ID: <1238337315.94.0.0169168036937.issue5573@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:35:32 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 14:35:32 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238337332.47.0.775263575364.issue5585@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:35:42 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 14:35:42 +0000 Subject: [issue5574] multiprocessing queues.py doesn't include JoinableQueue in its __all__ list In-Reply-To: <1238099248.59.0.559630696158.issue5574@psf.upfronthosting.co.za> Message-ID: <1238337342.1.0.431108254114.issue5574@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:35:53 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 14:35:53 +0000 Subject: [issue5501] Update multiprocessing docs re: freeze_support In-Reply-To: <1237312904.73.0.910184118935.issue5501@psf.upfronthosting.co.za> Message-ID: <1238337353.91.0.937823131457.issue5501@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:37:58 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 14:37:58 +0000 Subject: [issue5228] multiprocessing not compatible with functools.partial In-Reply-To: <1234448790.05.0.305625917638.issue5228@psf.upfronthosting.co.za> Message-ID: <1238337478.44.0.448842352269.issue5228@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:38:08 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 14:38:08 +0000 Subject: [issue5155] Multiprocessing.Queue created by sub-process fails when used in sub-sub-process ("bad file descriptor" in q.get()) In-Reply-To: <1233798773.64.0.357189782395.issue5155@psf.upfronthosting.co.za> Message-ID: <1238337488.94.0.849384385611.issue5155@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:38:33 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 14:38:33 +0000 Subject: [issue5331] multiprocessing hangs when Pool used within Process In-Reply-To: <1235146028.47.0.682929217877.issue5331@psf.upfronthosting.co.za> Message-ID: <1238337513.42.0.767454280028.issue5331@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 16:39:17 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 14:39:17 +0000 Subject: [issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close() In-Reply-To: <1235020872.08.0.0158488308351.issue5313@psf.upfronthosting.co.za> Message-ID: <1238337557.3.0.193252785404.issue5313@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 17:07:02 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Mar 2009 15:07:02 +0000 Subject: [issue532631] Confusions in formatfloat Message-ID: <1238339222.72.0.555340019744.issue532631@psf.upfronthosting.co.za> Mark Dickinson added the comment: I've replaced the fabs(x) / 1e25 >= 1e25 test with fabs(x) >= 1e50 in r70678. On IEEE 754 systems, assuming round-to-nearest, these two tests have identical meaning. I've also fixed the docs, replacing 1e25 by 1e50. Is there a good reason for '%.100f'% 1e49 to raise OverflowError (rather than providing the requested 100 places after the decimal point), other than implementation convenience? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 17:38:39 2009 From: report at bugs.python.org (Andreas Schawo) Date: Sun, 29 Mar 2009 15:38:39 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1238341119.08.0.457321747336.issue5463@psf.upfronthosting.co.za> Andreas Schawo added the comment: Yes you're right. The TypeError should be an OverflowError. It was just the copy and paste thing. Hm, I also wondering why struct.error is used. But someone already wanted to change this. The patch looks fine. Do you want to go ahead with the float coercion thing? Maybe I'll find some time the next week to care about. I think there's no hurry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 17:44:33 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 15:44:33 +0000 Subject: [issue5162] multiprocessing cannot spawn child from a Windows service In-Reply-To: <1233885632.9.0.0484597105973.issue5162@psf.upfronthosting.co.za> Message-ID: <1238341473.33.0.387516309476.issue5162@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 17:45:02 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 15:45:02 +0000 Subject: [issue5177] multiprocessing: SocketListener should use SO_REUSEADDR In-Reply-To: <1234015984.6.0.0454721510443.issue5177@psf.upfronthosting.co.za> Message-ID: <1238341502.77.0.49635593809.issue5177@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 17:45:10 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 15:45:10 +0000 Subject: [issue5400] patches for multiprocessing module on NetBSD In-Reply-To: <1235945240.08.0.454455099363.issue5400@psf.upfronthosting.co.za> Message-ID: <1238341510.56.0.127499399237.issue5400@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 17:45:56 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 29 Mar 2009 15:45:56 +0000 Subject: [issue3735] allow multiple threads to efficiently send the same requests to a processing.Pool without incurring duplicate processing In-Reply-To: <1220051229.09.0.236623735385.issue3735@psf.upfronthosting.co.za> Message-ID: <1238341556.89.0.414311719593.issue3735@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 17:59:22 2009 From: report at bugs.python.org (Tal Einat) Date: Sun, 29 Mar 2009 15:59:22 +0000 Subject: [issue1757057] IDLE + BeautifulSoup = Error Message-ID: <1238342362.29.0.506569372271.issue1757057@psf.upfronthosting.co.za> Tal Einat added the comment: To recreate use BeautifulSoup 3.0.4 and run the following: >>> from BeautifulSoup import BeautifulSoup >>> soup = BeautifulSoup("aa>> x = soup.find('html').contents[0] >>> x u'aa' >>> print x Traceback (most recent call last): File "", line 1, in print x RuntimeError: maximum recursion depth exceeded This is caused by a bug in BeautifulSoup which was fixed in version 3.0.5. The bug manifests when trying to pickle an instance of the NavigableString class. In the above scenario, IDLE has the subprocess pickle the object and send it to the parent process. Since the problem is with the pickling, turning the object into a string in the subprocess (instead of sending it as-is to the parent process) avoids generating the error: >>> print str(x) aa >>> print repr(x) u'aa' To verify that pickle is the culprit: >>> import pickle >>> pickle.dumps(x) (very long traceback...) RuntimeError: maximum recursion depth exceeded Like I said in my first post, IMO IDLE should check for any exception (not just pickle.PicklingError) when trying to pickle an object for sending to the parent process. If pickle doesn't work, for whatever reason, IDLE can still try to work around it with str() and/or repr(). (I tried this with Python 2.5 but I've tested this in the past with 2.6 as well. I haven't tried it with 3.0 or 2.7 yet.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 18:13:55 2009 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 29 Mar 2009 16:13:55 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238343235.4.0.585437036124.issue2578@psf.upfronthosting.co.za> Guido van Rossum added the comment: The naming pattern (assertListEqual, assertDictEqual, etc.) is pretty easy to pick up so I don't think the addition of several new methods is a big deal. Making assertEqual() do the right thing all the time is hard if there are subclasses that might override __eq__ or do other tricks, so I am glad that Greg only put the simplest test possible in assertEqual. And I would still want to have a way to explicit *disable* that in case I am comparing containers with millions of items. New assertions like assertSameElements, assertDictContainsSubset or assertMultilineEqual are not things that can be guessed, and they *are* useful. The names are also trivial to understand when reading tests that someone else wrote, so I am not so worried about the cognitive effort. I would rather start deprecating the fail* variants and use assertTrue in favor of assert_, and settle the question of whether to prefer assertEqual vs. assertEquals (the former, please). Finally, a simple refactoring of the code might be helpful where the preferred name for each function is actually the name used in the 'def' for it, so that tracebacks involving such assertions show the preferred names, and so that their definitions can be found by searching the code for e.g. "def assertEqual". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 18:17:50 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Mar 2009 16:17:50 +0000 Subject: [issue532631] Confusions in formatfloat Message-ID: <1238343470.88.0.146085728587.issue532631@psf.upfronthosting.co.za> Mark Dickinson added the comment: The worst-case length calculations look fine to me, except that on a system with sizeof(int) == 8 (yes, they do exist!) the precision could end up being more than 10 digits. I've added a check for that in r70682. The docs also already mention the %f -> %g conversion, so I think all Tim's points have been addressed. ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 19:02:08 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Mar 2009 17:02:08 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1238346128.35.0.903848333482.issue5463@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks again, Andreas. Applied in r70688. There's no particular hurry on removing the float coercion, except that I'd like to get it in before the first 3.1 beta. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 19:18:26 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 Mar 2009 17:18:26 +0000 Subject: [issue2522] locale.format() problems with decimal separator In-Reply-To: <1206983289.11.0.844443108334.issue2522@psf.upfronthosting.co.za> Message-ID: <1238347106.54.0.281194598269.issue2522@psf.upfronthosting.co.za> R. David Murray added the comment: It occured to me last night that it could be checked using a regular expression, and indeed the locale module already has a regular expression that matches percent codes. I've uploaded a patch that uses this regex to fix this issue. I've removed 2.6 and 3.0 as this change could break existing code that is misusing format. I added georg.brandl to the nosy list since svn blame shows him as the author of the code being modified. ---------- nosy: +georg.brandl priority: -> low resolution: wont fix -> stage: committed/rejected -> patch review status: pending -> open versions: -Python 2.6, Python 3.0 Added file: http://bugs.python.org/file13458/issue2522.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 19:41:13 2009 From: report at bugs.python.org (Petr Dolezal) Date: Sun, 29 Mar 2009 17:41:13 +0000 Subject: [issue5597] inspect.formatargspec crashes on missing kwonlydefaults In-Reply-To: <1238348473.08.0.854037190303.issue5597@psf.upfronthosting.co.za> Message-ID: <1238348473.08.0.854037190303.issue5597@psf.upfronthosting.co.za> New submission from Petr Dolezal : inspect.formatargspec is not able to handle functions with keyword only arguments without the default values (probably rare, but still allowed). This has also impact on help command which is then unable to show proper help page for such functions. Offending function examples: def fun1(arg, defarg=None, *args, kwonly): """Some documentation.""" return arg, defarg, args, kwonly def fun2(arg, defarg=None, *, kwonly): """Some documentation.""" return arg, defarg, kwonly The fix is easy: 897c897 < if kwonlyarg in kwonlydefaults: --- > if kwonlydefaults and kwonlyarg in kwonlydefaults: For the test following code snippet taken from help module (or help) can be used: import inspect def trybug(fun): args, varargs, varkw, defaults, kwonlyargs, kwdefaults, ann = \ inspect.getfullargspec(fun) argspec = inspect.formatargspec( args, varargs, varkw, defaults, kwonlyargs, kwdefaults, ann, formatannotation=inspect.formatannotationrelativeto(object)) ---------- components: Library (Lib) messages: 84417 nosy: petr.dolezal severity: normal status: open title: inspect.formatargspec crashes on missing kwonlydefaults type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 19:43:13 2009 From: report at bugs.python.org (Matthias Sommer) Date: Sun, 29 Mar 2009 17:43:13 +0000 Subject: [issue2995] Idle, some Linuxes, cannot position Cursor by mouseclick In-Reply-To: <1238335366.31.0.708739204518.issue2995@psf.upfronthosting.co.za> Message-ID: <49CFB32C.7030003@gmxpro.de> Matthias Sommer added the comment: Guilherme Polo wrote: I am the originator of this issue, and I'm back here. So I can add some text. I remember having read comments on this issue striking on other linuxes too. But I do not remember anymore what distibutions this were. I switched my Python development to windows (or to be true, I did not switch from windows to linux as intended at the office). At home I switched the Distribution first to Gentoo and lately to Ubuntu. These both work fine. So I am out here in fact. Regards Matthias Sommer ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 19:59:30 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 29 Mar 2009 17:59:30 +0000 Subject: [issue5597] inspect.formatargspec crashes on missing kwonlydefaults In-Reply-To: <1238348473.08.0.854037190303.issue5597@psf.upfronthosting.co.za> Message-ID: <1238349570.31.0.216714495609.issue5597@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This was fixed in r68647 and will appear in 3.0.2 and 3.1. ---------- nosy: +benjamin.peterson resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 20:09:27 2009 From: report at bugs.python.org (Retro) Date: Sun, 29 Mar 2009 18:09:27 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1238350167.18.0.12224183759.issue5390@psf.upfronthosting.co.za> Retro added the comment: I think this is an easy fix. Please try to fix this issue. Thank you. ---------- versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 20:33:47 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 29 Mar 2009 18:33:47 +0000 Subject: [issue5596] memory leaks in 3.1 In-Reply-To: <1238336388.84.0.581148968517.issue5596@psf.upfronthosting.co.za> Message-ID: <1238351627.03.0.380051570988.issue5596@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I hope attached patch will fix test_fileio leak. ---------- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file13459/py3k_fix_leak_of_fileio.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 20:38:21 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 29 Mar 2009 18:38:21 +0000 Subject: [issue5596] memory leaks in 3.1 In-Reply-To: <1238336388.84.0.581148968517.issue5596@psf.upfronthosting.co.za> Message-ID: <1238351901.78.0.277668680979.issue5596@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I hope attached patch will fix leak of test_socket.py. Leak is happening in FileObjectClassTestCase#testFullRead and testCloseAfterMakefile. (actually, IOBase#readall) ---------- Added file: http://bugs.python.org/file13460/py3k_fix_leak_of_test_socket.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 20:41:33 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 18:41:33 +0000 Subject: [issue5596] memory leaks in 3.1 In-Reply-To: <1238336388.84.0.581148968517.issue5596@psf.upfronthosting.co.za> Message-ID: <1238352093.4.0.72787314402.issue5596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Applied in r70690, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 20:48:59 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Mar 2009 18:48:59 +0000 Subject: [issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1 In-Reply-To: <1235679869.5.0.97489087981.issue5377@psf.upfronthosting.co.za> Message-ID: <1238352539.52.0.545614911182.issue5377@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks, Victor A couple of things: - I'm getting a test failure in test_class - you should probably be using sys.maxint rather than sys.maxsize: the two aren't necessarily the same. (E.g., on 64-bit windows, I believe that sys.maxint is 2**31-1 while sys.maxsize is 2**63-1). - This still doesn't fix the case of int(Fraction(2L)). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 21:49:28 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 29 Mar 2009 19:49:28 +0000 Subject: [issue1757057] IDLE + BeautifulSoup = Error In-Reply-To: <1238342362.29.0.506569372271.issue1757057@psf.upfronthosting.co.za> Message-ID: Guilherme Polo added the comment: > IMO IDLE should check for any exception > (not just pickle.PicklingError) when trying to pickle an object for > sending to the parent process. If pickle doesn't work, for whatever > reason, IDLE can still try to work around it with str() and/or repr(). > Do you have some specific suggestion on how to do so ? As I'm seeing it rpc.SocketIO.putmessage would return a custom exception when a PicklingError doesn't happen, which then PyShell.ModifiedInterpreter.runcode could handle and decide to run the code object locally. Sounds unpleasant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 21:49:56 2009 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 29 Mar 2009 19:49:56 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238356196.89.0.949346422551.issue2578@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 21:54:18 2009 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 29 Mar 2009 19:54:18 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238356458.79.0.9117730774.issue2578@psf.upfronthosting.co.za> Skip Montanaro added the comment: Personally, I would prefer it if unittest got rid of all the various ways to spell "assert" and just let test cases use the assert statement. I use nose for most of my stuff which supports/allows use of the assert statement. I think my test cases are better for it. (crap, crap, crap. I was scrolling through the messages and my finger slid off the button on my laptop. I pressed it again without really looking. I didn't realize the mouse was no longer over the scrollbar's thumb and, too late, saw that I had clicked the Remove button of this message "msg84360". I hope I clicked the cancel button soon enough. If not, can it be "unremoved" programmatically? I have the text of the message if need be.) ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 21:55:32 2009 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 29 Mar 2009 19:55:32 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238356532.52.0.928907717043.issue2578@psf.upfronthosting.co.za> Skip Montanaro added the comment: Just in case it can't be retrieved, here is Greg's text from msg84360: -------------------------------- Oh for reference, i left these out but they may interest people for completeness sake. assert_ 15% assertTrue 9% assertFalse 5% We don't currently have the auto type checking in assertEqual in our internal codebase, direct use of the type specific methods has been encouraged in the past but that doesn't mean it is the right thing for Python. ------------------------------------------- Again, my apologies. Skip ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 22:24:23 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 Mar 2009 20:24:23 +0000 Subject: [issue2625] mailbox.MH.get_message() treats result of get_sequences() as list of tuples In-Reply-To: <1208023131.05.0.0270197595247.issue2625@psf.upfronthosting.co.za> Message-ID: <1238358263.04.0.546644886439.issue2625@psf.upfronthosting.co.za> R. David Murray added the comment: Patch with test attached. ---------- keywords: +easy, patch nosy: +bitdancer stage: -> patch review versions: +Python 2.6, Python 2.7, Python 3.1 -Python 2.5 Added file: http://bugs.python.org/file13461/issue2625.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 22:33:35 2009 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 29 Mar 2009 20:33:35 +0000 Subject: [issue5545] multiprocessing: switch to autoconf detection of platform values In-Reply-To: <1237828557.72.0.911819794631.issue5545@psf.upfronthosting.co.za> Message-ID: <1238358815.12.0.696869255066.issue5545@psf.upfronthosting.co.za> Roumen Petrov added the comment: Cchristian it is not about random idea. It is how to write simple readable and correct autoconf script. Compare my check for functions (see attached bootstrap.sh) with you. Also some of macros in you patch are marked as obsolete. $ CC=g++ ./bootstrap.sh ... #define HAVE_SEM_OPEN 1 #define HAVE_SEM_OPEN_XXX 0 #define HAVE_SEM_OPEN_YYY 0 #define HAVE_SEM_TIMEDWAIT 1 ... So you propose check that fail in some cases. ---------- Added file: http://bugs.python.org/file13462/bootstrap.sh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 22:45:07 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 29 Mar 2009 20:45:07 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238291522.72.0.82656201884.issue2578@psf.upfronthosting.co.za> Guilherme Polo added the comment: Oh for reference, i left these out but they may interest people for completeness sake. assert_ 15% assertTrue 9% assertFalse 5% We don't currently have the auto type checking in assertEqual in our internal codebase, direct use of the type specific methods has been encouraged in the past but that doesn't mean it is the right thing for Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 22:46:07 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 29 Mar 2009 20:46:07 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238359567.16.0.386038564446.issue2578@psf.upfronthosting.co.za> Guilherme Polo added the comment: Skip: bugs.python.org/issueXXXX?@action=edit&@add at messages=MSGNUM This "Remove" button... :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 23:13:57 2009 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 29 Mar 2009 21:13:57 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238361237.26.0.232501474372.issue2578@psf.upfronthosting.co.za> Guido van Rossum added the comment: I would love to use the time machine to kill the 'fail' variants as well as 'assert_'. However they are in use and we don't want to break people's tests. Breaking tests is painful. And there are a lots of tests. So we'll have to support them for a long, long time. Maybe we can stop documenting them in 3.1 (this would also require changing things so that the 'def' lines all use the 'assert' variants). Then maybe we can start deprecating them in 3.2 and 3.3, and perhaps remove them in 3.4. I recommend we let 2.x alone, but 2to3 should fix all these. (And don't worry, Skip, somebody already put that message back. You can click on the link to deleted items in the History section at the bottom of the issue.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 23:33:18 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 29 Mar 2009 21:33:18 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1238361237.26.0.232501474372.issue2578@psf.upfronthosting.co.za> Message-ID: <1afaf6160903291433l2a11dd10te11de6d852bea3c3@mail.gmail.com> Benjamin Peterson added the comment: 2009/3/29 Guido van Rossum : > > Guido van Rossum added the comment: > > I would love to use the time machine to kill the 'fail' variants as well > as 'assert_'. ?However they are in use and we don't want to break > people's tests. ?Breaking tests is painful. ?And there are a lots of > tests. ?So we'll have to support them for a long, long time. ?Maybe we > can stop documenting them in 3.1 (this would also require changing > things so that the 'def' lines all use the 'assert' variants). ?Then > maybe we can start deprecating them in 3.2 and 3.3, and perhaps remove > them in 3.4. ?I recommend we let 2.x alone, but 2to3 should fix all these. Yes, actually this would be a great secondary use of 2to3's infrastructure, and I think it could be done quite correctly because people usually don't have many custom methods named failUnlessEqual() etc. Besides, they're tests, so people would know if they're broken. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 23:42:18 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Mar 2009 21:42:18 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1238362938.36.0.970997186173.issue2531@psf.upfronthosting.co.za> Mark Dickinson added the comment: Removing easy keyword, since I don't think it applies here. The problem here is hashing: either we break the rule that if two objects compare equal then they hash equal, or we fix hash so that e.g., hash(Decimal('2.5')) == hash(2.5). For the latter, the least invasive way to do it would be to fix only the Decimal __hash__ method. For that, we really need a Decimal -> float conversion, so that we can do something like (for a Decimal x): if x == Decimal.from_float(x.to_float()): return hash(x.to_float()) [rest of hash method here] The builtin float() (which converts a Decimal to a string and then uses the standard C library's string -> float conversion) probably isn't good enough for this, since there are no requirements that it should be (even close to) correctly rounded. The bottom line: getting a correctly-rounded Decimal -> float method, without knowing what the float format is, is going to be hard. If we assume IEEE 754 then it's much easier. ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 23:46:40 2009 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 29 Mar 2009 21:46:40 +0000 Subject: [issue5584] json.loads(u'3.14') fails unexpectedly (minor scanner bug) In-Reply-To: <1238219615.73.0.707210951472.issue5584@psf.upfronthosting.co.za> Message-ID: <1238363200.26.0.278790208786.issue5584@psf.upfronthosting.co.za> Changes by Bob Ippolito : ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 23:54:29 2009 From: report at bugs.python.org (harobed) Date: Sun, 29 Mar 2009 21:54:29 +0000 Subject: [issue5598] "paths" argument missing in DocFileSuite documentation In-Reply-To: <1238363669.79.0.212822428061.issue5598@psf.upfronthosting.co.za> Message-ID: <1238363669.79.0.212822428061.issue5598@psf.upfronthosting.co.za> New submission from harobed : This is DocFileSuite function source code (http://svn.python.org/view/python/trunk/Lib/doctest.py) : :: def DocFileSuite(*paths, **kw): """A unittest suite for one or more doctest files. The path to each doctest file is given as a string; the interpretation of that string depends on the keyword argument "module_relative". A number of options may be provided as keyword arguments: This is DocFileSuite documentation (http://svn.python.org/view/python/trunk/Doc/library/doctest.rst) : :: .. function:: DocFileSuite([module_relative][, package][, setUp][, tearDown][, globs][, optionflags][, parser][, encoding]) Convert doctest tests from one or more text files to a :class:`unittest.TestSuite`. The returned :class:`unittest.TestSuite` is to be run by the unittest framework and runs the interactive examples in each file. If an example in any file fails, then the synthesized unit test fails, and a :exc:`failureException` exception is raised showing the name of the file containing the test and a (sometimes approximate) line number. Pass one or more paths (as strings) to text files to be examined. I think "paths" argument missing in this documentation. Regards, Stephane ---------- assignee: georg.brandl components: Documentation messages: 84434 nosy: georg.brandl, harobed severity: normal status: open title: "paths" argument missing in DocFileSuite documentation versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 29 23:59:34 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 29 Mar 2009 21:59:34 +0000 Subject: [issue5337] Scanner class in re module undocumented In-Reply-To: <1235235366.45.0.579114073683.issue5337@psf.upfronthosting.co.za> Message-ID: <1238363974.95.0.193014818519.issue5337@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm sure people are already rely on the intimate details of this class, so why not? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 00:01:34 2009 From: report at bugs.python.org (Tal Einat) Date: Sun, 29 Mar 2009 22:01:34 +0000 Subject: [issue1757057] IDLE + BeautifulSoup = Error Message-ID: <1238364094.7.0.485215180018.issue1757057@psf.upfronthosting.co.za> Tal Einat added the comment: Sending a code object back to the parent process and having it deal with the situation sounds very unpleasant indeed! I think a completely different type of solution may be possible. In general, I can't think of any reason for IDLE to pickle "user objects" from the subprocess and send them to the parent process; it should merely send back the output (as strings), with special cases for exceptions and such. By "user objects" I mean objects "inside the interpreter", as opposed to those used by IDLE itself. I'll have to unwind the spaghetti in rpc.py, run.py and PyShell.py a bit more to propose a specific set of changes; I hope to get to that tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 00:14:02 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Mar 2009 22:14:02 +0000 Subject: [issue5596] memory leaks in 3.1 In-Reply-To: <1238336388.84.0.581148968517.issue5596@psf.upfronthosting.co.za> Message-ID: <1238364842.42.0.859881613235.issue5596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The only remaining leaks now are: test_urllib2 leaked [227, 227] references, sum=454 test_urllib2_localnet leaked [3, 3] references, sum=6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 00:23:37 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Sun, 29 Mar 2009 22:23:37 +0000 Subject: [issue3829] Tuple comparison masking exception In-Reply-To: <1221078780.65.0.750398332014.issue3829@psf.upfronthosting.co.za> Message-ID: <1238365417.02.0.932421656483.issue3829@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: I don't think the compare is actually masking an exception. The set type defines a tp_richcompare routine that gets called when comparing them as members of a tuple, but the set type also defines a tp_compare routine that does nothing but raise an exception. Another side effect is that sets are comparable using < etc., but not with cmp(): >>> s0 = frozenset(['testing 0']) >>> s1 = frozenset(['testing 1']) >>> s0 < s1 False >>> cmp(s0, s1) Traceback (most recent call last): File "", line 1, in ? TypeError: cannot compare sets using cmp() cmp() is gone in 3.0.1 so I've removed Python 3.0 from the versions. I'm not sure why tp_compare and tp_richcompare work differently. Maybe Raymond could shed some light? ---------- nosy: +rhettinger, stutzbach versions: +Python 2.7 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 00:33:15 2009 From: report at bugs.python.org (Steven Bethard) Date: Sun, 29 Mar 2009 22:33:15 +0000 Subject: [issue5563] Document bdist_msi In-Reply-To: <1238023978.65.0.898272761153.issue5563@psf.upfronthosting.co.za> Message-ID: <1238365995.28.0.270541620301.issue5563@psf.upfronthosting.co.za> Steven Bethard added the comment: I'm thinking of stealing/condensing some of the text from here: http://www.dcl.hpi.uni-potsdam.de/home/loewis/msipackage.html Does that seem okay? Is any of that text no longer accurate? (E.g. does bdist_wininst now support Win64?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 00:35:24 2009 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 29 Mar 2009 22:35:24 +0000 Subject: [issue5584] json.loads(u'3.14') fails unexpectedly (minor scanner bug) In-Reply-To: <1238219615.73.0.707210951472.issue5584@psf.upfronthosting.co.za> Message-ID: <1238366124.1.0.402275896251.issue5584@psf.upfronthosting.co.za> Bob Ippolito added the comment: trunk fix for 2.7 is in r70702 -- unsure about how to port this to 3.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 00:37:56 2009 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 29 Mar 2009 22:37:56 +0000 Subject: [issue5381] json needs object_pairs_hook In-Reply-To: <1235723876.26.0.796036500228.issue5381@psf.upfronthosting.co.za> Message-ID: <1238366276.3.0.943085864181.issue5381@psf.upfronthosting.co.za> Bob Ippolito added the comment: I fixed two problems with this that didn't show up in the test suite, this feature didn't work in load() and there was a problem with the pure python code path because the Python scanner needed a small change. Unfortunately I'm not sure how to best test the pure python code path with Python's test suite, but I ran across it when backporting to simplejson. r70702 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 00:42:01 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Sun, 29 Mar 2009 22:42:01 +0000 Subject: [issue4295] closing stdout in a child process on cygwin means that process doesn't receive bytes from stdin anymore. I think. In-Reply-To: <1226357832.32.0.219991496484.issue4295@psf.upfronthosting.co.za> Message-ID: <1238366521.72.0.28518427411.issue4295@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: I created a simple parent/child pair using subprocess under cygwin and Python 2.5 and for me closing stdout did not affect stdin. It would appear the problem is caused by something else? ---------- nosy: +stutzbach Added file: http://bugs.python.org/file13463/parent.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 00:42:11 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Sun, 29 Mar 2009 22:42:11 +0000 Subject: [issue4295] closing stdout in a child process on cygwin means that process doesn't receive bytes from stdin anymore. I think. In-Reply-To: <1226357832.32.0.219991496484.issue4295@psf.upfronthosting.co.za> Message-ID: <1238366531.59.0.466216135709.issue4295@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : Added file: http://bugs.python.org/file13464/child.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 01:13:31 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 29 Mar 2009 23:13:31 +0000 Subject: [issue2755] IDLE ignores module change before restart In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za> Message-ID: <1238368411.73.0.0863632307695.issue2755@psf.upfronthosting.co.za> Guilherme Polo added the comment: Is there any reason to keep this open ? It is not a IDLE bug, the title is misleading, and a solution has been provided for the problem related to how Ubuntu packages IDLE. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Mon Mar 30 01:16:29 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sun, 29 Mar 2009 23:16:29 +0000 Subject: [issue5563] Document bdist_msi In-Reply-To: <1238023978.65.0.898272761153.issue5563@psf.upfronthosting.co.za> Message-ID: <1238368589.05.0.270058553651.issue5563@psf.upfronthosting.co.za> Martin v. L?wis added the comment: That should all be correct still (except that the status has advanced); using it for the documentation is fine. It's just that it is more rationale than specification. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 01:45:09 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 29 Mar 2009 23:45:09 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1238370309.56.0.0330689304835.issue3959@psf.upfronthosting.co.za> Gregory P. Smith added the comment: benjamin.peterson mentioned this in his whats new in 3.1 lightning talk at pycon today and completely by chance, I had made showing a couple examples of ipaddr the topic of my own lightning talk ~30 minutes later. :) Anyways I hope to commit this for 3.1 and 2.7 during the python-dev sprints this week after we get some sphinx .rst style documentation written up (I'll base it off the wiki). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 02:40:17 2009 From: report at bugs.python.org (Mike Rotondo) Date: Mon, 30 Mar 2009 00:40:17 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1238373617.86.0.827612993155.issue2986@psf.upfronthosting.co.za> Mike Rotondo added the comment: >From the source, it seems that there is undocumented behavior to SequenceMatcher which is causing this error. If b is longer than 200 characters, it will consider any element x in b that takes up more than 1% of it's contents as "popular", and thus junk. So, in this case, difflib is treating each individual digit as an element of your sequences, and each one takes up more than 1% of the complete sequence b. Therefore, each one is "popular", and therefore ignored. A snippet which demonstrates this: from difflib import SequenceMatcher for i in range(1, 202)[::10]: a = "a" * i b = "b" + "a" * i s = SequenceMatcher(None, a, b) print s.find_longest_match(0, len(a), 0, len(b)) Up til i=200, the strings match, but afterwards they do not because "a" is "popular". Strangely, if you get rid of the "b" at the beginning of b, they continue to match at lengths greater than 200. This may be a bug, I'll keep looking into it but someone who knows more should probably take a look too. The comments from difflib.py say some interesting things: # b2j also does not contain entries for "popular" elements, meaning # elements that account for more than 1% of the total elements, and # when the sequence is reasonably large (>= 200 elements); this can # be viewed as an adaptive notion of semi-junk, and yields an enormous # speedup when, e.g., comparing program files with hundreds of # instances of "return NULL;" This seems to mean that you won't actually get an accurate diff in certain cases, which seems odd. At the very least, this behavior should probably be documented. Do people think it should be changed to get rid of the "popularity" heuristic? ---------- nosy: +mrotondo versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 02:55:34 2009 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 30 Mar 2009 00:55:34 +0000 Subject: [issue5337] Scanner class in re module undocumented In-Reply-To: <1235235366.45.0.579114073683.issue5337@psf.upfronthosting.co.za> Message-ID: <1238374534.69.0.8703627095.issue5337@psf.upfronthosting.co.za> Matthew Barnett added the comment: FYI, I did tidy up the class and add a 'scaniter' method when I was working on issue #2636; it might yet see the light of day if it gets the go ahead! ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 03:07:23 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 30 Mar 2009 01:07:23 +0000 Subject: [issue2560] removal of stale code from myreadline.c In-Reply-To: <1207447225.31.0.495506522061.issue2560@psf.upfronthosting.co.za> Message-ID: <1238375243.2.0.835648092758.issue2560@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: This patch looks good to me and applies cleanly to the trunk. Here's a synopsis of the code (before the patch) in question: static int my_fgets(char *buf, int len, FILE *fp) { for(;;) { /* a bunch of code that does not contain break or continue */ return -2; } } The patch removes the extraneous for loop and un-indents the inside of the loop. However, the patch changes that section of code to use 4-space indents while the rest of the file uses 8-space indents. ---------- nosy: +stutzbach versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 03:33:31 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 30 Mar 2009 01:33:31 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1238373617.86.0.827612993155.issue2986@psf.upfronthosting.co.za> Message-ID: R. David Murray added the comment: On Mon, 30 Mar 2009 at 00:40, Mike Rotondo wrote: > This seems to mean that you won't actually get an accurate diff in > certain cases, which seems odd. At the very least, this behavior should > probably be documented. Do people think it should be changed to get rid > of the "popularity" heuristic? A better way, I think, would be to provide a way to turn it off (and then document it, of course). ---------- nosy: +bitdancer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 03:51:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 01:51:03 +0000 Subject: [issue1332732] Incorrect use of -L/usr/lib/termcap Message-ID: <1238377863.26.0.174193094829.issue1332732@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- resolution: -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 03:51:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 01:51:04 +0000 Subject: [issue1234328] 'insufficient disk space' message wrong (msi on win xp pro) Message-ID: <1238377864.5.0.121972291534.issue1234328@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing on lack of response, uncommon use case. ---------- resolution: -> rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 03:51:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 01:51:08 +0000 Subject: [issue1412448] Compile under mingw properly Message-ID: <1238377868.68.0.571561481745.issue1412448@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing on lack of response. ---------- resolution: -> rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 03:51:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 01:51:19 +0000 Subject: [issue1447945] Unable to stringify datetime with tzinfo Message-ID: <1238377879.65.0.9419921451.issue1447945@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing: this is about 3rd party not following a documented API. ---------- resolution: -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 03:51:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 01:51:28 +0000 Subject: [issue1488906] endless loop in PyCFunction_Fini() Message-ID: <1238377888.33.0.668983973407.issue1488906@psf.upfronthosting.co.za> Daniel Diniz added the comment: Marked as fixed downstream, so closing. ---------- resolution: -> out of date status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 03:52:37 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 01:52:37 +0000 Subject: [issue1276509] 2.4.1 make fails on Solaris 10 (complexobject.c/HUGE_VAL) Message-ID: <1238377957.47.0.56774306585.issue1276509@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing on lack of response. This issue is also addressed in pymath.h's comments. ---------- resolution: -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 03:53:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 01:53:28 +0000 Subject: [issue1119626] patches to compile for AIX 4.1.x Message-ID: <1238378008.58.0.937712812892.issue1119626@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- resolution: -> out of date status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 03:56:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 01:56:34 +0000 Subject: [issue1351020] PythonD DJGPP-specific patch set for porting to DOS. Message-ID: <1238378194.85.0.976364454349.issue1351020@psf.upfronthosting.co.za> Daniel Diniz added the comment: Leaving open, then :) ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:03:07 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 30 Mar 2009 02:03:07 +0000 Subject: [issue5599] test_email_codecs is skipped because it fails to import TestSkipped from test_support In-Reply-To: <1238378587.61.0.473582086133.issue5599@psf.upfronthosting.co.za> Message-ID: <1238378587.61.0.473582086133.issue5599@psf.upfronthosting.co.za> New submission from R. David Murray : Recently (maybe within the last couple days) on the 2.7 trunk test_email_codecs has started to get skipped: rdmurray at partner:~/python/trunk>./python -m test.regrtest test_email_codecs test_email_codecs test_email_codecs skipped -- cannot import name TestSkipped 1 test skipped: test_email_codecs 1 skip unexpected on linux2: test_email_codecs ---------- components: Library (Lib) keywords: easy messages: 84456 nosy: benjamin.peterson, bitdancer priority: normal severity: normal stage: needs patch status: open title: test_email_codecs is skipped because it fails to import TestSkipped from test_support type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:04:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 02:04:08 +0000 Subject: [issue1571184] Generate numeric/space/linebreak from Unicode database. Message-ID: <1238378648.59.0.305900219209.issue1571184@psf.upfronthosting.co.za> Daniel Diniz added the comment: I believe this one is out of date, but without a sample test to check verifying is harder... ---------- nosy: +ajaksu2 stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:04:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 02:04:52 +0000 Subject: [issue1571170] Some numeric characters are still not recognized Message-ID: <1238378692.94.0.564821981351.issue1571170@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +Generate numeric/space/linebreak from Unicode database. stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:16:08 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 30 Mar 2009 02:16:08 +0000 Subject: [issue5599] test_email_codecs is skipped because it fails to import TestSkipped from test_support In-Reply-To: <1238378587.61.0.473582086133.issue5599@psf.upfronthosting.co.za> Message-ID: <1238379368.24.0.269124492443.issue5599@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70703. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:28:55 2009 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 30 Mar 2009 02:28:55 +0000 Subject: [issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths In-Reply-To: <1227071866.1.0.995372704707.issue4352@psf.upfronthosting.co.za> Message-ID: <1238380135.29.0.616044274773.issue4352@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I can reproduce this problem on Windows Vista, fresh py3k sources. Looks like bug occurs only with Latin-1 characters. At least Cyrillic works ok. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:29:29 2009 From: report at bugs.python.org (Mitchell Model) Date: Mon, 30 Mar 2009 02:29:29 +0000 Subject: [issue5600] Slight inaccuracy in webbrowser documentation In-Reply-To: <1238380169.52.0.082922809662.issue5600@psf.upfronthosting.co.za> Message-ID: <1238380169.52.0.082922809662.issue5600@psf.upfronthosting.co.za> New submission from Mitchell Model : The sentence introducing "Browser Controller Objects" in the documentation of the webbrowser module says that the methods parallel two of the module's convenience functions; it's really three. ---------- assignee: georg.brandl components: Documentation messages: 84460 nosy: MLModel, georg.brandl severity: normal status: open title: Slight inaccuracy in webbrowser documentation versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:31:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 02:31:52 +0000 Subject: [issue1562308] uninitialized memory read in parsetok() Message-ID: <1238380312.27.0.705846212991.issue1562308@psf.upfronthosting.co.za> Daniel Diniz added the comment: Seems to be the same as issue 3367, but Kristj?n forgot his repro case there. ---------- dependencies: +Uninitialized value read in parsetok.c nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:32:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 02:32:52 +0000 Subject: [issue3367] Uninitialized value read in parsetok.c In-Reply-To: <1216153264.95.0.467111480464.issue3367@psf.upfronthosting.co.za> Message-ID: <1238380372.97.0.261665016174.issue3367@psf.upfronthosting.co.za> Daniel Diniz added the comment: According to issue 1562308, "exec ''" is enough to reproduce this. ---------- nosy: +ajaksu2 stage: -> test needed versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:33:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 02:33:01 +0000 Subject: [issue1563079] code.InteractiveConsole() and closed sys.stdout Message-ID: <1238380381.81.0.00793585469872.issue1563079@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk, works fine on py3k. ---------- keywords: +easy, patch nosy: +ajaksu2 priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:33:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 02:33:32 +0000 Subject: [issue1565071] update Lib/plat-linux2/IN.py Message-ID: <1238380412.99.0.0198887433934.issue1565071@psf.upfronthosting.co.za> Daniel Diniz added the comment: IN.py on trunk still lacks IN.SIOCGIFADDR (mentioned by the linked bug's OP). Present SIOC* in IN.py: SIOCSPGRP = 0x8902 SIOCGPGRP = 0x8904 SIOCATMARK = 0x8905 SIOCGSTAMP = 0x8906 ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:33:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 02:33:39 +0000 Subject: [issue1565509] Repair or Change installation error Message-ID: <1238380419.61.0.18495691814.issue1565509@psf.upfronthosting.co.za> Daniel Diniz added the comment: If Greg's diagnostic is correct, then it's either a WFM (uncommon use case) or a matter of hard-coding the installer file name. Closing as WFM, reopen if necessary. ---------- nosy: +ajaksu2 priority: normal -> low resolution: -> works for me stage: -> test needed status: open -> closed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:33:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 02:33:47 +0000 Subject: [issue1566260] Better order in file type descriptions Message-ID: <1238380427.14.0.70168608144.issue1566260@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:34:17 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 02:34:17 +0000 Subject: [issue1566331] Bad behaviour in .obuf* Message-ID: <1238380457.81.0.294341008416.issue1566331@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:34:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 02:34:27 +0000 Subject: [issue1569040] Speed up using + for string concatenation Message-ID: <1238380467.0.0.706784652845.issue1569040@psf.upfronthosting.co.za> Daniel Diniz added the comment: IIRC, this was rejected as part of a larger string views proposal. Leaving open so that current performance optimizers can take a look at this :) ---------- nosy: +ajaksu2 priority: normal -> low type: -> performance versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:43:56 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 30 Mar 2009 02:43:56 +0000 Subject: [issue1569040] Speed up using + for string concatenation Message-ID: <1238381036.91.0.760806319824.issue1569040@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm rejecting this because previous string "views" have been rejected. ---------- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:49:45 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 30 Mar 2009 02:49:45 +0000 Subject: [issue5600] Slight inaccuracy in webbrowser documentation In-Reply-To: <1238380169.52.0.082922809662.issue5600@psf.upfronthosting.co.za> Message-ID: <1238381385.48.0.737835387542.issue5600@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70704. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 04:59:18 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 30 Mar 2009 02:59:18 +0000 Subject: [issue3154] "Quick search" box renders too wide if font size is large In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1238381958.88.0.355412302162.issue3154@psf.upfronthosting.co.za> R. David Murray added the comment: I confirm that this happens with FF 3.0.6 on Gentoo Linux if I press the + (zoom) key enough times (the page otherwise looks good, but the search box pokes out of the margin box and overlays text in the content area). At even larger font sizes it becomes apparent that there is insufficient gutter between content columns, as well. Definitely low priority, but it would be nice to fix it. ---------- keywords: +easy nosy: +bitdancer priority: -> low resolution: works for me -> stage: -> needs patch status: pending -> open title: "Quick search" box renders too long on FireFox 3 -> "Quick search" box renders too wide if font size is large type: -> behavior versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:08:07 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:08:07 +0000 Subject: [issue1554133] PyOS_InputHook() and related API funcs. not documented Message-ID: <1238382487.33.0.892021709433.issue1554133@psf.upfronthosting.co.za> Daniel Diniz added the comment: The only mention I can find is in Misc/HISTORY: When the interpreter shell is invoked interactively, it attempts to import the readline module; when this fails, the default input mechanism is used. The hook variables are PyOS_InputHook and PyOS_ReadlineFunctionPointer. ---------- nosy: +ajaksu2 type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:08:16 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:08:16 +0000 Subject: [issue1555842] email package and Unicode strings handling Message-ID: <1238382496.43.0.246781247446.issue1555842@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:08:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:08:22 +0000 Subject: [issue1557490] 2.5c1 Core dump during 64-bit make on Solaris 9 Sparc Message-ID: <1238382502.9.0.353499259316.issue1557490@psf.upfronthosting.co.za> Daniel Diniz added the comment: Rejecting this on lack of feedback, likelihood of being a compiler problem and being solvable by a different order of 64bit libraries in LD_LIBRARY_PATH. ---------- nosy: +ajaksu2 resolution: -> rejected stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:08:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:08:28 +0000 Subject: [issue1558802] Tru64 make install failure Message-ID: <1238382508.84.0.982326432235.issue1558802@psf.upfronthosting.co.za> Daniel Diniz added the comment: Ralf, Chris, is this still an issue? Feedback from issue 727732 makes me believe this is a pretty ancient platform, so I'll close this if no interested parties voice their opposition. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:08:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:08:38 +0000 Subject: [issue1559298] test_popen fails on Windows if installed to "Program Files" Message-ID: <1238382518.99.0.30702316232.issue1559298@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tests stage: -> patch review type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:08:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:08:47 +0000 Subject: [issue1559549] ImportError needs attributes for module and file name Message-ID: <1238382527.73.0.712096349099.issue1559549@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +brett.cannon stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:08:57 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:08:57 +0000 Subject: [issue1560032] confusing error msg from random.randint Message-ID: <1238382537.49.0.273615737735.issue1560032@psf.upfronthosting.co.za> Daniel Diniz added the comment: I'll close this as won't fix unless someone wants to fix this. ---------- nosy: +ajaksu2 status: open -> pending type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:09:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:09:06 +0000 Subject: [issue1560794] strftime('%z') behaving differently with/without time arg. Message-ID: <1238382546.48.0.955694876696.issue1560794@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as issue 1667546 is much more advanced (patch and discussion). ---------- dependencies: +time.strftime() %z error nosy: +ajaksu2 resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Time zone-capable variant of time.localtime type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:19:57 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 30 Mar 2009 03:19:57 +0000 Subject: [issue1584] Mac OS X: building with X11 Tkinter In-Reply-To: <1197345898.75.0.132866639605.issue1584@psf.upfronthosting.co.za> Message-ID: <1238383197.27.0.321301814377.issue1584@psf.upfronthosting.co.za> R. David Murray added the comment: Reopening since additional feedback was provided clarifying the request. How does this request interact with the business about building the Mac installer with a local tk installed? Does the fact that that does something useful mean that this request is in fact out of date? Looking at the setup.py comments, I suspect not. ---------- nosy: +bitdancer resolution: out of date -> status: pending -> open type: behavior -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:22:57 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:22:57 +0000 Subject: [issue1544102] ctypes unit test fails (test_macholib.py) under MacOS 10.4.7 Message-ID: <1238383377.89.0.485521946326.issue1544102@psf.upfronthosting.co.za> Daniel Diniz added the comment: reedobrien: can you still reproduce the problem? I'll close this issue unless we can confirm it's still present. ---------- components: +Tests, ctypes nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:23:07 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:23:07 +0000 Subject: [issue1546442] subprocess.Popen can't read file object as stdin after seek Message-ID: <1238383387.24.0.221116136268.issue1546442@psf.upfronthosting.co.za> Daniel Diniz added the comment: Not a bug, leaving open for the doc RFE (but suggest closing anyway). ---------- components: +Documentation -Library (Lib) nosy: +ajaksu2 priority: normal -> low type: -> feature request versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:23:15 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:23:15 +0000 Subject: [issue1547300] Wireless on Python Message-ID: <1238383395.65.0.894867815983.issue1547300@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing on lack of response. FWIW, for this RFE to have any chance at all it'd (at the very least) need a much better description of goals, use cases and benefits of having it included in the standard library. ---------- nosy: +ajaksu2 resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:23:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:23:23 +0000 Subject: [issue1553166] python 2.5 install can't find tcl/tk in /usr/lib64 Message-ID: <1238383403.81.0.560077717333.issue1553166@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as duplicate of issue 1294959. ---------- nosy: +ajaksu2 resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Problems with /usr/lib64 builds. type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:23:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:23:28 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1238383408.7.0.716577776422.issue1553375@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:23:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:23:39 +0000 Subject: [issue1553819] Class instance apparently not destructed when expected Message-ID: <1238383419.54.0.390767343867.issue1553819@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as invalid. If someone wants to salvage the doc RFE, please reopen. ---------- nosy: +ajaksu2 resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:42:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:42:04 +0000 Subject: [issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell Message-ID: <1238384524.61.0.693709403821.issue1542677@psf.upfronthosting.co.za> Daniel Diniz added the comment: This is about a disparity between IDLE and the python shell. I'm guessing different encodings are to blame here and that this is invalid. The disparity is present in an UCS4 build (IDLE shows UCS2-like behavior[1], maybe because it's using UTF8?). [1] http://mail.python.org/pipermail/python-dev/2008-July/080886.html ---------- nosy: +ajaksu2 title: IDLE shell doesn't accept non ascii char input -> IDLE shell gives different len() of unicode strings compared to Python shell versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:42:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:42:11 +0000 Subject: [issue1543467] test_tempfile fails on cygwin Message-ID: <1238384531.73.0.924730486373.issue1543467@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as WFM, reopen if you'd like to address the alternative way of calling test_tempfile. ---------- nosy: +ajaksu2 resolution: -> works for me stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:42:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:42:20 +0000 Subject: [issue1543469] test_subprocess fails on cygwin Message-ID: <1238384540.32.0.923590900865.issue1543469@psf.upfronthosting.co.za> Daniel Diniz added the comment: Can anyone confirm this? It'll be closed soon otherwise. ---------- components: +Tests keywords: +patch nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:46:17 2009 From: report at bugs.python.org (Mitchell Model) Date: Mon, 30 Mar 2009 03:46:17 +0000 Subject: [issue5601] webbrowser doesn't just open browsers In-Reply-To: <1238384777.3.0.774822780209.issue5601@psf.upfronthosting.co.za> Message-ID: <1238384777.3.0.774822780209.issue5601@psf.upfronthosting.co.za> New submission from Mitchell Model : There is a problem with the documentation of the webbrowser module: opening a URL doesn't necessarily open it in a browser. The documentation of the open function and method should say that the URL is opened in whatever application the system chooses based on considerations such as the type of URL, an application assigned to the file, and the application assigned to the file's type (extension). Here's why: The documentation of module webbrowser, as well as the name of the module itself, only mentions browsers as what opens the given URL. However, on some platforms (Mac OS X, e.g.) if things are configured so there is a default application associated with a particular file extension, the webbrowser functions will open a path to a file in the application associated with it's file type rather than a browser. This is true whether or not "file://" precedes the file path in the "URL". For example, if .py files are set to open in IDLE, webbrowser.open('/fullpath/to/file.py') will open /fullpath/to/file.py in IDLE. It's even possible to assign one browser to open .htm files and another to open .html files. It is also possible on some platforms (Mac, again) to assign a default application to files of a particular extension but assign a different application to specific files with that extension. Applications can also be assigned to URL types. For instance, you could have an application that isn't really a browser open ftp:// URLs. (This also can happen when you download a file from a browser and the task is turned over to a download application such as Speed Download or Interarchy on a Mac.) The real problem here is that some platforms have extended the idea of opening a URL (including a bare file path interpreted as a file:// URL) beyond browsers per se. In a sense the entire terminology of this module is suspect, despite its obvious intent. Although not a serious suggestion, it would more accurately be termed the urlopen module. ---------- assignee: georg.brandl components: Documentation messages: 84485 nosy: MLModel, georg.brandl severity: normal status: open title: webbrowser doesn't just open browsers versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:51:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:51:52 +0000 Subject: [issue1538691] Patch cElementTree to export CurrentLineNumber Message-ID: <1238385112.06.0.15160142213.issue1538691@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +XML -None stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:52:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:52:05 +0000 Subject: [issue1540112] Allow choice of copy function in shutil.copytree Message-ID: <1238385125.84.0.699201528818.issue1540112@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:52:15 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:52:15 +0000 Subject: [issue1542432] python-2.5c1.msi contains ICE validation errors and warnings Message-ID: <1238385135.07.0.099991238245.issue1542432@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as the build is now based on a different VS version, with new project files, and there was no evidence this ever caused real problems. ---------- nosy: +ajaksu2 resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 05:52:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 03:52:23 +0000 Subject: [issue1542544] Improve dynamic linking support on AIX Message-ID: <1238385143.67.0.357691441257.issue1542544@psf.upfronthosting.co.za> Daniel Diniz added the comment: G?ran: do you still need this? ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:02:59 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 30 Mar 2009 04:02:59 +0000 Subject: [issue1730372] Mesa with NPTL makes Python extensions crash with std::cerr Message-ID: <1238385779.19.0.505908045326.issue1730372@psf.upfronthosting.co.za> Changes by R. David Murray : Added file: http://bugs.python.org/file13465/spam.cc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:14:34 2009 From: report at bugs.python.org (Steven Bethard) Date: Mon, 30 Mar 2009 04:14:34 +0000 Subject: [issue5563] Document bdist_msi In-Reply-To: <1238023978.65.0.898272761153.issue5563@psf.upfronthosting.co.za> Message-ID: <1238386474.19.0.958283560315.issue5563@psf.upfronthosting.co.za> Steven Bethard added the comment: The original docs request was for a rationale for using bdist_msi instead of bdist_wininst, but you're right there should be something at least a little specification-y. And we probably want to keep it pretty short, so maybe something like:: .. class: distutils.command.build_bdist_msi.bdist_msi(Command) Builds a `Microsoft Installer`_ (.msi) binary package. .. _Microsoft Installer: http://msdn.microsoft.com/en-us/library/cc185688(VS.85).aspx In most cases, the bdist_msi installer is a better choice than the bdist_wininst installer, because it provides better support for Win64 platforms, allows administrators to perform non-interactive installations, and allows installation through group policies. I'm on the fence as to whether or not to include the URL to the MSI info. That's probably as close to a specification as we can get, but it's probably unnecessary for 99% of the people who might read the bdist_msi docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:17:08 2009 From: report at bugs.python.org (Mitchell Model) Date: Mon, 30 Mar 2009 04:17:08 +0000 Subject: [issue5602] Slight punctuation problem in documentation of urllib.request.urlopen In-Reply-To: <1238386628.28.0.265769634027.issue5602@psf.upfronthosting.co.za> Message-ID: <1238386628.28.0.265769634027.issue5602@psf.upfronthosting.co.za> New submission from Mitchell Model : In the documentation of the urllib.request module, the function urllib.request.urlretrieve is shown with parameters: (url[, data][, timeout]) Shouldn't the right bracket after 'data' be after 'timeout'? ---------- assignee: georg.brandl components: Documentation messages: 84489 nosy: MLModel, georg.brandl severity: normal status: open title: Slight punctuation problem in documentation of urllib.request.urlopen versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:22:20 2009 From: report at bugs.python.org (Mitchell Model) Date: Mon, 30 Mar 2009 04:22:20 +0000 Subject: [issue5603] Garbled sentence in documentation of urllib.request.urlopen In-Reply-To: <1238386940.02.0.317505088908.issue5603@psf.upfronthosting.co.za> Message-ID: <1238386940.02.0.317505088908.issue5603@psf.upfronthosting.co.za> New submission from Mitchell Model : The middle sentence of the last paragraph of the documentation of urllib.request.urlopen is garbled, reading: "The urlopen function from the previous version, Python 2.6 and earlier, of the module urllib has been discontinued as urlopen can return the file-object as the previous." Perhaps the easiest way to say what is intended is "urllib.request.urlopen replaces the function urllib.urlopen from versions of Python before 3.0". ---------- assignee: georg.brandl components: Documentation messages: 84490 nosy: MLModel, georg.brandl severity: normal status: open title: Garbled sentence in documentation of urllib.request.urlopen versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:22:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:22:23 +0000 Subject: [issue1531505] distutils 'register' command and windows home directories Message-ID: <1238386943.97.0.239992083621.issue1531505@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as the patch from issue 1858 was committed. ---------- nosy: +ajaksu2 resolution: -> fixed stage: -> committed/rejected status: open -> closed superseder: -> Make .pypirc handle multiple servers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:22:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:22:34 +0000 Subject: [issue1531775] HTTPSConnection request hangs Message-ID: <1238386954.72.0.348136163071.issue1531775@psf.upfronthosting.co.za> Daniel Diniz added the comment: This needs a test case reproducing the 'unexpected close'. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:22:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:22:44 +0000 Subject: [issue1531859] Tracing and profiling functions can cause hangs in threads Message-ID: <1238386964.2.0.929185027166.issue1531859@psf.upfronthosting.co.za> Daniel Diniz added the comment: The supplied test case passes for me (Linux, trunk). ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:22:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:22:55 +0000 Subject: [issue1533105] NetBSD build with --with-pydebug causes SIGSEGV Message-ID: <1238386975.21.0.942862240612.issue1533105@psf.upfronthosting.co.za> Daniel Diniz added the comment: Hirokazu-san, does this still happen in 2.6? ---------- assignee: -> georg.brandl components: +Tests keywords: +patch nosy: +ajaksu2, georg.brandl stage: -> patch review type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:23:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:23:06 +0000 Subject: [issue1533493] Tools/modulator does not exist (ext 1.4) Message-ID: <1238386986.61.0.955011714023.issue1533493@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low type: -> feature request versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:23:17 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:23:17 +0000 Subject: [issue1533520] Allow thread(ing) tests to pass without setting stack size Message-ID: <1238386997.38.0.404682240666.issue1533520@psf.upfronthosting.co.za> Daniel Diniz added the comment: The relevant tests were converted to unittest and don't rely Lib/test/output/test_thread anymore. I'll close this unless someone wants to salvage tests from the patch. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> patch review status: open -> pending type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:23:30 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:23:30 +0000 Subject: [issue1534738] Win32 debug version of _msi creates _msi.pyd, not _msi_d.pyd Message-ID: <1238387010.54.0.650946018575.issue1534738@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing due to msi build changes in 2.6, reopen if this is still valid. ---------- nosy: +ajaksu2 resolution: -> out of date stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:23:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:23:42 +0000 Subject: [issue1536339] "make install" doesn't install to /usr/lib64 on x86_64 boxes Message-ID: <1238387022.04.0.428524494565.issue1536339@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as a duplicate of issue 1294959. ---------- nosy: +ajaksu2 resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Problems with /usr/lib64 builds. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:23:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:23:50 +0000 Subject: [issue1537721] csv module: add header row to DictWriter Message-ID: <1238387030.83.0.770888549927.issue1537721@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:23:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:23:56 +0000 Subject: [issue1538556] PyThreadState_SetAsyncExc bug Message-ID: <1238387036.51.0.159999693086.issue1538556@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is this still valid? I recall some discussions about raising exceptions in another thread and don't think the use case is supported. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:24:33 2009 From: report at bugs.python.org (Steven Bethard) Date: Mon, 30 Mar 2009 04:24:33 +0000 Subject: [issue5095] msi missing from "bdist --help-formats" In-Reply-To: <1233198350.56.0.182108150047.issue5095@psf.upfronthosting.co.za> Message-ID: <1238387073.82.0.144159485479.issue5095@psf.upfronthosting.co.za> Steven Bethard added the comment: The following 2 line patch adds "msi" to the list of formats (patch against py3k trunk). I'm pretty sure this is all that it takes, but I'd appreciate if someone with more distutils experience could glance at it. ---------- keywords: +needs review Added file: http://bugs.python.org/file13466/python-3.x-help-formats-msi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:35:25 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:35:25 +0000 Subject: [issue1528167] Tweak to make string.Templates more customizable Message-ID: <1238387725.68.0.251260110905.issue1528167@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review type: -> feature request versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:35:30 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:35:30 +0000 Subject: [issue1528593] Printing: No print dialog or page setup Message-ID: <1238387730.23.0.456847196568.issue1528593@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +gpolo stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:35:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:35:32 +0000 Subject: [issue1528363] forward in turtle module may cause incorrect display Message-ID: <1238387732.26.0.518321856277.issue1528363@psf.upfronthosting.co.za> Daniel Diniz added the comment: Cannot confirm on Linux/trunk. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:35:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:35:33 +0000 Subject: [issue1529353] Squeezer - squeeze large output in the interpreter Message-ID: <1238387733.97.0.24851912322.issue1529353@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +gpolo stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:35:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:35:44 +0000 Subject: [issue1530012] Literal strings use BS as octal escape character Message-ID: <1238387744.72.0.395348794969.issue1530012@psf.upfronthosting.co.za> Daniel Diniz added the comment: Invalid as bug, keeping open for the doc RFE. ---------- assignee: -> georg.brandl components: +Documentation -Interpreter Core nosy: +ajaksu2, georg.brandl priority: normal -> low stage: -> needs patch type: -> feature request versions: +Python 2.6, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:35:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:35:49 +0000 Subject: [issue1531415] parsetok.c emits warnings by writing to stderr Message-ID: <1238387749.14.0.24078564086.issue1531415@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +brett.cannon stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:49:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:49:04 +0000 Subject: [issue1522587] Tix.Grid patch Message-ID: <1238388544.76.0.933549762526.issue1522587@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:49:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:49:06 +0000 Subject: [issue1525343] Webserver TypeError: expected read buffer, NoneType found Message-ID: <1238388546.12.0.0733858003964.issue1525343@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch priority: normal -> low stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:49:09 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:49:09 +0000 Subject: [issue1525806] Tkdnd mouse cursor handling patch Message-ID: <1238388549.4.0.666128866863.issue1525806@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:49:46 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:49:46 +0000 Subject: [issue1527597] New module: miniconf Message-ID: <1238388586.86.0.319166588867.issue1527597@psf.upfronthosting.co.za> Daniel Diniz added the comment: I like this, but think it would need quite some demand to be a candidate for the standard library. ---------- nosy: +ajaksu2 stage: -> patch review versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:49:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 04:49:55 +0000 Subject: [issue1528154] New sequences for Unicode groups and block ranges needed Message-ID: <1238388595.05.0.790417731339.issue1528154@psf.upfronthosting.co.za> Daniel Diniz added the comment: Has this been addressed for 2.6/3.0? Do the LOCALE and UNICODE constants cover this? ---------- components: +Unicode nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:56:56 2009 From: report at bugs.python.org (Larry Hastings) Date: Mon, 30 Mar 2009 04:56:56 +0000 Subject: [issue1569040] Speed up using + for string concatenation Message-ID: <1238389016.44.0.117315376066.issue1569040@psf.upfronthosting.co.za> Larry Hastings added the comment: I'm not saying that killing a two-year-old DOA patch is the wrong move--though I hold out hope that lazy string concatenation in CPython will yet happen. But you shouldn't kill this patch just because you think it has something to do with "string views"--it doesn't. "String views" were suggested by Josiah Carlson. A "string view" was a separate object with a reference to a string (or strings); this patch changed the implementation of strings directly. Josiah Carlson would be the first to point out that "lazy strings" and "string views" were different: http://mail.python.org/pipermail/python-3000/2007-January/005546.html Here's my take on what happened with "lazy string concatenation". GvR asked me to port it to Py3k. I optimistically combined "lazy string concatenation" with another optimization, "lazy string slices", and submitted the combined patch. GvR examined the two patches together and disliked it because of the behavior of the "lazy string slices". http://bugs.python.org/issue1629305 I subsequently tried to drum up interest in lazy concatenation without lazy string slices: http://mail.python.org/pipermail/python-3000/2007-January/005641.html but there was no strong interest. Finally, GvR officially rejected the patch. I hold out hope that "lazy string concatenation", separate from "lazy string slices", could still make it in. (Truthfully, I hope they *both* could make it in someday, if I did a better job.) I wouldn't claim these are a no-brainer--see my original description of the patch for caveats--but I still think they're worth the tradeoffs. FWIW, ajaksu2, another implementations of Python *has* already implemented this approach: PyPy. http://codespeak.net/pypy/dist/pypy/doc/interpreter-optimizations.html#string-join-objects Writing for the sake of posterity, /larry/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 06:57:15 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 30 Mar 2009 04:57:15 +0000 Subject: [issue1730372] Mesa with NPTL makes Python extensions crash with std::cerr Message-ID: <1238389035.54.0.92090435657.issue1730372@psf.upfronthosting.co.za> R. David Murray added the comment: I compiled the referenced test program on Gentoo, where my Mesa library is compiled with NPTL: rdmurray at partner:~>equery uses mesa [ Searching for packages matching mesa... ] [ Legend : Left column (U) - USE flags from make.conf ] [ : Right column (I) - USE flags packages was installed with ] [ Found these USE variables for media-libs/mesa-7.3 ] U I + + nptl gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -I/usr/include -I/usr/local/include -I./Include -I. -c spam.cc -o spam.o gcc -pthread -shared spam.o -L/usr/lib -L/usr/local/lib -Wl,-R/usr/lib -lGL -o build/lib.linux-i686-2.7/spam.so -lstdc++ rdmurray at partner:~/python/trunk>strings build/lib.linux-i686-2.7/spam.so |grep -i libgl libGL.so.1 >./python Python 2.7a0 (unknown, Mar 29 2009, 16:10:14) [GCC 4.1.2 (Gentoo 4.1.2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import spam >>> spam.system('ls') this be cerrzsh: segmentation fault ./python Without the '-lGL' it works fine. Now, is it a bug in Python, or Mesa? I haven't checked if it is still a problem in py3k since spam.cc does not compile cleanly under py3k. ---------- nosy: +bitdancer resolution: works for me -> status: pending -> open versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:05:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:05:49 +0000 Subject: [issue1520879] make install change: Allow $DESTDIR to be relative Message-ID: <1238389549.52.0.471398511832.issue1520879@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:05:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:05:54 +0000 Subject: [issue1521051] Extra configurability for doctest TestCases Message-ID: <1238389554.31.0.807339240685.issue1521051@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:06:51 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:06:51 +0000 Subject: [issue1521491] file.seek() influences write() when opened with a+ mode Message-ID: <1238389611.93.0.257196137312.issue1521491@psf.upfronthosting.co.za> Daniel Diniz added the comment: Can anyone confirm this for Windows and 2.6? Closing otherwise. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending title: file.seek() influelce write() when opened with a+ mode -> file.seek() influences write() when opened with a+ mode type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:06:57 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:06:57 +0000 Subject: [issue1521950] shlex.split() does not tokenize like the shell Message-ID: <1238389617.43.0.667767681465.issue1521950@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:07:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:07:44 +0000 Subject: [issue1522237] _threading_local.py logic error in _localbase __new__ Message-ID: <1238389664.85.0.730208099821.issue1522237@psf.upfronthosting.co.za> Daniel Diniz added the comment: It isn't obvious to me that this issue is valid. Some more context: class _localbase(object): __slots__ = '_local__key', '_local__args', '_local__lock' def __new__(cls, *args, **kw): self = object.__new__(cls) key = '_local__key', 'thread.local.' + str(id(self)) object.__setattr__(self, '_local__key', key) object.__setattr__(self, '_local__args', (args, kw)) object.__setattr__(self, '_local__lock', RLock()) if args or kw and (cls.__init__ is object.__init__): raise TypeError("Initialization arguments are not supported") ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:07:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:07:55 +0000 Subject: [issue1522400] irda socket support Message-ID: <1238389675.11.0.758872128735.issue1522400@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:11:57 2009 From: report at bugs.python.org (Greg Hazel) Date: Mon, 30 Mar 2009 05:11:57 +0000 Subject: [issue1565509] Repair or Change installation error Message-ID: <1238389917.63.0.165278691853.issue1565509@psf.upfronthosting.co.za> Greg Hazel added the comment: IE renamed the file for me. So this is not uncommon. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:15:58 2009 From: report at bugs.python.org (Garrett Cooper) Date: Mon, 30 Mar 2009 05:15:58 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1238390158.87.0.777637494659.issue5538@psf.upfronthosting.co.za> Garrett Cooper added the comment: As an FYI, I'm going to push this off until next week or the week after because I have more pressing things to take care of and have an OK workaround for this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:19:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:19:01 +0000 Subject: [issue1516897] Use dynload_shlib on newer HP-UX versions Message-ID: <1238390341.79.0.758908504122.issue1516897@psf.upfronthosting.co.za> Daniel Diniz added the comment: Kjetil, has issue 1454844 fixed this? ---------- dependencies: +Use dlopen() to load extensions on Darwin, where possible nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> feature request versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:19:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:19:06 +0000 Subject: [issue1520818] fcntl.ioctl fails to copy back exactly-1024 buffer Message-ID: <1238390346.47.0.843456688885.issue1520818@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing due to lack of feedback. ---------- nosy: +ajaksu2 resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:06:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:06:02 +0000 Subject: [issue1521196] smtplib login fails with aol smtp server Message-ID: <1238389562.97.0.33478204149.issue1521196@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:43:32 2009 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 30 Mar 2009 05:43:32 +0000 Subject: [issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths In-Reply-To: <1227071866.1.0.995372704707.issue4352@psf.upfronthosting.co.za> Message-ID: <1238391812.11.0.954566528358.issue4352@psf.upfronthosting.co.za> Andrew Svetlov added the comment: >From my understanding (after tracing/debugging) problem lies in import.c find_module tries to convert path from unicode to bytestring using Py_FileSystemDefaultEncoding (line 1397). For Windows it is 'mbcs'. Conversion done with decode_mbcs (unicodeobject.c:4244) what uses MultiByteToWideChar with codepage CP_ACP. Problem is: converting composite characters ('\u00e4' is 'a'+'2 dots over letter', I don't know true name for this sign) this function returns only 'a'. >>> repr('h\u00e4kkinen'.encode('mbcs')) "b'hakkinen'" MSDN says (http://msdn.microsoft.com/en- us/library/dd374130(VS.85).aspx): For strings that require validation, such as file, resource, and user names, the application should always use the WC_NO_BEST_FIT_CHARS flag with WideCharToMultiByte. This flag prevents the function from mapping characters to characters that appear similar but have very different semantics. In some cases, the semantic change can be extreme. For example, the symbol for "?" (infinity) maps to 8 (eight) in some code pages. Writing encoding function in opposite to PyUnicode_DecodeFSDefault with setting this flag also cannot help - problematic character just replaced with 'default' ('?' if not specified). Hacking specially for 'latin-1' encoding sounds ugly. Changing all filenames to unicode (with possible usage of fileio instead of direct calls of open/fdopen) in import.c looks good for me but takes long time and makes many changes. ---------- components: +Interpreter Core versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:54:31 2009 From: report at bugs.python.org (paul rubin) Date: Mon, 30 Mar 2009 05:54:31 +0000 Subject: [issue1560032] confusing error msg from random.randint Message-ID: <1238392471.78.0.813480781842.issue1560032@psf.upfronthosting.co.za> paul rubin added the comment: ajaksu2, I don't understand why you want to close this bug if it isn't fixed. I can accept that it's not the highest priority issue in the world, but it's something that trips up users from time to time, and it ix obviously fixable. Closing bugs like this is demoralizing to those of us who take the trouble to submit them in the hope of helping improve Python. I've noticed that any number of times over the years, and recently saw a post about Ubuntu bug triage that expressed the sentiment better than I could: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/blosxom/2009/03/02 (And while trying to locate that several week old post through web searches, I came across several more like it...). Anyway, the best thing to do with bugs like this is fix them. If there is other work with higher priority, the obvious thing is to just leave the bug open so someone gets around to it sooner or later. Closing the bug without a fix comes across as destructive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:56:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:56:47 +0000 Subject: [issue1512791] module wave does no rounding Message-ID: <1238392607.33.0.049820672594.issue1512791@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:56:53 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:56:53 +0000 Subject: [issue1513802] __del__: Type is cleared before instances Message-ID: <1238392613.4.0.562429437329.issue1513802@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk and py3k. Has this passed the the won't-fix threshold? ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:56:58 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:56:58 +0000 Subject: [issue1514420] Missing module code does spurious file search Message-ID: <1238392618.76.0.286827994994.issue1514420@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed in py3k and trunk. It's also possible to create a file named "", I seem to recall discussion on this. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:57:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:57:02 +0000 Subject: [issue1515142] sgmllib should recover from unmatched quotes Message-ID: <1238392622.4.0.821671391745.issue1515142@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:57:09 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 05:57:09 +0000 Subject: [issue1515839] socket timeout inheritance on accept Message-ID: <1238392629.41.0.27469794484.issue1515839@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Extension Modules stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 07:58:54 2009 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 30 Mar 2009 05:58:54 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1238392734.16.0.0400005132039.issue4015@psf.upfronthosting.co.za> Andrew Svetlov added the comment: optional .bat file generating - probably not bad idea. But I definitely don't want to see this issue as default. Maybe just tool for generating bat files for desired packages based on package metadata for scripts can be solution? ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:21:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 06:21:02 +0000 Subject: [issue1560032] confusing error msg from random.randint Message-ID: <1238394062.26.0.671924937884.issue1560032@psf.upfronthosting.co.za> Daniel Diniz added the comment: Paul, I meant no disrespect, but it seemed to me not even you wanted it fixed (as you never replied to Georg's comment). I stated I'd close this issue unless someone wanted it fixed. I'm reopening it, as you do want it fixed :) FWIW and IMHO, I don't see much improvement from a message saying "randint() takes exactly 2 arguments (1 given)". So I think it's possible it can be considered invalid, even after all this time. Anyway, if you can provide a patch (or even a specification) that makes the message clear without introducing too much code complication, I'm sure getting this fixed this will be much more likely. (nice link BTW, I read it back then and I think I'm following his advice where needed) ---------- stage: -> test needed status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:32:45 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 06:32:45 +0000 Subject: [issue1451466] reading very large files Message-ID: <1238394765.34.0.864723263332.issue1451466@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +Error reading files larger than 4GB stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:32:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 06:32:50 +0000 Subject: [issue1463043] test_minidom.py fails for Python-2.4.3 on SUSE 9.3 Message-ID: <1238394770.58.0.976050354769.issue1463043@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:32:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 06:32:55 +0000 Subject: [issue1506122] Add "compose" function to the functools Message-ID: <1238394775.21.0.0172936428239.issue1506122@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:32:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 06:32:59 +0000 Subject: [issue1508864] threading.Timer/timeouts break on change of win32 local time Message-ID: <1238394779.77.0.729997285541.issue1508864@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:33:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 06:33:03 +0000 Subject: [issue1509060] Interrupt/kill threads w/exception Message-ID: <1238394783.96.0.137209310005.issue1509060@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:33:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 06:33:08 +0000 Subject: [issue1512124] OSX: debugger hangs IDLE Message-ID: <1238394788.78.0.675646534846.issue1512124@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:33:15 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 06:33:15 +0000 Subject: [issue1512163] mailbox (2.5b1): locking doesn't work (esp. on FreeBSD) Message-ID: <1238394795.74.0.295204585411.issue1512163@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Documentation stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:33:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 06:33:27 +0000 Subject: [issue1509798] replace dist/src/Tools/scripts/which.py with tmick's which Message-ID: <1238394807.97.0.711023648296.issue1509798@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Demos and Tools -None stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:37:53 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 30 Mar 2009 06:37:53 +0000 Subject: [issue2755] IDLE ignores module change before restart In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za> Message-ID: <1238395073.07.0.522954525657.issue2755@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:40:15 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 30 Mar 2009 06:40:15 +0000 Subject: [issue1533105] NetBSD build with --with-pydebug causes SIGSEGV Message-ID: <1238395215.03.0.10553471147.issue1533105@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: It seems not happening on VC6. Stack size modification was checked in r65663 to workaround this issue, but SEGV doesn't occur even if I reverted this change on working copy. But when I lowered stack size of python_d.exe too much, SEGV occurred. Please ask original poster about NetBSD. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:42:30 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 06:42:30 +0000 Subject: [issue1583863] __str__ cannot be overridden on unicode-derived classes Message-ID: <1238395350.99.0.312881161335.issue1583863@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed in trunk. ---------- components: +Unicode nosy: +ajaksu2, haypo stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:43:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 06:43:21 +0000 Subject: [issue1571878] Improvements to socket module exceptions Message-ID: <1238395401.58.0.985256073051.issue1571878@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:48:06 2009 From: report at bugs.python.org (S.Fourmanoit) Date: Mon, 30 Mar 2009 06:48:06 +0000 Subject: [issue1527597] New module: miniconf Message-ID: <1238395685.91.0.245394019089.issue1527597@psf.upfronthosting.co.za> S.Fourmanoit added the comment: Daniel, I see many people relying on print() and exec() to basically perform the same task miniconf does: dumping and loading groups of parameters in a human-readable, 100% pythonic form. Look in the wild: http://www.google.com/search?q=exec+filetype:py I think that if we had a painless, almost drop-in replacement to do the same thing without risking feeding arbitrary code to the interpreter, we would use it. Anyway, thanks for the work of Bob Ippolito, we now have a json module in the standard library: it's fast, robust, and can pretty much cover the same use case, so I am happy; It just feels slightly weird to save and load configuration files in a javascript syntax from python apps. :-D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:49:55 2009 From: report at bugs.python.org (David Fraser) Date: Mon, 30 Mar 2009 06:49:55 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1238395795.51.0.436773799069.issue5482@psf.upfronthosting.co.za> Changes by David Fraser : ---------- nosy: +davidfraser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:54:54 2009 From: report at bugs.python.org (Ralf W. Grosse-Kunstleve) Date: Mon, 30 Mar 2009 06:54:54 +0000 Subject: [issue1558802] Tru64 make install failure Message-ID: <1238396094.98.0.850716785279.issue1558802@psf.upfronthosting.co.za> Ralf W. Grosse-Kunstleve added the comment: It is no longer a problem for me. As of last fall, we don't have any Tru64 machines anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 08:55:15 2009 From: report at bugs.python.org (Mark Summerfield) Date: Mon, 30 Mar 2009 06:55:15 +0000 Subject: [issue4630] IDLE no longer respects .Xdefaults insertOffTime In-Reply-To: <1228982754.08.0.523311497339.issue4630@psf.upfronthosting.co.za> Message-ID: <1238396115.53.0.188199481789.issue4630@psf.upfronthosting.co.za> Mark Summerfield added the comment: I think a checkbox would be better: [X] Blinking cursor or [X] Cursor blink but if you use radio buttons you could have: Cursor blink (*) On ( ) Off ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:20:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:20:06 +0000 Subject: [issue1581906] test_sqlite fails on OS X if test_ctypes is run Message-ID: <1238397606.84.0.374537105339.issue1581906@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tests, ctypes stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:20:17 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:20:17 +0000 Subject: [issue1581182] Definition of a "character" is wrong Message-ID: <1238397617.84.0.470222055831.issue1581182@psf.upfronthosting.co.za> Daniel Diniz added the comment: Anyone brave enough can find the mentioned definitions in the thread below. Reading all of it is necessary, as there are some contradictory quotes and interpretations before an agreement is (sort of) achieved. http://mail.python.org/pipermail/python-dev/2008-July/080886.html ---------- assignee: -> georg.brandl components: +Unicode nosy: +ajaksu2, georg.brandl type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:20:16 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:20:16 +0000 Subject: [issue1581183] pickle protocol 2 failure on int subclass Message-ID: <1238397616.5.0.602544466641.issue1581183@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk, has tests. ---------- nosy: +ajaksu2 stage: -> needs patch title: pickle protocol 2 failure on int subclass -> pickle protocol 2 failure on int subclass type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:20:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:20:22 +0000 Subject: [issue1579029] --disable-sunaudiodev --disable-tk does not work Message-ID: <1238397622.46.0.715983374.issue1579029@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing again, for the same reasons. ---------- components: +Build -Tkinter nosy: +ajaksu2 stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:20:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:20:26 +0000 Subject: [issue1578999] PyArg_ParseTuple corrections Message-ID: <1238397626.95.0.333983508458.issue1578999@psf.upfronthosting.co.za> Daniel Diniz added the comment: Are these corrections still relevant? ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:20:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:20:34 +0000 Subject: [issue1578643] various datetime methods fail in restricted mode Message-ID: <1238397634.24.0.702701401583.issue1578643@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:20:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:20:42 +0000 Subject: [issue1576598] ftplib doesn't follow standard Message-ID: <1238397642.56.0.846774462104.issue1576598@psf.upfronthosting.co.za> Daniel Diniz added the comment: Denis, can you confirm this is a Python issue? I'll close this otherwise. ---------- nosy: +ajaksu2 stage: -> test needed status: open -> pending type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:20:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:20:47 +0000 Subject: [issue1576313] os.execvp[e] on win32 fails for current directory Message-ID: <1238397647.97.0.0472146650702.issue1576313@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:20:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:20:56 +0000 Subject: [issue1576120] Support spawnvp[e] + use native execvp[e] on win32 Message-ID: <1238397656.51.0.218293815218.issue1576120@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:21:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:21:05 +0000 Subject: [issue1575020] Request wave support > 16 bit samples Message-ID: <1238397665.02.0.568416466435.issue1575020@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:21:16 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:21:16 +0000 Subject: [issue1574310] os.popen with os.close gives error message Message-ID: <1238397676.37.0.548430610274.issue1574310@psf.upfronthosting.co.za> Daniel Diniz added the comment: I'll close this based on Ronald's analysis unless opposition is voiced. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:21:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:21:21 +0000 Subject: [issue1574217] isinstance swallows exceptions Message-ID: <1238397681.73.0.881696905157.issue1574217@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> patch review type: -> behavior versions: +Python 2.7, Python 3.1 -Python 2.4, Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:21:29 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:21:29 +0000 Subject: [issue1573931] WSGI, cgi.FieldStorage incompatibility Message-ID: <1238397689.66.0.22541739633.issue1573931@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None keywords: +patch stage: -> patch review type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 09:21:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 07:21:47 +0000 Subject: [issue1572968] release GIL while doing I/O operations in the mmap module Message-ID: <1238397707.01.0.930387533516.issue1572968@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 10:11:00 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 30 Mar 2009 08:11:00 +0000 Subject: [issue5596] memory leaks in 3.1 In-Reply-To: <1238336388.84.0.581148968517.issue5596@psf.upfronthosting.co.za> Message-ID: <1238400660.98.0.801719040465.issue5596@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: About test_urllib2_localnet, this leak happens because FakeProxyHandler has class variable digest_auth_handler and its instance variables are modified. Following workaround can fix this leak, but I'm not sure this can be committed. Index: Lib/test/test_urllib2_localnet.py =================================================================== --- Lib/test/test_urllib2_localnet.py (revision 70694) +++ Lib/test/test_urllib2_localnet.py (working copy) @@ -241,6 +241,7 @@ def tearDown(self): self.server.stop() + FakeProxyHandler.digest_auth_handler.__init__() def test_proxy_with_bad_password_raises_httperror(self): self._digest_auth_handler.add_password(self.REALM, self.URL, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 11:11:39 2009 From: report at bugs.python.org (rocky bernstein) Date: Mon, 30 Mar 2009 09:11:39 +0000 Subject: [issue1531859] Tracing and profiling functions can cause hangs in threads Message-ID: <1238404299.59.0.261448001681.issue1531859@psf.upfronthosting.co.za> rocky bernstein added the comment: Well, in the over 3 years since this has last been looked at, I wouldn't be surprised if someone else noticed the problem and therefore it has since been fixed. Was version 2.6 released back in January '06? Python news seems to indication that October 2008 is when "Python 2.6 Final" was released. My recollection is that this was reported against version 2.5. But I really don't remember. Thanks though, for for getting on this. ---------- nosy: +rocky _______________________________________ Python tracker _______________________________________ From =?utf-8?q?G=C3=B6ran_Uddeborg_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Mar 30 11:44:19 2009 From: =?utf-8?q?G=C3=B6ran_Uddeborg_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?G=C3=B6ran_Uddeborg_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 30 Mar 2009 09:44:19 +0000 Subject: [issue1542544] Improve dynamic linking support on AIX Message-ID: <1238406259.85.0.688596165224.issue1542544@psf.upfronthosting.co.za> G?ran Uddeborg added the comment: It is a bit unclear. We are currently still using Python 2.4 with my patch for the active releases of our products. It is at this time not quite clear if we will continue to support AIX in future releases. If we do, we will also have to upgrade to a newer Python version. But right now I do not know if we will. Nor, if so, when we will do this upgrade. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Mon Mar 30 11:48:13 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Mon, 30 Mar 2009 09:48:13 +0000 Subject: [issue1528154] New sequences for Unicode groups and block ranges needed Message-ID: <1238406493.54.0.418976283177.issue1528154@psf.upfronthosting.co.za> Martin v. L?wis added the comment: No progress has been made. I still maintain that TR18 should be implemented. I'm not so sure whether the POSIX special groups should be provided. My understanding is that they originally were meant to integrate with the locale support, and change with locale. For Unicode, Annex C of TR18 makes a recommendation on how to provide the POSIX properties, and offers two alternative definitions: Standard Recommendation and POSIX Compatible. That alone tells me that it is best not to provide support for them: refuse the temptation to guess. ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 12:27:50 2009 From: report at bugs.python.org (Nick Craig-Wood) Date: Mon, 30 Mar 2009 10:27:50 +0000 Subject: [issue5131] pprint doesn't know how to print a set or a defaultdict In-Reply-To: <1233592442.21.0.0563262599933.issue5131@psf.upfronthosting.co.za> Message-ID: <1238408870.51.0.203200609585.issue5131@psf.upfronthosting.co.za> Nick Craig-Wood added the comment: I couldn't actually get this patch to apply to the py3k branch :-( $ patch -p0 --dry-run < issue_5131.patch patching file Misc/NEWS Hunk #1 FAILED at 2598. 1 out of 1 hunk FAILED -- saving rejects to file Misc/NEWS.rej patching file Misc/ACKS Hunk #1 succeeded at 147 (offset -1 lines). Hunk #2 succeeded at 791 (offset 3 lines). patching file Lib/pprint.py Hunk #1 FAILED at 37. Hunk #2 FAILED at 137. Hunk #3 FAILED at 168. 3 out of 3 hunks FAILED -- saving rejects to file Lib/pprint.py.rej patching file Lib/test/test_pprint.py Hunk #1 succeeded at 408 (offset -6 lines). $ svn info Path: . URL: http://svn.python.org/projects/python/branches/py3k Repository Root: http://svn.python.org/projects Repository UUID: 6015fed2-1504-0410-9fe1-9d1591cc4771 Revision: 70705 Node Kind: directory Schedule: normal Last Changed Author: antoine.pitrou Last Changed Rev: 70696 Last Changed Date: 2009-03-29 20:30:55 +0100 (Sun, 29 Mar 2009) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 12:49:40 2009 From: report at bugs.python.org (Retro) Date: Mon, 30 Mar 2009 10:49:40 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1238410180.62.0.129477985619.issue5390@psf.upfronthosting.co.za> Changes by Retro : ---------- versions: +Python 2.4, Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 12:51:56 2009 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 Mar 2009 10:51:56 +0000 Subject: [issue1583863] __str__ cannot be overridden on unicode-derived classes Message-ID: <1238410316.68.0.521842162188.issue1583863@psf.upfronthosting.co.za> STINNER Victor added the comment: Case "S" (type str): "%s" uses _PyObject_Str() which checks the object type with PyString_CheckExact(). Case "U" (type unicode) "%s" uses PyUnicode_Check() and then calls PyUnicode_Format(). PyUnicode_Format() uses PyUnicode_Check() to check the object object. It should uses PyUnicode_CheckExact() instead. xxx_CheckExact() is different than xxx_Check(): exact is only true for the base type, whereas the the second is also true for subclass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 13:45:55 2009 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 Mar 2009 11:45:55 +0000 Subject: [issue1583863] __str__ cannot be overridden on unicode-derived classes Message-ID: <1238413555.11.0.357400125362.issue1583863@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch: Use PyUnicode_CheckExact() instead of PyUnicode_CheckExact() in PyUnicode_Format() to use obj.__unicode__ slot. ---------- keywords: +patch Added file: http://bugs.python.org/file13467/format_unicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 13:48:32 2009 From: report at bugs.python.org (Oleg Broytmann) Date: Mon, 30 Mar 2009 11:48:32 +0000 Subject: [issue1576598] ftplib doesn't follow standard Message-ID: <1238413712.37.0.0321486591615.issue1576598@psf.upfronthosting.co.za> Oleg Broytmann added the comment: This is a duplicate of the issue http://bugs.python.org/issue821862 ---------- nosy: +phd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 13:53:50 2009 From: report at bugs.python.org (Oleg Broytmann) Date: Mon, 30 Mar 2009 11:53:50 +0000 Subject: [issue821862] ftplib: Strict RFC 959 (telnet in command channel) Message-ID: <1238414030.23.0.259213695807.issue821862@psf.upfronthosting.co.za> Oleg Broytmann added the comment: Since I've created the issue I found there are different servers even in Unix. ProFTPd (and, I believe wu-ftpd) strictly implement telnet-in-command channel, they even don't have an option to turn it off. PureFTPd doesn't implement it. On the client side - lftp (command line client) and squid (well-known web/ftp proxy) implement telnet-in-command channel. ---------- nosy: +ods _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 13:55:26 2009 From: report at bugs.python.org (Denis S. Otkidach) Date: Mon, 30 Mar 2009 11:55:26 +0000 Subject: [issue1576598] ftplib doesn't follow standard Message-ID: <1238414126.76.0.280843991268.issue1576598@psf.upfronthosting.co.za> Denis S. Otkidach added the comment: Yes, it's a problem in Python library. I believe the patch proposed by Oleg in the issue821862 is the best solution to it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 14:15:02 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 30 Mar 2009 12:15:02 +0000 Subject: [issue1513802] __del__: Type is cleared before instances Message-ID: <1238415302.29.0.171238604205.issue1513802@psf.upfronthosting.co.za> Benjamin Peterson added the comment: No, but I believe this is addressed in some other bugs like #812369. ---------- nosy: +benjamin.peterson resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 14:18:30 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 30 Mar 2009 12:18:30 +0000 Subject: [issue1569040] Speed up using + for string concatenation Message-ID: <1238415510.1.0.204800442449.issue1569040@psf.upfronthosting.co.za> Benjamin Peterson added the comment: In that case, I think it's probably ok to reopen until we have a more definite accept or reject. ---------- resolution: rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 14:19:06 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 30 Mar 2009 12:19:06 +0000 Subject: [issue1571878] Improvements to socket module exceptions Message-ID: <1238415546.03.0.120782385063.issue1571878@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 14:23:51 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 30 Mar 2009 12:23:51 +0000 Subject: [issue1569040] Speed up using + for string concatenation Message-ID: <1238415831.9.0.686337808102.issue1569040@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For information, I haven't done any benchmarks, but the StringIO type in Python 3.1 should be very efficient for this kind of purposes. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 14:27:00 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 30 Mar 2009 12:27:00 +0000 Subject: [issue1572968] release GIL while doing I/O operations in the mmap module Message-ID: <1238416020.98.0.215679189863.issue1572968@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't know mmap myself but patches are welcome. ---------- nosy: +pitrou priority: -> normal stage: test needed -> needs patch type: feature request -> performance versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 15:20:12 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 30 Mar 2009 13:20:12 +0000 Subject: [issue1522237] _threading_local.py logic error in _localbase __new__ Message-ID: <1238419212.15.0.517755179286.issue1522237@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It is still valid: >>> class MyLocal(local): ... def __init__(self, *args, **kwargs): ... self.args = args ... self.kwargs = kwargs ... >>> MyLocal(1) This works when local is thread._local (from thread import _local as local), but fails when imported from _threading_local (from _threading_local import local) See attached patch for the test case (and the fix of course) ---------- keywords: +needs review, patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file13468/localbase.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 15:32:51 2009 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 30 Mar 2009 13:32:51 +0000 Subject: [issue1528154] New sequences for Unicode groups and block ranges needed Message-ID: <1238419971.57.0.301301171627.issue1528154@psf.upfronthosting.co.za> Matthew Barnett added the comment: I implemented \p, \P and [:...:] for the simple categories (eg "Lu" and "upper", but not "IsGreek") in the work I did for issue #2636. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 15:33:31 2009 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 30 Mar 2009 13:33:31 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1238420011.68.0.225207869551.issue1580@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 15:39:51 2009 From: report at bugs.python.org (Reed O'Brien) Date: Mon, 30 Mar 2009 13:39:51 +0000 Subject: [issue1544102] ctypes unit test fails (test_macholib.py) under MacOS 10.4.7 Message-ID: <1238420391.96.0.80602823542.issue1544102@psf.upfronthosting.co.za> Reed O'Brien added the comment: I am no longer using OSX 10.4.x, but this issue appears fixed in 2.5.4 and 2.6.1 on OSX 10.5.6 I have no reason for this to stay open ---------- nosy: +robrien _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:07:38 2009 From: report at bugs.python.org (Tim Lesher) Date: Mon, 30 Mar 2009 14:07:38 +0000 Subject: [issue1674032] Make threading.Event().wait(timeout=3) return isSet Message-ID: <1238422058.96.0.807237498501.issue1674032@psf.upfronthosting.co.za> Tim Lesher added the comment: Thanks, Antoine. I will re-check the patch against trunk and add tests this week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:21:44 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 30 Mar 2009 14:21:44 +0000 Subject: [issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths In-Reply-To: <1227071866.1.0.995372704707.issue4352@psf.upfronthosting.co.za> Message-ID: <1238422904.42.0.623842350128.issue4352@psf.upfronthosting.co.za> Guido van Rossum added the comment: At the sprint, Andrew Svetlov, Martin von Loewis and I looked into this a bit, and discovered that Andrew's Vista copy uses a Russian locale for the filesystem encoding (despite using English as the language). In this locale, a-umlaut cannot be represented in the ANSI code page (which has only 256 values), because the Russian locale uses those byte values to represent Cyrillic. As long as the import code (written in C) uses bytes in the filesystem encoding to represent paths, this problem will remain. Two possible solutions would be to switch to Brett's importlib, or to change the import code to use wide characters everywhere (like posixmodule.c). Both are extremely risky and a lot of work, and I don't expect we'll get to this for 3.1. (In 2.x the same problem exists, but is perhaps less real because module names are limited to ASCII.) We also discovered another problem, which I'll report separately: the *module* name is decoded to UTF8, while the *path* name uses the filesystem encoding... ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Mon Mar 30 16:24:29 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Mon, 30 Mar 2009 14:24:29 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1238423069.78.0.406034607292.issue5390@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- versions: -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:26:41 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 30 Mar 2009 14:26:41 +0000 Subject: [issue5604] imp.find_module() mixes UTF8 and MBCS In-Reply-To: <1238423201.33.0.732435229283.issue5604@psf.upfronthosting.co.za> Message-ID: <1238423201.33.0.732435229283.issue5604@psf.upfronthosting.co.za> New submission from Guido van Rossum : There's a path in imp.find_module that mixes encodings. The module name is encoded to char* using UTF-8 by the 's' format passed to PyArg_ParseTuple(). But the path name is converted (in the loop over the path in find_module()) to char* using the filesystem encoding. On Windows this ends up constructing a char* that mixes MBCS and UTF8 in one string. (We discovered this when researching bug 4352, but this is not the cause of the problem reported there -- the module name in that bug is ASCII.) Andrew Svetlov is looking into producing a patch. ---------- components: Interpreter Core messages: 84548 nosy: asvetlov, gvanrossum priority: normal severity: normal stage: needs patch status: open title: imp.find_module() mixes UTF8 and MBCS type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:27:35 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 14:27:35 +0000 Subject: [issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X In-Reply-To: <1217610966.27.0.918507533161.issue3485@psf.upfronthosting.co.za> Message-ID: <1238423255.51.0.130964856339.issue3485@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The following patch explicitly mentions that os.path.normcase treats OSX like any other Unix platform. I'm in favor of applying this. ---------- keywords: +patch nosy: +ronaldoussoren versions: +Python 2.6, Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13469/normcase.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:30:15 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Mon, 30 Mar 2009 14:30:15 +0000 Subject: [issue1350] IDLE - CallTips enhancement - show full doc-string in new window In-Reply-To: <1193540394.75.0.209428889105.issue1350@psf.upfronthosting.co.za> Message-ID: <1238423415.75.0.00639257453265.issue1350@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: I think that because of the re-write of CallTips.py for py3k that we would need separate patches for 2.7 and 3.1. I suggest dropping the idea of adding the functionality to 2.7 unless OP wants to provide a separate patch against TRUNK. Because of the re-write, svn-merge will fail totally unless the rewrite is backported (which would have to be done as a separate patch, first.) Let's forget 2.x for this. We already are using inspect and the added functionality intended here should be implemented as a patch against current py3k HEAD. This patch won't appy. Also, if there is more new functionality than just the doc string window, it should be broken out into separate patches. The added functionality is useful, but this patch is not the way to go. ---------- priority: -> low resolution: -> out of date versions: +Python 3.1 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:32:09 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 14:32:09 +0000 Subject: [issue2754] Mac version of IDLE doesn't scroll as expected In-Reply-To: <1209903976.71.0.763172048838.issue2754@psf.upfronthosting.co.za> Message-ID: <1238423529.05.0.00745036447551.issue2754@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm closing this issue because I'v confirmed that the issue goes away when I install a newer version of Tk In /Library/Frameworks. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:37:59 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 14:37:59 +0000 Subject: [issue4865] system wide site-packages dir not used on Mac OS X In-Reply-To: <1231332662.33.0.831675111419.issue4865@psf.upfronthosting.co.za> Message-ID: <1238423879.13.0.727372989069.issue4865@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm in favour of adding /Library/Python/x.y/ to sys.path for Python 2.7 and 3.1 and will work on that during the Pycon sprints. /Library/Python will be added after the site-packages directory inside the framework instead of replacing the latter directory. The reason for this is that we don't want to install all packages in a location that's visible to Apple's copy of Python because you could accidently replace packages that Apple ships as part of the "Extras" directory that way. Replacing those is bad because those libraries are used by Apple system software and replacing stuff might therefore break the system (particularly on server systems). I won't backport to 2.6 and 3.0 because this is a feature request and not a bugfix. W.r.t. building PIL and other extensions: we've had a discussion about this during the startup phase of the macpython-sig sprint and we have some ideas to make this situation less painful in the future (without necessarily having to patch Python for that). ---------- assignee: -> ronaldoussoren nosy: +ronaldoussoren versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:39:27 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 14:39:27 +0000 Subject: [issue5270] OS X installer: faulty Python.app bundle inside of framework In-Reply-To: <1234688274.05.0.10424234912.issue5270@psf.upfronthosting.co.za> Message-ID: <1238423967.54.0.126006668793.issue5270@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: -> ronaldoussoren nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:39:51 2009 From: report at bugs.python.org (Richard King) Date: Mon, 30 Mar 2009 14:39:51 +0000 Subject: [issue2577] cmd.py should track input file objects so macros with submacros can be easily written In-Reply-To: <1238290775.68.0.513799603333.issue2577@psf.upfronthosting.co.za> Message-ID: <49D0D9B3.6080005@comcast.net> Richard King added the comment: ok, thanks. R. David Murray wrote: > R. David Murray added the comment: > > Since it's been almost a year and the OP hasn't responded with an > updated patch, I'm closing this as out of date. > > ---------- > nosy: +bitdancer > resolution: -> out of date > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.0.238 / Virus Database: 270.11.32/2030 - Release Date: 03/30/09 08:40:00 > > ---------- title: cmd.py should track input file objects so macros with submacros can be easily written -> cmd.py should track input file objects so macros with submacros can be easily written Added file: http://bugs.python.org/file13470/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- ok, thanks.

R. David Murray wrote:
R. David Murray <rdmurray at bitdance.com> added the comment:

Since it's been almost a year and the OP hasn't responded with an
updated patch, I'm closing this as out of date.

----------
nosy: +bitdancer
resolution:  -> out of date
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2577>
_______________________________________

No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.238 / Virus Database: 270.11.32/2030 - Release Date: 03/30/09 08:40:00
From report at bugs.python.org Mon Mar 30 16:40:17 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 14:40:17 +0000 Subject: [issue5271] OS X installer: build can fail on import checks In-Reply-To: <1234688710.61.0.976389854663.issue5271@psf.upfronthosting.co.za> Message-ID: <1238424017.53.0.750871998754.issue5271@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: -> ronaldoussoren nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:42:03 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 30 Mar 2009 14:42:03 +0000 Subject: [issue1581182] Definition of a "character" is wrong Message-ID: <1238424123.29.0.426421612565.issue1581182@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: See this talk for an explanation of the various Unicode terms and how they map to Python's implementation: http://www.egenix.com/library/presentations/#PythonAndUnicode Also note that the Unicode standard has evolved a lot since Unicode support was added to Python in late 1999. Some terms used in Python differ from those used in Unicode 5.0 or have been defined in more strict ways than were common at the time. And finally: don't forget that Python provides ways of *working* with Unicode, i.e. it does not guarantee that a Python Unicode string always contains all code points required for e.g. UTF-16. It is well possible to store lone surrogates and invalid or unassigned code points in a Python Unicode string. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:46:27 2009 From: report at bugs.python.org (Andrii V. Mishkovskyi) Date: Mon, 30 Mar 2009 14:46:27 +0000 Subject: [issue2522] locale.format() problems with decimal separator In-Reply-To: <1206983289.11.0.844443108334.issue2522@psf.upfronthosting.co.za> Message-ID: <1238424387.92.0.271271028165.issue2522@psf.upfronthosting.co.za> Andrii V. Mishkovskyi added the comment: Nice to see this moving forward. Your patch looks nicer than my naive approach and I hope it's going to be applied. Thanks for investigation. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:49:27 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 14:49:27 +0000 Subject: [issue5514] Darwin framework libpython3.0.a is not a normal static library In-Reply-To: <1237417615.01.0.58676676944.issue5514@psf.upfronthosting.co.za> Message-ID: <1238424567.18.0.759685936891.issue5514@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Jack: do I understand you correctly when I interpret your message to mean that libpython3.0.a inside the Python framework won't be usable as a library that's linked using '-lpython3.0' in a future edition of Xcode? That would be a bummer. The current name was chosen because some 3th party code explicitly looks for a '.a' file (IIRC mod_python is one of those). BTW. libpython3.0 is a symlink to the dylib in the Python.framework, specifically to allow applications that try to link to libpython to work. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:59:00 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 14:59:00 +0000 Subject: [issue5436] test_distutils fails with official Mac OS X Installer Disk Image (3.0.1) In-Reply-To: <1236446128.5.0.33521760843.issue5436@psf.upfronthosting.co.za> Message-ID: <1238425140.23.0.808462753713.issue5436@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Tarek: I don't understand your comment. Both the tests and code in distutils look correct to me, although one of them should be wrong given the failure that Martina is seeing. (I've check the code in Python's trunk and 3.x branch) ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 16:59:56 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 14:59:56 +0000 Subject: [issue1089399] Carbon.Res misses GetIndString Message-ID: <1238425196.5.0.0263678003102.issue1089399@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Closing this because this is a feature request and the Carbon bindings are deprecated. ---------- nosy: +ronaldoussoren resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 17:01:04 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 15:01:04 +0000 Subject: [issue1099] Mac compile fails with pydebug and framework enabled In-Reply-To: <1188886622.31.0.867109013105.issue1099@psf.upfronthosting.co.za> Message-ID: <1238425264.51.0.131195922455.issue1099@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: -> ronaldoussoren nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 17:01:56 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 15:01:56 +0000 Subject: [issue1090958] _AEModule.c patch Message-ID: <1238425316.66.0.150747975279.issue1090958@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Closing because these are feature enhancements and the Carbon bindings are deprecated. ---------- nosy: +ronaldoussoren resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 17:05:42 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 15:05:42 +0000 Subject: [issue785031] MacPython installer fails on UFS filesystem Message-ID: <1238425542.87.0.291319748156.issue785031@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Python is just one of the many things that will fail on a case sensitive root filesystem. I'm not particularly interested in fixing this issue. This doesn't affect Python 3.x because the code that causes this problem is not present in 3.x. Setting state to pending with resolution won't fix. ---------- nosy: +ronaldoussoren resolution: -> wont fix status: open -> pending versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 17:10:04 2009 From: report at bugs.python.org (Frank Wierzbicki) Date: Mon, 30 Mar 2009 15:10:04 +0000 Subject: [issue5605] Don't assume that repr of literal dicts are sorted like pprint sorts them. In-Reply-To: <1238425804.02.0.358939732522.issue5605@psf.upfronthosting.co.za> Message-ID: <1238425804.02.0.358939732522.issue5605@psf.upfronthosting.co.za> New submission from Frank Wierzbicki : test_same_as_repr in test_pprint.py assumes repr of literal dict {5:6, 7:8} will be ordered. This definitely is not the case for Jython, and the comments above the test appear to indicate that it is not a guarantee of CPython either. ---------- components: Tests files: test_pprint_patch.txt messages: 84561 nosy: fwierzbicki severity: normal status: open title: Don't assume that repr of literal dicts are sorted like pprint sorts them. type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file13471/test_pprint_patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 17:15:23 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 15:15:23 +0000 Subject: [issue1584] Mac OS X: building with X11 Tkinter In-Reply-To: <1197345898.75.0.132866639605.issue1584@psf.upfronthosting.co.za> Message-ID: <1238426123.59.0.235703342286.issue1584@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Adding support for building an X11 version of Tkinter would require an explicit flag to configure, defaulting to a build that uses AquaTk (which most people would like to use). I'm not interested in creating a patch for this, but am willing to review patches for this. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 17:16:00 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 30 Mar 2009 15:16:00 +0000 Subject: [issue5605] Don't assume that repr of literal dicts are sorted like pprint sorts them. In-Reply-To: <1238425804.02.0.358939732522.issue5605@psf.upfronthosting.co.za> Message-ID: <1238426160.4.0.0365046565465.issue5605@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70712. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 17:17:45 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 15:17:45 +0000 Subject: [issue602291] Bgen should learn about booleans Message-ID: <1238426265.79.0.933552115603.issue602291@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Jack: are you planning to work on this? I propose to close this issue if your not because bgen in the python.org tree is basically dead at this point. Any enhancements would be better of a separate project. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 17:24:42 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 15:24:42 +0000 Subject: [issue1254695] QuickTime API needs corrected object types Message-ID: <1238426682.88.0.168914187235.issue1254695@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've applied these patches in revision r70713, the bugfix will be in python 2.7. Also backported to 2.6 in r70715. ---------- nosy: +ronaldoussoren resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 17:40:37 2009 From: report at bugs.python.org (Tony Nelson) Date: Mon, 30 Mar 2009 15:40:37 +0000 Subject: [issue1522237] _threading_local.py logic error in _localbase __new__ Message-ID: <1238427637.3.0.551844083144.issue1522237@psf.upfronthosting.co.za> Tony Nelson added the comment: Thanks, Amaury. The new test works here on Python2.6.1, failing without the fix and passing with it. (Passing MyLocal(a=1) and failing MyLocal(1), as expected.) With the fix, _threading_local.py supports positional arguments to subclass __init__, as well as keyword arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 17:45:37 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 30 Mar 2009 15:45:37 +0000 Subject: [issue1175933] threading.Condition.wait() return value indicates timeout Message-ID: <1238427937.33.0.424683986408.issue1175933@psf.upfronthosting.co.za> Guido van Rossum added the comment: Since Tim Peters is the absolute authority on concurrency in Python, let's just close this as Rejected rather than letting it sit here forever. ---------- nosy: +gvanrossum resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 17:51:46 2009 From: report at bugs.python.org (Jesse Noller) Date: Mon, 30 Mar 2009 15:51:46 +0000 Subject: [issue5177] multiprocessing: SocketListener should use SO_REUSEADDR In-Reply-To: <1234015984.6.0.0454721510443.issue5177@psf.upfronthosting.co.za> Message-ID: <1238428306.4.0.464476006559.issue5177@psf.upfronthosting.co.za> Jesse Noller added the comment: Resolved in r70717 on python trunk. Will merge back into 2.6-maint later today. Test added as well. ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 17:52:54 2009 From: report at bugs.python.org (Jesse Noller) Date: Mon, 30 Mar 2009 15:52:54 +0000 Subject: [issue5177] multiprocessing: SocketListener should use SO_REUSEADDR In-Reply-To: <1234015984.6.0.0454721510443.issue5177@psf.upfronthosting.co.za> Message-ID: <1238428374.77.0.908538447066.issue5177@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 17:53:26 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 30 Mar 2009 15:53:26 +0000 Subject: [issue1674032] Make threading.Event().wait(timeout=3) return isSet Message-ID: <1238428406.63.0.520650478421.issue1674032@psf.upfronthosting.co.za> Guido van Rossum added the comment: Looking at this, I think this change is fine. The _Event class itself holds the condition that it's checking for, and the is_set() method doesn't acquire the lock, so there's no reason to prefer e.wait() if e.is_set(): GOT_IT() over if e.wait(): GOT_IT() IOW Tim's reasoning in #1175933 for rejecting a similar change to _Condition.wait() doesn't apply here. I think we can go ahead without waiting for Tim to confirm this. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:03:58 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 16:03:58 +0000 Subject: [issue896199] Some Carbon modules missing from documentation Message-ID: <1238429038.77.0.846438464525.issue896199@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Fixed in r70719 (trunk) and r70720 (2.6) ---------- nosy: +ronaldoussoren resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:04:09 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 30 Mar 2009 16:04:09 +0000 Subject: [issue1522237] _threading_local.py logic error in _localbase __new__ Message-ID: <1238429049.87.0.691023222186.issue1522237@psf.upfronthosting.co.za> Guido van Rossum added the comment: Looks good to me. Amaury, can you make sure this lands in 2.6, 2.7, 3.0 and 3.1? ---------- assignee: -> amaury.forgeotdarc nosy: +gvanrossum resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:07:13 2009 From: report at bugs.python.org (Jack Diederich) Date: Mon, 30 Mar 2009 16:07:13 +0000 Subject: [issue5131] pprint doesn't know how to print a set or a defaultdict In-Reply-To: <1233592442.21.0.0563262599933.issue5131@psf.upfronthosting.co.za> Message-ID: <1238429233.72.0.617784597377.issue5131@psf.upfronthosting.co.za> Jack Diederich added the comment: py3k is different enough (esp the NEWS) that I'll have to apply it by hand. This patch was against the 2.x trunk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:11:46 2009 From: report at bugs.python.org (Jesse Noller) Date: Mon, 30 Mar 2009 16:11:46 +0000 Subject: [issue5570] Bus error when calling .poll() on a closed Connection from multiprocessing.Pipe() In-Reply-To: <1238094531.54.0.874632618778.issue5570@psf.upfronthosting.co.za> Message-ID: <1238429506.42.0.772926733119.issue5570@psf.upfronthosting.co.za> Jesse Noller added the comment: Merged back in CL 70721 on 26 maint ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:12:16 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 30 Mar 2009 16:12:16 +0000 Subject: [issue5606] The makefile dependencies listing formatter.h are wrong In-Reply-To: <1238429536.66.0.981803111622.issue5606@psf.upfronthosting.co.za> Message-ID: <1238429536.66.0.981803111622.issue5606@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : The makefile lists Objects/stringlib/formatter.h as a dependency for Objects/unicodeobject.o, which doesn't include formatter.h. Python/formatter_unicode includes it, but doesn't list it as a dependency. I've attached a patch for Makefile.pre.in for the trunk. I'm not sure which other versions might be affected. At some point in the past perhaps it was a dependency for unicodeobject.o. ---------- components: Interpreter Core files: formatter.patch keywords: patch messages: 84574 nosy: stutzbach severity: normal status: open title: The makefile dependencies listing formatter.h are wrong type: behavior versions: Python 3.1 Added file: http://bugs.python.org/file13472/formatter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:30:47 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 16:30:47 +0000 Subject: [issue974159] Starting a script in OSX within a specific folder Message-ID: <1238430647.69.0.774399303005.issue974159@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Floris: you can run the script from a Terminal window. Alternatively you can use the Python Launcher tool that's location in /Applications/Python X.Y (select it from the context-menu for a .py file) ---------- resolution: -> works for me stage: -> committed/rejected status: open -> closed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:32:42 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Mon, 30 Mar 2009 16:32:42 +0000 Subject: [issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim In-Reply-To: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> Message-ID: <1238430762.27.0.0637582552312.issue5129@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: r70723. Thanks for the patch! Backport to 2.6.2.... ---------- keywords: +26backport resolution: -> accepted versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:32:53 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Mon, 30 Mar 2009 16:32:53 +0000 Subject: [issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0 In-Reply-To: <1230586952.45.0.591912771259.issue4773@psf.upfronthosting.co.za> Message-ID: <1238430773.3.0.585555161257.issue4773@psf.upfronthosting.co.za> Jeremy Hylton added the comment: The attached file is vaguely related to the current discussion. I'd like to document the API for the urllib response, but I'd also like to simplify the implementation on the py3k side. We can document the simple API on the py3k side, then support some version of that API on the py2k side. Apologies for the noise in this patch. I was on a plane, and I don't understand DVCS yet. ---------- keywords: +patch Added file: http://bugs.python.org/file13473/addinfourl_removal.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:35:30 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Mon, 30 Mar 2009 16:35:30 +0000 Subject: [issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim In-Reply-To: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> Message-ID: <1238430930.64.0.363871544614.issue5129@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:39:14 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 16:39:14 +0000 Subject: [issue5607] Lib/distutils/test/test_util: test_get_platform bogus for OSX In-Reply-To: <1238431154.34.0.307596210829.issue5607@psf.upfronthosting.co.za> Message-ID: <1238431154.34.0.307596210829.issue5607@psf.upfronthosting.co.za> New submission from Ronald Oussoren : the testcase test_get_platform is not entirely correct for the OSX case. Background: OSX supports fat binary builds (Apple calls those Universal Binaries). The testitem for OSX gives a false negative when you run the test with a Universal Binary build of Python on OSX. To get correct test results on OSX you'll have to patch a number of other variables as well, such as CFLAGS, because get_platform uses those to detect if you're running on a universal build. ---------- assignee: tarek messages: 84578 nosy: ronaldoussoren, tarek severity: normal status: open title: Lib/distutils/test/test_util: test_get_platform bogus for OSX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:39:25 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 16:39:25 +0000 Subject: [issue5607] Lib/distutils/test/test_util: test_get_platform bogus for OSX In-Reply-To: <1238431154.34.0.307596210829.issue5607@psf.upfronthosting.co.za> Message-ID: <1238431165.54.0.0354755690315.issue5607@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:49:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 16:49:31 +0000 Subject: [issue1703178] link_objects in setup.cfg crashes build Message-ID: <1238431771.34.0.737078705803.issue1703178@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek components: +Build, Distutils -None nosy: +tarek stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:49:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 16:49:34 +0000 Subject: [issue1702036] Turtle isn't thread-safe (crashes) Message-ID: <1238431774.83.0.747192394191.issue1702036@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:49:37 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 16:49:37 +0000 Subject: [issue1711605] CGIHttpServer leaves traces of previous requests in env Message-ID: <1238431777.61.0.106365875504.issue1711605@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -Extension Modules stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:49:40 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 16:49:40 +0000 Subject: [issue1724822] provide a shlex.split alternative for Windows shell syntax Message-ID: <1238431780.88.0.763736380472.issue1724822@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> georg.brandl components: +Documentation stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:49:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 16:49:49 +0000 Subject: [issue1726208] SimpleHTTPServer extensions_map Message-ID: <1238431789.13.0.828861573425.issue1726208@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:49:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 16:49:54 +0000 Subject: [issue1714773] python throws an error when unpacking bz2 file Message-ID: <1238431794.51.0.269063099148.issue1714773@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Extension Modules -None stage: -> test needed type: -> crash versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:50:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 16:50:02 +0000 Subject: [issue1728741] move intern to sys, make intern() optionally warn Message-ID: <1238431802.1.0.0532345184665.issue1728741@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:50:04 2009 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 30 Mar 2009 16:50:04 +0000 Subject: [issue4799] handling inf/nan in '%f' In-Reply-To: <1230796367.25.0.681154044554.issue4799@psf.upfronthosting.co.za> Message-ID: <1238431804.96.0.725803624471.issue4799@psf.upfronthosting.co.za> Mark Dickinson added the comment: Assigning to Eric, at his request. ---------- assignee: marketdickinson -> eric.smith nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:54:10 2009 From: report at bugs.python.org (Ned Deily) Date: Mon, 30 Mar 2009 16:54:10 +0000 Subject: [issue5436] test_distutils fails with official Mac OS X Installer Disk Image (3.0.1) In-Reply-To: <1236446128.5.0.33521760843.issue5436@psf.upfronthosting.co.za> Message-ID: <1238432050.16.0.624567532153.issue5436@psf.upfronthosting.co.za> Ned Deily added the comment: I believe r69307, checked in after 3.0.1, removes the faulty test in test_get_python_inc so this failure no longer occurs on py3k builds snd this issue can probably be closed. ---------- nosy: +nad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:54:26 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 30 Mar 2009 16:54:26 +0000 Subject: [issue4482] 10e667.__format__('+') should return 'inf' In-Reply-To: <1228153945.74.0.126553636811.issue4482@psf.upfronthosting.co.za> Message-ID: <1238432066.18.0.410926272931.issue4482@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: Here's a patch to add tests for this and a few other problems with formatting inf/-inf/nan, as well as a patch that fixes the problems. ---------- keywords: +patch nosy: +stutzbach versions: +Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13474/inf-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 18:55:02 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 30 Mar 2009 16:55:02 +0000 Subject: [issue4482] 10e667.__format__('+') should return 'inf' In-Reply-To: <1228153945.74.0.126553636811.issue4482@psf.upfronthosting.co.za> Message-ID: <1238432102.2.0.00722292067595.issue4482@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : Added file: http://bugs.python.org/file13475/inf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:03:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:03:47 +0000 Subject: [issue1691387] Call sys.except_hook if exception occurs in __del__ Message-ID: <1238432627.15.0.496971069798.issue1691387@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:03:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:03:54 +0000 Subject: [issue1689458] pdb unable to jump to first statement Message-ID: <1238432634.52.0.319972477504.issue1689458@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:03:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:03:59 +0000 Subject: [issue1244861] Enable os.startfile and webbrowser.WindowsDefault on Cygwin Message-ID: <1238432639.31.0.518191622465.issue1244861@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Windows stage: -> test needed type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:04:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:04:08 +0000 Subject: [issue1699594] shlex fails to parse strings correctly Message-ID: <1238432648.68.0.986312915174.issue1699594@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +shlex.split() does not tokenize like the shell stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:04:15 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:04:15 +0000 Subject: [issue1700304] pydoc.help samples sys.stdout and sys.stdin at import time Message-ID: <1238432655.29.0.466611389865.issue1700304@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:04:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:04:20 +0000 Subject: [issue1697175] winreg module for cygwin? Message-ID: <1238432660.87.0.496741506679.issue1697175@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:04:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:04:26 +0000 Subject: [issue1690103] trace module borks __file__ Message-ID: <1238432666.6.0.99764541818.issue1690103@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:20:51 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 17:20:51 +0000 Subject: [issue4848] MacPython build script uses Carbon and MacOS modules slated for removal In-Reply-To: <1231175758.14.0.180038218422.issue4848@psf.upfronthosting.co.za> Message-ID: <1238433651.5.0.406647128046.issue4848@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Fixed in r70727 (trunk), r70728 (2.6) and r70729 (3.1) ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:22:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:22:48 +0000 Subject: [issue1590068] Error piping output between scripts on Windows Message-ID: <1238433768.03.0.587714414419.issue1590068@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Windows stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:23:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:23:22 +0000 Subject: [issue1590352] The "lazy strings" patch Message-ID: <1238433802.0.0.225817539192.issue1590352@psf.upfronthosting.co.za> Daniel Diniz added the comment: ISTM that 2.x won't receive this kind on enhancement anymore. Collin, I'm adding you to the nosy list because you may be interested in having this (either on unladen or CPython). If so, also take a look at issue 1569040. ---------- nosy: +ajaksu2, collinwinter versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:23:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:23:26 +0000 Subject: [issue1590744] mail message parsing glitch Message-ID: <1238433806.13.0.512409835639.issue1590744@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:23:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:23:34 +0000 Subject: [issue1592241] Stepping into a generator throw does not work Message-ID: <1238433814.71.0.991332623115.issue1592241@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:23:40 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:23:40 +0000 Subject: [issue1597798] Modules/readline.c fails to compile on AIX 4.2 Message-ID: <1238433820.27.0.0176268105853.issue1597798@psf.upfronthosting.co.za> Daniel Diniz added the comment: I'll close this on lack of feedback unless someone voices opposition. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:24:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:24:50 +0000 Subject: [issue1599254] mailbox: other programs' messages can vanish without trace Message-ID: <1238433890.69.0.283823882853.issue1599254@psf.upfronthosting.co.za> Daniel Diniz added the comment: Barry: is this on scope for the email sprint? ---------- keywords: +patch nosy: +ajaksu2, barry stage: -> patch review type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:24:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:24:56 +0000 Subject: [issue1600182] Tix ComboBox entry is blank when not editable Message-ID: <1238433896.14.0.473198703348.issue1600182@psf.upfronthosting.co.za> Daniel Diniz added the comment: Tim: do you agree with the default colors explanation? ---------- nosy: +ajaksu2, gpolo stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:24:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:24:59 +0000 Subject: [issue1606233] readline on popen3 file returns empty string before end Message-ID: <1238433899.28.0.299639840797.issue1606233@psf.upfronthosting.co.za> Daniel Diniz added the comment: Bill, A short script that is able to reproduce the issue would be very helpful. A unittest-based test that shows the problem would be even better. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:25:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:25:06 +0000 Subject: [issue1607951] mailbox.Maildir re-reads directory too often Message-ID: <1238433906.93.0.504349447107.issue1607951@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> resource usage versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:25:48 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 30 Mar 2009 17:25:48 +0000 Subject: [issue1590352] The "lazy strings" patch Message-ID: <1238433948.38.0.717012411529.issue1590352@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Either this bug or #1569040 should be closed as duplicate of the other (it's really the same approach by the same author at two different times :-)). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:28:00 2009 From: report at bugs.python.org (Thomas Willis) Date: Mon, 30 Mar 2009 17:28:00 +0000 Subject: [issue5608] Add python.exe to the path in windows? In-Reply-To: <1238434080.38.0.135810189607.issue5608@psf.upfronthosting.co.za> Message-ID: <1238434080.38.0.135810189607.issue5608@psf.upfronthosting.co.za> New submission from Thomas Willis : All the vast amounts of documentation out there on how to do neat things with python seem to assume that python is already in the system path. It would be nice if the installer went ahead and set this up for the user. In my experience there are windows users that don't know how to do that themselves. As a result, when opening a console(something else becoming more and more foreign to windows users....) and typing "python" they get an error and possibly give up, and go back to VB.net or Excel. This seems like it would be a relatively easy thing to setup for them and likely increase world domination. ---------- components: Windows messages: 84589 nosy: twillis severity: normal status: open title: Add python.exe to the path in windows? type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:29:34 2009 From: report at bugs.python.org (Maksim Kozyarchuk) Date: Mon, 30 Mar 2009 17:29:34 +0000 Subject: [issue5609] Create Unit Tests for nturl2path module In-Reply-To: <1238434174.72.0.622903214477.issue5609@psf.upfronthosting.co.za> Message-ID: <1238434174.72.0.622903214477.issue5609@psf.upfronthosting.co.za> New submission from Maksim Kozyarchuk : Added Unit Tests for nturl2path module. http://codereview.appspot.com/32072/show ---------- components: Tests messages: 84590 nosy: Kozyarchuk severity: normal status: open title: Create Unit Tests for nturl2path module versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:31:12 2009 From: report at bugs.python.org (Maksim Kozyarchuk) Date: Mon, 30 Mar 2009 17:31:12 +0000 Subject: [issue5609] Create Unit Tests for nturl2path module In-Reply-To: <1238434174.72.0.622903214477.issue5609@psf.upfronthosting.co.za> Message-ID: <1238434272.67.0.746867505708.issue5609@psf.upfronthosting.co.za> Maksim Kozyarchuk added the comment: Patch is available on Appshot, please review/approve. http://codereview.appspot.com/32072/show ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:39:17 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:39:17 +0000 Subject: [issue1608267] Create the DESTDIR as part of the make install process Message-ID: <1238434757.45.0.824300629914.issue1608267@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed title: Makefile fix -> Create the DESTDIR as part of the make install process type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:39:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:39:21 +0000 Subject: [issue1608805] Py_FileSystemDefaultEncoding can be non-canonical Message-ID: <1238434761.88.0.127714058317.issue1608805@psf.upfronthosting.co.za> Daniel Diniz added the comment: Does this affect 3.x? ---------- components: +Unicode nosy: +ajaksu2, haypo type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:39:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:39:27 +0000 Subject: [issue1608921] PyThread_release_lock with pthreads munges errno Message-ID: <1238434767.32.0.927049639789.issue1608921@psf.upfronthosting.co.za> Daniel Diniz added the comment: Stephan, Can you provide a test case? ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:39:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:39:32 +0000 Subject: [issue1610654] cgi.py multipart/form-data Message-ID: <1238434772.55.0.687746828663.issue1610654@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -Interpreter Core keywords: +patch stage: -> test needed type: -> performance versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:39:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:39:38 +0000 Subject: [issue1611154] os.path.exists("file/") failure on Solaris 9 Message-ID: <1238434778.24.0.542905131808.issue1611154@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Build stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:39:45 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:39:45 +0000 Subject: [issue1612012] builtin compile() doc needs PyCF_DONT_IMPLY_DEDENT Message-ID: <1238434785.25.0.838232718269.issue1612012@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:39:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 17:39:49 +0000 Subject: [issue1612262] Class Browser doesn't show internal classes Message-ID: <1238434789.47.0.626219971044.issue1612262@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk and py3k. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:47:04 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Mon, 30 Mar 2009 17:47:04 +0000 Subject: [issue1201569] allow running multiple instances of IDLE Message-ID: <1238435224.21.0.0231417387822.issue1201569@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- status: open -> closed superseder: -> Allowing multiple instances of IDLE with sub-processes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 19:59:37 2009 From: report at bugs.python.org (Tony Nelson) Date: Mon, 30 Mar 2009 17:59:37 +0000 Subject: [issue5610] email feedparser.py CRLFLF bug: $ vs \Z In-Reply-To: <1238435977.23.0.604038870745.issue5610@psf.upfronthosting.co.za> Message-ID: <1238435977.23.0.604038870745.issue5610@psf.upfronthosting.co.za> New submission from Tony Nelson : feedparser.py does not pares mixed newlines properly. NLCRE_eol, which is used to search for the various newlines at End Of Line, uses $ to match the end of string, but $ also matches \n$, due to a wise long-ago patch by the Effbot. This causes feedparser to match '\r\n\n' at '\r\n', and then to remove the last two characters, leaving '\r', thus eating up a line. Such mixed line endings can occur if a message with CRLF line endings is parsed, written out, and then parsed again. When explicitly searching for various newlines, the \Z end-of-string marker should be used instead. There are two improper uses of $ in feedparser.py. I don't see any others in the email package. NLCRE_eol = re.compile('(\r\n|\r|\n)$') should be: NLCRE_eol = re.compile('(\r\n|\r|\n)\Z') and boundary_re also needs the fix. I can write a test. Where exactly should it be put? ---------- components: Library (Lib) files: feedparser_crlflf.patch keywords: patch messages: 84595 nosy: barry, tony_nelson severity: normal status: open title: email feedparser.py CRLFLF bug: $ vs \Z versions: Python 2.6 Added file: http://bugs.python.org/file13476/feedparser_crlflf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:00:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:00:23 +0000 Subject: [issue1613479] pydoc info for a package doesn't list all package contents Message-ID: <1238436023.46.0.0778878683251.issue1613479@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:00:45 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:00:45 +0000 Subject: [issue1613500] Write mode option for fileinput module. Message-ID: <1238436045.83.0.83619909907.issue1613500@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:02:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:02:03 +0000 Subject: [issue1615376] subprocess doesn\'t handle SIGPIPE Message-ID: <1238436123.11.0.299879024309.issue1615376@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk and py3k. ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:02:07 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:02:07 +0000 Subject: [issue1616125] Cached globals+builtins lookup optimization Message-ID: <1238436127.82.0.602660575019.issue1616125@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +collinwinter stage: -> test needed type: -> performance versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:02:17 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:02:17 +0000 Subject: [issue1615158] POSIX capabilities support Message-ID: <1238436137.97.0.134123935737.issue1615158@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:02:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:02:23 +0000 Subject: [issue1616979] cp720 encoding map Message-ID: <1238436143.07.0.512415139947.issue1616979@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Unicode -None stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:03:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:03:55 +0000 Subject: [issue1617161] Instance methods compare equal when their self's are equal Message-ID: <1238436235.62.0.291927863476.issue1617161@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed in trunk and py3k. ---------- nosy: +ajaksu2 stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:04:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:04:05 +0000 Subject: [issue1621111] IDLE crashes on OS X 10.4 when "Preferences" selected Message-ID: <1238436245.77.0.000747066800391.issue1621111@psf.upfronthosting.co.za> Daniel Diniz added the comment: So, can this be closed or should we try to handle the two different issues (bad .idlerc\config-main.cfg, wrong Tcl/Tk) in a better way? ---------- components: +IDLE, Tkinter -Macintosh nosy: +ajaksu2, gpolo priority: high -> low stage: -> test needed status: open -> pending type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:04:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:04:11 +0000 Subject: [issue1621421] normalize namespace from minidom Message-ID: <1238436251.1.0.37408700251.issue1621421@psf.upfronthosting.co.za> Daniel Diniz added the comment: Patch has tests, fixes issue 1371937. ---------- dependencies: +minidom namespace problems nosy: +ajaksu2 stage: -> patch review type: -> behavior versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:09:48 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 30 Mar 2009 18:09:48 +0000 Subject: [issue3326] py3k shouldn't use -fno-strict-aliasing anymore In-Reply-To: <1215605479.82.0.766368773223.issue3326@psf.upfronthosting.co.za> Message-ID: <1238436588.35.0.0314902769013.issue3326@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: I'm using gcc 3.4.4 (cygwin) and I get the sames warnings as Alexandre. I examined a random sampling of the code generating the warnings, all of which followed this pattern: some_function((some_type **) &var_of_some_other_type); Since the variable isn't actually being dereferenced in the calling function, the code isn't violating the strict aliasing rules. I guess gcc 4.3 is smart enough to suppress the warning in cases like this. We could make the warning go away by replacing "(some_type **)" with "(void *)", though that perhaps decreases readability. Alternately we can just disregard the warnings on older versions of gcc. ---------- nosy: +stutzbach versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:10:07 2009 From: report at bugs.python.org (Chris Withers) Date: Mon, 30 Mar 2009 18:10:07 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1238436607.11.0.0755541749792.issue1974@psf.upfronthosting.co.za> Chris Withers added the comment: Barry and I talked about this and he's is now working on it. We're literally going to remove the \t folding substitution and have it do the default space folding substitution instead. ---------- resolution: -> accepted versions: +Python 2.6, Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:10:46 2009 From: report at bugs.python.org (Kirk McDonald) Date: Mon, 30 Mar 2009 18:10:46 +0000 Subject: [issue5611] Auto-detect indentation in C source in vimrc In-Reply-To: <1238436646.8.0.898787236764.issue5611@psf.upfronthosting.co.za> Message-ID: <1238436646.8.0.898787236764.issue5611@psf.upfronthosting.co.za> New submission from Kirk McDonald : According to PEP 7, older C source files are indented with tabs, and newer ones are indented with spaces. The vimrc file in the repository assumes that existing C source files should be indented with tabs, and it should indent with spaces when you create a new C source file. This has an obvious drawback: It will configure vim to use tabs when you edit a file that in fact uses spaces. The attached patch will search for the regex '^\t'; if it is found, vim will be configured to use tabs and an 8-column shiftwidth; and if it is not found, it will be configured to use spaces and a 4-column shiftwidth. ---------- components: Demos and Tools files: vimrc.diff keywords: patch messages: 84602 nosy: KirkMcDonald severity: normal status: open title: Auto-detect indentation in C source in vimrc versions: Python 2.7 Added file: http://bugs.python.org/file13477/vimrc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:14:10 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Mon, 30 Mar 2009 18:14:10 +0000 Subject: [issue5578] unqualified exec in class body In-Reply-To: <1238164857.67.0.53034733648.issue5578@psf.upfronthosting.co.za> Message-ID: <1238436850.03.0.36217545634.issue5578@psf.upfronthosting.co.za> Changes by Jeremy Hylton : ---------- assignee: -> jhylton nosy: +jhylton resolution: -> accepted type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:19:06 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 30 Mar 2009 18:19:06 +0000 Subject: [issue4385] Py_Object_HEAD_INIT in Py3k In-Reply-To: <1227311037.4.0.355018022535.issue4385@psf.upfronthosting.co.za> Message-ID: <1238437146.01.0.460602628688.issue4385@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : ---------- versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:25:16 2009 From: report at bugs.python.org (Chris Withers) Date: Mon, 30 Mar 2009 18:25:16 +0000 Subject: [issue5612] whitespace folding in the email package could be better ; -) In-Reply-To: <1238437516.03.0.51001864383.issue5612@psf.upfronthosting.co.za> Message-ID: <1238437516.03.0.51001864383.issue5612@psf.upfronthosting.co.za> New submission from Chris Withers : In python 3 this has been done better already, but in python2.7 we still have this problem: >>> from email.mime.text import MIMEText >>> m = MIMEText('foo') >>> m['Subject'] = 'AA '*40 >>> str(m) 'From nobody Mon Mar 30 13:22:44 2009\nContent-Type: text/plain; charset="us-ascii"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nSubject: AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA\n\tAA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA \n\nfoo' Note that all the AA's are single spaced, even though they were supposed to be double spaced. It should be noted that the fix for [issue1974] actually relies on this bug for the fix to work properly ;-) More work will be required to fix that bug when this bug is fixed :-( ---------- assignee: barry components: Library (Lib) messages: 84603 nosy: barry, cjw296 severity: normal status: open title: whitespace folding in the email package could be better ;-) versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:25:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:25:24 +0000 Subject: [issue1626300] 'Installing Python Modules' does not work for Windows Message-ID: <1238437524.35.0.839694673373.issue1626300@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch nosy: +ajaksu2 stage: -> needs patch type: -> feature request versions: +Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:28:28 2009 From: report at bugs.python.org (Chris Withers) Date: Mon, 30 Mar 2009 18:28:28 +0000 Subject: [issue1645148] MIME renderer: wrong header line break with long subject? Message-ID: <1238437708.92.0.11525281729.issue1645148@psf.upfronthosting.co.za> Chris Withers added the comment: This bug is a combination of [Issue1974] and [Issue5612]. [Issue1974] is being worked on. [Issue5612] is fixed in Python 3, but will need more work to be fixed in Python 2, *if* anyone cares about it... Please followup on one of these issues... ---------- assignee: barry -> cjw296 nosy: +cjw296 resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:28:48 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 30 Mar 2009 18:28:48 +0000 Subject: [issue2443] uninitialized access to va_list In-Reply-To: <1206095258.5.0.538024401904.issue2443@psf.upfronthosting.co.za> Message-ID: <1238437728.82.0.0574491351662.issue2443@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: Rolland, The va_list is initialized by the function that calls objargs_mktuple. va_start() and va_end() need to be called in the function that takes "..." as a parameter, and it is. Not a bug, but +1 on Alexander's patch to consolidate all the #ifdef's for cleanliness. ---------- nosy: +stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:32:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:32:28 +0000 Subject: [issue5608] Add python.exe to the path in windows? In-Reply-To: <1238434080.38.0.135810189607.issue5608@psf.upfronthosting.co.za> Message-ID: <1238437948.23.0.543861897448.issue5608@psf.upfronthosting.co.za> Daniel Diniz added the comment: Thomas, Thanks for the RFE, but this has been rejected before (see e.g. issue 3561). Please search the tracker and mailing lists for previous discussions, as you can make a better case based on them. Also note that issue 1626300 focuses the doc part. Setting as 'pending' until a patch or a (very) good rationale comes forward. ---------- dependencies: +'Installing Python Modules' does not work for Windows nosy: +ajaksu2 stage: -> test needed status: open -> pending versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:33:16 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:33:16 +0000 Subject: [issue1625576] add ability to specify name to os.fdopen Message-ID: <1238437996.24.0.956770829626.issue1625576@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:40:17 2009 From: report at bugs.python.org (Tim Driscoll) Date: Mon, 30 Mar 2009 18:40:17 +0000 Subject: [issue5613] test_posix.py and test_wait4.py having missing import on win32 In-Reply-To: <1238438417.18.0.73151997177.issue5613@psf.upfronthosting.co.za> Message-ID: <1238438417.18.0.73151997177.issue5613@psf.upfronthosting.co.za> New submission from Tim Driscoll : These are supposed to raise a unittest.SkipTest on win32 but the unittest import is missing. The patch just adds the missing import See patch here: http://codereview.appspot.com/32074/show ---------- components: Tests messages: 84607 nosy: brett.cannon, tdriscol severity: normal status: open title: test_posix.py and test_wait4.py having missing import on win32 type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:42:10 2009 From: report at bugs.python.org (Jesse Noller) Date: Mon, 30 Mar 2009 18:42:10 +0000 Subject: [issue3770] test_multiprocessing fails on systems with HAVE_SEM_OPEN=0 In-Reply-To: <1220487838.93.0.477905681389.issue3770@psf.upfronthosting.co.za> Message-ID: <1238438530.63.0.7570896207.issue3770@psf.upfronthosting.co.za> Jesse Noller added the comment: Having trouble reproducing this, do you have a chunk of code that hits this frequently? I want to add a test to check for this so I can confirm the fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:43:21 2009 From: report at bugs.python.org (lekma) Date: Mon, 30 Mar 2009 18:43:21 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238438601.84.0.0779783280142.issue5585@psf.upfronthosting.co.za> lekma added the comment: > Right, it's just the Thread/Process API equivalance. I'm not saying > it's a stopper, but the docs would probably need to be modified > accordingly. I'm a bit confused here. The patch only adds a small feature to BaseManager and subtypes (the same way Pool does it already). AFAICT the Thread/Process API equivalence is preserved. Am I missing something? This patch should be better: - checks that initializer is a callable, raise TypeError if not (do it for Pool.__init__ also). - adds tests for Pool.__init__ and SyncManager.start ---------- Added file: http://bugs.python.org/file13478/Issue5585_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:43:58 2009 From: report at bugs.python.org (Jesse Noller) Date: Mon, 30 Mar 2009 18:43:58 +0000 Subject: [issue3770] test_multiprocessing fails on systems with HAVE_SEM_OPEN=0 In-Reply-To: <1220487838.93.0.477905681389.issue3770@psf.upfronthosting.co.za> Message-ID: <1238438638.14.0.159345600255.issue3770@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:44:16 2009 From: report at bugs.python.org (Jesse Noller) Date: Mon, 30 Mar 2009 18:44:16 +0000 Subject: [issue3770] test_multiprocessing fails on systems with HAVE_SEM_OPEN=0 In-Reply-To: <1220487838.93.0.477905681389.issue3770@psf.upfronthosting.co.za> Message-ID: <1238438656.54.0.277992849071.issue3770@psf.upfronthosting.co.za> Jesse Noller added the comment: Sorry, I hit the wrong bug ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:48:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:48:08 +0000 Subject: [issue1633941] for line in sys.stdin: doesn't notice EOF the first time Message-ID: <1238438888.78.0.638054996066.issue1633941@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed title: for line in sys.stdin: doesn't notice EOF the first time -> for line in sys.stdin: doesn't notice EOF the first time type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:48:15 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:48:15 +0000 Subject: [issue1633600] using locale does not display the intended behavior Message-ID: <1238438895.5.0.733890820014.issue1633600@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:48:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:48:20 +0000 Subject: [issue1628205] socket.readline() interface doesn't handle EINTR properly Message-ID: <1238438900.3.0.440393064401.issue1628205@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:48:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:48:26 +0000 Subject: [issue1626545] Would you mind renaming object.h to pyobject.h? Message-ID: <1238438906.71.0.257650650477.issue1626545@psf.upfronthosting.co.za> Daniel Diniz added the comment: I don't see the slightest change of this happening. Will close unless opposition is voiced. ---------- keywords: +patch nosy: +ajaksu2 priority: normal -> low status: open -> pending versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:51:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 18:51:55 +0000 Subject: [issue1634034] Show "expected" token on syntax error Message-ID: <1238439115.77.0.861203426228.issue1634034@psf.upfronthosting.co.za> Daniel Diniz added the comment: Sounds really useful. ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:55:12 2009 From: report at bugs.python.org (Jesse Noller) Date: Mon, 30 Mar 2009 18:55:12 +0000 Subject: [issue4660] multiprocessing.JoinableQueue task_done() issue In-Reply-To: <1229273282.85.0.657676661464.issue4660@psf.upfronthosting.co.za> Message-ID: <1238439312.26.0.535751716595.issue4660@psf.upfronthosting.co.za> Jesse Noller added the comment: Hi Brian - do you have a chunk of code that exacerbates this? I'm having problems reproducing this, and need a test so I can prove out the fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 20:59:26 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 30 Mar 2009 18:59:26 +0000 Subject: [issue2518] smtpd.py to handle huge email In-Reply-To: <1206940317.15.0.464118270083.issue2518@psf.upfronthosting.co.za> Message-ID: <1238439566.8.0.983896467515.issue2518@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: -> test needed type: resource usage -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:04:17 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 19:04:17 +0000 Subject: [issue1634774] locale 1251 does not convert to upper case properly Message-ID: <1238439857.09.0.701080319348.issue1634774@psf.upfronthosting.co.za> Daniel Diniz added the comment: May be related to issue 1633600. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:04:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 19:04:21 +0000 Subject: [issue1635741] Interpreter seems to leak references after finalization Message-ID: <1238439861.86.0.53744971117.issue1635741@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> resource usage versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:04:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 19:04:28 +0000 Subject: [issue1637120] Python 2.5 fails to build on AIX 5.3 (xlc_r compiler) Message-ID: <1238439868.28.0.451893752067.issue1637120@psf.upfronthosting.co.za> Daniel Diniz added the comment: Orlando, Thomas: is this still valid? ---------- nosy: +ajaksu2 stage: -> test needed type: -> compile error versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:04:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 19:04:39 +0000 Subject: [issue1641544] rlcompleter tab completion in pdb Message-ID: <1238439879.34.0.383029857079.issue1641544@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:04:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 19:04:49 +0000 Subject: [issue1642054] Python 2.5 gets curses.h warning on HPUX Message-ID: <1238439889.34.0.403226135675.issue1642054@psf.upfronthosting.co.za> Daniel Diniz added the comment: Roy: still an issue for you? I'll close this if not. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:05:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 19:05:01 +0000 Subject: [issue1643712] Emphasize buffering issues when sys.stdin is used Message-ID: <1238439901.79.0.295044798705.issue1643712@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +for line in sys.stdin: doesn't notice EOF the first time stage: -> test needed type: -> feature request versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Mon Mar 30 21:06:42 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Mon, 30 Mar 2009 19:06:42 +0000 Subject: [issue5608] Add python.exe to the path in windows? In-Reply-To: <1238434080.38.0.135810189607.issue5608@psf.upfronthosting.co.za> Message-ID: <1238440002.05.0.090227060818.issue5608@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Actually, closing it as a duplicate of issue3561. ---------- nosy: +loewis resolution: -> duplicate status: pending -> closed superseder: -> Windows installer should add Python and Scripts directories to the PATH environment variable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:11:15 2009 From: report at bugs.python.org (Senthil) Date: Mon, 30 Mar 2009 19:11:15 +0000 Subject: [issue4675] urllib's splitpasswd does not accept newline chars in passwords In-Reply-To: <1229455632.0.0.358250268025.issue4675@psf.upfronthosting.co.za> Message-ID: <1238440275.78.0.625478023958.issue4675@psf.upfronthosting.co.za> Senthil added the comment: Verified the patch. Added unittest. Can be applied against the trunk (py27) and py3k (3.1) ---------- Added file: http://bugs.python.org/file13479/issue4675-py27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:11:30 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 30 Mar 2009 19:11:30 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238440290.4.0.48734761103.issue2578@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Updated patch after sprinting on this with Michael Foord. TODO: * update assertRaisesWithRegexpMatch to be a context manager. * documentation. i'm working on the docs now. ---------- Added file: http://bugs.python.org/file13480/unittest-new-asserts-gps02.diff.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:11:35 2009 From: report at bugs.python.org (Senthil) Date: Mon, 30 Mar 2009 19:11:35 +0000 Subject: [issue4675] urllib's splitpasswd does not accept newline chars in passwords In-Reply-To: <1229455632.0.0.358250268025.issue4675@psf.upfronthosting.co.za> Message-ID: <1238440295.98.0.946231646481.issue4675@psf.upfronthosting.co.za> Changes by Senthil : Added file: http://bugs.python.org/file13481/issue4675-py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:11:46 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 30 Mar 2009 19:11:46 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238440306.66.0.53196007249.issue2578@psf.upfronthosting.co.za> Changes by Gregory P. Smith : Removed file: http://bugs.python.org/file13447/unittest-new-asserts-gps01.diff.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:15:12 2009 From: report at bugs.python.org (Andreas Schawo) Date: Mon, 30 Mar 2009 19:15:12 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1238440512.63.0.366813742004.issue5463@psf.upfronthosting.co.za> Andreas Schawo added the comment: Doesn't took much time. Even nothing happend. PyLong_AsLong trys to convert to int bevor raising an Exception. I'm not sure if struct.pack('l', x) should raise an Exception when a float is given. In case of string there is one. I first did PyLong_Check the parameter and raised an StructError. But I removed this from the patch. I leaved the documentation untouched. Nobody will notice the changes. I increased the version number. Whether we overwork the Errors prior 3.1b or not we could leave it at 0.3. ---------- Added file: http://bugs.python.org/file13482/cleanup_float_coerce_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:20:20 2009 From: report at bugs.python.org (Yinon Ehrlich) Date: Mon, 30 Mar 2009 19:20:20 +0000 Subject: [issue2266] Missing documentation about old/new-style classes In-Reply-To: <1205167505.81.0.00833692461216.issue2266@psf.upfronthosting.co.za> Message-ID: <1238440820.27.0.18577787424.issue2266@psf.upfronthosting.co.za> Yinon Ehrlich added the comment: * http://docs.python.org/reference/datamodel.html covers new style and old style quite well. However, for the sake of the reader who reads it top-down, it will be nice to add internal cross references (to http://docs.python.org/reference/datamodel.html#new-style-and-classic-classes) * http://docs.python.org/tutorial/classes.html mentions old-style without any hint to the reader what it's. I suggest to add a link to http://docs.python.org/reference/datamodel.html#new-style-and-classic-classes. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:21:11 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 30 Mar 2009 19:21:11 +0000 Subject: [issue5611] Auto-detect indentation in C source in vimrc In-Reply-To: <1238436646.8.0.898787236764.issue5611@psf.upfronthosting.co.za> Message-ID: <1238440871.82.0.482862592656.issue5611@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon nosy: +brett.cannon priority: -> low stage: -> patch review type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:21:58 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 30 Mar 2009 19:21:58 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1238440290.4.0.48734761103.issue2578@psf.upfronthosting.co.za> Message-ID: <1238441000.6888.56.camel@fsol> Antoine Pitrou added the comment: > Updated patch after sprinting on this with Michael Foord. > > TODO: > * update assertRaisesWithRegexpMatch to be a context manager. Wouldn't it be simpler to make assertRaises return the exception and let the calling code match it as it feels like? (or, at least, find a shorter name than assertRaisesWithRegexpMatch :-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:26:11 2009 From: report at bugs.python.org (Jean-Michel Fauth) Date: Mon, 30 Mar 2009 19:26:11 +0000 Subject: [issue4626] compile() doesn't ignore the source encoding when a string is passed in In-Reply-To: <1228976357.63.0.133847904092.issue4626@psf.upfronthosting.co.za> Message-ID: <1238441171.03.0.496812204765.issue4626@psf.upfronthosting.co.za> Jean-Michel Fauth added the comment: Quick feedback from a Windows user. I made a few more tests with the freshly installed Pyton 3.1a1. The compile() function is running very well. As a side effect, it now possible to write an "execfile()" without any problem. Tests with execfile() versions reading files as text or as binary, with/without coding cookies, BOM, cp1252, cp850, cp437, utf-8 cookie, utf-8 with bom, .... (Of course, taking in account and managing universal newline). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:39:37 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 19:39:37 +0000 Subject: [issue5269] OS X Installer: add options to specify universal build type and deployment target In-Reply-To: <1234687874.34.0.561795974463.issue5269@psf.upfronthosting.co.za> Message-ID: <1238441977.35.0.666434212371.issue5269@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Committed as r70737 (trunk), r70738 (2.6), r70739 (3.1) There is a small issue related to the bsddb3 tests with a 4-way universal build on the trunk and 2.6, I'll look into that in the near future. ---------- assignee: ronaldoussoren -> rhettinger nosy: +rhettinger resolution: -> accepted status: open -> pending versions: -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:47:35 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 30 Mar 2009 19:47:35 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1238441000.6888.56.camel@fsol> Message-ID: Guido van Rossum added the comment: > Antoine Pitrou added the comment: > Wouldn't it be simpler to make assertRaises return the exception and let > the calling code match it as it feels like? Hm, that sounds awfully familiar. I can't recall if there was ever a good reason not to do this. > (or, at least, find a shorter name than assertRaisesWithRegexpMatch :-)) assertRaisesRegex? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:48:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 19:48:06 +0000 Subject: [issue1644987] ./configure --prefix=/ breaks, won't build C modules Message-ID: <1238442486.2.0.511382250047.issue1644987@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:48:07 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 19:48:07 +0000 Subject: [issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long) Message-ID: <1238442487.84.0.688274352775.issue1646068@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Build stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:48:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 19:48:11 +0000 Subject: [issue1646838] os.path, %HOME% set: realpath contradicts expanduser on '~' Message-ID: <1238442491.92.0.845261574354.issue1646838@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Windows priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:48:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 19:48:27 +0000 Subject: [issue1647654] No obvious and correct way to get the time zone offset Message-ID: <1238442507.03.0.649223691197.issue1647654@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +Time zone-capable variant of time.localtime type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:48:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 19:48:34 +0000 Subject: [issue1648102] proxy_bypass in urllib handling of macro Message-ID: <1238442514.98.0.412243308316.issue1648102@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:48:46 2009 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 30 Mar 2009 19:48:46 +0000 Subject: [issue5604] imp.find_module() mixes UTF8 and MBCS In-Reply-To: <1238423201.33.0.732435229283.issue5604@psf.upfronthosting.co.za> Message-ID: <1238442526.2.0.292120782019.issue5604@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Problem fixed, patch attached I inserted conversion path parameters to using Py_FileSystemDefaultEncoding for: * load_module * load_compiled * load_dynamic * load_source * load_package find_module is already has conversion. ---------- Added file: http://bugs.python.org/file13483/import.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 21:51:51 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 30 Mar 2009 19:51:51 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: Message-ID: <1238442792.6888.59.camel@fsol> Antoine Pitrou added the comment: > > Wouldn't it be simpler to make assertRaises return the exception and let > > the calling code match it as it feels like? > > Hm, that sounds awfully familiar. I can't recall if there was ever a > good reason not to do this. IIRC some people felt that having a function named "assertSomething" return something other None wasn't "pure". The other reason is that you couldn't get the raised exception in a very practical way if used as a context manager. > > (or, at least, find a shorter name than assertRaisesWithRegexpMatch :-)) > > assertRaisesRegex? Sounds better! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:00:21 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 20:00:21 +0000 Subject: [issue5270] OS X installer: faulty Python.app bundle inside of framework In-Reply-To: <1234688274.05.0.10424234912.issue5270@psf.upfronthosting.co.za> Message-ID: <1238443221.96.0.742976711355.issue5270@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Applied in r5270 (trunk), r70743 (2.6) and r70745 (3.1) ---------- resolution: -> accepted status: open -> closed versions: -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:01:23 2009 From: report at bugs.python.org (Jack Jansen) Date: Mon, 30 Mar 2009 20:01:23 +0000 Subject: [issue602291] Bgen should learn about booleans Message-ID: <1238443283.94.0.161319728297.issue602291@psf.upfronthosting.co.za> Jack Jansen added the comment: Close it. I'll revive my version of bgen whenever I find the time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:03:22 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 20:03:22 +0000 Subject: [issue602291] Bgen should learn about booleans Message-ID: <1238443402.66.0.221950323437.issue602291@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:03:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 20:03:41 +0000 Subject: [issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long) Message-ID: <1238443421.65.0.907984667991.issue1646068@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch type: feature request -> behavior versions: +Python 2.6, Python 3.0 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:04:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 20:04:44 +0000 Subject: [issue1648268] Parameter list mismatches (portation problem) Message-ID: <1238443484.58.0.483669187971.issue1648268@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Interpreter Core -None stage: -> patch review type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:04:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 20:04:48 +0000 Subject: [issue1648923] HP-UX: -lcurses missing for readline.so Message-ID: <1238443488.12.0.837894773552.issue1648923@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:05:46 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 20:05:46 +0000 Subject: [issue5271] OS X installer: build can fail on import checks In-Reply-To: <1234688710.61.0.976389854663.issue5271@psf.upfronthosting.co.za> Message-ID: <1238443546.4.0.707927852259.issue5271@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Committed as r70746 (trunk), r70748 (2.6) and r70749 (3.1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:06:38 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 20:06:38 +0000 Subject: [issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X In-Reply-To: <1217610966.27.0.918507533161.issue3485@psf.upfronthosting.co.za> Message-ID: <1238443598.11.0.845376715969.issue3485@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've committed a fix for this in r70746 and ported this to 3.1 and 2.6 as well. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:07:07 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 20:07:07 +0000 Subject: [issue5271] OS X installer: build can fail on import checks In-Reply-To: <1234688710.61.0.976389854663.issue5271@psf.upfronthosting.co.za> Message-ID: <1238443627.5.0.390222025486.issue5271@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:07:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 20:07:27 +0000 Subject: [issue1648957] HP-UX: _ctypes/libffi/src/ia64/ffi/__attribute__/native cc Message-ID: <1238443647.26.0.25434893083.issue1648957@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> theller components: +ctypes priority: normal -> low stage: -> test needed type: -> compile error versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:10:54 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 20:10:54 +0000 Subject: [issue5558] Python 3.0.1 Mac OS X install image ReadMe file is incorrect In-Reply-To: <1237935745.17.0.299901472709.issue5558@psf.upfronthosting.co.za> Message-ID: <1238443854.11.0.616403786788.issue5558@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've clarified the readme for the 3.1 installer. ---------- nosy: +ronaldoussoren resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.1 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:11:02 2009 From: report at bugs.python.org (Michael Foord) Date: Mon, 30 Mar 2009 20:11:02 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238443862.7.0.961218646715.issue2578@psf.upfronthosting.co.za> Michael Foord added the comment: New patch with assertRaisesWithRegexMatch as a context manager. ---------- keywords: +patch nosy: +mfoord Added file: http://bugs.python.org/file13484/unittest-new-asserts.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:13:05 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 30 Mar 2009 20:13:05 +0000 Subject: [issue5604] imp.find_module() mixes UTF8 and MBCS In-Reply-To: <1238423201.33.0.732435229283.issue5604@psf.upfronthosting.co.za> Message-ID: <1238443985.04.0.121667291574.issue5604@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: PyMem_Free is needed when "es" is used with PyArg_ParseTuple. See other part of import.c. I did same mistake before. ;-) ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:17:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 20:17:48 +0000 Subject: [issue1649011] HP-UX: compiler warnings: alignment Message-ID: <1238444268.74.0.629167401099.issue1649011@psf.upfronthosting.co.za> Daniel Diniz added the comment: Just a compiler warning, so I'll close this unless someone voices opposition. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:20:43 2009 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 30 Mar 2009 20:20:43 +0000 Subject: [issue5604] imp.find_module() mixes UTF8 and MBCS In-Reply-To: <1238443985.04.0.121667291574.issue5604@psf.upfronthosting.co.za> Message-ID: <270ea8310903301320x25320581kb89c7276a52a881d@mail.gmail.com> Andrew Svetlov added the comment: Thank you. On Mon, Mar 30, 2009 at 3:13 PM, Hirokazu Yamamoto wrote: > > Hirokazu Yamamoto added the comment: > > PyMem_Free is needed when "es" is used with PyArg_ParseTuple. See other > part of import.c. I did same mistake before. ;-) > > ---------- > nosy: +ocean-city > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:24:46 2009 From: report at bugs.python.org (Tal Einat) Date: Mon, 30 Mar 2009 20:24:46 +0000 Subject: [issue1529353] Squeezer - squeeze large output in the interpreter Message-ID: <1238444686.04.0.102542649493.issue1529353@psf.upfronthosting.co.za> Tal Einat added the comment: "Test needed"? I'll need a bit of guidance on this. Has there been a change of policy of which I'm not aware, that patches to IDLE not going to be accepted unless comprehensive tests are included? Much of IDLE doesn't include tests, e.g. the RPC code. There's a comment by K.B.K. in the end of rpc.py from September '03 saying we need a proper test suite for it, and testing that should be simple compared to testing GUI related functionality. In any case, if someone can suggest a simple approach to test Squeezer I'll gladly work it up. As it is, I can think of ways to test certain functions, but I'm not sure how to approach testing GUI related functionality (or if I should approach this at all). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:25:15 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 30 Mar 2009 20:25:15 +0000 Subject: [issue1324770] Adding redblack tree to collections module Message-ID: <1238444715.49.0.180609134425.issue1324770@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: I agree with Raymond. In general, the collections module should define containers that are named after their function rather than their implementation. That way the implementation can be changed at a later date (or in other Python implementations) without causing confusion, and it makes it more obvious what use-case the new collection is solving. That's my opinion, anyway. As much as I'd love to see more container types in the collections module (my kingdom for a heap with .decrease_key()!), I don't see what use-case this implementation of red-black trees fills. ---------- nosy: +stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:25:33 2009 From: report at bugs.python.org (Brian) Date: Mon, 30 Mar 2009 20:25:33 +0000 Subject: [issue4660] multiprocessing.JoinableQueue task_done() issue In-Reply-To: <1238439312.26.0.535751716595.issue4660@psf.upfronthosting.co.za> Message-ID: <4a3ced360903301325l4d3a74b8yd85a35ce4b49226@mail.gmail.com> Brian added the comment: Hey Jesse, It was good meeting you at Pycon. I don't have anything handy at the moment although, if memory serves, the most trivial of example seemed to illustrate the problem. Basically any situation where a joinable queue would keep bumping up against being empty (ie retiring items faster than they are being fed), and does enough work between get() and task_done() to be preempted would eventually break. FWIW I was running on a Windows box. I am afraid I am away from my computer until late tonight but I can try to cook something up then (I presume you are sprinting today?). Also I think the issue becomes clear when you think about what happens if joinablequeue.task_done() gets preempted between its few lines. -brian On Mon, Mar 30, 2009 at 2:55 PM, Jesse Noller wrote: > > Jesse Noller added the comment: > > Hi Brian - do you have a chunk of code that exacerbates this? I'm having > problems reproducing this, and need a test so I can prove out the fix. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file13485/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Hey Jesse,

It was good meeting you at Pycon. ??I don't have anything handy at the moment although, if memory serves, the most trivial of example seemed to illustrate the problem. ??Basically any situation where a joinable queue would keep bumping up against being empty (ie retiring items faster than they are being fed), and does enough work between get() and task_done() to be preempted would eventually break. ??FWIW I was running on a Windows box.

I am afraid I am away from my computer until late tonight but I can try to cook something up then (I presume you are sprinting today?). ??Also I think the issue becomes clear when you think about what happens if joinablequeue.task_done() gets preempted between its few lines.

-brian

On Mon, Mar 30, 2009 at 2:55 PM, Jesse Noller <report at bugs.python.org> wrote:

Jesse Noller <jnoller at gmail.com> added the comment:

Hi Brian - do you have a chunk of code that exacerbates this? I'm having
problems reproducing this, and need a test so I can prove out the fix.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4660>
_______________________________________

From report at bugs.python.org Mon Mar 30 22:31:33 2009 From: report at bugs.python.org (Senthil) Date: Mon, 30 Mar 2009 20:31:33 +0000 Subject: [issue5208] urllib2.build_opener( In-Reply-To: <1234286185.85.0.555213161426.issue5208@psf.upfronthosting.co.za> Message-ID: <1238445093.55.0.114628903014.issue5208@psf.upfronthosting.co.za> Senthil added the comment: Georg, I think this can be closed as invalid. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:34:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 20:34:19 +0000 Subject: [issue1649329] gettext.py incompatible with eggs Message-ID: <1238445259.67.0.510590807744.issue1649329@psf.upfronthosting.co.za> Daniel Diniz added the comment: Not really a distutils issue, but fits the current distribution discussion scope. ---------- assignee: -> tarek components: +Distutils keywords: +patch nosy: +ajaksu2, tarek stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:40:17 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 30 Mar 2009 20:40:17 +0000 Subject: [issue2972] arguments and default path not set in site.py and sitecustomize.py In-Reply-To: <1211818636.32.0.584139114136.issue2972@psf.upfronthosting.co.za> Message-ID: <1238445617.92.0.208701025262.issue2972@psf.upfronthosting.co.za> Brett Cannon added the comment: This cannot change as sys.argv needs to be set after Python initializes to strip out what arguments were meant for the interpreter and not the script being run. All of this also needs to happen with site executing first, so this cannot be changed. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:42:46 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 30 Mar 2009 20:42:46 +0000 Subject: [issue5236] time.strptime should reject bytes arguments on Py3 In-Reply-To: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> Message-ID: <1238445766.83.0.156798829396.issue5236@psf.upfronthosting.co.za> Brett Cannon added the comment: I am going to do a review at http://codereview.appspot.com/28147 ; not done yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:42:50 2009 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 30 Mar 2009 20:42:50 +0000 Subject: [issue5604] imp.find_module() mixes UTF8 and MBCS In-Reply-To: <1238423201.33.0.732435229283.issue5604@psf.upfronthosting.co.za> Message-ID: <1238445770.54.0.652384589653.issue5604@psf.upfronthosting.co.za> Andrew Svetlov added the comment: According to Hirokazu Yamamoto memory cleanup added. Patch is updated. ---------- Added file: http://bugs.python.org/file13486/import.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:48:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 20:48:32 +0000 Subject: [issue1529353] Squeezer - squeeze large output in the interpreter Message-ID: <1238446112.38.0.219999399697.issue1529353@psf.upfronthosting.co.za> Daniel Diniz added the comment: Tal, There is no such policy AFAIK. The stage field is a tool to help us handle the issues, sorry to give you a wrong impression. If IDLE has no tests, 'test needed' doesn't apply here, so we can set this to 'patch review'. If someone is already working on adding tests for IDLE, please revert this to 'test needed'. ---------- nosy: +ajaksu2 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 22:52:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 20:52:47 +0000 Subject: [issue1650090] doctest doesn't find nested functions Message-ID: <1238446367.23.0.920704114692.issue1650090@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tests -None stage: -> patch review type: -> performance versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:01:37 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 21:01:37 +0000 Subject: [issue763708] Failures in test_macostools for --enable-unicode=ucs4 Message-ID: <1238446897.81.0.0529241283618.issue763708@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The attached file issue763708.patch changes configure.in and disables the toolbox glue when doing a UCS4 build. To get this behaviour I had to move a couple of sections around inside configure.in (--enable-toolbox-glue was checked for before the size of unicode characters was known). ---------- keywords: +26backport, needs review, patch versions: +Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13487/issue763708.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:03:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:03:05 +0000 Subject: [issue1653416] print >> f, "Hello" produces no error: normal? Message-ID: <1238446985.21.0.736304605329.issue1653416@psf.upfronthosting.co.za> Daniel Diniz added the comment: Can anyone confirm this for Mac? ---------- components: +Macintosh nosy: +ajaksu2 stage: -> test needed versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:06:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:06:20 +0000 Subject: [issue1651995] sgmllib _convert_ref UnicodeDecodeError exception, new in 2.5 Message-ID: <1238447180.85.0.884854074818.issue1651995@psf.upfronthosting.co.za> Daniel Diniz added the comment: A patch against SVN trunk including a unittest would be great. ---------- keywords: +patch nosy: +ajaksu2 stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:06:53 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:06:53 +0000 Subject: [issue1651427] readline needs termcap on my FC6 Message-ID: <1238447213.8.0.859919884654.issue1651427@psf.upfronthosting.co.za> Daniel Diniz added the comment: guichaz: can you confirm this for newer versions? ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:11:56 2009 From: report at bugs.python.org (Michael Foord) Date: Mon, 30 Mar 2009 21:11:56 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238447516.32.0.426428329558.issue2578@psf.upfronthosting.co.za> Michael Foord added the comment: Updated patch with asserts in unittest changed to explicitly raising self.failureException, hardcoded AssertionError in tests changed to self.failureException and addition of assertRegexMatches. ---------- Added file: http://bugs.python.org/file13488/unittest-new-asserts.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:23:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:23:59 +0000 Subject: [issue1653457] Python misbehaves when installed in / (patch attached) Message-ID: <1238448239.57.0.372269745432.issue1653457@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Extension Modules dependencies: +./configure --prefix=/ breaks, won't build C modules stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:24:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:24:06 +0000 Subject: [issue1654367] [PATCH] Debuggers need a way to change the locals of a frame Message-ID: <1238448246.95.0.0109100526263.issue1654367@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> patch review versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:24:25 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:24:25 +0000 Subject: [issue1654408] Installer should split tcl/tk and tkinter install options. Message-ID: <1238448265.18.0.0680011322628.issue1654408@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Installation stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:24:35 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:24:35 +0000 Subject: [issue1654429] thread join() with timeout hangs on Windows 2003 x64 Message-ID: <1238448275.95.0.150738711035.issue1654429@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Windows stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:24:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:24:43 +0000 Subject: [issue1654974] Binding annotations in tracebacks. Message-ID: <1238448283.21.0.381506951142.issue1654974@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:24:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:24:52 +0000 Subject: [issue1658799] Handle requests to intern string subtype instances Message-ID: <1238448292.82.0.184830057712.issue1658799@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as the patch was retracted. Please reopen if you disagree. ---------- nosy: +ajaksu2 resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:25:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:25:05 +0000 Subject: [issue1659171] Calling tparm from extension lib fails in Python 2.5 Message-ID: <1238448305.65.0.590374335801.issue1659171@psf.upfronthosting.co.za> Daniel Diniz added the comment: I'll close this unless someone can confirm for 2.6. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:25:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:25:12 +0000 Subject: [issue1659410] Minor AST tweaks Message-ID: <1238448312.07.0.328775576263.issue1659410@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:25:18 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:25:18 +0000 Subject: [issue1659705] Python extension problems after re-install Message-ID: <1238448318.79.0.0865824070542.issue1659705@psf.upfronthosting.co.za> Daniel Diniz added the comment: Can anyone confirm for recent versions? ---------- components: +Installation nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:30:16 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 21:30:16 +0000 Subject: [issue5413] urllib ctypes error on Mac OS X Server 10.5 In-Reply-To: <1236124544.96.0.577290884621.issue5413@psf.upfronthosting.co.za> Message-ID: <1238448616.99.0.701744093935.issue5413@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't have a PPC machine handy at the moment, but I hope the attached copy of urllib fixes the issue. Could you please test if that's indeed the case? ---------- keywords: +patch Added file: http://bugs.python.org/file13489/urllib5413.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:31:26 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 30 Mar 2009 21:31:26 +0000 Subject: [issue5236] time.strptime should reject bytes arguments on Py3 In-Reply-To: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> Message-ID: <1238448686.34.0.105677073201.issue5236@psf.upfronthosting.co.za> Brett Cannon added the comment: Applied in r70755 for py3k. I am not backporting as I changed it to explicitly check both arguments which is a change in semantics. ---------- resolution: -> accepted status: open -> closed versions: -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:34:52 2009 From: report at bugs.python.org (Senthil) Date: Mon, 30 Mar 2009 21:34:52 +0000 Subject: [issue4962] urlparse & nfs url (rfc 2224) In-Reply-To: <1232101704.89.0.669847506906.issue4962@psf.upfronthosting.co.za> Message-ID: <1238448892.62.0.176007634377.issue4962@psf.upfronthosting.co.za> Senthil added the comment: Patch to fix this. Looked into the RFCs and I do not find a reason why the nfs://server/path/to/file.txt should not be parsed as: >>> urlparse.urlsplit('nfs://server/path/to/file.txt') SplitResult(scheme='nfs', netloc='server', path='/path/to/file.txt', query='', fragment='') Patch and Tests added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:35:08 2009 From: report at bugs.python.org (Senthil) Date: Mon, 30 Mar 2009 21:35:08 +0000 Subject: [issue4962] urlparse & nfs url (rfc 2224) In-Reply-To: <1232101704.89.0.669847506906.issue4962@psf.upfronthosting.co.za> Message-ID: <1238448908.46.0.0150794680328.issue4962@psf.upfronthosting.co.za> Changes by Senthil : ---------- keywords: +patch Added file: http://bugs.python.org/file13490/issue4962-py27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:35:21 2009 From: report at bugs.python.org (Senthil) Date: Mon, 30 Mar 2009 21:35:21 +0000 Subject: [issue4962] urlparse & nfs url (rfc 2224) In-Reply-To: <1232101704.89.0.669847506906.issue4962@psf.upfronthosting.co.za> Message-ID: <1238448921.21.0.520211597436.issue4962@psf.upfronthosting.co.za> Changes by Senthil : Added file: http://bugs.python.org/file13491/issue4962-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:36:32 2009 From: report at bugs.python.org (Tal Einat) Date: Mon, 30 Mar 2009 21:36:32 +0000 Subject: [issue1529353] Squeezer - squeeze large output in the interpreter Message-ID: <1238448992.88.0.171143167309.issue1529353@psf.upfronthosting.co.za> Tal Einat added the comment: Daniel, Thanks for clearing that up :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:40:11 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Mon, 30 Mar 2009 21:40:11 +0000 Subject: [issue4962] urlparse & nfs url (rfc 2224) In-Reply-To: <1232101704.89.0.669847506906.issue4962@psf.upfronthosting.co.za> Message-ID: <1238449211.3.0.477716230959.issue4962@psf.upfronthosting.co.za> Jeremy Hylton added the comment: looks good to me ---------- nosy: +jhylton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:41:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:41:08 +0000 Subject: [issue1661754] ftplib passive ftp problem on multihomed clients Message-ID: <1238449268.4.0.644871128031.issue1661754@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +giampaolo.rodola stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:41:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:41:12 +0000 Subject: [issue1669349] make install fails if no previous Python installation Message-ID: <1238449272.62.0.387728308598.issue1669349@psf.upfronthosting.co.za> Daniel Diniz added the comment: Bumping priority so this has a better change of being confirmed/closed. ---------- nosy: +ajaksu2 priority: normal -> high stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:41:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:41:19 +0000 Subject: [issue1669539] Change (fix!) os.path.isabs() semantics on Win32 Message-ID: <1238449279.8.0.355423365377.issue1669539@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:41:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:41:24 +0000 Subject: [issue1670765] email.Generator: no header wrapping for multipart/signed Message-ID: <1238449284.88.0.322007857489.issue1670765@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:41:35 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:41:35 +0000 Subject: [issue1671676] test_mailbox is hanging while doing gmake test on HP-UX v3 Message-ID: <1238449295.94.0.582792183253.issue1671676@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tests priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:42:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:42:20 +0000 Subject: [issue1672568] silent error in email.message.Message.get_payload Message-ID: <1238449340.54.0.164726809619.issue1672568@psf.upfronthosting.co.za> Daniel Diniz added the comment: Renaud: providing a test script would help us here. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:42:25 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 21:42:25 +0000 Subject: [issue1673203] add identity function Message-ID: <1238449345.89.0.38324033256.issue1673203@psf.upfronthosting.co.za> Daniel Diniz added the comment: I suggest closing per http://mail.python.org/pipermail/python-ideas/2009-March/003647.html ---------- components: +Extension Modules -None nosy: +ajaksu2 priority: normal -> low stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:42:59 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Mon, 30 Mar 2009 21:42:59 +0000 Subject: [issue4675] urllib's splitpasswd does not accept newline chars in passwords In-Reply-To: <1229455632.0.0.358250268025.issue4675@psf.upfronthosting.co.za> Message-ID: <1238449379.92.0.242225098121.issue4675@psf.upfronthosting.co.za> Jeremy Hylton added the comment: looks good to me ---------- nosy: +jhylton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:43:03 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 30 Mar 2009 21:43:03 +0000 Subject: [issue3770] test_multiprocessing fails on systems with HAVE_SEM_OPEN=0 In-Reply-To: <1220487838.93.0.477905681389.issue3770@psf.upfronthosting.co.za> Message-ID: <1238449383.04.0.702314818027.issue3770@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:49:02 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 30 Mar 2009 21:49:02 +0000 Subject: [issue5604] imp.find_module() mixes UTF8 and MBCS In-Reply-To: <1238423201.33.0.732435229283.issue5604@psf.upfronthosting.co.za> Message-ID: <1238449742.64.0.681003380798.issue5604@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks Andrew! Committed to 3.0.2 as 70756. Should be merged into 3.1, but should *not* be backported to 2.x. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:49:08 2009 From: report at bugs.python.org (John Ehresman) Date: Mon, 30 Mar 2009 21:49:08 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1218712281.34.0.473878484861.issue3551@psf.upfronthosting.co.za> Message-ID: <1238449748.64.0.908292700171.issue3551@psf.upfronthosting.co.za> John Ehresman added the comment: I'll try to work on a patch for this, but the reproduce.py script seems to spawn dozens of sub-interpreters right now when run with trunk (python 2.7) on win32 ---------- nosy: +jpe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:52:25 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 30 Mar 2009 21:52:25 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> Message-ID: <1238449945.47.0.348099502935.issue5239@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: This issue seems to be fixed on py3k by r70755. (issue5236) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:52:28 2009 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 30 Mar 2009 21:52:28 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1238449948.43.0.287393319622.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: Eric and I have set up a branch of py3k for work on this issue. URL for (read-only) checkout is: http://svn.python.org/projects/python/branches/py3k-short-float-repr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:53:26 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 30 Mar 2009 21:53:26 +0000 Subject: [issue763708] Failures in test_macostools for --enable-unicode=ucs4 Message-ID: <1238450006.52.0.0449896079091.issue763708@psf.upfronthosting.co.za> Brett Cannon added the comment: Patch looks fine to me. ---------- assignee: jackjansen -> ronaldoussoren resolution: later -> stage: test needed -> patch review type: behavior -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:53:57 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 21:53:57 +0000 Subject: [issue1653416] print >> f, "Hello" produces no error: normal? Message-ID: <1238450037.57.0.683549134907.issue1653416@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This issue is still present on OSX: Python 2.6.1+ (release26-maint:70603, Mar 26 2009, 08:38:03) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> f = open("/dev/null") >>> print >>f, "hello" >>> f = open("/etc/hosts") >>> print >>f, "world" >>> This is a 2.6.x build from earlier this week. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:54:25 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 30 Mar 2009 21:54:25 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> Message-ID: <1238450065.49.0.557713903408.issue5239@psf.upfronthosting.co.za> Brett Cannon added the comment: As Hirokazu pointed out, this was fixed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:54:38 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 21:54:38 +0000 Subject: [issue900502] bundlebuilder: some way to add non-py files in packages Message-ID: <1238450078.47.0.827604363314.issue900502@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:57:01 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 30 Mar 2009 21:57:01 +0000 Subject: [issue5497] openssl compileerror with original source In-Reply-To: <1237272241.76.0.44185655243.issue5497@psf.upfronthosting.co.za> Message-ID: <1238450221.21.0.98051777982.issue5497@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 30 23:58:43 2009 From: report at bugs.python.org (Senthil) Date: Mon, 30 Mar 2009 21:58:43 +0000 Subject: [issue4675] urllib's splitpasswd does not accept newline chars in passwords In-Reply-To: <1229455632.0.0.358250268025.issue4675@psf.upfronthosting.co.za> Message-ID: <1238450323.56.0.940077959486.issue4675@psf.upfronthosting.co.za> Senthil added the comment: Fixed. ---------- assignee: -> orsenthil resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:02:07 2009 From: report at bugs.python.org (Senthil) Date: Mon, 30 Mar 2009 22:02:07 +0000 Subject: [issue4962] urlparse & nfs url (rfc 2224) In-Reply-To: <1232101704.89.0.669847506906.issue4962@psf.upfronthosting.co.za> Message-ID: <1238450527.16.0.363725944252.issue4962@psf.upfronthosting.co.za> Senthil added the comment: fixed. ---------- assignee: -> orsenthil resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:02:56 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 22:02:56 +0000 Subject: [issue5614] Malloc errors in test_io In-Reply-To: <1238450576.61.0.363286616174.issue5614@psf.upfronthosting.co.za> Message-ID: <1238450576.61.0.363286616174.issue5614@psf.upfronthosting.co.za> New submission from Ronald Oussoren : The malloc warnings happen on OSX, with a fresh checkout of the python3 branch. Python was build using --enable-universalsdk=/ --with-universal- archs=all, on a x86_64 capable laptop running Leopard. The issue goes away when running from the commandline, the "-E -bb" flags that 'make test' use seem to be involved in the issue. test_io Testing large file ops skipped on darwin. It requires 2147483648 bytes and a long time. Use 'regrtest.py -u largefile test_io' to run it. Testing large file ops skipped on darwin. It requires 2147483648 bytes and a long time. Use 'regrtest.py -u largefile test_io' to run it. python.exe(35535,0x7fff701d1720) malloc: *** mmap(size=- 9223372036854775808) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug python.exe(35535,0x7fff701d1720) malloc: *** mmap(size=- 9223372036854775808) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug python.exe(35535,0x7fff701d1720) malloc: *** mmap(size=- 9223372036854775808) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug test_ioctl ---------- messages: 84672 nosy: nad, ronaldoussoren severity: normal status: open title: Malloc errors in test_io _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:03:04 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 30 Mar 2009 22:03:04 +0000 Subject: [issue5615] linking fails when configured --without-threads In-Reply-To: <1238450584.26.0.327846530944.issue5615@psf.upfronthosting.co.za> Message-ID: <1238450584.26.0.327846530944.issue5615@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : A few spots are missing #ifdef WITH_THREAD I've included a patch for the relevant bits. ---------- components: Extension Modules, Interpreter Core files: without-threads.patch keywords: patch messages: 84673 nosy: stutzbach severity: normal status: open title: linking fails when configured --without-threads type: compile error versions: Python 3.1 Added file: http://bugs.python.org/file13492/without-threads.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:08:19 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 22:08:19 +0000 Subject: [issue5614] Malloc errors in test_io In-Reply-To: <1238450576.61.0.363286616174.issue5614@psf.upfronthosting.co.za> Message-ID: <1238450899.79.0.599508058172.issue5614@psf.upfronthosting.co.za> Ronald Oussoren added the comment: What's more annoying: the error goes away while running in a debugger. The issue happens at least in tes_constructor: test_constructor (__main__.CBufferedWriterTest) ... python.exe(35957,0x7fff701d1720) malloc: *** mmap(size=- 9223372036854775808) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:08:35 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:08:35 +0000 Subject: [issue1674555] Python 2.5 testsuite sys.path contains system dirs Message-ID: <1238450915.42.0.074012292512.issue1674555@psf.upfronthosting.co.za> Daniel Diniz added the comment: Theodoros, Can you provide a short script that reproduces this? ---------- components: +Tests nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:08:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:08:42 +0000 Subject: [issue1675026] Redirect cause invalid descriptor error Message-ID: <1238450922.9.0.330730414063.issue1675026@psf.upfronthosting.co.za> Daniel Diniz added the comment: Issue 1590068 seems to be the same problem. ---------- assignee: -> georg.brandl components: +Documentation dependencies: +Error piping output between scripts on Windows nosy: +ajaksu2 stage: -> test needed type: -> feature request versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:08:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:08:48 +0000 Subject: [issue1676121] Problem linking to readline lib on x86(64) Solaris Message-ID: <1238450928.26.0.79092387522.issue1676121@psf.upfronthosting.co.za> Daniel Diniz added the comment: The "ac_cv_have_readline" check isn't present in trunk. I'll close this unless someone voices opposition. ---------- components: +Build -None nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:09:15 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:09:15 +0000 Subject: [issue1676135] Remove trailing slash from --prefix Message-ID: <1238450955.69.0.904028236941.issue1676135@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Installation stage: -> patch review type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:09:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:09:28 +0000 Subject: [issue1676820] Add a PeriodicTimer to threading Message-ID: <1238450968.62.0.33493701358.issue1676820@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:09:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:09:42 +0000 Subject: [issue1367631] maximum length not enforced in cgi.parse() Message-ID: <1238450982.71.0.129261426023.issue1367631@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:10:02 2009 From: report at bugs.python.org (John Ehresman) Date: Mon, 30 Mar 2009 22:10:02 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1218712281.34.0.473878484861.issue3551@psf.upfronthosting.co.za> Message-ID: <1238451002.73.0.301645359979.issue3551@psf.upfronthosting.co.za> Changes by John Ehresman : Added file: http://bugs.python.org/file13493/reproduce.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:10:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:10:04 +0000 Subject: [issue1681842] splitext of dotfiles, incl backwards compat and migration Message-ID: <1238451004.21.0.985129318046.issue1681842@psf.upfronthosting.co.za> Daniel Diniz added the comment: Still needs a pronouncement. IMHO, should be included in the CoobBook or PyPI if it doesn't get added to the standard lib. ---------- nosy: +ajaksu2 stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:10:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:10:10 +0000 Subject: [issue1690608] email.utils.formataddr() should be rfc2047 aware Message-ID: <1238451010.26.0.506941643897.issue1690608@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:10:11 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 22:10:11 +0000 Subject: [issue763708] Failures in test_macostools for --enable-unicode=ucs4 Message-ID: <1238451011.71.0.982220445532.issue763708@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm not yet sure that patch is correct, I got some build failure during later tests that went away when I reverted this patch. To be continued... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:11:19 2009 From: report at bugs.python.org (Jesse Noller) Date: Mon, 30 Mar 2009 22:11:19 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1218712281.34.0.473878484861.issue3551@psf.upfronthosting.co.za> Message-ID: <1238451079.15.0.939305482397.issue3551@psf.upfronthosting.co.za> Jesse Noller added the comment: John, can you try this on trunk: from multiprocessing import * latin = str SENTINEL = latin('') def _echo(conn): for msg in iter(conn.recv_bytes, SENTINEL): conn.send_bytes(msg) conn.close() conn, child_conn = Pipe() p = Process(target=_echo, args=(child_conn,)) p.daemon = True p.start() really_big_msg = latin('X') * (1024 * 1024 * 32) conn.send_bytes(really_big_msg) assert conn.recv_bytes() == really_big_msg conn.send_bytes(SENTINEL) # tell child to quit child_conn.close() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:12:36 2009 From: report at bugs.python.org (Georg Brandl) Date: Mon, 30 Mar 2009 22:12:36 +0000 Subject: [issue5199] warns vars() assignment as well as locals() In-Reply-To: <1234251967.11.0.473034551632.issue5199@psf.upfronthosting.co.za> Message-ID: <1238451156.42.0.748704376775.issue5199@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r70765. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:18:53 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 30 Mar 2009 22:18:53 +0000 Subject: [issue1074015] current directory in sys.path handles symlinks badly Message-ID: <1238451533.68.0.452917510269.issue1074015@psf.upfronthosting.co.za> Brett Cannon added the comment: So the joe directory is put on sys.path instead of lib because joe.py resolves to joe/joe.py. I think that is correct semantics as you may symlink that file into your bin directory but the original file has dependencies in that location. Plus changing it now would break scripts depending on the current semantics. Closing as won't fix. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:19:29 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 30 Mar 2009 22:19:29 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1218712281.34.0.473878484861.issue3551@psf.upfronthosting.co.za> Message-ID: <1238451569.9.0.543465070505.issue3551@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Really? Hmm weird... I'm using Win2000, maybe are you using newer OS? Or maybe larger data is needed. This guy says error occurs around 200MB. (This is async IO though) >http://www.gamedev.net/community/forums/topic.asp?topic_id=382135 If this happens only on my machine, maybe you can close this entry as "works for me". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:20:27 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 30 Mar 2009 22:20:27 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1218712281.34.0.473878484861.issue3551@psf.upfronthosting.co.za> Message-ID: <1238451627.46.0.840152447185.issue3551@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Ah, I forgot this. Process#set_daemon doesn't exist on trunk, I had to use "p.daemon = True" instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:20:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:20:42 +0000 Subject: [issue1512] Removal of stale code in pyconfig.h In-Reply-To: <1196259247.47.0.175425290011.issue1512@psf.upfronthosting.co.za> Message-ID: <1238451642.73.0.756184437409.issue1512@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:24:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:24:04 +0000 Subject: [issue1244208] expat binding for XML_ParserReset (Bug #1208730) Message-ID: <1238451844.14.0.291530784513.issue1244208@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing in favor of issue 1208730. ---------- dependencies: -expat binding for XML_ParserReset nosy: +ajaksu2 resolution: -> duplicate stage: test needed -> committed/rejected status: open -> closed superseder: -> expat binding for XML_ParserReset _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:24:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:24:33 +0000 Subject: [issue1208730] expat binding for XML_ParserReset Message-ID: <1238451873.66.0.819904196199.issue1208730@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +XML keywords: +patch stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:25:30 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 30 Mar 2009 22:25:30 +0000 Subject: [issue1534764] sys.path gets munged with certain directory structures Message-ID: <1238451930.69.0.760685797674.issue1534764@psf.upfronthosting.co.za> Brett Cannon added the comment: I can't reproduce this. Closing as out of date. Plus having an import fail because you shadow a built-in is not a bug. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:29:56 2009 From: report at bugs.python.org (Jesse Noller) Date: Mon, 30 Mar 2009 22:29:56 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1218712281.34.0.473878484861.issue3551@psf.upfronthosting.co.za> Message-ID: <1238452196.74.0.18676935526.issue3551@psf.upfronthosting.co.za> Jesse Noller added the comment: John, try this new version ---------- Added file: http://bugs.python.org/file13494/reproduce.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:32:13 2009 From: report at bugs.python.org (John Hitz) Date: Mon, 30 Mar 2009 22:32:13 +0000 Subject: [issue5039] Adjust reference-counting note In-Reply-To: <1232755919.64.0.595244867135.issue5039@psf.upfronthosting.co.za> Message-ID: <1238452333.29.0.289214267698.issue5039@psf.upfronthosting.co.za> John Hitz added the comment: Attached patch ---------- keywords: +patch nosy: +John Added file: http://bugs.python.org/file13495/issue5039.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:34:58 2009 From: report at bugs.python.org (Lennart Regebro) Date: Mon, 30 Mar 2009 22:34:58 +0000 Subject: [issue5616] Distutils 2to3 support doesn't have the doctest_only flag. In-Reply-To: <1238452498.24.0.140926416369.issue5616@psf.upfronthosting.co.za> Message-ID: <1238452498.24.0.140926416369.issue5616@psf.upfronthosting.co.za> New submission from Lennart Regebro : The run_2to3 method, and therefore also the Mixin2to3 class doesn't take a parameter for doctest_only parameter that refactor has. That means you have to do a lot of code duplication if you want to write distutil commands that handle doctest files. The fix is simple, just add the parameter to the relevant methods. ---------- assignee: tarek components: 2to3 (2.x to 3.0 conversion tool), Distutils messages: 84689 nosy: lregebro, tarek severity: normal status: open title: Distutils 2to3 support doesn't have the doctest_only flag. type: feature request versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:35:27 2009 From: report at bugs.python.org (John Ehresman) Date: Mon, 30 Mar 2009 22:35:27 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1238452196.74.0.18676935526.issue3551@psf.upfronthosting.co.za> Message-ID: <49D14926.6020104@wingware.com> John Ehresman added the comment: Latest version works -- question is why prior versions spawned many subprocesses. It's really another bug because prior version wasn't hitting the write length limit. ---------- title: multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) -> multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:36:36 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:36:36 +0000 Subject: [issue1076515] shutil.move clobbers read-only files. Message-ID: <1238452596.14.0.78614002854.issue1076515@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +shutil.copyfile fails when dst exists read-only stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:36:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:36:38 +0000 Subject: [issue1371937] minidom namespace problems Message-ID: <1238452598.17.0.569152337489.issue1371937@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as issue 1621421 has better discussion and patch. ---------- components: +XML nosy: +ajaksu2 resolution: -> duplicate status: open -> closed superseder: -> normalize namespace from minidom type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:36:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:36:41 +0000 Subject: [issue1191964] asynchronous Subprocess Message-ID: <1238452601.69.0.79425814734.issue1191964@psf.upfronthosting.co.za> Daniel Diniz added the comment: Josiah: can this be closed? ---------- components: +Library (Lib) -None keywords: +patch nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:36:45 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:36:45 +0000 Subject: [issue675976] mhlib does not obey MHCONTEXT env var Message-ID: <1238452605.55.0.814814899746.issue675976@psf.upfronthosting.co.za> Daniel Diniz added the comment: If it's a new feature, it should have a test. ---------- nosy: +ajaksu2 stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:36:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:36:52 +0000 Subject: [issue1677694] test_timeout refactoring Message-ID: <1238452612.32.0.0837390761263.issue1677694@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tests -None dependencies: +test_timeout updates stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:36:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:36:55 +0000 Subject: [issue1243678] httplib gzip support Message-ID: <1238452615.65.0.346298581596.issue1243678@psf.upfronthosting.co.za> Daniel Diniz added the comment: Should this be closed in favor of #1675951? ---------- nosy: +ajaksu2 stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:37:50 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 22:37:50 +0000 Subject: [issue5614] Malloc errors in test_io In-Reply-To: <1238450576.61.0.363286616174.issue5614@psf.upfronthosting.co.za> Message-ID: <1238452670.81.0.654604144287.issue5614@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Buffer_size is set to 0x7fffffffffffffff in BufferedWriter_init at the end of test_constructor. I have no idea why this happens, but this definitly seems wrong to me. Debugging is rather hard at the moment because the issue goes away in the debugger. Setting this as a release blocker because arguments of a wrong magnitude to memory allocation functions are scary. ---------- priority: -> release blocker stage: -> needs patch type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:38:26 2009 From: report at bugs.python.org (Jesse Noller) Date: Mon, 30 Mar 2009 22:38:26 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1218712281.34.0.473878484861.issue3551@psf.upfronthosting.co.za> Message-ID: <1238452706.33.0.103008541597.issue3551@psf.upfronthosting.co.za> Jesse Noller added the comment: The if __name__ clause is actually well documented, see: http://docs.python.org/library/multiprocessing.html#windows ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:43:38 2009 From: report at bugs.python.org (Georg Brandl) Date: Mon, 30 Mar 2009 22:43:38 +0000 Subject: [issue5039] Adjust reference-counting note In-Reply-To: <1232755919.64.0.595244867135.issue5039@psf.upfronthosting.co.za> Message-ID: <1238453018.35.0.0247281414557.issue5039@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed as r70773, thanks for the patch! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:43:42 2009 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 30 Mar 2009 22:43:42 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1238453022.12.0.0720572974762.issue1974@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: So astoundingly, this change has deep implications. The upshot is that it's difficult to fix this so that headers look nice for e.g. Subject headers, but so that splitting and wrapping work as expected for e.g. machine readability of Received headers. After discussion with other sprinters, I'm committing a change to Python 2.7 to fix this, but I am not back porting the change to 2.6. I think we should Do It Right for Python 3.1 but this requires (IMO) API changes. r70772 ---------- status: open -> closed versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:44:26 2009 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 30 Mar 2009 22:44:26 +0000 Subject: [issue1645148] MIME renderer: wrong header line break with long subject? Message-ID: <1238453066.88.0.148301752829.issue1645148@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: cjw296 -> barry status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:50:39 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 22:50:39 +0000 Subject: [issue4892] Sending Connection-objects over multiprocessing connections fails In-Reply-To: <1231501567.81.0.886406215073.issue4892@psf.upfronthosting.co.za> Message-ID: <1238453439.57.0.755443465267.issue4892@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- components: -Macintosh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:51:37 2009 From: report at bugs.python.org (Senthil) Date: Mon, 30 Mar 2009 22:51:37 +0000 Subject: [issue4962] urlparse & nfs url (rfc 2224) In-Reply-To: <1232101704.89.0.669847506906.issue4962@psf.upfronthosting.co.za> Message-ID: <1238453497.83.0.163942446019.issue4962@psf.upfronthosting.co.za> Changes by Senthil : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:52:09 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 22:52:09 +0000 Subject: [issue1089624] Carbon.File.FSCatalogInfo.createDate implementation Message-ID: <1238453529.05.0.903378416218.issue1089624@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Closing this as won't fix. Nobody else complained and changing this might break existing code. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:56:25 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:56:25 +0000 Subject: [issue1685453] email package should work better with unicode Message-ID: <1238453785.45.0.0878126633105.issue1685453@psf.upfronthosting.co.za> Daniel Diniz added the comment: Link to #1681333, #4487, #1443875, #1555842, #4661, #1078919, #963906, #1379416 and #1368247. ---------- components: +Unicode dependencies: +Add utf8 alias for email charsets, Email.Header encodes non-ASCII content incorrectly, Unicode email address helper, email package and Unicode strings handling, email.Header encode() unicode P2.6, email.header unicode fix, email.parser: impossible to read messages encoded in a different encoding, email/charset.py convert() patch, unicode in email.MIMEText and email/Charset.py nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:57:05 2009 From: report at bugs.python.org (paul rubin) Date: Mon, 30 Mar 2009 22:57:05 +0000 Subject: [issue1560032] confusing error msg from random.randint Message-ID: <1238453825.52.0.925520787811.issue1560032@psf.upfronthosting.co.za> paul rubin added the comment: Daniel, thanks--I didn't mean to jump on you, so I'm sorry if it came across that way. Maybe I'm a little oversensitized to this issue due to some unrelated incidents with other programs. I'll try to write a more detailed reply and maybe include a patch later (I can't do it right now). Regards Paul ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:58:29 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:58:29 +0000 Subject: [issue1681333] email.header unicode fix Message-ID: <1238453909.68.0.719658991898.issue1681333@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:59:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 22:59:14 +0000 Subject: [issue672656] securing pydoc server Message-ID: <1238453954.74.0.812387364136.issue672656@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> security versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:59:15 2009 From: report at bugs.python.org (Pernici Mario) Date: Mon, 30 Mar 2009 22:59:15 +0000 Subject: [issue3451] Asymptotically faster divmod and str(long) In-Reply-To: <1217121065.64.0.642253571203.issue3451@psf.upfronthosting.co.za> Message-ID: <1238453955.39.0.297870841519.issue3451@psf.upfronthosting.co.za> Pernici Mario added the comment: In this patch there is an implementation of the algorithm to convert numbers in strings by recursively splitting the number in half, adapted from Fredrik's div.py ---------- Added file: http://bugs.python.org/file13496/longformat.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 00:59:33 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 22:59:33 +0000 Subject: [issue1113328] OSATerminology still semi-broken Message-ID: <1238453973.51.0.271251291168.issue1113328@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:01:31 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 23:01:31 +0000 Subject: [issue1004810] Carbon.File fails if server vol is mounted after launch Message-ID: <1238454091.67.0.381317028622.issue1004810@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I propose closing this as won't fix, the issue is caused by a limitation in the Carbon APIs (which assume you're running an eventloop and won't notice changes when you don't). ---------- nosy: +ronaldoussoren resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:04:53 2009 From: report at bugs.python.org (Pernici Mario) Date: Mon, 30 Mar 2009 23:04:53 +0000 Subject: [issue3451] Asymptotically faster divmod and str(long) In-Reply-To: <1217121065.64.0.642253571203.issue3451@psf.upfronthosting.co.za> Message-ID: <1238454293.68.0.267700231671.issue3451@psf.upfronthosting.co.za> Pernici Mario added the comment: In this second patch to the above patch it is added the recursive division algorithm by Burnikel and Ziegler (BZ) from longobject2.diff, unmodified, to see the effect of the subquadratic algorithm; there is still a lot of work to be done on it, as Mark pointed out. Here is a benchmark on hp pavilion Q8200 2.33GHz a = 7**n; compute str(a) N times n N unpatched patch1 patch2 100 100000 0.25 0.25 0.25 200 100000 0.63 0.64 0.63 300 100000 1.19 1.22 1.23 400 100000 1.87 1.74 1.75 500 10000 0.27 0.24 0.24 1000 10000 0.98 0.59 0.60 2000 1000 0.36 0.16 0.17 5000 1000 2.17 0.65 0.66 10000 100 0.86 0.20 0.19 20000 100 3.42 0.70 0.55 50000 10 2.13 0.37 0.24 100000 1 0.85 0.13 0.08 500000 1 21 2.9 0.94 1000000 1 85 11 2.8 2000000 1 339 44 8.4 str(n) in the first patch uses a quadratic algorithm, but asymptotically it is almost 8 times faster than the unpatched version; in the second patch the subquadratic algorithm starts showing after 10000 digits. ---------- Added file: http://bugs.python.org/file13497/longformat_BZ.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:05:13 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 23:05:13 +0000 Subject: [issue779153] bgen requires Universal Headers, not OS X dev headers Message-ID: <1238454313.43.0.967117144627.issue779153@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Although this might be seen as a bug in the Python build machinery, I'm closing this as a won't fix feature request. The Carbon bindings are deprecated and will not be updated in the future, hence the state of bgen is basically irrelevant. ---------- nosy: +ronaldoussoren resolution: -> wont fix stage: -> committed/rejected status: open -> closed type: behavior -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:09:14 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 30 Mar 2009 23:09:14 +0000 Subject: [issue5614] Malloc errors in test_io In-Reply-To: <1238450576.61.0.363286616174.issue5614@psf.upfronthosting.co.za> Message-ID: <1238454554.84.0.50093972352.issue5614@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: >malloc: *** mmap(size=-9223372036854775808) failed Does this error occur even if you revert Modules/mmapmodule.c to ?69214? I have touched this module recently (I believe I fixed only SEGV bugs, not changed behavior) so I want to know it. ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:10:06 2009 From: report at bugs.python.org (Jesse Noller) Date: Mon, 30 Mar 2009 23:10:06 +0000 Subject: [issue4892] Sending Connection-objects over multiprocessing connections fails In-Reply-To: <1231501567.81.0.886406215073.issue4892@psf.upfronthosting.co.za> Message-ID: <1238454606.66.0.140068324446.issue4892@psf.upfronthosting.co.za> Jesse Noller added the comment: Before I can logically support this, I need a clear use case that supports the idea that this should be supported in the current version of multiprocessing. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:12:47 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 30 Mar 2009 23:12:47 +0000 Subject: [issue1191964] asynchronous Subprocess Message-ID: <1238454767.21.0.808812420891.issue1191964@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:13:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:13:42 +0000 Subject: [issue1693546] email.Message set_param rfc2231 encoding incorrect Message-ID: <1238454822.66.0.700529236401.issue1693546@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> barry nosy: +barry stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:13:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:13:48 +0000 Subject: [issue1694442] Failure to build on AIX 5.3 Message-ID: <1238454828.81.0.167983965846.issue1694442@psf.upfronthosting.co.za> Daniel Diniz added the comment: Jaman: is this still a problem for you? If not (and nobody else opposes), I'll close this one. ---------- components: +Build -None nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> compile error versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:13:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:13:56 +0000 Subject: [issue1683908] PEP 361 Warnings Message-ID: <1238454836.02.0.238237412056.issue1683908@psf.upfronthosting.co.za> Daniel Diniz added the comment: I think this one is out of date. ---------- components: +Interpreter Core, Library (Lib) nosy: +ajaksu2 stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:13:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:13:56 +0000 Subject: [issue1681974] mkdtemp fails on Windows if username has non-ASCII character Message-ID: <1238454836.6.0.0873257119595.issue1681974@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Windows stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:14:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:14:05 +0000 Subject: [issue1703592] have a way to ignore nonexisting locales in locale.setlocale Message-ID: <1238454845.56.0.841423588501.issue1703592@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:15:07 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 23:15:07 +0000 Subject: [issue5614] Malloc errors in test_io In-Reply-To: <1238450576.61.0.363286616174.issue5614@psf.upfronthosting.co.za> Message-ID: <1238454907.56.0.516547123135.issue5614@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't think this is related to Python's mmap module, the message says that malloc(3) cannot mmap some extra memory space. I'll test with the older version of mmap just in case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:16:34 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 30 Mar 2009 23:16:34 +0000 Subject: [issue4865] system wide site-packages dir not used on Mac OS X In-Reply-To: <1231332662.33.0.831675111419.issue4865@psf.upfronthosting.co.za> Message-ID: <1238454994.79.0.441890559752.issue4865@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Committed a fix for this as r70778 (trunk), r70782 (3.1) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:17:36 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 30 Mar 2009 23:17:36 +0000 Subject: [issue5614] Malloc errors in test_io In-Reply-To: <1238450576.61.0.363286616174.issue5614@psf.upfronthosting.co.za> Message-ID: <1238455056.73.0.189252122982.issue5614@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Sorry, this is not related to mmap module... Forgot my comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:21:12 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 30 Mar 2009 23:21:12 +0000 Subject: [issue1562822] importing threading in a thread does not work Message-ID: <1238455272.73.0.816418351324.issue1562822@psf.upfronthosting.co.za> Brett Cannon added the comment: So the failure stems from threading being imported by decimal in a thread itself. This is just not going to be supported as it confuses threading as to what thread was the main thread. Closing as "won't fix". ---------- resolution: -> wont fix status: open -> closed title: decimal module borks thread -> importing threading in a thread does not work _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:21:17 2009 From: report at bugs.python.org (Adam Olsen) Date: Mon, 30 Mar 2009 23:21:17 +0000 Subject: [issue1683908] PEP 361 Warnings Message-ID: <1238455277.3.0.504259668304.issue1683908@psf.upfronthosting.co.za> Adam Olsen added the comment: Aye. 2.6 has come and gone, with most or all warnings applied using (I believe) a different patch. If any future work is needed it can get a new ticket. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:25:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:25:27 +0000 Subject: [issue1704134] minidom Level 1 DOM compliance Message-ID: <1238455527.66.0.51894725741.issue1704134@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +ajaksu2 stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:25:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:25:32 +0000 Subject: [issue1709112] test_1686475 of test_os & pagefile.sys Message-ID: <1238455532.86.0.0735091097338.issue1709112@psf.upfronthosting.co.za> Daniel Diniz added the comment: The Modules/posixmodule.c patch needs tests. ---------- components: +Windows nosy: +ajaksu2 stage: -> test needed title: test_1686475 of test_os & pagefile.sys -> test_1686475 of test_os & pagefile.sys type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:25:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:25:38 +0000 Subject: [issue1706323] Updated ASTVisitor Classes Message-ID: <1238455538.84.0.44018181967.issue1706323@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:25:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:25:42 +0000 Subject: [issue1705393] Select() failure (race condition) Message-ID: <1238455542.9.0.325805534812.issue1705393@psf.upfronthosting.co.za> Daniel Diniz added the comment: Cannot verify for trunk. ---------- components: +Extension Modules nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:26:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:26:03 +0000 Subject: [issue1683908] PEP 361 Warnings Message-ID: <1238455563.43.0.540552083039.issue1683908@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- resolution: -> out of date _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:30:33 2009 From: report at bugs.python.org (Jesse Noller) Date: Mon, 30 Mar 2009 23:30:33 +0000 Subject: [issue5261] with lock fails on multiprocessing In-Reply-To: <1234637534.63.0.0578864534082.issue5261@psf.upfronthosting.co.za> Message-ID: <1238455833.75.0.0581816163722.issue5261@psf.upfronthosting.co.za> Jesse Noller added the comment: Reviewed, applied in python-trunk r70783 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:37:22 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 30 Mar 2009 23:37:22 +0000 Subject: [issue5614] Malloc errors in test_io In-Reply-To: <1238450576.61.0.363286616174.issue5614@psf.upfronthosting.co.za> Message-ID: <1238456242.72.0.879654450969.issue5614@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- nosy: -ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:38:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:38:08 +0000 Subject: [issue1699853] locale.getlocale() output fails as setlocale() input Message-ID: <1238456288.91.0.0377829673816.issue1699853@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> needs patch title: locale.getlocale() output fails as setlocale() input -> locale.getlocale() output fails as setlocale() input type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:38:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:38:12 +0000 Subject: [issue1707768] os.path.normpath changes path (chops of trailing slash) Message-ID: <1238456292.3.0.693538431694.issue1707768@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:38:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:38:14 +0000 Subject: [issue1718017] posixpath and friends have uses that should be documented Message-ID: <1238456294.55.0.169707890758.issue1718017@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:38:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:38:19 +0000 Subject: [issue1721862] email.FeedParser.BufferedSubFile improperly handles "\r\n" Message-ID: <1238456299.3.0.00810759541023.issue1721862@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:38:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:38:24 +0000 Subject: [issue1725295] Line ending bug SimpleXMLRPCServer Message-ID: <1238456304.2.0.95999151078.issue1725295@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:38:29 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:38:29 +0000 Subject: [issue1726172] ftplib.py: IndexError in voidresp occasionally Message-ID: <1238456309.71.0.388787216273.issue1726172@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +giampaolo.rodola stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:41:42 2009 From: report at bugs.python.org (Josiah Carlson) Date: Mon, 30 Mar 2009 23:41:42 +0000 Subject: [issue1191964] asynchronous Subprocess Message-ID: <1238456502.8.0.13191370824.issue1191964@psf.upfronthosting.co.za> Josiah Carlson added the comment: I don't believe this should be closed. The functionality is still desired by me and others who have posted on and off since the patch was created. This patch definitely needs some love (tests mostly). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:48:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:48:52 +0000 Subject: [issue1726196] Windows Build Warnings Message-ID: <1238456932.93.0.488887680969.issue1726196@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is this still an issue with the new build system? ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:48:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:48:56 +0000 Subject: [issue1727418] xmlrpclib waits indefinately Message-ID: <1238456936.76.0.940724365936.issue1727418@psf.upfronthosting.co.za> Daniel Diniz added the comment: Would the patch from issue 1767370 help with the robustness part? ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:54:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:54:32 +0000 Subject: [issue1730959] telnetlib: A callback for monitoring the telnet session Message-ID: <1238457272.33.0.995780890086.issue1730959@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:54:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 30 Mar 2009 23:54:48 +0000 Subject: [issue1714451] subprocess.py problems errors when calling cmd.exe Message-ID: <1238457288.32.0.322525482434.issue1714451@psf.upfronthosting.co.za> Daniel Diniz added the comment: Collin: do you still want a patch or is this a won't fix? ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:56:02 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 30 Mar 2009 23:56:02 +0000 Subject: [issue5614] Malloc errors in test_io In-Reply-To: <1238450576.61.0.363286616174.issue5614@psf.upfronthosting.co.za> Message-ID: <1238457362.03.0.248784062381.issue5614@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If you look at test_io, calling malloc() with sys.maxsize is precisely the purpose of the test, to check that allocation failures are detected and reported properly. So the warnings can be safely ignored, if they only happen in test_constructor. ---------- nosy: +pitrou priority: release blocker -> normal versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:56:35 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 30 Mar 2009 23:56:35 +0000 Subject: [issue5614] Malloc errors in test_io In-Reply-To: <1238450576.61.0.363286616174.issue5614@psf.upfronthosting.co.za> Message-ID: <1238457395.45.0.490953549364.issue5614@psf.upfronthosting.co.za> Antoine Pitrou added the comment: PS: if the warnings are annoying, the test can be disabled selectively under Mac OS X. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 01:59:37 2009 From: report at bugs.python.org (John Ehresman) Date: Mon, 30 Mar 2009 23:59:37 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1218712281.34.0.473878484861.issue3551@psf.upfronthosting.co.za> Message-ID: <1238457577.44.0.037708303316.issue3551@psf.upfronthosting.co.za> John Ehresman added the comment: It turns out that the original reproduce.py deadlocks if the pipe buffer is smaller than message size -- even with a fix to the bug. Patch to fix is coming soon. ---------- Added file: http://bugs.python.org/file13498/reproduce.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 02:06:11 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 31 Mar 2009 00:06:11 +0000 Subject: [issue5614] Malloc errors in test_io In-Reply-To: <1238450576.61.0.363286616174.issue5614@psf.upfronthosting.co.za> Message-ID: <1238457971.67.0.758112416725.issue5614@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I can't believe that I completely missed that this is the purpose of the tests, I honestly believed that I had checked everything there was to check :-( Disabling the test won't be necessary, I'm keeping this issue open for a while longer to check if we can avoid getting a message on stderr during the test. It's rather annoying that malloc logs error messages during what turns out to be perfectly fine behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 02:09:49 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 31 Mar 2009 00:09:49 +0000 Subject: [issue1542544] Improve dynamic linking support on AIX Message-ID: <1238458189.55.0.0415704247452.issue1542544@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I suggest keeping the issue open since building on AIX with proper extension module support can be tricky, and it's good to have an idea of what a possible patch looks like. (especially if snakebite finally gets an AIX machine) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 02:29:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 00:29:13 +0000 Subject: [issue1542544] Improve dynamic linking support on AIX Message-ID: <1238459353.28.0.204458761251.issue1542544@psf.upfronthosting.co.za> Daniel Diniz added the comment: OK :) ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 02:47:36 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 00:47:36 +0000 Subject: [issue1717900] Destructor behavior faulty Message-ID: <1238460456.82.0.52810969479.issue1717900@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 02:47:37 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 00:47:37 +0000 Subject: [issue1732662] socket makefile objects are not independent Message-ID: <1238460457.57.0.280876799367.issue1732662@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 02:47:46 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 00:47:46 +0000 Subject: [issue1733523] HP shared object option Message-ID: <1238460466.42.0.826309266492.issue1733523@psf.upfronthosting.co.za> Daniel Diniz added the comment: I'll close this unless we get some useful feedback. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 02:47:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 00:47:49 +0000 Subject: [issue1733532] HP automatic build of zlib Message-ID: <1238460469.03.0.855355184602.issue1733532@psf.upfronthosting.co.za> Daniel Diniz added the comment: Brad: any feedback? I'll close this otherwise. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> compile error versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 02:47:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 00:47:54 +0000 Subject: [issue1733546] AIX shared object build of python 2.5 does not work Message-ID: <1238460474.78.0.591634843433.issue1733546@psf.upfronthosting.co.za> Daniel Diniz added the comment: I'll close this unless we get more info. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 02:47:57 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 00:47:57 +0000 Subject: [issue1733513] zlib configure behaves differently than main configure Message-ID: <1238460477.79.0.797095962069.issue1733513@psf.upfronthosting.co.za> Daniel Diniz added the comment: Anyone against closing this? ---------- nosy: +ajaksu2 priority: normal -> low status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 02:48:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 00:48:03 +0000 Subject: [issue1733509] Modules/ld_so_aix needs to strip path off of whichcc call Message-ID: <1238460483.68.0.941268134025.issue1733509@psf.upfronthosting.co.za> Daniel Diniz added the comment: I'll close this unless opposition is voiced. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 02:48:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 00:48:08 +0000 Subject: [issue1733484] Solaris 64 bit LD_LIBRARY_PATH_64 needs to be set Message-ID: <1238460488.31.0.569173942314.issue1733484@psf.upfronthosting.co.za> Daniel Diniz added the comment: I'll close this unless someone wants to see this fixed. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 02:48:16 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 00:48:16 +0000 Subject: [issue1733544] HP 64 bit does not run Message-ID: <1238460496.69.0.80256473748.issue1733544@psf.upfronthosting.co.za> Daniel Diniz added the comment: Brad: I'm going to close this unless you give us the requested information. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: open -> pending type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:19:07 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 01:19:07 +0000 Subject: [issue1742940] can't run single lamba funcs as unittest Message-ID: <1238462347.21.0.597929660564.issue1742940@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:19:07 2009 From: report at bugs.python.org (A.M. Kuchling) Date: Tue, 31 Mar 2009 01:19:07 +0000 Subject: [issue4753] Faster opcode dispatch on gcc In-Reply-To: <1230325778.98.0.752974375077.issue4753@psf.upfronthosting.co.za> Message-ID: <1238462347.69.0.784510537799.issue4753@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Is a backport to 2.7 still planned? ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:19:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 01:19:22 +0000 Subject: [issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies Message-ID: <1238462362.19.0.843367337273.issue1284670@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:19:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 01:19:28 +0000 Subject: [issue1735509] Newer reply format for imap commands in imaplib.py Message-ID: <1238462368.62.0.974795713931.issue1735509@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:19:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 01:19:34 +0000 Subject: [issue1736483] os.popen('yes | echo hello') stuck Message-ID: <1238462374.82.0.46862753895.issue1736483@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:19:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 01:19:43 +0000 Subject: [issue1741130] struct.pack("I", "foo"); struct.pack("L", "foo") should fail Message-ID: <1238462383.69.0.612040378222.issue1741130@psf.upfronthosting.co.za> Daniel Diniz added the comment: Cannot confirm for trunk. ---------- components: +Extension Modules -None nosy: +ajaksu2, marketdickinson stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:19:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 01:19:47 +0000 Subject: [issue1742837] Documentation for BaseHTTPServer.HTTPServer Message-ID: <1238462387.8.0.555183589199.issue1742837@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:19:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 01:19:54 +0000 Subject: [issue1739789] Accelerate attr dict lookups Message-ID: <1238462394.06.0.735491379257.issue1739789@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low type: -> performance versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:26:11 2009 From: report at bugs.python.org (David Christian) Date: Tue, 31 Mar 2009 01:26:11 +0000 Subject: [issue5617] Unicode pringint in post-mortem sessions In-Reply-To: <1238462770.71.0.542276550689.issue5617@psf.upfronthosting.co.za> Message-ID: <1238462770.71.0.542276550689.issue5617@psf.upfronthosting.co.za> New submission from David Christian : http://blog.kowalczyk.info/article/Gdb-basics.html It is difficult to display the frame you're in while debugging a core dump in python 3.0 (when in a core dump, you can't run functions, and thus cannot use many of the normal methods of displaying unicode). Martin van Loewis discovered this gdb function (linked), "pu", which prints out unicode strings. The way it does so is a bit kludgy, but I think it is at least the start of a solution. Perhaps it can be included in .gdbinit? ---------- messages: 84738 nosy: dugan severity: normal status: open title: Unicode pringint in post-mortem sessions type: feature request versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:26:24 2009 From: report at bugs.python.org (David Christian) Date: Tue, 31 Mar 2009 01:26:24 +0000 Subject: [issue5617] Unicode printing in gdb post-mortem sessions In-Reply-To: <1238462770.71.0.542276550689.issue5617@psf.upfronthosting.co.za> Message-ID: <1238462784.6.0.35263305591.issue5617@psf.upfronthosting.co.za> Changes by David Christian : ---------- title: Unicode pringint in post-mortem sessions -> Unicode printing in gdb post-mortem sessions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:29:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 01:29:28 +0000 Subject: [issue1748015] Module-level stack scopes have incorrect bindings. Message-ID: <1238462968.65.0.509533550411.issue1748015@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed in trunk, adding the bare .py files. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 Added file: http://bugs.python.org/file13499/buggy.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:29:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 01:29:41 +0000 Subject: [issue1748015] Module-level stack scopes have incorrect bindings. Message-ID: <1238462981.9.0.765626408178.issue1748015@psf.upfronthosting.co.za> Changes by Daniel Diniz : Added file: http://bugs.python.org/file13500/triggerPdb.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:29:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 01:29:55 +0000 Subject: [issue1748015] Module-level stack scopes have incorrect bindings. Message-ID: <1238462995.5.0.35528246919.issue1748015@psf.upfronthosting.co.za> Changes by Daniel Diniz : Added file: http://bugs.python.org/file13501/triggerBug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:30:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 31 Mar 2009 01:30:05 +0000 Subject: [issue1748015] Module-level stack scopes have incorrect bindings. Message-ID: <1238463005.73.0.195744714979.issue1748015@psf.upfronthosting.co.za> Changes by Daniel Diniz : Added file: http://bugs.python.org/file13502/inspectStack.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 03:37:12 2009 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 31 Mar 2009 01:37:12 +0000 Subject: [issue1676121] Problem linking to readline lib on x86(64) Solaris In-Reply-To: <1238450928.26.0.79092387522.issue1676121@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: I don't have a Solaris box to test at the moment, but I believe the following commit fixed this issue: ------------------------------------------------------------------------ r66283 | gregory.p.smith | 2008-09-07 01:15:18 -0400 (Sun, 07 Sep 2008) | 5 lines - Issue #1204: The configure script now tests for additional libraries that may be required when linking against readline. This fixes issues with x86_64 builds on some platforms (at least a few Linux flavors as well as OpenBSD/amd64). ------------------------------------------------------------------------ If it is the case, this issue should be closed as a duplicate of #1204. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 04:14:26 2009 From: report at bugs.python.org (Ron DuPlain) Date: Tue, 31 Mar 2009 02:14:26 +0000 Subject: [issue4535] Build / Test Py3K failed on Ubuntu 8.10 In-Reply-To: <1228423046.58.0.110673745829.issue4535@psf.upfronthosting.co.za> Message-ID: <1238465666.27.0.61778898423.issue4535@psf.upfronthosting.co.za> Ron DuPlain added the comment: For what it's worth, I ran these tests on Ubuntu 8.10 with Python trunk (2.7) r70765 (svn). All tests passed. Output is attached (cleaned out ref counts). --rduplain ---------- nosy: +rduplain Added file: http://bugs.python.org/file13503/trunk.r70765.debug-ubuntu-8.10.out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 04:20:45 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 31 Mar 2009 02:20:45 +0000 Subject: [issue5039] Adjust reference-counting note In-Reply-To: <1232755919.64.0.595244867135.issue5039@psf.upfronthosting.co.za> Message-ID: <1238466045.46.0.363577692081.issue5039@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The patch has an error. It says 'Python currently...' instead of 'CPython currently....', as in my suggestion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 05:07:17 2009 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 31 Mar 2009 03:07:17 +0000 Subject: [issue5610] email feedparser.py CRLFLF bug: $ vs \Z In-Reply-To: <1238435977.23.0.604038870745.issue5610@psf.upfronthosting.co.za> Message-ID: <1238468837.58.0.638092110491.issue5610@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: -> barry versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 05:17:35 2009 From: report at bugs.python.org (karl) Date: Tue, 31 Mar 2009 03:17:35 +0000 Subject: [issue3791] bsddb not completely removed In-Reply-To: <1220661145.94.0.113291838613.issue3791@psf.upfronthosting.co.za> Message-ID: <1238469455.63.0.725883900424.issue3791@psf.upfronthosting.co.za> karl added the comment: On the mac version there is an issue with the python version installed by default. Python 2.5.1 (r251:54863, Jan 13 2009, 10:26:13) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/dbhash.py", line 5, in import bsddb File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/bsddb/__init__.py", line 51, in import _bsddb ImportError: No module named _bsddb ---------- components: +Macintosh -Windows nosy: +karlcow versions: +Python 2.5 -Python 3.0 _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Mar 31 05:20:02 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 31 Mar 2009 03:20:02 +0000 Subject: [issue3791] bsddb not completely removed In-Reply-To: <1220661145.94.0.113291838613.issue3791@psf.upfronthosting.co.za> Message-ID: <1238469602.76.0.612064533778.issue3791@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Python 2.5 is completed; no further changes will be made to it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 05:32:45 2009 From: report at bugs.python.org (Jesse Noller) Date: Tue, 31 Mar 2009 03:32:45 +0000 Subject: [issue5574] multiprocessing queues.py doesn't include JoinableQueue in its __all__ list In-Reply-To: <1238099248.59.0.559630696158.issue5574@psf.upfronthosting.co.za> Message-ID: <1238470365.08.0.13358150146.issue5574@psf.upfronthosting.co.za> Jesse Noller added the comment: r70792 on trunk ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 05:34:45 2009 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 31 Mar 2009 03:34:45 +0000 Subject: [issue5610] email feedparser.py CRLFLF bug: $ vs \Z In-Reply-To: <1238435977.23.0.604038870745.issue5610@psf.upfronthosting.co.za> Message-ID: <1238470485.34.0.453012122957.issue5610@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I think this is a good idea. Does the existing test suite still pass with this change? For a long time, email's philosophy was to use native line endings and never expected mixed eol, and it definitely never expected mixed line endings, so we'll need at least a few tests for this. Add them to Lib/email/test_email.py (for now, I want to split this file up soon). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 05:36:01 2009 From: report at bugs.python.org (Brian Curtin) Date: Tue, 31 Mar 2009 03:36:01 +0000 Subject: [issue5618] PyMemberDef type T_UBYTE incorrectly documtented In-Reply-To: <1238470561.76.0.295268646264.issue5618@psf.upfronthosting.co.za> Message-ID: <1238470561.76.0.295268646264.issue5618@psf.upfronthosting.co.za> New submission from Brian Curtin : One of the available options for the type field in the PyMemberDef structure is incorrectly listed as T_UNBYTE. T_UBYTE is the correct type. See http://docs.python.org/c-api/structures.html#PyMemberDef ---------- assignee: georg.brandl components: Documentation files: structures_2x.patch keywords: patch messages: 84747 nosy: briancurtin, georg.brandl severity: normal status: open title: PyMemberDef type T_UBYTE incorrectly documtented type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13504/structures_2x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 05:37:37 2009 From: report at bugs.python.org (Brian Curtin) Date: Tue, 31 Mar 2009 03:37:37 +0000 Subject: [issue5618] PyMemberDef type T_UBYTE incorrectly documtented In-Reply-To: <1238470561.76.0.295268646264.issue5618@psf.upfronthosting.co.za> Message-ID: <1238470657.02.0.414490634507.issue5618@psf.upfronthosting.co.za> Brian Curtin added the comment: Adding 3x patch ---------- Added file: http://bugs.python.org/file13505/structures_3x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 06:04:07 2009 From: report at bugs.python.org (Collin Winter) Date: Tue, 31 Mar 2009 04:04:07 +0000 Subject: [issue1714451] subprocess.py problems errors when calling cmd.exe Message-ID: <1238472247.5.0.506501845847.issue1714451@psf.upfronthosting.co.za> Collin Winter added the comment: Do you know of anyone actively working on Windows support? If not, I say close it as "won't fix". ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Mar 31 06:13:03 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 31 Mar 2009 04:13:03 +0000 Subject: [issue5619] Pass MS CRT debug flags into subprocesses In-Reply-To: <1238472783.0.0.132667741337.issue5619@psf.upfronthosting.co.za> Message-ID: <1238472783.0.0.132667741337.issue5619@psf.upfronthosting.co.za> New submission from Martin v. L?wis : To avoid bringing up CRT assert message dialogs, the CRT debug flags need to be passed into subprocesses for multiprocessing. CRT doesn't have getters. Instead, you have to set to 0, get the current value, then restore it. This can be done with modes = [] for m in [msvcrt.CRT_WARN, msvcrt.CRT_ERROR, msvcrt.CRT_ASSERT]: oldmode = msvcrt.CrtSetReportMode(m, 0) msvcrt.CrtSetReportMode(m, oldmode) modes.append((m, oldmode)) The same probably needs to be done for CrtSetReportFile, except that msvcrt.CrtSetReportFile currently doesn't return the previous value. (Also, it returns a HFILE - hopefully, the file handle value will still be valid in the subprocess) ---------- messages: 84750 nosy: asvetlov, jnoller, loewis severity: normal status: open title: Pass MS CRT debug flags into subprocesses _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 06:21:19 2009 From: report at bugs.python.org (Tony Nelson) Date: Tue, 31 Mar 2009 04:21:19 +0000 Subject: [issue5610] email feedparser.py CRLFLF bug: $ vs \Z In-Reply-To: <1238435977.23.0.604038870745.issue5610@psf.upfronthosting.co.za> Message-ID: <1238473279.26.0.56791170412.issue5610@psf.upfronthosting.co.za> Tony Nelson added the comment: make test still passes all tests except test_httpservers on my Python 2.6.1 build. The network resource was not enabled and tk is not available. The new test for CRLFLF at the end of a message body is added to Lib/email/test_email at the end of the TestParsers class. It passes with the fix patch and fails without it. What other tests do you want? ---------- versions: -Python 3.1 Added file: http://bugs.python.org/file13506/feedparser_crlflf_test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 07:51:59 2009 From: report at bugs.python.org (John Hitz) Date: Tue, 31 Mar 2009 05:51:59 +0000 Subject: [issue5039] Adjust reference-counting note In-Reply-To: <1238466045.46.0.363577692081.issue5039@psf.upfronthosting.co.za> Message-ID: John Hitz added the comment: Sorry about that. First one I've ever done. Consecrating more on how than what. John > Subject: [issue5039] Adjust reference-counting note > To: johnhitz321 at msn.com > From: report at bugs.python.org > Date: Tue, 31 Mar 2009 02:20:45 +0000 > > > Terry J. Reedy added the comment: > > The patch has an error. It says 'Python currently...' instead of > 'CPython currently....', as in my suggestion. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ _________________________________________________________________ Windows Live??? SkyDrive: Get 25 GB of free online storage. http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_032009 ---------- Added file: http://bugs.python.org/file13507/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Sorry about that.  First one I've ever done.  Consecrating more on how than what.

John



> Subject: [issue5039] Adjust reference-counting note
> To: johnhitz321 at msn.com
> From: report at bugs.python.org
> Date: Tue, 31 Mar 2009 02:20:45 +0000
>
>
> Terry J. Reedy <tjreedy at udel.edu> added the comment:
>
> The patch has an error. It says 'Python currently...' instead of
> 'CPython currently....', as in my suggestion.
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue5039>
> _______________________________________


Windows Live??? SkyDrive: Get 25 GB of free online storage. Check it out. From report at bugs.python.org Tue Mar 31 08:05:29 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 31 Mar 2009 06:05:29 +0000 Subject: [issue1685453] email package should work better with unicode Message-ID: <1238479529.75.0.39805058192.issue1685453@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Probably these are related too. #5259 #5304 ---------- dependencies: +email/base64mime.py cannot work, smtplib is broken in Python3 nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 09:12:24 2009 From: report at bugs.python.org (lekma) Date: Tue, 31 Mar 2009 07:12:24 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238483544.85.0.508241689121.issue5585@psf.upfronthosting.co.za> lekma added the comment: The same against py3k. Jesse, is there any chance that this will make it in, or should I just go and implement a local solution? ---------- Added file: http://bugs.python.org/file13508/Issue5585_2_py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 09:16:02 2009 From: report at bugs.python.org (Chris Withers) Date: Tue, 31 Mar 2009 07:16:02 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1238483762.36.0.937575692605.issue1974@psf.upfronthosting.co.za> Chris Withers added the comment: It's probably worth noting that changing: from email.mime.text import MIMEText m = MIMEText('foo') m['subject']='something long' ...to: from email.header import Header m = MIMEText('foo') m['subject']=Header('something long') ...will do folding without the \t problem, even in Python 2.6 I guess the moral of the story is that all headers should really be header objects. I think Barry has some ideas on that ;-) ---------- keywords: -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 09:26:12 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 31 Mar 2009 07:26:12 +0000 Subject: [issue1569040] Speed up using + for string concatenation Message-ID: <1238484372.39.0.422934499988.issue1569040@psf.upfronthosting.co.za> Raymond Hettinger added the comment: IIRC, this has already been rejected on python-dev in a number of discussions (check for "ropes" in the search). Also, Armin has long ago implemented some optimizations for string concatenation in a number of contexts. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 09:41:41 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 31 Mar 2009 07:41:41 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238485301.12.0.0215437000421.issue2578@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New patch uploaded. Based on mfoord's 200903301411 version. Adds documentation. Cleans up a few things and fixes names on a few things. This patch has been put up for review in: http://codereview.appspot.com/32080 ---------- Added file: http://bugs.python.org/file13509/unittest-new-asserts-gps03.diff.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 09:42:23 2009 From: report at bugs.python.org (Nick Craig-Wood) Date: Tue, 31 Mar 2009 07:42:23 +0000 Subject: [issue5131] pprint doesn't know how to print a set or a defaultdict In-Reply-To: <1233592442.21.0.0563262599933.issue5131@psf.upfronthosting.co.za> Message-ID: <1238485343.42.0.362397390214.issue5131@psf.upfronthosting.co.za> Nick Craig-Wood added the comment: Oops, my bad, I assumed the patch would by for py3k! I applied it to trunk and tested it. It works very well - thank you for fixing that :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 09:50:06 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 31 Mar 2009 07:50:06 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238485806.06.0.967310510059.issue2578@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fixed the unintentional extra edits in the docs in gps04. ---------- Added file: http://bugs.python.org/file13510/unittest-new-asserts-gps04.diff.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 09:50:19 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 31 Mar 2009 07:50:19 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238485819.21.0.453250207366.issue2578@psf.upfronthosting.co.za> Changes by Gregory P. Smith : Removed file: http://bugs.python.org/file13480/unittest-new-asserts-gps02.diff.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 09:50:25 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 31 Mar 2009 07:50:25 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238485825.68.0.945991780223.issue2578@psf.upfronthosting.co.za> Changes by Gregory P. Smith : Removed file: http://bugs.python.org/file13484/unittest-new-asserts.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 09:50:31 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 31 Mar 2009 07:50:31 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238485831.58.0.290347791552.issue2578@psf.upfronthosting.co.za> Changes by Gregory P. Smith : Removed file: http://bugs.python.org/file13509/unittest-new-asserts-gps03.diff.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 10:05:50 2009 From: report at bugs.python.org (Steven Bethard) Date: Tue, 31 Mar 2009 08:05:50 +0000 Subject: [issue5311] bdist_msi generates version number for pure Python packages In-Reply-To: <1235016969.03.0.818386696301.issue5311@psf.upfronthosting.co.za> Message-ID: <1238486750.94.0.724705980146.issue5311@psf.upfronthosting.co.za> Steven Bethard added the comment: Ok, so here's what needs to happen to make this work. Note that all of the following needs to happen at *runtime*, not at the time at which the .msi is created: (1) Find all sub-keys of SOFTWARE\Python\PythonCore in the registry. These are the versions, e.g. 2.5, 2.6, 3.0, etc. (2) For each version, get the Python installation dir from SOFTWARE\Python\PythonCore\%(version)s\InstallPath (3) Populate the ListView table with entries containing these installation paths, e.g. something like: TARGETDIR 1 C:\Python24 TARGETDIR 2 C:\Python25 ... (4) Modify Control/SelectDirectoryDlg so that it uses a ListView (filled with the above values) instead of a DirectoryCombo. (5) Make a couple minor edits to bdist_msi.py to stop it from inserting the version into the .msi name for Python-only modules. I looked into a couple ways of doing this. Ideally, we should avoid using a CustomAction, which would require maintaining some additional C or VBScript code, and instead do everything through the database tables that are built into all .msi files. Some problems I've run into with this approach: * The only way to read the registry AFAICT is through the RegLocator table: http://msdn.microsoft.com/en-us/library/aa371171(VS.85).aspx. But RegLocator can only look up single key values, and cannot look up the sub-keys under a key (which is what we need to get the Python versions). * We could hard code all the possible versions, and stick all the corresponding SOFTWARE\...\%(version)s\InstallPath keys into RegLocator. Then these can be read into properties using the AppSearch table (http://msdn.microsoft.com/en-us/library/aa371559(VS.85).aspx), and we could then fill in the ListView table with the install paths. But AFAICT, there is no way to keep from putting one row into the ListView table for each version of Python we statically define. Which means a bunch of inappropriate rows at runtime (e.g. there'd be a row for Python 2.3 even if there was no Python 2.3 on your system). Basically, the problem is that we'd like to determine what goes into the ListView table at runtime, but I can only figure out how to put things into it at the time at which the .msi is built. I'm going to continue to look into this, and I'd welcome suggestions anyone has. The last resort would be to create a CustomAction using a DLL or VBScript, but I'm really trying to avoid that, both because maintaining and debugging such code is painful, and because Michael Foord suggested that some virus checkers will complain about .msi files with embedded VBScript (probably forcing me to maintain a DLL - ugh!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 10:13:25 2009 From: report at bugs.python.org (Frank Chu) Date: Tue, 31 Mar 2009 08:13:25 +0000 Subject: [issue3392] subprocess fails in select when descriptors are large In-Reply-To: <1216293940.59.0.136491841956.issue3392@psf.upfronthosting.co.za> Message-ID: <1238487205.11.0.334113422728.issue3392@psf.upfronthosting.co.za> Frank Chu added the comment: Hi, This is a patch that uses poll() in subprocess.communicate() if it is available. This is my first patch and may contain style errors. I try to conform to PEP 8 as close as I can. Besides the discussion here, I would like to add this is desired because select() has its own limit on the file descriptor size, in FD_SETSIZE. Unix has a different limit on the largest file descriptor, in 'ulimit -n'. When the select() limit is smaller than the ulimit limit, it is not hard to get a file descriptor that is beyond FD_SETSIZE. In that case select() simply does not work. Since there is no precise way to force file descriptor to be small, the only workaround seems to be hack like what hte first poster yorick suggests. This is tested via 'python regrtest.py -w test_subprocess' under a system that supports poll(). I don't have a system that does *not* support poll, but I've done some manual edits to force that code path and test it as well. The test passes, which I think should be good enough as it has several tests on communicate(). This patch is against 2.6. ---------- keywords: +patch nosy: +fpmc Added file: http://bugs.python.org/file13511/subprocess_with_poll.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 10:26:37 2009 From: report at bugs.python.org (Richard B. Kreckel) Date: Tue, 31 Mar 2009 08:26:37 +0000 Subject: [issue1659171] Calling tparm from extension lib fails in Python 2.5 Message-ID: <1238487997.91.0.638099271659.issue1659171@psf.upfronthosting.co.za> Richard B. Kreckel added the comment: I just tried Python 2.6 (r26:66714, Feb 21 2009, 05:33:00) from SUSE Linux Enterprise Server 11 (i586) and it didn't fail. This appears to have been fixed, somehow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 10:30:57 2009 From: report at bugs.python.org (Jan Ondrej) Date: Tue, 31 Mar 2009 08:30:57 +0000 Subject: [issue1732662] socket makefile objects are not independent Message-ID: <1238488257.78.0.103621500917.issue1732662@psf.upfronthosting.co.za> Jan Ondrej added the comment: I can't confirm this bug on Fedora 8 or Fedora 10. I think it's fixed now and should be closed. Also tested on ubuntu-hardy without problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 10:54:03 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 31 Mar 2009 08:54:03 +0000 Subject: [issue4753] Faster opcode dispatch on gcc In-Reply-To: <1238462347.69.0.784510537799.issue4753@psf.upfronthosting.co.za> Message-ID: <49D1DA28.3000001@egenix.com> Marc-Andre Lemburg added the comment: On 2009-03-31 03:19, A.M. Kuchling wrote: > A.M. Kuchling added the comment: > > Is a backport to 2.7 still planned? I hope it is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 13:27:25 2009 From: report at bugs.python.org (edmundy) Date: Tue, 31 Mar 2009 11:27:25 +0000 Subject: [issue5620] The attribute's action of an object is not correct. In-Reply-To: <1238498845.56.0.843345010323.issue5620@psf.upfronthosting.co.za> Message-ID: <1238498845.56.0.843345010323.issue5620@psf.upfronthosting.co.za> New submission from edmundy : The following is the test code. class C1: myurl = [] def test(self): url = [5,6,7] self.myurl.extend(url) def testv(): c = C1() c.test() print(c.myurl) i = 0 while i<10 : testv() i = i+1 The output is : [5, 6, 7] [5, 6, 7, 5, 6, 7] [5, 6, 7, 5, 6, 7, 5, 6, 7] [5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7] [5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7] [5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7] [5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7] [5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7] [5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7] [5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7] The myurl of class C1 is not set to [] when a new object is created. All objects use the same memory. ---------- components: None messages: 84765 nosy: Yong yang severity: normal status: open title: The attribute's action of an object is not correct. type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 14:05:49 2009 From: report at bugs.python.org (Christian Heimes) Date: Tue, 31 Mar 2009 12:05:49 +0000 Subject: [issue5497] openssl compileerror with original source In-Reply-To: <1237272241.76.0.44185655243.issue5497@psf.upfronthosting.co.za> Message-ID: <1238501149.15.0.662209695678.issue5497@psf.upfronthosting.co.za> Christian Heimes added the comment: For legal reasons we can't ship Python with certain algorithms. If I can recall correctly IDEA is one of the patented algorithms. The patch is looking goo.d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 14:25:12 2009 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 31 Mar 2009 12:25:12 +0000 Subject: [issue992389] attribute error after non-from import Message-ID: <1238502312.83.0.653971110274.issue992389@psf.upfronthosting.co.za> Nick Coghlan added the comment: This came up on python-dev again recently: http://mail.python.org/pipermail/python-dev/2009-March/087955.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 14:37:30 2009 From: report at bugs.python.org (Jesse Noller) Date: Tue, 31 Mar 2009 12:37:30 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238483544.85.0.508241689121.issue5585@psf.upfronthosting.co.za> Message-ID: Jesse Noller added the comment: On Mar 31, 2009, at 2:12 AM, lekma wrote: > > lekma added the comment: > > The same against py3k. > > Jesse, is there any chance that this will make it in, or should I just > go and implement a local solution? > I'm thinking about it and plan on discussing it with other core devs today. Altering the Api is not something done lightly ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 14:37:38 2009 From: report at bugs.python.org (Aleksi Torhamo) Date: Tue, 31 Mar 2009 12:37:38 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238503058.31.0.233097368088.issue1161031@psf.upfronthosting.co.za> Aleksi Torhamo added the comment: Please correct me, if i'm wrong, but this seems to be a real bug, caused by people thinking that handle_expt is something like handle_error. As Tony stated, the docs say that handle_expt is called when out-of-band data arrives, and that is - i think - correct. poll, which uses select, calls _exception -> handle_expt_event with fds from the third set of select. The manpage select_tut(2) has example code, which has a comment indicating that the third set is supposed to contain sockets with OOB data. poll2, however, calls readwrite, which calls handle_expt_event on error conditions. Furthermore, it calls handle_read_event on POLLPRI, which (according to the manpage of poll(2)) is supposed to indicate OOB data when using poll. Since handle_error is intended for python exceptions, currently there is no proper method to call on POLLERR and POLLNVAL, unless handle_close is called. With POLLNVAL, handle_close seems like the correct thing to do (manpage says it indicates that fd is not open.) With POLLERR, i have no idea. Manpage says "Error condition", but from that, it's hard to say whether it refers to a temporary error condition or not. So, i think readwrite should look something like this: (Assuming POLLERR -> handle_close, otherwise a new handler would probably have to be introduced) if flags & select.POLLPRI: obj.handle_expt_event() if flags & select.POLLIN: obj.handle_read_event() if flags & select.POLLOUT: obj.handle_write_event() if flags & (select.POLLERR | select.POLLNVAL | select.POLLHUP): obj.handle_close() ---------- nosy: +alexer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 14:58:49 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 31 Mar 2009 12:58:49 +0000 Subject: [issue4753] Faster opcode dispatch on gcc In-Reply-To: <1230325778.98.0.752974375077.issue4753@psf.upfronthosting.co.za> Message-ID: <1238504329.12.0.565721072088.issue4753@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Andrew, your patch disables the optimization that HAS_ARG(op) is a constant when op is known by the compiler (that is, inside a "TARGET_##op" label), so I'd rather keep the version which is currently in SVN. ---------- versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:02:13 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 31 Mar 2009 13:02:13 +0000 Subject: [issue1739789] Accelerate attr dict lookups Message-ID: <1238504533.92.0.0330078248574.issue1739789@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +collinwinter, jyasskin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:05:42 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 31 Mar 2009 13:05:42 +0000 Subject: [issue5387] mmap.move crashes by integer overflow In-Reply-To: <1235756718.87.0.0651298987866.issue5387@psf.upfronthosting.co.za> Message-ID: <1238504742.11.0.703971977141.issue5387@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Well, I think your patch has some issues. >>> import mmap >>> m = mmap.mmap(-1, 10) >>> m.move(10, 10, 0) # legal, should not fail Traceback (most recent call last): File "", line 1, in ValueError: source out of range >>> m.move(9, 9, -1) # should not crash (crash) I hesitated to commit my patch because mmap.move is using unsigned long, but I thought it should use size_t or Py_ssize_t (If mmap should represent total memory area, it may have to use size_t, but maybe it should use Py_ssize_t as well as other python modules like string) Anyway, I'll commit my patch before Python2.6.2 will be released. Crash is not good thing for any time. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:10:10 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 31 Mar 2009 13:10:10 +0000 Subject: [issue3675] Python 2.6 can't read sets pickled with Python 3.0 In-Reply-To: <1219666544.55.0.587307324969.issue3675@psf.upfronthosting.co.za> Message-ID: <1238505010.16.0.242135171886.issue3675@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:16:01 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 31 Mar 2009 13:16:01 +0000 Subject: [issue1717900] Destructor behavior faulty Message-ID: <1238505361.52.0.921405603071.issue1717900@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Armin's proposal is in #812369, closing this bug. (it is not obvious Armin's patch is enough to solve the problem at hand, but the problem is well-known anyway and there are certainly other bug entries pointing to it :-)) ---------- nosy: +pitrou resolution: -> duplicate status: open -> closed superseder: -> module shutdown procedure based on GC _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:16:23 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 31 Mar 2009 13:16:23 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238505383.83.0.153552287383.issue1161031@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: @Aleksy http://bugs.python.org/issue4501 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:17:19 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 31 Mar 2009 13:17:19 +0000 Subject: [issue1717900] Destructor behavior faulty Message-ID: <1238505439.76.0.833814822386.issue1717900@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, an easy way to fix it would probably to rewrite the destructor in the following way (haven't tested): def __del__(self): self.__class__.population -= 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:18:10 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 31 Mar 2009 13:18:10 +0000 Subject: [issue812369] module shutdown procedure based on GC Message-ID: <1238505490.93.0.20542985295.issue812369@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Retargetting, and I hope someone can take a look at the patch and give it the green light :-) ---------- stage: -> patch review type: -> behavior versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:21:17 2009 From: report at bugs.python.org (lekma) Date: Tue, 31 Mar 2009 13:21:17 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238505677.5.0.315280738822.issue5585@psf.upfronthosting.co.za> lekma added the comment: > I'm thinking about it and plan on discussing it with other core devs > today. Altering the Api is not something done lightly yep. Thanks for considering it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:33:24 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 13:33:24 +0000 Subject: [issue5039] Adjust reference-counting note In-Reply-To: <1232755919.64.0.595244867135.issue5039@psf.upfronthosting.co.za> Message-ID: <1238506404.63.0.794040224057.issue5039@psf.upfronthosting.co.za> Georg Brandl added the comment: It's all right, I spotted that and added the "C" in the commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:35:31 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 31 Mar 2009 13:35:31 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238506531.96.0.694915312267.issue5585@psf.upfronthosting.co.za> R. David Murray added the comment: >I'm a bit confused here. The patch only adds a small feature to >BaseManager and subtypes (the same way Pool does it already). AFAICT the >Thread/Process API equivalence is preserved. Am I missing something? No, I'm the one who was missing something. I obviously didn't look at the patch carefully enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:36:00 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 31 Mar 2009 13:36:00 +0000 Subject: [issue1659410] Minor AST tweaks Message-ID: <1238506560.15.0.228097507662.issue1659410@psf.upfronthosting.co.za> Changes by Jeremy Hylton : ---------- nosy: +jhylton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:39:48 2009 From: report at bugs.python.org (Aleksi Torhamo) Date: Tue, 31 Mar 2009 13:39:48 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238506788.43.0.259936764473.issue1161031@psf.upfronthosting.co.za> Aleksi Torhamo added the comment: Sorry for the noise. I just registered, and started going through the open issues for asyncore in order. I'll read them all through before commenting on the next one.. I also bumped to this: http://groups.google.com/group/python-dev2/browse_thread/thread/eec1ddadefe09fd8/a38270231620870e?lnk=gst&q=asyncore It seems lots of things i have been thinking about have already been done, but the whole asyncore is at a standstill. Any pointers on where i should look if i want to help with doing something to the current state of affairs? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:46:08 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 31 Mar 2009 13:46:08 +0000 Subject: [issue5002] multiprocessing/pipe_connection.c compiler warning (conn_poll) In-Reply-To: <1232392483.91.0.505084549833.issue5002@psf.upfronthosting.co.za> Message-ID: <1238507168.7.0.887408363295.issue5002@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I noticed this warning still happens on release26-maint. Is backporting this to release26-maint not good for binary compatibility reason? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 15:49:08 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 31 Mar 2009 13:49:08 +0000 Subject: [issue4315] On some Python builds, exec in a function can't create shadows of variables if these are declared "global" in another function of the same module In-Reply-To: <1226592373.02.0.139711229291.issue4315@psf.upfronthosting.co.za> Message-ID: <1238507348.68.0.921619425172.issue4315@psf.upfronthosting.co.za> Jeremy Hylton added the comment: Committed revision 70809 (trunk). Needs to be backported. ---------- nosy: +jhylton resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 16:08:14 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 31 Mar 2009 14:08:14 +0000 Subject: [issue5387] mmap.move crashes by integer overflow In-Reply-To: <1235756718.87.0.0651298987866.issue5387@psf.upfronthosting.co.za> Message-ID: <1238508494.77.0.502994060614.issue5387@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Committed in r70800(trunk), r70803(release26-maint), r70808(py3k), r70811(release30-maint). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 16:09:19 2009 From: report at bugs.python.org (Senthil) Date: Tue, 31 Mar 2009 14:09:19 +0000 Subject: [issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0 In-Reply-To: <1230586952.45.0.591912771259.issue4773@psf.upfronthosting.co.za> Message-ID: <1238508559.75.0.586341206648.issue4773@psf.upfronthosting.co.za> Senthil added the comment: I spent sometime on the patch which replaces the self.msg usage with self.headers in http.client. Everything is fine. The next step is to provide an interface in the urllib.response and the equivalent changes to py2k. ---------- assignee: georg.brandl -> jhylton resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 16:21:20 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 31 Mar 2009 14:21:20 +0000 Subject: [issue1153622] eval does not bind variables in lambda bodies correctly Message-ID: <1238509280.35.0.0382093987031.issue1153622@psf.upfronthosting.co.za> Jeremy Hylton added the comment: The current docs cover this case: http://docs.python.org/reference/executionmodel.html#interaction-with-dynamic-features It basically says that code compiled via exec / eval can't access free variables. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 16:25:30 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 31 Mar 2009 14:25:30 +0000 Subject: [issue5002] multiprocessing/pipe_connection.c compiler warning (conn_poll) In-Reply-To: <1232392483.91.0.505084549833.issue5002@psf.upfronthosting.co.za> Message-ID: <1238509530.29.0.306509360973.issue5002@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The function is static and not visible to other modules. The patch can be backported without compatibility problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 16:27:50 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 31 Mar 2009 14:27:50 +0000 Subject: [issue4951] failure in test_httpservers In-Reply-To: <1231978384.8.0.984870711272.issue4951@psf.upfronthosting.co.za> Message-ID: <1238509670.72.0.31809218778.issue4951@psf.upfronthosting.co.za> Ned Deily added the comment: Also seeing on OS X. Without having looked at the code yet, I wonder if this might be related to Issue1711605. ---------- nosy: +nad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 16:32:40 2009 From: report at bugs.python.org (Jesse Noller) Date: Tue, 31 Mar 2009 14:32:40 +0000 Subject: [issue5002] multiprocessing/pipe_connection.c compiler warning (conn_poll) In-Reply-To: <1232392483.91.0.505084549833.issue5002@psf.upfronthosting.co.za> Message-ID: <1238509960.75.0.23806474357.issue5002@psf.upfronthosting.co.za> Jesse Noller added the comment: I'll be back porting it today ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 16:35:35 2009 From: report at bugs.python.org (Jesse Noller) Date: Tue, 31 Mar 2009 14:35:35 +0000 Subject: [issue5002] multiprocessing/pipe_connection.c compiler warning (conn_poll) In-Reply-To: <1232392483.91.0.505084549833.issue5002@psf.upfronthosting.co.za> Message-ID: <1238510135.67.0.432313257964.issue5002@psf.upfronthosting.co.za> Jesse Noller added the comment: MErged 70814 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 16:37:13 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 31 Mar 2009 14:37:13 +0000 Subject: [issue991196] An inconsistency with nested scopes Message-ID: <1238510233.72.0.820155089762.issue991196@psf.upfronthosting.co.za> Changes by Jeremy Hylton : ---------- assignee: -> jhylton nosy: +jhylton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 16:38:29 2009 From: report at bugs.python.org (Larry Hastings) Date: Tue, 31 Mar 2009 14:38:29 +0000 Subject: [issue1569040] Speed up using + for string concatenation Message-ID: <1238510309.61.0.338361305744.issue1569040@psf.upfronthosting.co.za> Larry Hastings added the comment: rhettinger: It's a bit unfair to paint the lazy string concatenation patch with the adjective "ropes", then point out ropes have been rejected many times. Lazy string concatenation objects are a form of specialized rope but they don't share the downsides of these other "ropes" proposals. The major problems with conventional rope implementations are a) slowdown, b) complexity, and c) you must use a new API to interact with them: http://mail.python.org/pipermail/python-dev/2000-February/002321.html Lazy string concatenation makes Python faster, it isolates its complexity locally inside the string object implementation, and it makes only two changes to the API. Those two changes are: one, you may no longer access the string directly, and two, APIs that returned the internal string (PyString_AsString, PyString_AS_STRING*) may fail in low-memory conditions. You don't need to use a new API to interact with the string; traditional APIs like strchr work fine. * Those were the names in 2.6 anyway. I don't know what the modern names would be in 3.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 16:45:06 2009 From: report at bugs.python.org (John Posner) Date: Tue, 31 Mar 2009 14:45:06 +0000 Subject: [issue5621] Add description of special case to "Assignment statements" section In-Reply-To: <1238510706.85.0.278195682658.issue5621@psf.upfronthosting.co.za> Message-ID: <1238510706.85.0.278195682658.issue5621@psf.upfronthosting.co.za> New submission from John Posner : The subsection "Augmented assignment statements" includes a note on this special case: a.x += 1 But the parent section "Assignment statements" does not include such a note, even though it's essentially the same situation. I suggest replacing the bulleted paragraph that begins "If the target is an attribute reference" with the following: --------- * If the target is an attribute reference: The primary expression in the reference is evaluated. It should yield an object with assignable attributes; if this is not the case, TypeError is raised. That object is then asked to assign the assigned object to the given attribute; if it cannot perform the assignment, it raises an exception (usually but not necessarily AttributeError). If the object is a class instance and the attribute reference occurs on both sides of the assignment operator; for example:: a.x = a.x + 1 ... in the RHS expression, ``a.x`` is evaluated with ``getattr()``, which can access either an instance attribute or (if no instance attribute exists) a class attribute. The LHS target ``a.x`` is assigned with ``setattr()``, which *always* accesses an instance attribute, creating it if necessary. Thus, the two occurrences of ``a.x`` do not necessarily refer to the same variable. If the RHS expression refers to a class attribute, the LHS creates a new instance attribute as the target of the assignment. (This description does not necessarily apply to attributes defined with ``property()``, which are accessed with user-defined functions instead of ``getattr()`` and ``setattr()``). See section "Augmented assignment statements" for a similar note on attribute references. --------- ---------- assignee: georg.brandl components: Documentation messages: 84790 nosy: georg.brandl, jjposner severity: normal status: open title: Add description of special case to "Assignment statements" section versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 16:56:33 2009 From: report at bugs.python.org (Maksim Kozyarchuk) Date: Tue, 31 Mar 2009 14:56:33 +0000 Subject: [issue5620] The attribute's action of an object is not correct. In-Reply-To: <1238498845.56.0.843345010323.issue5620@psf.upfronthosting.co.za> Message-ID: <1238511393.98.0.265206065637.issue5620@psf.upfronthosting.co.za> Maksim Kozyarchuk added the comment: AFAIK, This is expected behavior. myurl is a class attribute if you want it to be different per instance you should re-initialize it in the __init__ method. See below. >>> class C1(object): ... def __init__(self): ... self.myurl = [] ... def test(self): ... self.myurl.extend([5,6,7]) ... [44085 refs] >>> def testv(): ... c = C1() ... c.test() ... print(c.myurl) ... [44108 refs] >>> for i in range(10): ... testv() ... [5, 6, 7] [5, 6, 7] [5, 6, 7] [5, 6, 7] [5, 6, 7] [5, 6, 7] [5, 6, 7] [5, 6, 7] [5, 6, 7] [5, 6, 7] [44119 refs] ---------- nosy: +Kozyarchuk _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Mar 31 16:56:34 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 31 Mar 2009 14:56:34 +0000 Subject: [issue5311] bdist_msi generates version number for pure Python packages In-Reply-To: <1235016969.03.0.818386696301.issue5311@psf.upfronthosting.co.za> Message-ID: <1238511394.88.0.0543271760048.issue5311@psf.upfronthosting.co.za> Martin v. L?wis added the comment: In http://www.installsite.org/pages/en/msi/articles/MultiListBox/index.htm there is a demo how to modify the listbox contents dynamically using VBScript. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:00:37 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 31 Mar 2009 15:00:37 +0000 Subject: [issue5622] wrong error from curses.wrapper if curses initialization fails In-Reply-To: <1238511637.05.0.307555783931.issue5622@psf.upfronthosting.co.za> Message-ID: <1238511637.05.0.307555783931.issue5622@psf.upfronthosting.co.za> New submission from Ned Deily : wrong error from curses.wrapper if curses initialization fails One way to reproduce is trying under IDLE.app in OS X: import curses def scr(a): a.getch() curses.wrapper(scr) Traceback before patch: UnboundLocalError: local variable 'stdscr' referenced before assignment Traceback after patch: _curses.error: setupterm: could not find terminal APPLIES 2.6, 2.7, 3.0, 3.1 ---------- components: Library (Lib) files: patch-nad0018.txt messages: 84793 nosy: nad severity: normal status: open title: wrong error from curses.wrapper if curses initialization fails versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13512/patch-nad0018.txt _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Mattias_Engdeg=C3=A5rd_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Tue Mar 31 17:00:49 2009 From: =?utf-8?q?Mattias_Engdeg=C3=A5rd_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Mattias_Engdeg=C3=A5rd_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Tue, 31 Mar 2009 15:00:49 +0000 Subject: [issue3392] subprocess fails in select when descriptors are large In-Reply-To: <1216293940.59.0.136491841956.issue3392@psf.upfronthosting.co.za> Message-ID: <1238511649.1.0.831730615213.issue3392@psf.upfronthosting.co.za> Mattias Engdeg?rd added the comment: The patch looks all right in general. I would use something like if "poll" in dir(select) instead of catching AttributeError which risks hiding bugs in _communicate_with_poll(). PEP8 probably wants spaces around the bitwise-or operator. Some systems cannot use TTYs in poll(2) but this should not be a problem here - there is no point in using .communicate() with stdin/ stdout/stderr set to anything but PIPE, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:01:10 2009 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 31 Mar 2009 15:01:10 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <00151750d9b8f174a104666b7729@google.com> Guido van Rossum added the comment: Hi Greg, I've mostly reviewed for style... http://codereview.appspot.com/32080/diff/13/1006 File Doc/library/unittest.rst (right): http://codereview.appspot.com/32080/diff/13/1006#newcode611 Line 611: assertTrue(expr[, msg]) Make assertTrue the first/preferred/recommended spelling. http://codereview.appspot.com/32080/diff/13/1006#newcode623 Line 623: :const:`None`. Note that using :meth:`failUnlessEqual` improves upon failUnlessEqal -> assertEqual http://codereview.appspot.com/32080/diff/13/1006#newcode624 Line 624: doing the comparison as the first parameter to :meth:`failUnless`: the failUnless -> assertTrue (This kind of change may have to be done throughout.) http://codereview.appspot.com/32080/diff/13/1010 File Lib/test/test_unittest.py (right): http://codereview.appspot.com/32080/diff/13/1010#newcode75 Line 75: self.fail("%s and %s do not hash equal" % (obj_1, obj_2)) maybe better %r and %r ? http://codereview.appspot.com/32080/diff/13/1010#newcode84 Line 84: self.fail("%s and %s hash equal, but shouldn't" % ditto? http://codereview.appspot.com/32080/diff/13/1010#newcode2313 Line 2313: self.assertRaises(self.failureException, self.assertIn, 'elephant', animals) lin too long http://codereview.appspot.com/32080/diff/13/1010#newcode2317 Line 2317: self.assertRaises(self.failureException, self.assertNotIn, 'cow', animals) linr too long http://codereview.appspot.com/32080/diff/13/1007 File Lib/unittest.py (right): http://codereview.appspot.com/32080/diff/13/1007#newcode257 Line 257: class AssertRaisesContext(object): While you're at it, can you add a docstring? http://codereview.appspot.com/32080/diff/13/1007#newcode332 Line 332: # Map types to custom assertEquals functions that will compare assertEquals -> assertEqual http://codereview.appspot.com/32080/diff/13/1007#newcode512 Line 512: # should use their type specific assertSpamEquals method to compare assertSpamEqual http://codereview.appspot.com/32080/diff/13/1007#newcode521 Line 521: def _baseAssertEquals(self, first, second, msg=None): Mind dropping the trailing 's'? http://codereview.appspot.com/32080/diff/13/1007#newcode526 Line 526: def failUnlessEqual(self, first, second, msg=None): We had talked about making the 'def' define the recommended name, e.g. assertNotEqual, and using aliases to keep the other names. Do you want to do that at the same time as this change or in a separate one? http://codereview.appspot.com/32080/diff/13/1007#newcode581 Line 581: def assertSequenceEquals(self, seq1, seq2, msg=None, seq_type=None): Drop the trailing 's' in the name? http://codereview.appspot.com/32080 ---------- title: Figure out what to do with unittest's redundant APIs -> additional unittest type equality methods _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:03:05 2009 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 31 Mar 2009 15:03:05 +0000 Subject: [issue1537721] csv module: add header row to DictWriter Message-ID: <1238511785.88.0.821042918195.issue1537721@psf.upfronthosting.co.za> Skip Montanaro added the comment: I don't see a patch. Is there some reason that if you need this you can't simply subclass DictWriter? ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:09:27 2009 From: report at bugs.python.org (Brett Cannon) Date: Tue, 31 Mar 2009 15:09:27 +0000 Subject: [issue1161031] Neverending warnings from asyncore In-Reply-To: <1238506788.43.0.259936764473.issue1161031@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Tue, Mar 31, 2009 at 06:39, Aleksi Torhamo wrote: > > Aleksi Torhamo > > added the comment: > > Sorry for the noise. > > I just registered, and started going through the open issues for > asyncore in order. I'll read them all through before commenting on the > next one.. > > I also bumped to this: > > http://groups.google.com/group/python-dev2/browse_thread/thread/eec1ddadefe09fd8/a38270231620870e?lnk=gst&q=asyncore > > It seems lots of things i have been thinking about have already been > done, but the whole asyncore is at a standstill. Any pointers on where i > should look if i want to help with doing something to the current state > of affairs? > > Thanks. Beyond looking at what is in trunk, nothing specific comes to mind. ---------- Added file: http://bugs.python.org/file13513/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

On Tue, Mar 31, 2009 at 06:39, Aleksi Torhamo <report at bugs.python.org> wrote:

Aleksi Torhamo <alexerion+pythonbugs at gmail.com> added the comment:

Sorry for the noise.

I just registered, and started going through the open issues for
asyncore in order. I'll read them all through before commenting on the
next one..

I also bumped to this:
http://groups.google.com/group/python-dev2/browse_thread/thread/eec1ddadefe09fd8/a38270231620870e?lnk=gst&q=asyncore

It seems lots of things i have been thinking about have already been
done, but the whole asyncore is at a standstill. Any pointers on where i
should look if i want to help with doing something to the current state
of affairs?

Thanks.

Beyond looking at what is in trunk, nothing specific comes to mind.

From report at bugs.python.org Tue Mar 31 17:24:43 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 31 Mar 2009 15:24:43 +0000 Subject: [issue5623] test_fdopen fails with vs2005, release build on Windows 2000 In-Reply-To: <1238513083.42.0.065691454167.issue5623@psf.upfronthosting.co.za> Message-ID: <1238513083.42.0.065691454167.issue5623@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : Python trunk, compiled with VS2005 SP1, release build on Windows 2000: >>> import os >>> fd = os.open("t", 0) >>> os.close(fd) Traceback (most recent call last): File "", line 1, in OSError: [Errno 9] Bad file descriptor The _PyVerify_fd() returned False for the given fd! Needless to say that there are many other similar failures. For example, subprocess does not work. Digging inside assembly code, I noticed that the __pioinfo structure compiled inside msvcr80.dll has a sizeof==64 (asssembly code multiplies by 64 when doing pointer arithmetic); in Debug mode, sizeof==56. in posixmodule.c, _PyVerify_fd() uses a sizeof of 56... It appears that Windows 2000 picks the first msvcr80.dll it finds on the PATH. So I played with copying various versions of it in the target directory. Here are the results, as reported by Visual Studio in the "Modules" pane. fails: C:\WINNT\system32\msvcr80.dll 8.00.50727.1433 fails: C:\python\trunk\PC\VS8.0\msvcr80.dll 8.00.50727.1433 works: C:\python\trunk\PC\VS8.0\msvcr80.dll 8.00.50727.762 fails: C:\python\trunk\PC\VS8.0\msvcr80.dll 8.00.50727.163 fails: C:\python\trunk\PC\VS8.0\msvcr80.dll 8.00.50727.42 works: C:\WINNT\system32\msvcr80d.dll 8.00.50727.762 DLL hell... The manifest embedded inside python27.dll contains version="8.0.50727.762", which is the only working version. So the problem will likely not happen on Windows XP, which enforces manifests. Is there a way to enforce the manifest information on Windows 2000 as well? If not, there may be several solutions: - disable the _PyVerify_fd() stuff on Windows 2000. - write clever code to detect the real sizeof(ioinfo) (for example: _get_osfhandle(1) returns __pioinfo[0][1]->osfhnd, which is a file opened for writing) ---------- components: Windows messages: 84798 nosy: amaury.forgeotdarc, loewis, mhammond priority: critical severity: normal status: open title: test_fdopen fails with vs2005, release build on Windows 2000 type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:25:50 2009 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 31 Mar 2009 15:25:50 +0000 Subject: [issue992389] attribute error after non-from import Message-ID: <1238513150.16.0.436818131279.issue992389@psf.upfronthosting.co.za> Guido van Rossum added the comment: Good sleuthing Nick! It's clearly the same bug that Fredrik found. I tried to test if using Brett' importlib has the same problem, but it can import neither p.a nor p.b, so that's not helpful as to sorting out the import semantics. I believe that at some point many of the details of importlib should be seen as the reference documentation for the darkest corners of import semantics. But it seems we aren't there yet. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:33:23 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 15:33:23 +0000 Subject: [issue5621] Add description of special case to "Assignment statements" section In-Reply-To: <1238510706.85.0.278195682658.issue5621@psf.upfronthosting.co.za> Message-ID: <1238513603.72.0.541224665663.issue5621@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm not sure it belongs there, since normal assignments do not say *anything* about the RHS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:34:00 2009 From: report at bugs.python.org (Maksim Kozyarchuk) Date: Tue, 31 Mar 2009 15:34:00 +0000 Subject: [issue5624] Py3K branch import _winreg instead of winreg In-Reply-To: <1238513640.75.0.770010391975.issue5624@psf.upfronthosting.co.za> Message-ID: <1238513640.75.0.770010391975.issue5624@psf.upfronthosting.co.za> New submission from Maksim Kozyarchuk : Number of modules in py3k branch are importing _winreg instead of winreg. According to fix_import.py module in libpy2to3 all _winreg imports need to be converted to winreg. ---------- components: Library (Lib) messages: 84801 nosy: Kozyarchuk severity: normal status: open title: Py3K branch import _winreg instead of winreg type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:34:17 2009 From: report at bugs.python.org (Maksim Kozyarchuk) Date: Tue, 31 Mar 2009 15:34:17 +0000 Subject: [issue5624] Py3K branch import _winreg instead of winreg In-Reply-To: <1238513640.75.0.770010391975.issue5624@psf.upfronthosting.co.za> Message-ID: <1238513657.13.0.722872014072.issue5624@psf.upfronthosting.co.za> Maksim Kozyarchuk added the comment: Looking at this now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:35:27 2009 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 31 Mar 2009 15:35:27 +0000 Subject: [issue992389] attribute error after non-from import Message-ID: <1238513727.78.0.542439344311.issue992389@psf.upfronthosting.co.za> Guido van Rossum added the comment: Sorry, never mind about the importlib bug, that was my mistake. importlib actually behaves exactly the same way as the built-in import. I conclude that this is probably the best semantics of import that we can hope for in this corner case. I propose to close this as "works as intended" -- and perhaps document it somewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:43:35 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 15:43:35 +0000 Subject: [issue5519] Deletion of some statements in re documentation In-Reply-To: <1237492563.73.0.360381251415.issue5519@psf.upfronthosting.co.za> Message-ID: <1238514215.83.0.562426860775.issue5519@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r70824. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:46:01 2009 From: report at bugs.python.org (John Posner) Date: Tue, 31 Mar 2009 15:46:01 +0000 Subject: [issue5621] Add description of special case to "Assignment statements" section In-Reply-To: <1238510706.85.0.278195682658.issue5621@psf.upfronthosting.co.za> Message-ID: <1238514361.85.0.664250386228.issue5621@psf.upfronthosting.co.za> John Posner added the comment: The "Assignment statements" section *does* talk about the RHS -- but in a subtle way: For targets which are attribute references, the initial value is retrieved with a getattr() The retrieving of the initial value (maybe "current value" would be better) occurs on the RHS of the assignment statement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:48:09 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 31 Mar 2009 15:48:09 +0000 Subject: [issue5625] test_urllib2 fails - urlopen error file not on local host In-Reply-To: <1238514488.84.0.993697323023.issue5625@psf.upfronthosting.co.za> Message-ID: <1238514488.84.0.993697323023.issue5625@psf.upfronthosting.co.za> New submission from Ned Deily : [NOTE: applies to 2.x urllib2 and similar code in merged 3.x urllib] test_urllib2 can fail because urllib2.FileHandler assumes incorrectly that the local host has only a single IP address. It is not uncommon to have host IP configurations where a host has more than one network interface and the same IP host name is associated with each address. Both the urllib module and test_urllib2 use socket.gethostbyname(socket.gethostname()) to find "the" host IP address. But, as can be seen here, consecutive calls may produce different addresses depending on the network configuration and underlying os implementation: Python 2.6.1 (r261:67515, Dec 17 2008, 23:27:50) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.gethostbyname(socket.gethostname()) '10.52.12.105' >>> socket.gethostbyname(socket.gethostname()) '10.52.12.105' >>> socket.gethostbyname(socket.gethostname()) '10.52.12.205' >>> This leads to predictable test failures when the calls in test_urllib2 and urllib2.FileHandler return different addresses: test_urllib2 test test_urllib2 failed -- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/te st_urllib2.py", line 621, in test_file r = h.file_open(Request(url)) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2 .py", line 1229, in file_open return self.open_local_file(req) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2 .py", line 1266, in open_local_file raise URLError('file not on local host') URLError: The simplest way to avoid the test failure is to modify urllib2.FileHandler to use socket.gethostbyname_ex which returns all of the IPv4 addresses associated with a hostname: >>> socket.gethostbyname_ex(socket.gethostname()) ('myhost.net', [], ['10.52.12.205', '10.52.12.105']) Attached patches for 2.x urllib2 and 3.x urllib do that. Note that there remain other issues in this area: - when urllib2 is enhanced to support IPv6, code is needed to return all of the host's IPv6 addresses as well (-> adding a note to open Issue1675455) - the merged 3.0 urlib has two nearly identical functions named open_local_file, one each from 2.x urllib.URLopener and urllib2.FileHandler, and both use similarly flawed socket.gethostbyname(socket.gethostname()) tests but the tests for local vs remote file URLs is somewhat different in each. (The patches here do not attempt to address this other than to add a comment.) ---------- components: Library (Lib) files: patch-nad0017-trunk-26.txt messages: 84806 nosy: nad severity: normal status: open title: test_urllib2 fails - urlopen error file not on local host versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13514/patch-nad0017-trunk-26.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:48:09 2009 From: report at bugs.python.org (Mike Coleman) Date: Tue, 31 Mar 2009 15:48:09 +0000 Subject: [issue3392] subprocess fails in select when descriptors are large In-Reply-To: <1216293940.59.0.136491841956.issue3392@psf.upfronthosting.co.za> Message-ID: <1238514489.76.0.895471324427.issue3392@psf.upfronthosting.co.za> Mike Coleman added the comment: My original report didn't mention it specifically, but I believe I was hitting the FD_SETSIZE limit that Frank mentioned. (Thanks for working on this!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:48:54 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 31 Mar 2009 15:48:54 +0000 Subject: [issue5625] test_urllib2 fails - urlopen error file not on local host In-Reply-To: <1238514488.84.0.993697323023.issue5625@psf.upfronthosting.co.za> Message-ID: <1238514534.21.0.0164395896049.issue5625@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file13515/patch-nad0017-py3k-30.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:49:10 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 15:49:10 +0000 Subject: [issue5566] Minor error in document of PyLong_AsSsize_t In-Reply-To: <1238066882.54.0.64237594344.issue5566@psf.upfronthosting.co.za> Message-ID: <1238514550.96.0.929499643169.issue5566@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed first issue in r70825. Fixed second issue in r70827. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:50:30 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 15:50:30 +0000 Subject: [issue5581] abc.abstractproperty() docs list fget as required; fget is not required by abc.abstractproperty() In-Reply-To: <1238179111.83.0.887852993055.issue5581@psf.upfronthosting.co.za> Message-ID: <1238514630.88.0.665751918312.issue5581@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r70828, thanks! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:52:01 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 31 Mar 2009 15:52:01 +0000 Subject: [issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support Message-ID: <1238514721.42.0.918854614077.issue1675455@psf.upfronthosting.co.za> Ned Deily added the comment: Note also Issue5625 - any work for IPv6 should keep in mind that local hosts may have more than one IP address. ---------- nosy: +nad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:52:50 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 15:52:50 +0000 Subject: [issue5548] In the tutorial, PyMODINIT_FUNC is shown as having a return type of void rather than PyObject * In-Reply-To: <1237846749.48.0.0822005616246.issue5548@psf.upfronthosting.co.za> Message-ID: <1238514770.92.0.124025702038.issue5548@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r70829. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:53:14 2009 From: report at bugs.python.org (Stephan R.A. Deibel) Date: Tue, 31 Mar 2009 15:53:14 +0000 Subject: [issue1608921] PyThread_release_lock with pthreads munges errno Message-ID: <1238514794.62.0.445127944957.issue1608921@psf.upfronthosting.co.za> Stephan R.A. Deibel added the comment: If you are at PyCon 2009 sprints, try to see if you can find John Ehresman in the Python Core sprint to see it happen at line 115 of threadops.c in the Wing 3.2 source base. If you're not there or can't find him, I'll try to make a small example later. Feel free to email me directly also at sdeibel at wingware dot com. Note I saw this w/ pthreads and it may be that it does not occur under other threading implementations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:56:25 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 31 Mar 2009 15:56:25 +0000 Subject: [issue991196] An inconsistency with nested scopes Message-ID: <1238514985.59.0.547244501238.issue991196@psf.upfronthosting.co.za> Jeremy Hylton added the comment: This code behaves as intended. The module-level execution environment is different than other environments. The global scope and local scope are the same dictionary. Assignments at the top-level become globals because of this behavior of the execution environment. If you want exec to mimic the top-level environment, you need to pass it a single dictionary. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:57:18 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 15:57:18 +0000 Subject: [issue5540] "file objects" in python 3 tutorial In-Reply-To: <1237767830.7.0.116685302416.issue5540@psf.upfronthosting.co.za> Message-ID: <1238515038.15.0.998037439196.issue5540@psf.upfronthosting.co.za> Georg Brandl added the comment: I found nothing in that document that refers to file objects as seen in Python 2, e.g. the "file" type. I'd still refer to all of Python 3's IO objects as "file objects". ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 17:58:38 2009 From: report at bugs.python.org (Maksim Kozyarchuk) Date: Tue, 31 Mar 2009 15:58:38 +0000 Subject: [issue5624] Py3K branch import _winreg instead of winreg In-Reply-To: <1238513640.75.0.770010391975.issue5624@psf.upfronthosting.co.za> Message-ID: <1238515118.69.0.714995681013.issue5624@psf.upfronthosting.co.za> Maksim Kozyarchuk added the comment: Fixed, patch is on appshot. http://codereview.appspot.com/32083/show ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:03:02 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 31 Mar 2009 16:03:02 +0000 Subject: [issue5626] misleading comment in socket.gethostname() documentation In-Reply-To: <1238515382.33.0.784525971679.issue5626@psf.upfronthosting.co.za> Message-ID: <1238515382.33.0.784525971679.issue5626@psf.upfronthosting.co.za> New submission from Ned Deily : The documentation for socket.gethostname() contains the following comment: "If you want to know the current machine?s IP address, you may want to use gethostbyname(gethostname()). This operation assumes that there is a valid address-to-host mapping for the host, and the assumption does not always hold." This comment leads to the mistaken assumption that a machine has only one IP address, an assumption which results in bugs such as in Issue5625. The comment also does not deal with other address families, i.e. IPv6 addresses. Either the paragraph should be expanded to cover multiple addresses and families, requiring the use of other socket functions, or the paragraph should simply be removed. ---------- assignee: georg.brandl components: Documentation messages: 84816 nosy: georg.brandl, nad severity: normal status: open title: misleading comment in socket.gethostname() documentation versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:06:59 2009 From: report at bugs.python.org (Stephan R.A. Deibel) Date: Tue, 31 Mar 2009 16:06:59 +0000 Subject: [issue1608805] Py_FileSystemDefaultEncoding can be non-canonical Message-ID: <1238515619.76.0.0666887707377.issue1608805@psf.upfronthosting.co.za> Stephan R.A. Deibel added the comment: It appears to be specific to 2.x and does not occur under Python 3.0: Python 3.0 (r30:67503, Jan 15 2009, 09:27:16) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.getfilesystemencoding() 'utf-8' Python 2.6.1 (r261:67515, Dec 11 2008, 11:59:39) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>import sys >>> sys.getfilesystemencoding() 'UTF-8' Python 2.5.4 (r254:67916, Mar 16 2009, 09:34:35) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.getfilesystemencoding() 'UTF-8' (This is on a Ubuntu system where LANG=en_US.UTF-8 is the default) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:10:22 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 31 Mar 2009 16:10:22 +0000 Subject: [issue4831] exec() behavior - revisited In-Reply-To: <1231080757.34.0.371299910719.issue4831@psf.upfronthosting.co.za> Message-ID: <1238515822.43.0.374619218706.issue4831@psf.upfronthosting.co.za> Jeremy Hylton added the comment: I think this bug ran out of steam. Python is behaving as intended, and I think Georg addressed all of David's questions. ---------- nosy: +jhylton resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:12:04 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 16:12:04 +0000 Subject: [issue5529] Backport sys module docs involving import to 2.7 In-Reply-To: <1237605762.97.0.593625711393.issue5529@psf.upfronthosting.co.za> Message-ID: <1238515924.17.0.938990859735.issue5529@psf.upfronthosting.co.za> Georg Brandl added the comment: Done in r70830. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:12:46 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 31 Mar 2009 16:12:46 +0000 Subject: [issue5578] unqualified exec in class body In-Reply-To: <1238164857.67.0.53034733648.issue5578@psf.upfronthosting.co.za> Message-ID: <1238515966.05.0.611778818977.issue5578@psf.upfronthosting.co.za> Jeremy Hylton added the comment: exec is allowed in a class statement ---------- resolution: accepted -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:15:30 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 31 Mar 2009 16:15:30 +0000 Subject: [issue5524] execfile() removed from Python3 In-Reply-To: <1237514044.93.0.31573705804.issue5524@psf.upfronthosting.co.za> Message-ID: <1238516130.95.0.998945964274.issue5524@psf.upfronthosting.co.za> Jeremy Hylton added the comment: It doesn't seem helpful to leave this issue open, particularly since the title suggest there's a problem with execfile being removed and that's not going to change. ---------- nosy: +jhylton status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:15:34 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 16:15:34 +0000 Subject: [issue5621] Add description of special case to "Assignment statements" section In-Reply-To: <1238510706.85.0.278195682658.issue5621@psf.upfronthosting.co.za> Message-ID: <1238516134.41.0.812449346947.issue5621@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, it says that getattr() is used in the section about augassign; but there the note you refer to is already present. ---------- resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:15:55 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 31 Mar 2009 16:15:55 +0000 Subject: [issue5623] test_fdopen fails with vs2005, release build on Windows 2000 In-Reply-To: <1238513083.42.0.065691454167.issue5623@psf.upfronthosting.co.za> Message-ID: <1238516155.6.0.0866344360873.issue5623@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- nosy: +krisvale _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:16:43 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 31 Mar 2009 16:16:43 +0000 Subject: [issue4199] add shorthand global and nonlocal statements In-Reply-To: <1224887535.03.0.272495603252.issue4199@psf.upfronthosting.co.za> Message-ID: <1238516203.56.0.809627636325.issue4199@psf.upfronthosting.co.za> Changes by Jeremy Hylton : ---------- nosy: +jhylton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:18:05 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 31 Mar 2009 16:18:05 +0000 Subject: [issue1346238] A constant folding optimization pass for the AST Message-ID: <1238516285.7.0.502007865088.issue1346238@psf.upfronthosting.co.za> Changes by Jeremy Hylton : ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:18:08 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 16:18:08 +0000 Subject: [issue1503789] Cannot write source code in UTF16 Message-ID: <1238516288.88.0.169126117294.issue1503789@psf.upfronthosting.co.za> Georg Brandl added the comment: Why am I assigned this issue? ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:18:44 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 31 Mar 2009 16:18:44 +0000 Subject: [issue2344] Using an iteration variable outside a list comprehension needs a Py3K warning In-Reply-To: <1205778004.51.0.0647688258878.issue2344@psf.upfronthosting.co.za> Message-ID: <1238516324.94.0.586326281632.issue2344@psf.upfronthosting.co.za> Changes by Jeremy Hylton : ---------- nosy: +jhylton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:19:46 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 31 Mar 2009 16:19:46 +0000 Subject: [issue2344] Using an iteration variable outside a list comprehension needs a Py3K warning In-Reply-To: <1205778004.51.0.0647688258878.issue2344@psf.upfronthosting.co.za> Message-ID: <1238516386.26.0.355209501959.issue2344@psf.upfronthosting.co.za> Jeremy Hylton added the comment: Seemed like a good idea, but no one knew how to do it. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:21:06 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 16:21:06 +0000 Subject: [issue1501979] syntax errors on continuation lines Message-ID: <1238516466.04.0.77143924267.issue1501979@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm not sure if this is necessary; you could argue that the syntax error really is on the last line, because there the parenthesis is missing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:22:16 2009 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 31 Mar 2009 16:22:16 +0000 Subject: [issue1653416] print >> f, "Hello" produces no error: normal? Message-ID: <1238516536.95.0.465174623542.issue1653416@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- nosy: -skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:30:33 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 31 Mar 2009 16:30:33 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238517033.32.0.406839671109.issue1161031@psf.upfronthosting.co.za> Josiah Carlson added the comment: Your analysis WRT handle_expt_event() is correct. I've been meaning to fix that for a while, but I forgot to do it in 2.6/3.0 with all of the other changes/fixes. Looking at the docs, you are also right about POLLNVAL. I also don't *know* what to do when presented with POLLERR, but few socket errors are transient (transient errors should be handled by the underlying stacks), so I agree with you that they should just be closed. I went ahead and made the changes as you have suggested, and also made the same change with the select-based loop. Errors on the socket just result in closing the socket, resulting in _exception() -> close(). Thinking about it, I've also had a change of heart, and added a frozenset object called 'ignore_log_types', which specifies the log types to ignore. By default it is populated with 'warning', which squelches all currently existing "unhandled * event" bits. If you use self.log(arg) or self.log_info(one_arg), those lines are unchanged. Handle_error() uses the "error" type, which is also nice, but which you can also suppress with ease (though you really should be logging them so you can fix your code). I've attached a version that I think is pretty reasonable. Comments? Questions? ---------- keywords: +needs review, patch versions: +Python 2.7 -Python 2.6 Added file: http://bugs.python.org/file13516/async_no_warn.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:31:25 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 16:31:25 +0000 Subject: [issue1386675] _winreg specifies EnvironmentError instead of WindowsError Message-ID: <1238517085.59.0.987416336873.issue1386675@psf.upfronthosting.co.za> Georg Brandl added the comment: Re-fixed in r70832. ---------- assignee: fdrake -> georg.brandl nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:33:57 2009 From: report at bugs.python.org (Maksim Kozyarchuk) Date: Tue, 31 Mar 2009 16:33:57 +0000 Subject: [issue5624] Py3K branch import _winreg instead of winreg In-Reply-To: <1238513640.75.0.770010391975.issue5624@psf.upfronthosting.co.za> Message-ID: <1238517237.58.0.154547261551.issue5624@psf.upfronthosting.co.za> Maksim Kozyarchuk added the comment: Fixed Typo, and Re-Uploaded http://codereview.appspot.com/28156/show ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:37:06 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 31 Mar 2009 16:37:06 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <0016e644cb2802c2b804666ccf6d@google.com> Gregory P. Smith added the comment: Reviewers: fuzzyman, GvR, http://codereview.appspot.com/32080/diff/13/1006 File Doc/library/unittest.rst (right): http://codereview.appspot.com/32080/diff/13/1006#newcode611 Line 611: assertTrue(expr[, msg]) On 2009/03/31 15:01:06, GvR wrote: > Make assertTrue the first/preferred/recommended spelling. Done. http://codereview.appspot.com/32080/diff/13/1006#newcode623 Line 623: :const:`None`. Note that using :meth:`failUnlessEqual` improves upon On 2009/03/31 15:01:06, GvR wrote: > failUnlessEqal -> assertEqual Done. http://codereview.appspot.com/32080/diff/13/1006#newcode624 Line 624: doing the comparison as the first parameter to :meth:`failUnless`: the On 2009/03/31 15:01:06, GvR wrote: > failUnless -> assertTrue > (This kind of change may have to be done throughout.) Done. http://codereview.appspot.com/32080/diff/13/1010 File Lib/test/test_unittest.py (right): http://codereview.appspot.com/32080/diff/13/1010#newcode75 Line 75: self.fail("%s and %s do not hash equal" % (obj_1, obj_2)) On 2009/03/31 15:01:06, GvR wrote: > maybe better %r and %r ? Done. http://codereview.appspot.com/32080/diff/13/1010#newcode84 Line 84: self.fail("%s and %s hash equal, but shouldn't" % On 2009/03/31 15:01:06, GvR wrote: > ditto? Done. http://codereview.appspot.com/32080/diff/13/1010#newcode2313 Line 2313: self.assertRaises(self.failureException, self.assertIn, 'elephant', animals) On 2009/03/31 15:01:06, GvR wrote: > lin too long Done. http://codereview.appspot.com/32080/diff/13/1010#newcode2317 Line 2317: self.assertRaises(self.failureException, self.assertNotIn, 'cow', animals) On 2009/03/31 15:01:06, GvR wrote: > linr too long Done. http://codereview.appspot.com/32080/diff/13/1007 File Lib/unittest.py (right): http://codereview.appspot.com/32080/diff/13/1007#newcode257 Line 257: class AssertRaisesContext(object): On 2009/03/31 15:01:06, GvR wrote: > While you're at it, can you add a docstring? Done. We also decided that this should be private so I've added an _. http://codereview.appspot.com/32080/diff/13/1007#newcode332 Line 332: # Map types to custom assertEquals functions that will compare On 2009/03/31 15:01:06, GvR wrote: > assertEquals -> assertEqual Done. http://codereview.appspot.com/32080/diff/13/1007#newcode512 Line 512: # should use their type specific assertSpamEquals method to compare On 2009/03/31 15:01:06, GvR wrote: > assertSpamEqual Done. http://codereview.appspot.com/32080/diff/13/1007#newcode521 Line 521: def _baseAssertEquals(self, first, second, msg=None): On 2009/03/31 15:01:06, GvR wrote: > Mind dropping the trailing 's'? Done. http://codereview.appspot.com/32080/diff/13/1007#newcode526 Line 526: def failUnlessEqual(self, first, second, msg=None): On 2009/03/31 15:01:06, GvR wrote: > We had talked about making the 'def' define the recommended name, e.g. > assertNotEqual, and using aliases to keep the other names. Do you want to do > that at the same time as this change or in a separate one? Yes I'm going to do that in the next revision immediately after this one. http://codereview.appspot.com/32080/diff/13/1007#newcode581 Line 581: def assertSequenceEquals(self, seq1, seq2, msg=None, seq_type=None): On 2009/03/31 15:01:06, GvR wrote: > Drop the trailing 's' in the name? Done. Description: http://bugs.python.org/issue2578 - additional unittest type specific equality methods that print useful error messages and type introspection within assertEqual to automatically use them when deemed appropriate. Please review this at http://codereview.appspot.com/32080 Affected files: M Doc/library/unittest.rst M Lib/test/test_gc.py M Lib/test/test_struct.py M Lib/test/test_unittest.py M Lib/unittest.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:39:02 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 16:39:02 +0000 Subject: [issue5522] HTTPRedirectHandler documentation is wrong In-Reply-To: <1237508721.0.0.854942701546.issue5522@psf.upfronthosting.co.za> Message-ID: <1238517542.05.0.986195814348.issue5522@psf.upfronthosting.co.za> Georg Brandl added the comment: This seems to be fixed in the development docs. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:41:37 2009 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 31 Mar 2009 16:41:37 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <0016e6509e8e42bfbc04666cdfba@google.com> Guido van Rossum added the comment: LG. http://codereview.appspot.com/32080 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:41:45 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 31 Mar 2009 16:41:45 +0000 Subject: [issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size) In-Reply-To: <1202768252.75.0.386707250967.issue2073@psf.upfronthosting.co.za> Message-ID: <1238517705.41.0.865865196891.issue2073@psf.upfronthosting.co.za> Josiah Carlson added the comment: When push is called in the current trunk (as of 2.6), the data is automatically chopped up into self.ac_out_buffer_size blocks for later writing. In order to force the use of the asynchat.simple_producer class (which takes an argument for the block size to send), you must pass the producer itself with push_with_producer() . Closing as out of date. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:47:13 2009 From: report at bugs.python.org (Euler Taveira de Oliveira) Date: Tue, 31 Mar 2009 16:47:13 +0000 Subject: [issue5627] PyDict_SetItemString() fails when the second argument is null In-Reply-To: <1238518033.32.0.364685297824.issue5627@psf.upfronthosting.co.za> Message-ID: <1238518033.32.0.364685297824.issue5627@psf.upfronthosting.co.za> New submission from Euler Taveira de Oliveira : PyDict_SetItemString() fails when the second argument (key) is null pointer. It occurs because PyString_FromString(key) call doesn't check for null pointer and if we're in a disabled assert environment the assert() is not caught and strlen() fails. I don't know what is the best fix but we have two possibilities: (i) check the second argument in PyDict_SetItemString() before calling PyString_FromString() and returns null if that argument is null; (ii) replace the assert() in PyString_FromString() to 'if (str == NULL) return NULL;'. This bug was reported as a PostgreSQL bug at [1]. [1] http://archives.postgresql.org/pgsql-hackers/2009-03/msg01344.php ---------- components: Interpreter Core messages: 84833 nosy: eulerto severity: normal status: open title: PyDict_SetItemString() fails when the second argument is null type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:49:26 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 31 Mar 2009 16:49:26 +0000 Subject: [issue1569040] Speed up using + for string concatenation Message-ID: <1238518166.25.0.488727941616.issue1569040@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think lazy evaluation was discussed in the same thread. Either I or someone else suggested it and there was some issue because the string struct had long been exposed and people were accessing it directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:51:58 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 16:51:58 +0000 Subject: [issue5417] Reference to missing(?) function in Extending & Embedding Document In-Reply-To: <1236201719.81.0.524909062224.issue5417@psf.upfronthosting.co.za> Message-ID: <1238518318.02.0.200503944463.issue5417@psf.upfronthosting.co.za> Georg Brandl added the comment: The function is there, but not documented, so the examples are valid. I now changed them to refer to PyObject_Call[Object] which are documented in r70836. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:57:28 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 31 Mar 2009 16:57:28 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238518648.18.0.333534399712.issue2578@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Comments applied. committed to trunk in r70837. Needs porting to python 3.1. Next changes TODO: * rename the method def's and add deprecation warnings to fail* variants. In room discussion at pycon 2009 sprints consensus on Equal vs Equals names is that existing Equals names will continue to exist but remain undocumented. Arguments can be made for both (and some others) and we'd like to reduce clutter but not drive the world crazy with nitpicking deprecations over a single 's'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:57:31 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 16:57:31 +0000 Subject: [issue992207] exec statement balks at CR/LF Message-ID: <1238518651.87.0.998172415623.issue992207@psf.upfronthosting.co.za> Georg Brandl added the comment: Documented in r70838, r70840. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 18:59:31 2009 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 31 Mar 2009 16:59:31 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238518771.3.0.90936829431.issue2578@psf.upfronthosting.co.za> Guido van Rossum added the comment: I think we should rename the method defs ASAP but not start deprecating the old names until 3.2. Otherwise many people's tests will be very noisy and that's just annoying. Give them time to migrate voluntarily. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 19:07:13 2009 From: report at bugs.python.org (Aleksi Torhamo) Date: Tue, 31 Mar 2009 17:07:13 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238519233.6.0.771538525756.issue1161031@psf.upfronthosting.co.za> Aleksi Torhamo added the comment: The _exception() -> close() change seems to be wrong. The third set of select() is supposed to represent oob data, so the previous use in the select-based loop should have been correct? Other than that, i can't see anything wrong with it. Maybe handle_expt_event should be reverted to the old one, that just calls handle_expt, too? The current version seems to assume that it is called on socket error conditions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 19:08:45 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 31 Mar 2009 17:08:45 +0000 Subject: [issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse In-Reply-To: <1238519324.96.0.24578067817.issue5628@psf.upfronthosting.co.za> Message-ID: <1238519324.96.0.24578067817.issue5628@psf.upfronthosting.co.za> New submission from Jeremy Hylton : import io import urllib.request f_bytes = urllib.request.urlopen("http://www.python.org/") f_string = io.TextIOWrapper(f_bytes, "iso-8859-1") print(f_string.read()) ---------- components: Library (Lib) messages: 84840 nosy: jhylton severity: normal status: open title: TextIOWrapper fails with SystemError when reading HTTPResponse versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 19:13:21 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 17:13:21 +0000 Subject: [issue970783] PyObject_GenericGetAttr is undocumented Message-ID: <1238519601.39.0.0631723263904.issue970783@psf.upfronthosting.co.za> Georg Brandl added the comment: Documented in r70842.c ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 19:15:27 2009 From: report at bugs.python.org (Larry Hastings) Date: Tue, 31 Mar 2009 17:15:27 +0000 Subject: [issue1569040] Speed up using + for string concatenation Message-ID: <1238519727.92.0.19784781549.issue1569040@psf.upfronthosting.co.za> Larry Hastings added the comment: Thanks for pointing that out! I think I found it; the discussion is actually about lazy string slices, and it starts here: http://mail.python.org/pipermail/python-dev/2000-February/002317.html If I were to resubmit lazy string slices (which wouldn't be in this patch), the slices would only have weakrefs on the original string and render when the original string was destroyed. That addresses some of the concerns about lazy string slices, though they are still uncomfortably (internally) complex. As for the second concern: the official way is to use the accessors, and CPython consistently uses them itself. I don't know what the right answer is. We *could* make PyStringObject a private type to force the issue, though that would add overhead. (Well, PyUnicodeObject really, this would never be accepted in the 2.x series at this point.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 19:18:48 2009 From: report at bugs.python.org (Brett Cannon) Date: Tue, 31 Mar 2009 17:18:48 +0000 Subject: [issue5629] PEP 0 date and revision not being set In-Reply-To: <1238519928.09.0.287279544516.issue5629@psf.upfronthosting.co.za> Message-ID: <1238519928.09.0.287279544516.issue5629@psf.upfronthosting.co.za> New submission from Brett Cannon : The date and revision data for PEP 0 is not being set since it is trying to use svn substitution when the PEP itself is not in svn. ---------- components: None messages: 84843 nosy: benjamin.peterson, brett.cannon priority: low severity: normal stage: needs patch status: open title: PEP 0 date and revision not being set type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 19:22:34 2009 From: report at bugs.python.org (Torsten Bronger) Date: Tue, 31 Mar 2009 17:22:34 +0000 Subject: [issue992389] attribute error after non-from import Message-ID: <1238520154.92.0.151539196581.issue992389@psf.upfronthosting.co.za> Torsten Bronger added the comment: Maybe it's better to leave it open, waiting for someone to pick it up, even if this is some time in the future? In my opinion, this is suprising behaviour without an actual rationale, and a current implementation feature. I'd be a pitty for me to see it becoming an official part of the language. What bothers me most is that from . import moduleX doesn't work but import package.moduleX does work. So the circular import itself works without problems, however, not with a handy identifier. This is would be an odd asymmetry, I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 19:40:06 2009 From: report at bugs.python.org (Derek Morr) Date: Tue, 31 Mar 2009 17:40:06 +0000 Subject: [issue1664] nntplib is not IPv6-capable In-Reply-To: <1198094830.43.0.175472713308.issue1664@psf.upfronthosting.co.za> Message-ID: <1238521206.04.0.379203269384.issue1664@psf.upfronthosting.co.za> Derek Morr added the comment: Any chance of this being applied soon? It's been sitting in the bugtracker for over a year now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 19:40:43 2009 From: report at bugs.python.org (Derek Morr) Date: Tue, 31 Mar 2009 17:40:43 +0000 Subject: [issue5111] httplib: wrong Host header when connecting to IPv6 litteral URL In-Reply-To: <1233334139.62.0.259128767537.issue5111@psf.upfronthosting.co.za> Message-ID: <1238521243.39.0.228922328236.issue5111@psf.upfronthosting.co.za> Changes by Derek Morr : ---------- nosy: +dmorr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 19:42:50 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Mar 2009 17:42:50 +0000 Subject: [issue1664] nntplib is not IPv6-capable In-Reply-To: <1198094830.43.0.175472713308.issue1664@psf.upfronthosting.co.za> Message-ID: <1238521370.99.0.537804324977.issue1664@psf.upfronthosting.co.za> STINNER Victor added the comment: @dmorr: It would be faster if nntplib has some tests :-/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 19:48:28 2009 From: report at bugs.python.org (Derek Morr) Date: Tue, 31 Mar 2009 17:48:28 +0000 Subject: [issue1664] nntplib is not IPv6-capable In-Reply-To: <1198094830.43.0.175472713308.issue1664@psf.upfronthosting.co.za> Message-ID: <1238521708.85.0.720503947297.issue1664@psf.upfronthosting.co.za> Derek Morr added the comment: I'm confused by that. In order to apply a 3 line patch (which replaces one standard library function with another), you want an entire test suite written for nntplib? If we're willing to accept that nttplib works reasonably well now, why is the testsuite necessary? socket.create_connection() is already used in several other modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 20:13:43 2009 From: report at bugs.python.org (Jesse Noller) Date: Tue, 31 Mar 2009 18:13:43 +0000 Subject: [issue5400] patches for multiprocessing module on NetBSD In-Reply-To: <1235945240.08.0.454455099363.issue5400@psf.upfronthosting.co.za> Message-ID: <1238523223.97.0.701145853675.issue5400@psf.upfronthosting.co.za> Jesse Noller added the comment: Applied in r70849 python-trunk, merging to py3k and 26maint ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 20:16:33 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 31 Mar 2009 18:16:33 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238523393.54.0.962602388514.issue1161031@psf.upfronthosting.co.za> Josiah Carlson added the comment: You are right. Handling OOB data is within the "exceptional condition" that the select document specifies. I've added a check for error conditions within handle_expt_event(), which induces a handle_close() on discovery of an error, handle_expt() otherwise. One thing to consider is that when there is OOB data, and when handle_expt() isn't overridden, we will get churn because that data will never be read from the socket. I'm thinking about tossing a handle_close() as part of the default handle_expt() call. Attached is an updated patch without the handle_close() in handle_expt(). ---------- Added file: http://bugs.python.org/file13517/async_no_warn.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 20:16:40 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 31 Mar 2009 18:16:40 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238523400.8.0.166795578615.issue1161031@psf.upfronthosting.co.za> Changes by Josiah Carlson : Removed file: http://bugs.python.org/file13516/async_no_warn.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 20:17:17 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 31 Mar 2009 18:17:17 +0000 Subject: [issue1370380] async_chat.push() can trigger handle_error(). undocumented. Message-ID: <1238523437.31.0.0273611717615.issue1370380@psf.upfronthosting.co.za> Changes by Josiah Carlson : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 20:20:40 2009 From: report at bugs.python.org (Euler Taveira de Oliveira) Date: Tue, 31 Mar 2009 18:20:40 +0000 Subject: [issue5627] PyDict_SetItemString() fails when the second argument is null In-Reply-To: <1238518033.32.0.364685297824.issue5627@psf.upfronthosting.co.za> Message-ID: <1238523640.6.0.0409490407613.issue5627@psf.upfronthosting.co.za> Euler Taveira de Oliveira added the comment: It seems PyDict_DelItemString() and PyDict_SetItem() suffer from the same disease. :( Both use assert() to detect a null pointer but fail to prevent it. As I stated in the previous comment, maybe the right fix is to replace assert() with the 'if (foo == NULL) return whatever'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 20:27:09 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 18:27:09 +0000 Subject: [issue837577] cryptic os.spawnvpe() return code Message-ID: <1238524029.1.0.419201677871.issue837577@psf.upfronthosting.co.za> Georg Brandl added the comment: Documented in r70851. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 20:30:53 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 18:30:53 +0000 Subject: [issue5245] PyRun_SimpleStringFlags() documentation In-Reply-To: <1234526583.65.0.906444250771.issue5245@psf.upfronthosting.co.za> Message-ID: <1238524253.07.0.335024666717.issue5245@psf.upfronthosting.co.za> Georg Brandl added the comment: Documented in r70855. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 20:33:26 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 18:33:26 +0000 Subject: [issue5227] Py_Main() does not return on sys.exit() In-Reply-To: <1234443648.41.0.597133870232.issue5227@psf.upfronthosting.co.za> Message-ID: <1238524406.64.0.279449036856.issue5227@psf.upfronthosting.co.za> Georg Brandl added the comment: Documented in r70857. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 20:34:34 2009 From: report at bugs.python.org (Aleksi Torhamo) Date: Tue, 31 Mar 2009 18:34:34 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238524474.92.0.731549762622.issue1161031@psf.upfronthosting.co.za> Aleksi Torhamo added the comment: Ah, you're right. I hadn't thought about the exceptional condition being used to signal anything besides OOB. Looks really good to me. s/close/_exception/ in the select-based poll(), and i don't have anything more to add. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 20:39:14 2009 From: report at bugs.python.org (Jack Diederich) Date: Tue, 31 Mar 2009 18:39:14 +0000 Subject: [issue5387] mmap.move crashes by integer overflow In-Reply-To: <1235756718.87.0.0651298987866.issue5387@psf.upfronthosting.co.za> Message-ID: <1238524754.69.0.783856349958.issue5387@psf.upfronthosting.co.za> Jack Diederich added the comment: running a fresh 2.7 trunk >>> a >>> a.move(-1, -1, -1 ... ) Segmentation fault jack at sprat:~/src/python-rw$ ./python Python 2.7a0 (trunk:70847M, Mar 31 2009, 14:14:31) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mmap >>> a = mmap.mmap(-1, 1000) >>> a.move(0, 0, 0) >>> a.move(-1, -1, 1) Segmentation fault ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 20:42:25 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 18:42:25 +0000 Subject: [issue5241] Missing flags in the Regex howto In-Reply-To: <1234496763.66.0.0120470676401.issue5241@psf.upfronthosting.co.za> Message-ID: <1238524945.24.0.666698469204.issue5241@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r70859, r70861. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 20:53:59 2009 From: report at bugs.python.org (John Ehresman) Date: Tue, 31 Mar 2009 18:53:59 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1218712281.34.0.473878484861.issue3551@psf.upfronthosting.co.za> Message-ID: <1238525639.25.0.440108564398.issue3551@psf.upfronthosting.co.za> John Ehresman added the comment: Attached is a patch, though I have mixed feelings about it. The OS error can still occur even if a smaller amount is written in each WriteFile call; I think an internal OS buffer fills up and the error is returned if that buffer is full because the other process hasn't read yet. The patch just ignores ERROR_NO_SYSTEM_RESOURCES and writes again. I don't know though if ERROR_NO_SYSTEM_RESOURCES can mean something else is wrong and the write will never succeed. The message is also broken up into 32K parts and a recv_bytes on the other end must be called multiple times to read it all. The patch is one option. Another might be to let the application decide to continue or not and essentially treat the pipes as nonblocking. ---------- keywords: +patch Added file: http://bugs.python.org/file13518/win32_pipe.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 20:56:49 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 18:56:49 +0000 Subject: [issue1717] Get rid of more references to __cmp__ In-Reply-To: <1199205565.64.0.0495465164968.issue1717@psf.upfronthosting.co.za> Message-ID: <1238525809.58.0.354297942492.issue1717@psf.upfronthosting.co.za> Georg Brandl added the comment: Documentation updated in r70863. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:05:01 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 31 Mar 2009 19:05:01 +0000 Subject: [issue5387] mmap.move crashes by integer overflow In-Reply-To: <1235756718.87.0.0651298987866.issue5387@psf.upfronthosting.co.za> Message-ID: <1238526301.54.0.831253500902.issue5387@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Yes, you are right... My patch was not correct neigher. :-( Here is revised patch. ---------- resolution: fixed -> status: closed -> open Added file: http://bugs.python.org/file13519/fix_mmap_move_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:06:11 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 31 Mar 2009 19:06:11 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238526371.71.0.0307979522547.issue2578@psf.upfronthosting.co.za> Gregory P. Smith added the comment: def's of the methods changed to be the official assert* names in trunk r70864. unittests added to confirm that all known method names continue to work. Guido - If we fix 2to3 to fixup unittests that use the fail* method names to use the assert* names would you be okay with adding the deprecation warning in 3.1 or should it really wait for 3.2 with a removal in 3.3? I'm fine with leaving the deprecation out for 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:07:15 2009 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 31 Mar 2009 19:07:15 +0000 Subject: [issue5604] imp.find_module() mixes UTF8 and MBCS In-Reply-To: <1238423201.33.0.732435229283.issue5604@psf.upfronthosting.co.za> Message-ID: <1238526435.44.0.24707744099.issue5604@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Continuing work over import.c I fixed bad error message encoding in generated ImportError exception. Tests for checking in case of non-ascii characters added. ---------- Added file: http://bugs.python.org/file13520/import.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:07:21 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 19:07:21 +0000 Subject: [issue4882] Behavior of backreferences to named groups in regular expressions unclear In-Reply-To: <1231428946.66.0.0747408022841.issue4882@psf.upfronthosting.co.za> Message-ID: <1238526441.13.0.367431686357.issue4882@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed a similar patch in r70866. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:07:49 2009 From: report at bugs.python.org (Larry Hastings) Date: Tue, 31 Mar 2009 19:07:49 +0000 Subject: [issue5630] Update CObject API so it is safe and regular In-Reply-To: <1238526469.89.0.691687509266.issue5630@psf.upfronthosting.co.za> Message-ID: <1238526469.89.0.691687509266.issue5630@psf.upfronthosting.co.za> New submission from Larry Hastings : The CObject API has two flaws. First, there is no usable type safety mechanism. You can store a void *object, and a void *description. There is no established schema for the description; it could be an integer cast to a pointer, or it could point to memory of any configuration, or it could be NULL. Thus users of the CObject API generally ignore it--thus working without any type safety whatsoever. A programmer could crash the interpreter from pure Python by mixing and matching CObjects from different modules (e.g. give "curses" a CObject from "_ctypes"). Second, the destructor callback is defined as taking *either* one *or* two parameters, depending on whether the "descr" pointer is non-NULL. One can debate the finer points of what is and isn't defined behavior in C, but at its heart this is a sloppy API. MvL and I discussed this last night and decided to float a revision of the API. I wrote the patch, though, so don't blame Martin if you don't like my specific approach. The color of this particular bike shed is: * The PyCObject is now a private data structure; you must use accessors. I added accessors for all the members. * The constructors and the main accessor (PyCObject_AsVoidPtr) now all *require* a "const char *type" parameter, which must be a non-NULL C string of non-zero length. If you call that accessor and the "type" is invalid *or doesn't match,* it fails. * The destructor now takes the PyObject *, not the PyCObject *. You must use accessors to get your hands on the data inside to free it. Yes, you can easily skip around the "matching type" restriction by calling PyCObject_AsVoidPtr(cobj, PyCObject_GetType(cobj)). The point of my API changes is to *encourage* correct use. The attached patch was written py3k/trunk r70718. It compiles with no new warnings/errors and doesn't seem to cause any new failures in the regression test. Note: this patch is not complete; I fixed all the .c and .h files, but I have yet to update the documentation. I figure I don't want to put the effort in until the dust settles. ---------- components: Interpreter Core files: cobject.diff keywords: patch messages: 84864 nosy: lhastings severity: normal status: open title: Update CObject API so it is safe and regular versions: Python 3.1 Added file: http://bugs.python.org/file13521/cobject.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:09:29 2009 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 31 Mar 2009 19:09:29 +0000 Subject: [issue5604] imp.find_module() mixes UTF8 and MBCS In-Reply-To: <1238423201.33.0.732435229283.issue5604@psf.upfronthosting.co.za> Message-ID: <1238526569.58.0.336180487189.issue5604@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Martin von Loewis added to nosy list ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:10:18 2009 From: report at bugs.python.org (Michael Foord) Date: Tue, 31 Mar 2009 19:10:18 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238526618.99.0.624075543142.issue2578@psf.upfronthosting.co.za> Michael Foord added the comment: If the deprecation causes noise people can just turn off the deprecation warning surely? Especially as transforming a codebase really is as simple as a global search and replace. Personally I'd prefer earlier deprecation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:10:29 2009 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 31 Mar 2009 19:10:29 +0000 Subject: [issue5241] Missing flags in the Regex howto In-Reply-To: <1234496763.66.0.0120470676401.issue5241@psf.upfronthosting.co.za> Message-ID: <1238526629.24.0.393526208164.issue5241@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Mar 31 21:10:49 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 31 Mar 2009 19:10:49 +0000 Subject: [issue5623] test_fdopen fails with vs2005, release build on Windows 2000 In-Reply-To: <1238522622.35.0.999805207131.issue5623@psf.upfronthosting.co.za> Message-ID: <49D26AAD.80101@v.loewis.de> Martin v. L?wis added the comment: > We could also simply redistribute the MSVCRT in python/bin, as we are > allowed to. We *do* distribute the CRT with Python, and it works just fine. The report is about VS 2005 ---------- title: test_fdopen fails with vs2005, release build on Windows 2000 -> test_fdopen fails with vs2005, release build on Windows 2000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:10:50 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 19:10:50 +0000 Subject: [issue1096310] sys.__stdout__ doco isn't discouraging enough Message-ID: <1238526650.58.0.523358406924.issue1096310@psf.upfronthosting.co.za> Georg Brandl added the comment: Amended documentation in r70867. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:12:41 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 19:12:41 +0000 Subject: [issue5190] optparse doex not export make_option In-Reply-To: <1234185792.84.0.378540305485.issue5190@psf.upfronthosting.co.za> Message-ID: <1238526761.44.0.0586871565706.issue5190@psf.upfronthosting.co.za> Georg Brandl added the comment: As commented in optparse.py, make_option is the preferred way to create options, so I've added it to __all__ in r70868. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:13:27 2009 From: report at bugs.python.org (Jesse Noller) Date: Tue, 31 Mar 2009 19:13:27 +0000 Subject: [issue5228] multiprocessing not compatible with functools.partial In-Reply-To: <1234448790.05.0.305625917638.issue5228@psf.upfronthosting.co.za> Message-ID: <1238526807.28.0.0143294386376.issue5228@psf.upfronthosting.co.za> Jesse Noller added the comment: I agree that this is a nice feature, however it requires adding a getstate/setstate within the functools C code. I would need a patch which does this, and adds tests to the functools/pickle test suite for this. Also, the feature will only be accepted for py3k (3.1) currently. Features such as this will not be backported to the 2.x branch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:19:13 2009 From: report at bugs.python.org (Jesse Noller) Date: Tue, 31 Mar 2009 19:19:13 +0000 Subject: [issue5228] multiprocessing not compatible with functools.partial In-Reply-To: <1234448790.05.0.305625917638.issue5228@psf.upfronthosting.co.za> Message-ID: <1238527153.43.0.736167031884.issue5228@psf.upfronthosting.co.za> Jesse Noller added the comment: Jack offered to take a peek ---------- assignee: jnoller -> jackdied nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:23:27 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 31 Mar 2009 19:23:27 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1238527407.14.0.0949877025749.issue5391@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- dependencies: +only accept byte for getarg('c') and unicode for getarg('C') _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:23:46 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 31 Mar 2009 19:23:46 +0000 Subject: [issue5410] msvcrt bytes cleanup In-Reply-To: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> Message-ID: <1238527426.24.0.677968156435.issue5410@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- dependencies: +only accept byte for getarg('c') and unicode for getarg('C') _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:23:52 2009 From: report at bugs.python.org (Jesse Noller) Date: Tue, 31 Mar 2009 19:23:52 +0000 Subject: [issue5503] multiprocessing/connection.py wrong pipe name under win32 In-Reply-To: <1237342644.17.0.0547422221967.issue5503@psf.upfronthosting.co.za> Message-ID: <1238527432.56.0.846177079584.issue5503@psf.upfronthosting.co.za> Jesse Noller added the comment: I need to know what the exception/error is, given multiprocessing is working fine on WIN32. Setting status to pending - without a test case that shows the issue or more information, I can not move forward with this. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:24:15 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 31 Mar 2009 19:24:15 +0000 Subject: [issue5499] only accept byte for getarg('c') and unicode for getarg('C') In-Reply-To: <1237294698.92.0.380829116259.issue5499@psf.upfronthosting.co.za> Message-ID: <1238527456.0.0.676074587872.issue5499@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:25:09 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 31 Mar 2009 19:25:09 +0000 Subject: [issue5499] only accept byte for getarg('c') and unicode for getarg('C') In-Reply-To: <1237294698.92.0.380829116259.issue5499@psf.upfronthosting.co.za> Message-ID: <1238527509.11.0.816818371294.issue5499@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Note: #5391 and #5410 are depends on this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:26:40 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 19:26:40 +0000 Subject: [issue4411] __mro__ documentation In-Reply-To: <1227553709.92.0.112307623193.issue4411@psf.upfronthosting.co.za> Message-ID: <1238527600.14.0.171900797249.issue4411@psf.upfronthosting.co.za> Georg Brandl added the comment: Documented in r70870. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:31:14 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 19:31:14 +0000 Subject: [issue5618] PyMemberDef type T_UBYTE incorrectly documtented In-Reply-To: <1238470561.76.0.295268646264.issue5618@psf.upfronthosting.co.za> Message-ID: <1238527874.04.0.243704384651.issue5618@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r70871. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:32:48 2009 From: report at bugs.python.org (Jack Diederich) Date: Tue, 31 Mar 2009 19:32:48 +0000 Subject: [issue5387] mmap.move crashes by integer overflow In-Reply-To: <1235756718.87.0.0651298987866.issue5387@psf.upfronthosting.co.za> Message-ID: <1238527968.78.0.49489600961.issue5387@psf.upfronthosting.co.za> Jack Diederich added the comment: Looks good. Attached is a more thorough test_mmap.py patch that would have found the bugs in both our patches ;) ---------- resolution: -> fixed status: open -> closed Added file: http://bugs.python.org/file13522/test_mmap_harder.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:34:05 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 19:34:05 +0000 Subject: [issue1681974] mkdtemp fails on Windows if username has non-ASCII character Message-ID: <1238528045.1.0.789439375411.issue1681974@psf.upfronthosting.co.za> Georg Brandl added the comment: Why are you using a unicode string as your temp directory prefix? Does it raise something different if you don't? ---------- assignee: -> loewis nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:34:34 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 31 Mar 2009 19:34:34 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238528074.55.0.972472709191.issue1161031@psf.upfronthosting.co.za> Josiah Carlson added the comment: Fixed the close() call and committed to trunk. Python 2.6 tests pass with the new version of the library. Calling it good :) . ---------- keywords: -needs review resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:35:38 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 19:35:38 +0000 Subject: [issue1243678] httplib gzip support Message-ID: <1238528138.59.0.418541624838.issue1243678@psf.upfronthosting.co.za> Georg Brandl added the comment: Sounds reasonable. ---------- resolution: -> duplicate status: open -> closed superseder: -> [gzip] Performance for small reads and fix seek problem _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:40:16 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 19:40:16 +0000 Subject: [issue1590068] Error piping output between scripts on Windows Message-ID: <1238528416.53.0.638318354235.issue1590068@psf.upfronthosting.co.za> Georg Brandl added the comment: Duplicate of #1675026. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> Redirect cause invalid descriptor error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:44:09 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 19:44:09 +0000 Subject: [issue5208] urllib2.build_opener( In-Reply-To: <1234286185.85.0.555213161426.issue5208@psf.upfronthosting.co.za> Message-ID: <1238528649.5.0.823229643526.issue5208@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing as invalid. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:44:47 2009 From: report at bugs.python.org (Piotr Meyer) Date: Tue, 31 Mar 2009 19:44:47 +0000 Subject: [issue5510] patches for Modules/socketmodule.c for NetBSD In-Reply-To: <1237400494.47.0.163345338744.issue5510@psf.upfronthosting.co.za> Message-ID: <1238528687.96.0.0459105550505.issue5510@psf.upfronthosting.co.za> Changes by Piotr Meyer : ---------- nosy: +aniou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 21:49:14 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Tue, 31 Mar 2009 19:49:14 +0000 Subject: [issue808164] socket.close() doesn't play well with __del__ Message-ID: <1238528954.67.0.0858969079881.issue808164@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: Daniel, _closedsocket is a global, so it isn't safe to be used within __del__ during shutdown. In the py3k branch, socket.__del__ calls socket._real_close which references the global _socket. So it's not safe their, either. ---------- nosy: +stutzbach versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:01:10 2009 From: report at bugs.python.org (Martin Blais) Date: Tue, 31 Mar 2009 20:01:10 +0000 Subject: [issue5631] Distutils "upload" command does not show up in --help-commands output. In-Reply-To: <1238529670.22.0.992833360277.issue5631@psf.upfronthosting.co.za> Message-ID: <1238529670.22.0.992833360277.issue5631@psf.upfronthosting.co.za> New submission from Martin Blais : The output of running "python setup.py --help-commands" does not include the "upload" command. ---------- components: Library (Lib) messages: 84884 nosy: blais severity: normal status: open title: Distutils "upload" command does not show up in --help-commands output. versions: Python 2.4, Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:01:28 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 31 Mar 2009 20:01:28 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238529688.76.0.483517550216.issue2578@psf.upfronthosting.co.za> Gregory P. Smith added the comment: trunk r70878 has the code issue an actual PendingDeprecationWarning for the fail* methods and documents them as deprecated. If anyone has a better idea of a better way to state those deprecations in the docs, feel free to jump in here. I was unaware of the PendingDeprecationWarning (ignored by default) prior to this. I think that is what Guido was suggesting. The question of if we can do an actual DeprecationWarning for 3.1 or not still stands. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:12:29 2009 From: report at bugs.python.org (Mike Coleman) Date: Tue, 31 Mar 2009 20:12:29 +0000 Subject: [issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size) In-Reply-To: <1202768252.75.0.386707250967.issue2073@psf.upfronthosting.co.za> Message-ID: <1238530349.2.0.353234217425.issue2073@psf.upfronthosting.co.za> Mike Coleman added the comment: Just to confirm, the real problem here was that tiny packets were being sent out by default, and the obvious fix (altering ac_out_buffer_size) didn't work. Looking at the code, it appears that the change by Josiah Carlson (#64062) causes ac_out_buffer_size (which currently defaults to 4096) to be obeyed. Should that 4096 be larger? MTU for jumbo packets is ~9000, I think, plus there's less system call overhead for larger values. (I use 62000 for my app, but I haven't studied alternatives lately.) Also, there are still two constants '512' in asyncore/asynchat. Shouldn't these be changed to match the 4096 default? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:14:52 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 31 Mar 2009 20:14:52 +0000 Subject: [issue5387] mmap.move crashes by integer overflow In-Reply-To: <1235756718.87.0.0651298987866.issue5387@psf.upfronthosting.co.za> Message-ID: <1238530492.17.0.350495252331.issue5387@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I've committed your test with some modification. (r70879) Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:16:39 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 31 Mar 2009 20:16:39 +0000 Subject: [issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size) In-Reply-To: <1202768252.75.0.386707250967.issue2073@psf.upfronthosting.co.za> Message-ID: <1238530599.09.0.827081505622.issue2073@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: In my experience I noticed that 65536 is a pretty good compromise, at least when moving big amounts of data: http://code.google.com/p/pyftpdlib/issues/detail?id=94 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:23:49 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 20:23:49 +0000 Subject: [issue2266] Missing documentation about old/new-style classes In-Reply-To: <1205167505.81.0.00833692461216.issue2266@psf.upfronthosting.co.za> Message-ID: <1238531029.94.0.404621389302.issue2266@psf.upfronthosting.co.za> Georg Brandl added the comment: The new docs already have glossary entries that point to the datamodel doc. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:29:31 2009 From: report at bugs.python.org (Maksim Kozyarchuk) Date: Tue, 31 Mar 2009 20:29:31 +0000 Subject: [issue5631] Distutils "upload" command does not show up in --help-commands output. In-Reply-To: <1238529670.22.0.992833360277.issue5631@psf.upfronthosting.co.za> Message-ID: <1238531371.9.0.371195806736.issue5631@psf.upfronthosting.co.za> Maksim Kozyarchuk added the comment: adding upload to __init__.py of commands package fixes this Patch on Appshot. http://codereview.appspot.com/32087/show ---------- nosy: +Kozyarchuk versions: +Python 3.1 -Python 2.4, Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:29:43 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 20:29:43 +0000 Subject: [issue1714773] python throws an error when unpacking bz2 file Message-ID: <1238531383.37.0.647135262472.issue1714773@psf.upfronthosting.co.za> Georg Brandl added the comment: This was apparently fixed sometime in trunk. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:32:49 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 31 Mar 2009 20:32:49 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238531569.15.0.470101675632.issue1161031@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I still get some occasional EBADF failures when running pyftpdlib test suite by using poll(). I think that it makes more sense moving the: if flags & (select.POLLHUP | select.POLLERR | select.POLLNVAL): obj.handle_close() ...lines at the top and return if handle_close() is called, as I did in the patch attached to issue 4501, which is: if flags & (select.POLLHUP | select.POLLERR | select.POLLNVAL): obj.handle_close() else: if flags & select.POLLIN: obj.handle_read_event() if flags & select.POLLOUT: obj.handle_write_event() if flags & select.POLLPRI: obj.handle_expt_event() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:34:39 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 31 Mar 2009 20:34:39 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238531679.48.0.887092488459.issue1161031@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: ...after all no read/write methods should be called after the socket has been closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:40:43 2009 From: report at bugs.python.org (Lennart Regebro) Date: Tue, 31 Mar 2009 20:40:43 +0000 Subject: [issue5616] Distutils 2to3 support doesn't have the doctest_only flag. In-Reply-To: <1238452498.24.0.140926416369.issue5616@psf.upfronthosting.co.za> Message-ID: <1238532042.77.0.0630712305611.issue5616@psf.upfronthosting.co.za> Lennart Regebro added the comment: Also, the run_2to3 method takes the explicit parameter, but does not pass it into the DistutilsRefactoringTool. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:41:17 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 20:41:17 +0000 Subject: [issue1674032] Make threading.Event().wait(timeout=3) return isSet Message-ID: <1238532077.15.0.0885621062945.issue1674032@psf.upfronthosting.co.za> Georg Brandl added the comment: Added a pony test and committed in r70883. ---------- assignee: tim_one -> georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:53:47 2009 From: report at bugs.python.org (David Christian) Date: Tue, 31 Mar 2009 20:53:47 +0000 Subject: [issue1674555] Python 2.5 testsuite sys.path contains system dirs Message-ID: <1238532827.12.0.378929681645.issue1674555@psf.upfronthosting.co.za> Changes by David Christian : ---------- nosy: +dugan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:54:24 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 31 Mar 2009 20:54:24 +0000 Subject: [issue978604] wait_variable hangs at exit Message-ID: <1238532864.36.0.749695988129.issue978604@psf.upfronthosting.co.za> Guilherme Polo added the comment: You can also reproduce it with a shorter test that doesn't need any interaction: import Tkinter root = Tkinter.Tk() waitvar = Tkinter.BooleanVar() root.after(50, lambda: waitvar.set(True)) root.after(10, root.destroy) root.wait_variable(waitvar) root.mainloop() Verifying. ---------- nosy: +gpolo versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:56:53 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 20:56:53 +0000 Subject: [issue1530012] Literal strings use BS as octal escape character Message-ID: <1238533013.65.0.994002855324.issue1530012@psf.upfronthosting.co.za> Georg Brandl added the comment: Swapped the sections in r70893. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:58:48 2009 From: report at bugs.python.org (David Christian) Date: Tue, 31 Mar 2009 20:58:48 +0000 Subject: [issue1711605] CGIHttpServer leaves traces of previous requests in env Message-ID: <1238533128.21.0.220776561402.issue1711605@psf.upfronthosting.co.za> Changes by David Christian : ---------- nosy: +dugan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 22:59:36 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 31 Mar 2009 20:59:36 +0000 Subject: [issue5623] test_fdopen fails with vs2005, release build on Windows 2000 In-Reply-To: <1238513083.42.0.065691454167.issue5623@psf.upfronthosting.co.za> Message-ID: <1238533176.42.0.483262302848.issue5623@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The problem with Windows 2000 is that it is not enough to distribute the CRT. For example, I am sure that a few months ago the version ending with .1433 was not present on my machine; the version in the system32 directory was .762 (the one shipped with vs2005 sp1). Trying several sizes is a good idea IMO, and is not likely to segfault if we only try with a low fd (1 or 2). I'll try to come with a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:00:38 2009 From: report at bugs.python.org (Daniel Darabos) Date: Tue, 31 Mar 2009 21:00:38 +0000 Subject: [issue1651995] sgmllib _convert_ref UnicodeDecodeError exception, new in 2.5 Message-ID: <1238533238.44.0.379756774731.issue1651995@psf.upfronthosting.co.za> Daniel Darabos added the comment: Attached patch against SVN trunk including unittest. The test is not great, because it practically only checks if the patch was applied and not the real-life situation where the exception occurs, but I'm not too handy with sgmllib (I only encountered this problem through BeautifulSoup). ---------- Added file: http://bugs.python.org/file13523/issue1651995.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:00:50 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 21:00:50 +0000 Subject: [issue5603] Garbled sentence in documentation of urllib.request.urlopen In-Reply-To: <1238386940.02.0.317505088908.issue5603@psf.upfronthosting.co.za> Message-ID: <1238533250.84.0.142091154485.issue5603@psf.upfronthosting.co.za> Georg Brandl added the comment: Already fixed in dev docs. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:01:38 2009 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 31 Mar 2009 21:01:38 +0000 Subject: [issue5632] Bug - threading.currentThread().ident returns None in main thread In-Reply-To: <1238533298.48.0.429621534133.issue5632@psf.upfronthosting.co.za> Message-ID: <1238533298.48.0.429621534133.issue5632@psf.upfronthosting.co.za> New submission from Skip Montanaro : The main thread has an ident, but the threading module doesn't recognize that fact. I shouldn't have to "start" the main thread. Example: % python Python 2.7a0 (trunk:70084, Feb 28 2009, 20:51:51) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import threading >>> import thread >>> print threading.currentThread(), threading.currentThread().ident, thread.get_ident() <_MainThread(MainThread, started)> None -1602627808 % python3.1 Python 3.1a0 (py3k:70084M, Feb 28 2009, 20:46:48) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import threading >>> print (threading.current_thread(), threading.current_thread().ident)<_MainThread(MainThread, started)> None ---------- components: Library (Lib) messages: 84901 nosy: skip.montanaro severity: normal status: open title: Bug - threading.currentThread().ident returns None in main thread type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:01:39 2009 From: report at bugs.python.org (Tim Driscoll) Date: Tue, 31 Mar 2009 21:01:39 +0000 Subject: [issue5633] timeit breaks when the statment is a string and the setup is not In-Reply-To: <1238533299.21.0.751134071386.issue5633@psf.upfronthosting.co.za> Message-ID: <1238533299.21.0.751134071386.issue5633@psf.upfronthosting.co.za> New submission from Tim Driscoll : The patch and test is here: http://codereview.appspot.com/28161/show There were no tests so i added a few of them. The one that breaks without the patch to timeit is: test_setup_is_called_when_the_statment_is_string_and_the_setup_is_not() (sorry for the long name) Even if the patch is no good perhaps the test could be useful. ---------- components: Library (Lib) messages: 84902 nosy: tdriscol severity: normal status: open title: timeit breaks when the statment is a string and the setup is not type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:04:33 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 21:04:33 +0000 Subject: [issue5602] Slight punctuation problem in documentation of urllib.request.urlopen In-Reply-To: <1238386628.28.0.265769634027.issue5602@psf.upfronthosting.co.za> Message-ID: <1238533473.65.0.39558162382.issue5602@psf.upfronthosting.co.za> Georg Brandl added the comment: Actually, that style is fine as well and even indicates a bit better that you don't have to give data if you give timeout. We'll likely try to get the style of writing optional parameters more consistent in the future. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:04:50 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 31 Mar 2009 21:04:50 +0000 Subject: [issue5633] timeit breaks when the statment is a string and the setup is not In-Reply-To: <1238533299.21.0.751134071386.issue5633@psf.upfronthosting.co.za> Message-ID: <1238533490.31.0.345063612145.issue5633@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:05:03 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 21:05:03 +0000 Subject: [issue5563] Document bdist_msi In-Reply-To: <1238023978.65.0.898272761153.issue5563@psf.upfronthosting.co.za> Message-ID: <1238533503.94.0.282271398434.issue5563@psf.upfronthosting.co.za> Georg Brandl added the comment: I'll wait for a patch from you, Steven. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:08:18 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 31 Mar 2009 21:08:18 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238533698.5.0.535707961014.issue1641@psf.upfronthosting.co.za> Josiah Carlson added the comment: I fixed some bugs with my patch, merged in Giampaolo's tests and documentation, and altered the API to match Giampaolo's API almost completely. This new version differs from Giampaolo's patch only in underlying implementation; this uses a modified sched.py, and doesn't have a standard "execute outstanding methods" function built into asyncore (asynchat.scheduled_tasks.run(time.time()) is sufficient). The major difference is that the modifications to sched.py offer a fast cancel/reschedule operation, which Giampaolo's lacks. ---------- Added file: http://bugs.python.org/file13524/scheduler.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:08:44 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 31 Mar 2009 21:08:44 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238533724.16.0.469265642588.issue1641@psf.upfronthosting.co.za> Changes by Josiah Carlson : Removed file: http://bugs.python.org/file13238/scheduler_partial.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:09:54 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 21:09:54 +0000 Subject: [issue5601] webbrowser doesn't just open browsers In-Reply-To: <1238384777.3.0.774822780209.issue5601@psf.upfronthosting.co.za> Message-ID: <1238533794.61.0.39715369046.issue5601@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm inclined not to document that. webbrowser is meant for URLs, the behavior if you call it with file names is undefined. ---------- resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:10:43 2009 From: report at bugs.python.org (Tim Driscoll) Date: Tue, 31 Mar 2009 21:10:43 +0000 Subject: [issue5633] fix for timeit when the statment is a string and the setup is not (and tests) In-Reply-To: <1238533299.21.0.751134071386.issue5633@psf.upfronthosting.co.za> Message-ID: <1238533843.96.0.189215803995.issue5633@psf.upfronthosting.co.za> Changes by Tim Driscoll : ---------- title: timeit breaks when the statment is a string and the setup is not -> fix for timeit when the statment is a string and the setup is not (and tests) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:11:03 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 21:11:03 +0000 Subject: [issue5337] Scanner class in re module undocumented In-Reply-To: <1235235366.45.0.579114073683.issue5337@psf.upfronthosting.co.za> Message-ID: <1238533863.78.0.413391123093.issue5337@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, so we'll wait for that. ---------- dependencies: +Regexp 2.7 (modifications to current re 2.2.2) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:15:45 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 21:15:45 +0000 Subject: [issue5598] "paths" argument missing in DocFileSuite documentation In-Reply-To: <1238363669.79.0.212822428061.issue5598@psf.upfronthosting.co.za> Message-ID: <1238534145.45.0.599215384782.issue5598@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r70896. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:16:21 2009 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 31 Mar 2009 21:16:21 +0000 Subject: [issue5632] Bug - threading.currentThread().ident returns None in main thread In-Reply-To: <1238533298.48.0.429621534133.issue5632@psf.upfronthosting.co.za> Message-ID: <1238534181.49.0.0808911980032.issue5632@psf.upfronthosting.co.za> Skip Montanaro added the comment: Here's a test case which reveals the problem as I see it. ---------- keywords: +patch stage: -> needs patch Added file: http://bugs.python.org/file13525/threading.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:17:27 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 31 Mar 2009 21:17:27 +0000 Subject: [issue5633] fix for timeit when the statment is a string and the setup is not (and tests) In-Reply-To: <1238533299.21.0.751134071386.issue5633@psf.upfronthosting.co.za> Message-ID: <1238534247.69.0.657295192788.issue5633@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Georg, this was your patch: http://bugs.python.org/issue1533909 I don't think it should have been accepted so readily. It is not harmonious with all of the other proposals for improving timeit. No that it is out in the wild, I think all you can do is fix-up the docs. Also, the inner template function should have a func=func argument so that the func() call is localized. This affects the timings. Part of the concept of the module is to make the surrounding timing apparatus be as light-weight as possible so that the timings reflect the thing being timed without being obscured by the overhead of the timing module itself. ---------- assignee: rhettinger -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:17:57 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 21:17:57 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1238534277.72.0.147210632483.issue2953@psf.upfronthosting.co.za> Georg Brandl added the comment: That's fortunate, because I can just reassign this to him :) ---------- assignee: georg.brandl -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:19:31 2009 From: report at bugs.python.org (Aleksi Torhamo) Date: Tue, 31 Mar 2009 21:19:31 +0000 Subject: [issue909005] asyncore fixes and improvements Message-ID: <1238534371.13.0.0690517251626.issue909005@psf.upfronthosting.co.za> Aleksi Torhamo added the comment: "not the handle_close_event() replacements, stick with handle_close()". I'm guessing this has to do with "breaking the abstraction"? I can't think of a situation where handle_close() is called, but close() should not be called. If indeed so, i feel it's weird to require the user remember to call close(), and it should IMHO be done automatically. (I feel like i'm bitten by this each and every time i replace the default handle_close().. :) If the naming of handle_close_event() is not appropriate (as it "sounds" like a layer 1 method), how about adding do_close(), and making other places call that? def do_close(self): self.close() self.handle_close() ---------- nosy: +alexer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:19:35 2009 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 31 Mar 2009 21:19:35 +0000 Subject: [issue5619] Pass MS CRT debug flags into subprocesses In-Reply-To: <1238472783.0.0.132667741337.issue5619@psf.upfronthosting.co.za> Message-ID: <1238534375.86.0.711147327865.issue5619@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Patch for multiprocessing added. Using with regrtest -n option now allows to pass all regression test stack without any popup assertion dialog on Windows box. Probably have to be backported to Python 2.7 branch ---------- components: +Tests versions: +Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13526/_multiprocessing.patch.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:19:47 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 31 Mar 2009 21:19:47 +0000 Subject: [issue5337] Scanner class in re module undocumented In-Reply-To: <1235235366.45.0.579114073683.issue5337@psf.upfronthosting.co.za> Message-ID: <1238534387.67.0.156835650401.issue5337@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Whether this should be exposed is up to effbot. It's his code. He knows its limitations and he made the original decision to leave it undocumented. ---------- assignee: benjamin.peterson -> effbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:22:44 2009 From: report at bugs.python.org (David Christian) Date: Tue, 31 Mar 2009 21:22:44 +0000 Subject: [issue1608921] PyThread_release_lock with pthreads munges errno Message-ID: <1238534564.74.0.567974348599.issue1608921@psf.upfronthosting.co.za> Changes by David Christian : ---------- nosy: +dugan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:25:52 2009 From: report at bugs.python.org (vadim suvorov) Date: Tue, 31 Mar 2009 21:25:52 +0000 Subject: [issue5634] cPickle error in case of recursion limit In-Reply-To: <1238534752.39.0.574212792554.issue5634@psf.upfronthosting.co.za> Message-ID: <1238534752.39.0.574212792554.issue5634@psf.upfronthosting.co.za> New submission from vadim suvorov : In case of heavily recursive data structure cPickle produces intermittent random exceptions (AttributeError, etc.). The expected is RuntimeError: ('maximum recursion depth exceeded in ...'). In addition, the behavior differs for classic/new classes. The reason: the cPickle needs several optional methods (__getstate__, __getinitargs__) for each object. In their absence an AttributeError is generated. It is normally suppressed, but suppression itself causes recursion. The error in exception processing leads to fancy errors. The proposed solution: temporary (for call of PyErr_ExceptionMatches()) increase recursion limit. ---------- files: !!! messages: 84915 nosy: bad severity: normal status: open title: cPickle error in case of recursion limit type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file13527/!!! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:27:05 2009 From: report at bugs.python.org (Aleksi Torhamo) Date: Tue, 31 Mar 2009 21:27:05 +0000 Subject: [issue909005] asyncore fixes and improvements Message-ID: <1238534825.49.0.964077022638.issue909005@psf.upfronthosting.co.za> Aleksi Torhamo added the comment: I just remembered that "level 1" function handle_connect_event() is also called from "level 2", so i actually can't see why the close helper could not be called handle_close_event(). Is there some other reason besides "breaking abstraction" to not introduce it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:28:37 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 31 Mar 2009 21:28:37 +0000 Subject: [issue909005] asyncore fixes and improvements Message-ID: <1238534917.83.0.53987890826.issue909005@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > I can't think of a situation where handle_close() is called, but close() > should not be called. If indeed so, i feel it's weird to require the > user remember to call close(), and it should IMHO be done automatically. It's already done automatically if you don't override handle_close. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:34:54 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 31 Mar 2009 21:34:54 +0000 Subject: [issue5632] Bug - threading.currentThread().ident returns None in main thread In-Reply-To: <1238533298.48.0.429621534133.issue5632@psf.upfronthosting.co.za> Message-ID: <1238535294.73.0.652202616045.issue5632@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70897. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:36:25 2009 From: report at bugs.python.org (Aleksi Torhamo) Date: Tue, 31 Mar 2009 21:36:25 +0000 Subject: [issue909005] asyncore fixes and improvements Message-ID: <1238535385.21.0.659042465209.issue909005@psf.upfronthosting.co.za> Aleksi Torhamo added the comment: > It's already done automatically if you don't override handle_close. Sorry, i meant the case where you need to override it. If we always need to call close() from handle_close(), it feels redundant having to remember to add it, when it could be done automatically instead. Why not do it automatically, if every overriding user must otherwise always remember to add it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:37:46 2009 From: report at bugs.python.org (Tim Mooney) Date: Tue, 31 Mar 2009 21:37:46 +0000 Subject: [issue3786] _curses, _curses_panel & _multiprocessing can't be build in 2.6b3 w/ SunStudio 12 In-Reply-To: <1220608521.1.0.66106932182.issue3786@psf.upfronthosting.co.za> Message-ID: <1238535466.89.0.205040682032.issue3786@psf.upfronthosting.co.za> Tim Mooney added the comment: Solaris has both traditional System V curses and an XPG4-compatible curses that does include mvwchgat. The traditional system V curses is the default, for backward compatibility. If you want the XPG4 compatible curses, you need to make sure -I/usr/xpg4/include and -L/usr/xpg4/lib -R/usr/xpg4/lib (or their 64-bit equivalents) are in CPPFLAGS/CFLAGS/LDFLAGS so that the XPG4 curses is discovered. See the man page for mvwchgat(3XCURSES) on Solaris for more info. The difficulty for Python is that it also tries to build a readline module, and the libreadline was more than likely linked against the default system V curses. That means that if you add the -I and -L/-R flags to get XPG4 curses for all of the Python build, you'll probably get a link failure or worse when building the readline module. There are at least two ways around this: - rebuild readline to use XPG4 curses, and then rebuild every single application that links against readline. Then build Python, using the -I and -L/-R flags to get XPG4 curses for the entire Python build. - modify the setup.py for the _curses module so that logic is added for Solaris to look for the XPG4 curses only during the build of the _curses module. There is, however, no XPG4 panels library, since panels was not part of the XPG4 specification. That means that with the appropriate Python code in setup.py it would be possible to build _curses against XPG4 curses lib, but _curses_panel either couldn't be built or would have to somehow be linked against the standard (system V) panel library and the standard curses library. ---------- nosy: +enchanter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:40:11 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 31 Mar 2009 21:40:11 +0000 Subject: [issue978604] wait_variable hangs at exit Message-ID: <1238535611.42.0.620711851158.issue978604@psf.upfronthosting.co.za> Guilherme Polo added the comment: Patch attached, but didn't test it at all. This is a trick so it doesn't get committed without a test (hopefully) :) ---------- keywords: +patch Added file: http://bugs.python.org/file13528/issue978604.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:42:46 2009 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 31 Mar 2009 21:42:46 +0000 Subject: [issue992389] attribute error after non-from import Message-ID: <1238535766.23.0.468487714769.issue992389@psf.upfronthosting.co.za> Nick Coghlan added the comment: I just had a thought: we may be able to eliminate this behaviour without mucking about in the package globals. What if the import semantics were adjusted so that, as a last gasp effort before bailing out with an ImportError, the import process checked sys.modules again with the full module name? Not a fully fleshed out idea at this point (and possibly symptomatic of not being fully awake yet), but I'll bring it up in the current python-dev thread anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:43:38 2009 From: report at bugs.python.org (Steven Bethard) Date: Tue, 31 Mar 2009 21:43:38 +0000 Subject: [issue5563] Document bdist_msi In-Reply-To: <1238023978.65.0.898272761153.issue5563@psf.upfronthosting.co.za> Message-ID: <1238535818.84.0.28480537759.issue5563@psf.upfronthosting.co.za> Steven Bethard added the comment: Here you go. I built the docs with the attached patch, and everything looks about right to me now. ---------- keywords: +patch Added file: http://bugs.python.org/file13529/python3-bdist-msi-docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:43:58 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 21:43:58 +0000 Subject: [issue1675026] Redirect cause invalid descriptor error Message-ID: <1238535838.99.0.913637174976.issue1675026@psf.upfronthosting.co.za> Georg Brandl added the comment: Documented in README in r70902. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:46:05 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 21:46:05 +0000 Subject: [issue1676135] Remove trailing slash from --prefix Message-ID: <1238535965.25.0.903264230133.issue1676135@psf.upfronthosting.co.za> Georg Brandl added the comment: Changed a bit (seems that backslash before the $ in the regex isn't necessary) and checked in in r70903. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:49:02 2009 From: report at bugs.python.org (Lisandro Dalcin) Date: Tue, 31 Mar 2009 21:49:02 +0000 Subject: [issue5630] Update CObject API so it is safe and regular In-Reply-To: <1238526469.89.0.691687509266.issue5630@psf.upfronthosting.co.za> Message-ID: <1238536142.48.0.0182309702045.issue5630@psf.upfronthosting.co.za> Lisandro Dalcin added the comment: Two questions: 1) Why do you prefer to pass destructor as a first argument? 2) Do we really need two different calls for providing a context pointer? Why no just one call and pass a NULL context? A comment: Suppose one wants to implement export/import module C-API's in a function-by-function basis. This is nice, as you can extend your module C-API, and make it be backward "ABI" compatible. As the void* <-> void(*)(void) conversion is illegal(?) in C(99?), one has to go to the oddities of doing some sort of type-punning with unions... this could be somewhat tedious for hand-written extension modules. Do you have any idea on how extend the CObject API for the commented use case? ---------- nosy: +dalcinl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:49:51 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 31 Mar 2009 21:49:51 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238536191.48.0.314005485654.issue1161031@psf.upfronthosting.co.za> Josiah Carlson added the comment: Good point Giampaolo. Fixed and committed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 31 23:56:54 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 31 Mar 2009 21:56:54 +0000 Subject: [issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size) In-Reply-To: <1202768252.75.0.386707250967.issue2073@psf.upfronthosting.co.za> Message-ID: <1238536614.6.0.9019646039.issue2073@psf.upfronthosting.co.za> Josiah Carlson added the comment: The spare 512 values are for code that I expect no one is actually using. In terms of increasing the buffer size from 4096 to something larger, that can be done, but I think that more than just a 10mbit switched lan test should be performed. I would tend to believe that a larger size would tend to perform better, but my concern is sending blocks too large to the OS and having it say "sorry, but you need to chop it up more" via sock.send() returning 1 or 2 (I've experienced this on Windows with stdio and sockets). Considering how easy it is to adjust, and considering that the value is respected everywhere that matters (performance-conscious users aren't using simple_producer, nor are they using dispatcher_with_send), I think that 4096 is sufficient for the time being. Adjusting it up to 16k in Python 2.8/3.2 seems reasonable to me. Someone ping me in a year ;) . ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Tue Mar 31 23:59:56 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Tue, 31 Mar 2009 21:59:56 +0000 Subject: [issue4706] try to build a C module, but don't worry if it doesn't work In-Reply-To: <1229782192.75.0.491587462854.issue4706@psf.upfronthosting.co.za> Message-ID: <1238536796.39.0.157567591332.issue4706@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek resolution: -> duplicate status: open -> closed superseder: -> Optional extensions in setup.py _______________________________________ Python tracker _______________________________________