[issue14259] re.finditer() doesn't accept keyword arguments

2012-03-12 Thread Sean Reifschneider
Sean Reifschneider added the comment: Attached is a patch which implements this, including updated tests. I would appreciate a review of this patch. -- assignee: -> ezio.melotti keywords: +needs review, patch stage: -> patch review Added file: http://bugs.python.org/file24805/cpytho

[issue13703] Hash collision security issue

2012-03-12 Thread STINNER Victor
STINNER Victor added the comment: > FWIW I upgraded to ubuntu pangolin beta over the weekend, > which includes 2.7.3rc1, ... > > File "/usr/lib/python2.7/random.py", line 47, in >from os import urandom as _urandom > ImportError: cannot import name urandom It looks like you are using rando

[issue1178863] Variable.__init__ uses self.set(), blocking specialization

2012-03-12 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- keywords: +patch versions: +Python 3.3 -Python 3.2 Added file: http://bugs.python.org/file24806/tk.patch ___ Python tracker ___ _

[issue1178863] Variable.__init__ uses self.set(), blocking specialization

2012-03-12 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue14270] Can't install a project in a specific directory

2012-03-12 Thread Éric Araujo
Éric Araujo added the comment: Mathieu is working on a patch. -- stage: -> test needed title: Can't install a package in a specific directory -> Can't install a project in a specific directory versions: +3rd party -Python 2.7, Python 3.1, Python 3.2 __

[issue14238] python shouldn't need username in passwd database

2012-03-12 Thread Éric Araujo
Éric Araujo added the comment: Indeed. -- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> "import site failed" when Python can't find home directory (sysconfig._getuserbase) ___ Python tracke

[issue10496] Python startup should not require passwd entry

2012-03-12 Thread Éric Araujo
Éric Araujo added the comment: Adding people from the duplicate report #14238. Georg said: > there should be a guard here that just doesn't add user site directories if > the lookup fails. I concurred and added: > we also need to fix sysconfig; I think the right thing to do would be not to >

[issue14238] python shouldn't need username in passwd database

2012-03-12 Thread STINNER Victor
STINNER Victor added the comment: > This patch fixes the issue but needs review. > It is my first patch ever so be nice :) Python should not decide what is the default home directory. The issue is in the site module: I proposed nonexistent_user.patch in the issue #10496 to fix the issue in th

[issue5758] fileinput.hook_compressed returning bytes from gz file

2012-03-12 Thread Tatiana Al-Chueyr
Tatiana Al-Chueyr added the comment: I had a lot of help of R. David Murray, could someone review our patch, please? We are specially concerned about backward compatibility. -- keywords: +patch Added file: http://bugs.python.org/file24807/issue5758_fileinput_gzip_with_encoding.patch

[issue14251] HTMLParser decode issue

