[issue13929] fnmatch to support escape characters

2012-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue8402 has discussion and patch(es). -- nosy: +serhiy.storchaka resolution: - duplicate status: open - closed superseder: - Add a way to escape metacharacters in glob/fnmatch ___ Python tracker

[issue10836] regression: TypeError during exception handling in urllib.request.urlretrieve

2012-10-15 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10836 ___ ___ Python-bugs-list

[issue16200] Setting .posix=True for shlex object causes infinite loop in __next__

2012-10-15 Thread Roger Serwy
Roger Serwy added the comment: The shlex_posix_property.patch makes .posix a read/write property that changes .eof appropriately. -- Added file: http://bugs.python.org/file27580/shlex_posix_property.patch ___ Python tracker rep...@bugs.python.org

[issue15442] Expand the list of default dirs filecmp.dircmp ignores

2012-10-15 Thread Eli Bendersky
Eli Bendersky added the comment: I tend to agree with Éric here. moijes12, would you like to send an updated patch without the raw literals, and with added tests for the new/changed functionality? -- ___ Python tracker rep...@bugs.python.org

[issue15586] Provide some examples for usage of ElementTree methods/attributes

2012-10-15 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15586 ___

[issue16239] PEP8 arithmetic operator examples

2012-10-15 Thread Peter Würtz
New submission from Peter Würtz: I think the PEP8 examples for arithmetic expressions are a bit misleading. (http://www.python.org/dev/peps/pep-0008/#id20) The text clearly says that it should add spaces around operators of low(est) priority, which means that I'm encouraged to visually group

[issue15811] ElementTree.write() raises TypeError when xml_declaration = True and encoding is a unicode string

2012-10-15 Thread Eli Bendersky
Eli Bendersky added the comment: Finally found time to look at this, sorry for the delay. I agree with Amaury, and don't think any change is necessary in 2.7, the behavior there is quite consistent with what was usually done in 2.x. For porting or keeping the code 2/3 compatible, Amaury's

[issue16238] Automatically remove build directory when build options changed

2012-10-15 Thread Kushal Das
Changes by Kushal Das kushal...@gmail.com: -- nosy: +kushaldas ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16238 ___ ___ Python-bugs-list

[issue15518] Provide test coverage for filecmp.dircmp.report methods.

2012-10-15 Thread Eli Bendersky
Eli Bendersky added the comment: Moving to 3.4 In 3.3 we won't add functionality to filecmp, but in 3.4 we will, so the new tests should go there. -- nosy: +eli.bendersky versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue16214] 2to3 does not remove exceptions import

2012-10-15 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - duplicate status: open - closed superseder: - 'exceptions' import fixer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16214 ___

[issue15518] Provide test coverage for filecmp.dircmp.report methods.

2012-10-15 Thread Eli Bendersky
Eli Bendersky added the comment: Chris Calloway, let's move this forward. I want to see more tests for filecmp ASAP. Please address Chris Jerdonek's points in a new patch made vs. fresh default branch (3.4), at this point cding (before the test_cwd thing is done). For testing code,

[issue15351] Add to unittest.TestCase support for using context managers

2012-10-15 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15351 ___ ___ Python-bugs-list

[issue13133] FD leaks in ZipFile.read(), ZipFile.extract() and also using explicit arc_member.close()

2012-10-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13133 ___ ___

[issue9969] tokenize: add support for tokenizing 'str' objects

2012-10-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- versions: +Python 3.4 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9969 ___

[issue7101] tarfile: OSError with TarFile.add(..., recursive=True) about non-existing file

2012-10-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7101 ___ ___

[issue15721] PEP 3121, 384 Refactoring applied to tkinter module

2012-10-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Andrew, I have questions about the following part of commit bf9d118779f5: + PyTclObject_Type_slots[3].pfunc = PyObject_GenericGetAttr; First, the 3 refers to the position of Py_tp_getattro in the array, which is a fragile thing IMO. Then, this hack was

[issue15936] Add link from os.urandom to random.SystemRandom

2012-10-15 Thread Ramchandra Apte
Ramchandra Apte added the comment: @Bryce Retract that message. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15936 ___ ___ Python-bugs-list

[issue1776674] glob.glob inconsistent

2012-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The question is what result desirable for glob.glob(c:/tmp///3691674.jpg*), ['c:/tmp///3691674.jpg'] or ['c:\\tmp\\3691674.jpg']? -- nosy: +serhiy.storchaka versions: +Python 3.3, Python 3.4 -Python 3.1 ___ Python

[issue1776674] glob.glob inconsistent

2012-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have added some comments in Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1776674 ___ ___

[issue8402] Add a way to escape metacharacters in glob/fnmatch

2012-10-15 Thread Ezio Melotti
Ezio Melotti added the comment: I think the escaping workaround should be documented in the glob and/or fnmatch docs. This way users can simply do: import glob glob.glob(c:\abc\afolderwith[[]test]\*) rather than import glob import fnmatch glob.glob(fnmatch.escape(c:\abc\afolderwith[test]\)

[issue1776674] glob.glob inconsistent

2012-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Shell preserves the separators. Well, in any case we always can apply os.path.normpath() to result. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1776674

[issue1776674] glob.glob inconsistent

2012-10-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1776674 ___ ___

[issue10836] regression: TypeError during exception handling in urllib.request.urlretrieve

2012-10-15 Thread Guido van Rossum
Changes by Guido van Rossum gu...@python.org: -- priority: normal - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10836 ___ ___

[issue16231] pickle persistent_id return value

2012-10-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: An easy workaround (and probably the preferred method) it to return a (tag, index) tuple, like the example in http://docs.python.org/release/3.2/library/pickle.html#pickle-persistent Testing for the None value introduces a slight incompatibility, so IMO

[issue16240] Document a way to escape metacharacters in glob/fnmatch

2012-10-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: fnmatch.translate's docstraing says There is no way to quote meta-characters., but this is wrong. One can remove the special meaning of ``'?'``, ``'*'`` and ``'['`` by wrapping them between square brackets. Thus, ``'[?]'`` matches the literal character

[issue8402] Add a way to escape metacharacters in glob/fnmatch

2012-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think the escaping workaround should be documented in the glob and/or fnmatch docs. See issue16240. This issue left for enhancement. -- ___ Python tracker rep...@bugs.python.org

[issue10836] regression: TypeError during exception handling in urllib.request.urlretrieve

2012-10-15 Thread Ezio Melotti
Ezio Melotti added the comment: The problem is in open_local_file (Lib/urllib/request.py:1885). It passes 3 arguments to URLError, but the constructor only accepts 2: reason and filename (Lib/urllib/error.py:29). This used to be an IOError when urllib was a single module rather than a

[issue8402] Add a function to escape metacharacters in glob/fnmatch

2012-10-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- title: Add a way to escape metacharacters in glob/fnmatch - Add a function to escape metacharacters in glob/fnmatch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8402

[issue8402] Add a way to escape metacharacters in glob/fnmatch

2012-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated (thanks Ezio for review and comments). -- Added file: http://bugs.python.org/file27582/fnmatch_escape_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8402

[issue16241] -X faulthandler is not documented in -X option docs

2012-10-15 Thread Ramchandra Apte
New submission from Ramchandra Apte: http://docs.python.org/release/3.3.0/using/cmdline.html#cmdoption-X says CPython currently defines none of them... But in Python 3.3, faulthandler can be passed to the option. -- assignee: docs@python components: Documentation messages: 172980

[issue16202] sys.path[0] security issues

2012-10-15 Thread Jan Lieskovsky
Jan Lieskovsky added the comment: Jeroen, just out of curiosity. Is the current issue different from CVE-2008-5983 (at first quick glance it looks the be the same issue):? [1] http://bugs.python.org/issue5753 Thank you, Jan. -- Jan iankko Lieskovsky -- nosy: +iankko

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: The presence of During handling of the above exception, another exception occurred: is part of an intentional change between 2.x and 3.x. Exception handling has been tweaked a bit more in the past year. 3.2.3 only gives the second half of the traceback, which

[issue16202] sys.path[0] security issues

2012-10-15 Thread Nick Coghlan
Nick Coghlan added the comment: It's actually the same as #946373 - it's not about adding the current directory to sys.path, it's adding the directory of a script that's in a world-writable directory (such as /tmp). The difference is that the proposed solution this time recognises that simply

[issue16231] pickle persistent_id return value

2012-10-15 Thread PSchaafsma
PSchaafsma added the comment: There are indeed many easy workarounds, and we definitely don't want to introduce any incompatibilities. I guess the best thing to do is just update the documentation, right? -- ___ Python tracker

[issue16241] -X faulthandler is not documented in -X option docs

2012-10-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, haypo stage: - needs patch type: - enhancement versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16241

[issue15721] PEP 3121, 384 Refactoring applied to tkinter module

2012-10-15 Thread Andrew Svetlov
Andrew Svetlov added the comment: Amaury, I completely agree with your objection. I've found this code in xxlimited.c and adapted to _tkinter source. If that weird code can be removed I will do it. I have no idea how we can catch/reproduce the problem, maybe Martin von Loewis can help as

[issue15442] Expand the list of default dirs filecmp.dircmp ignores

2012-10-15 Thread moijes12
moijes12 added the comment: Yeah. I'm on it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15442 ___ ___ Python-bugs-list mailing list

[issue16229] Demo *redemo.py* lacking in Windows installation

2012-10-15 Thread Ned Deily
Ned Deily added the comment: Thanks for the update. So I think the bigger issue here is there something that should be changed in the Windows installer to accommodate the demo changes in Python 3. Adding the Windows experts and deassigning from docs. -- assignee: docs@python -

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-15 Thread Ezio Melotti
Ezio Melotti added the comment: While fixing this issue is easy, there is a wider problem with the use of URLError. The constructor accepts two args, reason and filename. About half of the errors in Lib/urllib/request.py use only one argument, and in the other half not a single one uses the

[issue13538] Improve doc for str(bytesobject)

2012-10-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: I would just say that str(bytesobj, encoding, errors) is equivalent to bytesobj.decode(encoding, errors) (assuming it really is). Good suggestion. And yes, code is shared in the following way:

[issue13538] Improve doc for str(bytesobject)

2012-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed: m = memoryview(b) str(m, utf-8) '' m.decode(utf-8) Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'memoryview' object has no attribute 'decode' -- ___ Python tracker

[issue13538] Improve doc for str(bytesobject)

2012-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note: character buffer isn't a term we use anymore (in Python 3, that is). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538 ___

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: needs patch - patch review Added file: http://bugs.python.org/file27584/issue10836-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10836

[issue15442] Expand the list of default dirs filecmp.dircmp ignores

2012-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Should __pycache__ be ignored too? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15442 ___

[issue16242] Pickle and __getattr__

2012-10-15 Thread Joseph Fall
New submission from Joseph Fall: This report is to re-raise an old issue from 2009: http://bugs.python.org/issue5370 Although that issue is marked as fixed, I disagree that it was ever fixed, and spent an evil day tracking it down. Use Case: - take two 3rd party packages: django and

[issue16197] Several small errors in winreg documentation

2012-10-15 Thread Zachary Ware
Zachary Ware added the comment: It occurs to me that I should have asked; should the documentation be changed to match the code, or the code to match the documentation (with regards to the default argument to the access parameter in a few functions)? --

[issue16197] Several small errors in winreg documentation

2012-10-15 Thread Brian Curtin
Brian Curtin added the comment: Docs should match code. If we did it the other way around we'd probably break something. Thanks for looking into this. I've been busy the last few days but I will get to the review and application of the patch very soon. --

[issue15958] bytes.join() should allow arbitrary buffer objects

2012-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is an updated patch using PySequence_Fast_GET_SIZE to avoid problems when the sequence is resized during iteration. -- Added file: http://bugs.python.org/file27585/bytes_join_buffers2.patch ___ Python tracker

[issue16197] Several small errors in winreg documentation

2012-10-15 Thread Zachary Ware
Zachary Ware added the comment: That's what I figured, so that's what I did in the patch; but I've also seen cases in Python where prior documentation has dictated how the code should work. Thanks for the confirmation. -- ___ Python tracker

[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2012-10-15 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13897 ___ ___

[issue13607] Move generator specific sections out of ceval.

2012-10-15 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13607 ___ ___

[issue16202] sys.path[0] security issues

2012-10-15 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: It's sort of the same as #946373, except that bug report deals with other bad consequences of sys.path[0], unrelated to security. #5753 is specifically about the C API, not about running plain Python. -- ___ Python

[issue5256] rlcompleter adds builtins when custom dict is used

2012-10-15 Thread Michele Orrù
Michele Orrù added the comment: Updated. Note that removing `eval` is necessary for the new logic of the function. -- Added file: http://bugs.python.org/file27586/issue5256.1.patch ___ Python tracker rep...@bugs.python.org

[issue16202] sys.path[0] security issues

2012-10-15 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I should point out that there is also dangerous code in Lib/test/test_subprocess.py in the test_cwd() function. There, the following is executed from /tmp: python -c 'import sys,os; sys.stdout.write(os.getcwd())' As Python luckily knows where to import

[issue12486] tokenize module should have a unicode API

2012-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch to allow tokenize() accepts string is very simple, only 4 lines. But it requires a lot of documentation changes. Then we can get rid of undocumented generate_tokens(). Note, stdlib an tools use only generate_tokens(), none uses tokenize(). Of course,

[issue9771] add an optional default argument to tokenize.detect_encoding

2012-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I never understood the usage of the second item. IMO it should be None if no cookie found. UTF-8 is the default source encoding for Python 3. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org

[issue12691] tokenize.untokenize is broken

2012-10-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12691 ___ ___

[issue16243] Regression in inspect module

2012-10-15 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: In Python 3.3.0 and 3.2.3: from inspect import * def f(a,b):pass ... formatargspec(getargspec(f)) Traceback (most recent call last): File stdin, line 1, in module File /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/inspect.py,

[issue16243] Regression in inspect module

2012-10-15 Thread STINNER Victor
STINNER Victor added the comment: It looks like a typo in your code. You should use instead: formatargspec(*getargspec(f)) Or better: formatargspec(*getfullargspec(f)) Try with: def f(a: int, b: float): pass -- nosy: +haypo ___ Python tracker

[issue16227] Add link to 3.3 version in unicode howto

2012-10-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset c59884f4bc8d by Chris Jerdonek in branch '2.7': Issue #16227: Add to 2.x Unicode HOWTO a link to the Python 3 version. http://hg.python.org/cpython/rev/c59884f4bc8d -- nosy: +python-dev ___ Python

[issue16227] Add link to 3.3 version in unicode howto

2012-10-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: Committed without changing the first sentence, as Éric preferred. Thanks for the report, Mark! -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker

[issue16225] add to looping techniques tutorial a note about modifying sequence

2012-10-15 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- title: list.remove in for loop - add to looping techniques tutorial a note about modifying sequence type: - enhancement versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python tracker

[issue16225] add to looping techniques tutorial a note about modifying sequence

2012-10-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: It will be nice somewhere in deep clarify for experts what happens with list iterator if the list changed. Resist the urge to over-specify. Unless the behavior is tested and known to be consistent across all implementations, I'm content with the

[issue16225] add to looping techniques tutorial a note about modifying sequence

2012-10-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks, Raymond. I will be doing that later today. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16225 ___

[issue16239] PEP8 arithmetic operator examples

2012-10-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Shouldn't this be in the Yes or an Optionally example block? +1 -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16239 ___

[issue16243] Regression in inspect module

2012-10-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: My bad, but I think documentation can be improved by adding an example. -- assignee: - docs@python components: +Documentation -Library (Lib) nosy: +docs@python type: behavior - enhancement versions: -Python 3.2, Python 3.3

[issue16225] add to looping techniques tutorial a note about modifying sequence

2012-10-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1f1bf6a3abbc by Chris Jerdonek in branch '3.2': Issue #16225: Add additional note to tutorial about changing sequence while looping. http://hg.python.org/cpython/rev/1f1bf6a3abbc New changeset 8cb14494d33c by Chris Jerdonek in branch '3.3': Issue

[issue16225] add to looping techniques tutorial a note about modifying sequence

2012-10-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset dc006b6212e7 by Chris Jerdonek in branch '2.7': Issue #16225: Backport from 3.2: Add additional note to tutorial about looping. http://hg.python.org/cpython/rev/dc006b6212e7 -- ___ Python tracker

[issue16225] add to looping techniques tutorial a note about modifying sequence

2012-10-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: Committed. Thanks for reporting the suggestion, Ian. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16225

[issue16235] Add python-config.sh for use during cross compilation.

2012-10-15 Thread Trent Nelson
Changes by Trent Nelson tr...@snakebite.org: -- nosy: +trent ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16235 ___ ___ Python-bugs-list mailing

[issue9583] Document startup option/environment interaction

2012-10-15 Thread Todd Rovito
Todd Rovito added the comment: Applies to Python 3.4 in development and Python 2.7. I recently ran into a similar conflict where I was overriding a environment variable with a command line option and didn't realize it. I first checked the documentation and noticed that it was not clear.

[issue1283110] Give __len__() advice for don't know

2012-10-15 Thread Todd Rovito
Todd Rovito added the comment: For Python 3.4 attached is a patch as suggested by Raymond Hettinger. My suggestion is to put the patch in Doc/reference/datamodel.rst because if a user searches google.com for __len__ this is the first link in the list. I think this extra information is a

[issue16244] TimedRotatingFileHandler forces write mode, should use append

2012-10-15 Thread Richard Jones
New submission from Richard Jones: The RotatingFileHandler classes force the open() mode of the new log file to be w even though it is initially defaulted to a in doRollover() methods: self.mode = 'w' self.stream = self._open() This can cause problems in systems that have

[issue9583] Document startup option/environment interaction

2012-10-15 Thread Todd Rovito
Todd Rovito added the comment: After another review I decided to submit a newer patch that uses a comma so I think the documentation flows better. -- type: - enhancement Added file: http://bugs.python.org/file27590/EnvironmentVariables.patch ___

<    1   2