2012-03-12 Thread Ezio Melotti
Ezio Melotti added the comment: I test this again and indeed a bare s.decode() is not enough to fix the problem. The attribute might contain non-ascii characters, and that will result in an error (see for example the "test.py" script attached to #3932). The correct solution is to decode the

[issue10496] Python startup should not require passwd entry

2012-03-12 Thread Éric Araujo
Éric Araujo added the comment: I reviewed haypo’s patch. I’d be happy to update it to address my remarks if you want me to. -- ___ Python tracker ___ _

[issue14278] email.utils.localtime throws exception if time.daylight is False

2012-03-12 Thread Brian Jones
New submission from Brian Jones : In email.utils.localtime, there's a variable 'offset' that will only exist if time.daylight evaluates to True. If time.daylight evaluates to False, you'll get an UnboundLocalError, because 'offset' is being referenced without being assigned. The attached pat

[issue14259] re.finditer() doesn't accept keyword arguments

2012-03-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1adb114343f9 by Sean Reifschneider in branch 'default': closes #14259 re.finditer() now takes keyword arguments: pos, endpos. http://hg.python.org/cpython/rev/1adb114343f9 -- nosy: +python-dev resolution: -> fixed stage: patch review -> co

[issue14279] simple indexes (in wrappers) should support flat directories of distributions

2012-03-12 Thread Jim Fulton
New submission from Jim Fulton : Currently, distutils2.pypi.wrapper has a notion of a simple index, which has subdirectories for each project as pypi/simple does. This is good. It should also support flat indexes ala a directory of files. -- assignee: eric.araujo components: Distutils

[issue5758] fileinput.hook_compressed returning bytes from gz file

2012-03-12 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the patch. I commented on not-so-important things on the code review site (which should have sent an email to Tatiana) and wanted to raise an issue here. Is it best that the encoding used defaults to Python’s default encoding (UTF-8) or the I/O defa

[issue14279] packaging.pypi should support flat directories of distributions

2012-03-12 Thread Éric Araujo
Éric Araujo added the comment: +1 -- stage: -> needs patch title: simple indexes (in wrappers) should support flat directories of distributions -> packaging.pypi should support flat directories of distributions versions: +3rd party, Python 3.3 ___

[issue5758] fileinput.hook_compressed returning bytes from gz file

2012-03-12 Thread R. David Murray
R. David Murray added the comment: I think it should use the same default as open, but frankly I couldn't remember the right way to achieve that. Suggestions welcome :) -- nosy: +r.david.murray ___ Python tracker

[issue14277] time.monotonic docstring does not mention the time unit returned

2012-03-12 Thread Nicholas Riley
Nicholas Riley added the comment: According to http://juliusdavies.ca/posix_clocks/clock_realtime_linux_faq.html, CLOCK_REALTIME can go backwards. CLOCK_MONOTONIC_RAW is best where available (like QueryPerformanceFrequency / mach_absolute_time) and CLOCK_MONOTONIC is pretty good. So I have u

[issue14280] simple indexes (in wrappers) should not require md5 hashes

2012-03-12 Thread Jim Fulton
New submission from Jim Fulton : Requiring md5s makes it hard to implement simple indexes with simple web servers, where simple indexes include flat directories of distributions. -- assignee: eric.araujo components: Distutils2 messages: 155542 nosy: alexis, eric.araujo, j1m, tarek prior

[issue5758] fileinput.hook_compressed returning bytes from gz file

2012-03-12 Thread Éric Araujo
Éric Araujo added the comment: We can use locale.getpreferredencoding, or be smarter and just pass down encoding=encoding to TextIOWrapper and let *it* call getpreferredencoding if it’s given a None :) -- ___ Python tracker

[issue14280] packaging.pypi should not require checksums

2012-03-12 Thread Éric Araujo
Éric Araujo added the comment: I’m not sure that this report should not be merged with #14279, but Alexis will judge that. -- assignee: eric.araujo -> alexis title: simple indexes (in wrappers) should not require md5 hashes -> packaging.pypi should not require checksums versions: +3rd

[issue1178863] Variable.__init__ uses self.set(), blocking specialization

2012-03-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 79bb99ec2464 by Martin v. Löwis in branch 'default': Issue #1178863: Separate initialisation from setting when initializing http://hg.python.org/cpython/rev/79bb99ec2464 -- nosy: +python-dev ___ Python t

[issue14260] re.groupindex available for modification and continues to work, having incorrect data inside it

2012-03-12 Thread Matthew Barnett
Matthew Barnett added the comment: It appears I was wrong. :-( The simplest solution in that case is for it to return a _copy_ of the dict. -- ___ Python tracker ___ __

[issue2843] New methods for existing Tkinter widgets

2012-03-12 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov versions: +Python 3.3 -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue10543] Test discovery (unittest) does not work with jython

2012-03-12 Thread Michael Foord
Michael Foord added the comment: Fixed in 2.7. Worth fixing in Python 3.2 / 3.2 anyway as sourceless distributions (bytecode only) are still possible. -- versions: +Python 3.2, Python 3.3 ___ Python tracker _

[issue5758] fileinput.hook_compressed returning bytes from gz file

2012-03-12 Thread Tatiana Al-Chueyr
Tatiana Al-Chueyr added the comment: Excellent! Thanks for all remarks, Éric! I'll follow your suggestions and will submit a new patch. -- ___ Python tracker ___ ___

[issue14184] test_recursion_limit fails on OS X when compiled with clang

2012-03-12 Thread Ned Deily
Ned Deily added the comment: It looks like the increase isn't quite big enough for the clang in Xcode 4.2. Revised patch uses a slightly bigger size. -- Added file: http://bugs.python.org/file24810/issue14184_rev1.patch ___ Python tracker

[issue14002] AttributeError in distutils2.pypi.wrapper

2012-03-12 Thread Éric Araujo
Éric Araujo added the comment: [Paul] > To what? The individual packages? No, I meant distutils2 bugs. I will open them when I get a minute. You’re right that projects using metadata 1.0 or 1.1 don’t have to use a version conforming to PEP 386, and that packaging should warn when using the c

[issue8942] __path__ attribute of modules loaded by zipimporter is untested

2012-03-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7e576ad85663 by R David Murray in branch 'default': #8942: add test for __path__ contents in zipimport tests http://hg.python.org/cpython/rev/7e576ad85663 -- nosy: +python-dev ___ Python tracker

[issue8942] __path__ attribute of modules loaded by zipimporter is untested

2012-03-12 Thread R. David Murray
R. David Murray added the comment: I committed Tatiana's patch because it looks reasonable to me, but I'm not familiar enough with zipimport to know if additional tests are needed. If you think there are additional tests that should be added, please reopen the issue. -- nosy: +r.davi

[issue14002] AttributeError in distutils2.pypi.wrapper

2012-03-12 Thread Tetsuya Morimoto
Changes by Tetsuya Morimoto : Removed file: http://bugs.python.org/file24801/distutils2_pypi_wrapper.patch ___ Python tracker ___ ___ Python-b

[issue5758] fileinput.hook_compressed returning bytes from gz file

2012-03-12 Thread R. David Murray
R. David Murray added the comment: Duh. I should have remembered that the io module used None to represent the default encoding. Thanks, Éric. -- ___ Python tracker ___ __

[issue5758] fileinput.hook_compressed returning bytes from gz file

2012-03-12 Thread Éric Araujo
Éric Araujo added the comment: Nobody can remember everything: I tried in a shell and looked at the docs to find it :) -- ___ Python tracker ___

[issue13959] Re-implement parts of imp in pure Python

2012-03-12 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue1531415] parsetok.c emits warnings by writing to stderr

2012-03-12 Thread Sean Reifschneider
Sean Reifschneider added the comment: Michele: Do you know what needs to be done to determine the resolution to the _warnings/pgen question? If not, maybe asking the question on python-dev could get some advice. -- nosy: +jafo ___ Python tracker

[issue10037] multiprocessing.pool processes started by worker handler stops working

2012-03-12 Thread Sean Reifschneider
Sean Reifschneider added the comment: The attached patch does change the semantics somewhat, but I don't fully understand how much. In particular: It changes the "get()" call to be turned into "get(timeout=1.0)" if inqueue doesn't have a _reader attribute. In the case that inqueue doesn't ha

[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2012-03-12 Thread Sean Reifschneider
Sean Reifschneider added the comment: Martin: They are looking for you to review this, in particular see: http://bugs.python.org/issue7511#msg106420 -- assignee: tarek -> loewis nosy: +jafo ___ Python tracker

[issue14250] for string patterns regex.flags is never equal to 0

2012-03-12 Thread py.user
py.user added the comment: >>> import re >>> p = re.compile(br'') >>> p.flags 0 >>> -- title: regex.flags is never equal to 0 -> for string patterns regex.flags is never equal to 0 ___ Python tracker

[issue14250] for string patterns regex.flags is never equal to 0

2012-03-12 Thread R. David Murray
R. David Murray added the comment: Heh. Good point. Documenting this is a clear way may be non-trivial. -- ___ Python tracker ___ _

[issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error

2012-03-12 Thread Éric Araujo
Changes by Éric Araujo : -- versions: +Python 3.3 -Python 2.6, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue14262] Allow using decimals as arguments to `timedelta`

2012-03-12 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +belopolsky, facundobatista, haypo, mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bug

[issue14260] re.groupindex available for modification and continues to work, having incorrect data inside it

2012-03-12 Thread Éric Araujo
Éric Araujo added the comment: But regex.sub is affected only if you manually muck with the dict, right? If so, then it looks like a case of “it hurts when I do this” (the doctor’s reply: “Don’t do this.”) -- nosy: +eric.araujo ___ Python tracker

[issue14255] tempfile.gettempdir() didn't return the path with correct case.

2012-03-12 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +brian.curtin, georg.brandl, ncoghlan, tim.golden stage: -> test needed type: -> behavior versions: -Python 2.6, Python 3.1, Python 3.4 ___ Python tracker __

[issue14250] for string patterns regex.flags is never equal to 0

2012-03-12 Thread Eli Bendersky
Eli Bendersky added the comment: Issue #13358 may be related -- nosy: +eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mail

[issue14250] for string patterns regex.flags is never equal to 0

2012-03-12 Thread R. David Murray
R. David Murray added the comment: It doesn't look like it. Is that the right issue number? -- ___ Python tracker ___ ___ Python-bug

[issue14281] Add unit test for cgi.escape method

2012-03-12 Thread Brian Landers
New submission from Brian Landers : The cgi.escape method is deprecated, but it should still have test coverage. This patch adds a test for it. -- components: Tests files: cgi_test_escape.patch keywords: patch messages: 155563 nosy: packetslave priority: normal severity: normal status:

[issue14250] for string patterns regex.flags is never equal to 0

2012-03-12 Thread Eli Bendersky
Eli Bendersky added the comment: Oh, sorry I meant http://bugs.python.org/issue13385 -- ___ Python tracker ___ ___ Python-bugs-list m

[issue8739] Update to smtpd.py to RFC 5321

2012-03-12 Thread Dan Boswell
Dan Boswell added the comment: I built on Michele's patch during the pycon sprint, addressing some of the concerns rightly raised in previous comment: 1. Turn off the SIZE extension if client uses HELO (though limits are still used internally to limit message size for DoS protection), and rep

[issue12640] test_ctypes seg fault (test_callback_register_double); armv7; gcc 4.5.1

2012-03-12 Thread python272
python272 added the comment: test_ctypes is successful in 2.7.3rc1, armv7l (using --with-system-ffi (3.0.10); i haven't tested w/out that config option) note: Python-2.7.3rc1/Modules/_ctypes/libffi/configure contains this line: VERSION='3.0.10rc0' (2.7.2 has the same line) but upstream libf

[issue14246] Accelerated ETree XMLParser cannot handle io.StringIO

2012-03-12 Thread Eli Bendersky
Eli Bendersky added the comment: Attaching a patch that fixes the problem and adds a test. xmlparser_parse from _elementtree will now be able to handle Unicode, encoding it to bytes with UTF-8, parallel to the way it's done in pyexpat. I would appreciate a review for the patch. -- ke

[issue8954] wininst regression: errors when building on linux

2012-03-12 Thread Sean Reifschneider
Sean Reifschneider added the comment: Éric: In http://bugs.python.org/issue8954#msg135902 are you saying: This issue needs to be re-targeted to a newer Python. Close -- won't fix. Something else? This issue seems to be stuck here, any ideas on what needs to be done to move this forward?

[issue14282] lib2to3.fixer_util.touch_import('__future__', ...) can lead to SyntaxError in code

2012-03-12 Thread Luke Macken
New submission from Luke Macken : Problem: lib2to3.fixer_util.touch_import('__future__', ...) will insert the import statement below all other imports. This will then trigger the following error: SyntaxError: from __future__ imports must occur at the beginning of the file How to reprod

[issue14260] re.groupindex available for modification and continues to work, having incorrect data inside it

2012-03-12 Thread py.user
py.user added the comment: the first message shows how it can work with a broken dict Éric Araujo wrote: > But regex.sub is affected only if you manually muck with the dict, right? I can get code from anywhere -- ___ Python tracker

[issue14283] match.pos describes that match object has methods search() and match()

2012-03-12 Thread py.user
New submission from py.user : http://docs.python.org/py3k/library/re.html#re.match.pos http://docs.python.org/py3k/library/re.html#re.match.endpos "which was passed to the search() or match() method of a match object." http://docs.python.org/py3k/library/re.html#re.match.re match object -> regu

[issue14282] lib2to3.fixer_util.touch_import('__future__', ...) can lead to SyntaxError in code

2012-03-12 Thread Luke Macken
Changes by Luke Macken : -- keywords: +patch Added file: http://bugs.python.org/file24814/python-lib2to3-touch-future-import.patch ___ Python tracker ___ ___

[issue14284] unicodeobject error on macosx in build process

2012-03-12 Thread Hervé Coatanhay
New submission from Hervé Coatanhay : On a fresh install from mercurial on macosx. ./python -SE -m sysconfig --generate-posix-vars Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Assertion failed: (compact->utf8_length == 0), function _PyUnicode_CheckConsistency

[issue14284] unicodeobject error on macosx in build process

2012-03-12 Thread Ezio Melotti
Ezio Melotti added the comment: See #13241. -- nosy: +ezio.melotti resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7) ___ Python tracker

[issue14285] Traceback wrong on ImportError while executing a package

2012-03-12 Thread Marc Schlaich
New submission from Marc Schlaich : It is very simple to reproduce this error. There is an executable package: package/ __init__.py __main__.py The __init__ imports a missing module: import missing_module And the __main__ imports from it: from . import missing_module Now I

<    1   2