[issue15476] Add "code object" to glossary

2012-09-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: That's fine by me. I guess what's more important to me is that "code object" have a central, linkable definition *somewhere* (and not necessarily that this somewhere be a glossary entry). That way references to code object in the docs can link to a definitio

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-09-04 Thread Eric Snow
Eric Snow added the comment: Well, the workflow on Windows is certainly different. I've run out of time to get this sorted out in the short term. However, the patch should be pretty close to what's needed. Obviously the posix-only bit doesn't fit for a Windows-specific test. -- __

[issue15476] Add "code object" to glossary

2012-09-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: I disagree that this should be added. The glossary is not intended to be a dictionary of every possible concept. Ideally, it should remain short enough so that it can be read in a single sitting. Making the docs fatter doesn't make them better. ---

[issue15476] Add "code object" to glossary

2012-09-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: I am starting work on this in the next couple days. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue15457] consistent treatment of generator terminology

2012-09-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: This slipped under my radar. After starting work on this again, I realize that it would make sense to complete issue 15476 first. The reason is that it would improve the process of referencing "code object" in the generator docs (Terry's suggestion) once "co

[issue15510] textwrap.wrap('') returns empty list

2012-09-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching an updated patch as promised in my previous comment. Note that I removed two edge test cases pertaining to leading whitespace. I would rather discuss those cases as part of a different issue to avoid making this thread even longer (and it is off the

[issue15510] textwrap.wrap('') returns empty list

2012-09-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I agree that the existing behavior should not be changed. Most likely, a change would break some code that is currently working, and there would be little to no gain. -- nosy: +rhettinger ___ Python tracke

[issue15837] Added test to test_random.py testing Random.shuffle

2012-09-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch look fine as-is and it can be applied in 3.4. (BTW, I miss having a Resolution status of Accepted, meaning that the patch passed review and is ready to apply). FWIW, I'll remove the int=int optimization in Py3.4. It doesn't provide much benefit

[issue15837] Added test to test_random.py testing Random.shuffle

2012-09-04 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue15510] textwrap.wrap('') returns empty list

2012-09-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: I responded to David's comments on the review tool. Later today I will update the patch in response to his comments (accommodating all of his suggestions) along with a couple other changes. -- ___ Python tracker <

[issue15626] unittest.main negates -bb option and programmatic warning configuration

2012-09-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-09-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm observed this happening on a number of machines at my client's site. It started about three weeks ago and has not stopped (even with fresh installs of Py2.7.3 and ActiveTCL). I've not been able to figure-out why it affects some machines and not other

[issue15831] comma after leading optional argument is after bracket in docs

2012-09-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: > We are moving toward using the same signatures that we have in the Python > code The single * is not so common (yet), I created issue 15865 to add the single * to the documentation where appropriate. -- ___

[issue15865] reflect bare star * in function signature documentation

2012-09-04 Thread Chris Jerdonek
New submission from Chris Jerdonek: This issue is to make sure that the bare * in the function signatures of pure Python functions is properly reflected in the documentation. This will bring the signatures in the documentation closer to the signatures that we have in the Python code -- a goal

[issue15864] Package cache doesn't cache packages with overlapping sys.path entries

2012-09-04 Thread R. David Murray
R. David Murray added the comment: It isn't the file things are defined in that matters, it is how the module object is named. As I said, foo.bar.baz and bar.baz are different objects from Python's point of view, as you found out. -- resolution: -> invalid stage: -> committed/reject

[issue15864] Package cache doesn't cache packages with overlapping sys.path entries

2012-09-04 Thread Daniel Wagner-Hall
Daniel Wagner-Hall added the comment: That is indeed the behaviour I'm talking about. In particular I came across this where two libraries imported an exception type using different sys.path traversals, which both led to the same file, and a try-catch didn't catch the exception because it had

[issue15864] Package cache doesn't cache packages with overlapping sys.path entries

2012-09-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Agreed, I don't think this is a bug. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list ma

[issue15864] Package cache doesn't cache packages with overlapping sys.path entries

2012-09-04 Thread R. David Murray
R. David Murray added the comment: Unless I misunderstand you, you are importing the module using two different names, so loading it twice would be the correct behavior. That is, 'foo.bar.baz' is a different thing from 'bar.baz' from Python's point of view. -- nosy: +r.david.murray _

[issue15841] Some StringIO and BytesIO methods can succeed after close

2012-09-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Alessandro, have you already signed a contributor agreement so that your patch can be integrated? If not, you'll find the instructions at http://www.python.org/psf/contrib/ Thank you! -- ___ Python tracker

[issue15831] comma after leading optional argument is after bracket in docs

2012-09-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching an updated patch after doing another pass at the code and in light of Ezio's comments. Let me know if and when you'd like me to prepare separate patches for 2.7 and 3.2. -- Added file: http://bugs.python.org/file27120/issue-15831-2.patch __

[issue15862] IDLE not working when due to wrong Hard Drive point of os.path.expanduser

2012-09-04 Thread Roger Serwy
Roger Serwy added the comment: IDLE not responding is likely due to Issue13582, since the warning message would cause IDLE to terminate abruptly when launched with pythonw.exe. What does os.path.expanduser("~") evaluate to when executed from the IDLE shell? -- nosy: +serwy ___

[issue15864] Package cache doesn't cache packages with overlapping sys.path entries

2012-09-04 Thread Daniel Wagner-Hall
New submission from Daniel Wagner-Hall: Importing the same module twice should only execute its code once, and should only lead to one copy of the classes defined in the module's file. If a subdirectory of $PWD is on $PYTHONPATH, and a package is imported both relative to $PWD and relative to

[issue15863] Fine-grained info about Python versions which support changes introduced in micro releases

2012-09-04 Thread Alexander Konovalenko
New submission from Alexander Konovalenko: Some security fixes and bug fixes that are simultaneously issued for multiple Python versions require changes to the documentation. I'm now looking at the hash randomization vulnerability that was fixed in 2.6.8 and 2.7.3. The docs always mention the

[issue15862] IDLE not working when due to wrong Hard Drive point of os.path.expanduser

2012-09-04 Thread Cemal Duman
New submission from Cemal Duman: Hi Unfortunately i'm using Vista on my corparate laptop I can open my Python CLI without any problem but IDLE is not responding. When i started idle.py by issuing following command: C:\Python27>python.exe Lib\idlelib\idle.py I see following output: C:\Python

[issue15861] ttk.Treeview "unmatched open brace in list"

2012-09-04 Thread Bryan Oakley
New submission from Bryan Oakley: If you try to insert an item into the treeview, give it a tuple of values for the "values" attribute, and one of those values has unbalanced braces, you'll get an error "unmatched open brace in list" To reproduce: import Tkinter as tk import ttk root = tk.Tk

[issue15533] subprocess.Popen(cwd) documentation

2012-09-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: Updating the doc portion of the patch one more time. -- Added file: http://bugs.python.org/file27118/issue-15533-7-default.patch ___ Python tracker

[issue15841] Some StringIO and BytesIO methods can succeed after close

2012-09-04 Thread Alessandro Moura
Alessandro Moura added the comment: Thanks. Here is the amended patch with your suggestions implemented. -- Added file: http://bugs.python.org/file27117/memoryio.patch ___ Python tracker ___

[issue15831] comma after leading optional argument is after bracket in docs

2012-09-04 Thread Ezio Melotti
Ezio Melotti added the comment: > So I wasn't sure if this notation was preferred or discouraged. We are moving toward using the same signatures that we have in the Python code, but that doesn't always work (e.g. when the meaning of values changes depending on the number of args, when there's

[issue15841] Some StringIO and BytesIO methods can succeed after close

2012-09-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: A couple of nits about the docstrings: +PyDoc_STRVAR(stringio_seekable_doc, +"seekable() -> Bool. Returns True if IO object can be seeked."); First, "bool" should be lowercase. Also, in seekable(), "IO object" should be "the IO object". Otherwise, looks fine t

[issue15859] PyUnicode_EncodeFSDefault win32 inconsistancy.

2012-09-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sounds reasonable to me. -- nosy: +pitrou stage: -> patch review ___ Python tracker ___ ___ Python-

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-09-04 Thread Lucas Sinclair
Lucas Sinclair added the comment: I agree to close the issue. I tried following the steps proposed here: http://docs.python.org/devguide/ And typed these two commands on a OS X 10.8.1 with XCode and command line tools installed. $ hg clone http://hg.python.org/cpython. $ run ./configure --wit

[issue15831] comma after leading optional argument is after bracket in docs

2012-09-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks for responding to all of those questions, Ezio. I will update the patch based on your responses. (Likely most of it will remain the same.) > Note that if possible, it's better to avoid using the [] and put the default > values. However, in these cases

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-09-04 Thread Ronald Oussoren
Ronald Oussoren added the comment: The configure script for python 3.3 detects llvm-gcc and automatically selects clang when it is found. That seems to be the best feasible solution for this issue. I therefore propose to close this issue. -- ___ P

[issue15860] Use TestCase assertion methods in unittest.mock.assert* to make them easier to read

2012-09-04 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue15533] subprocess.Popen(cwd) documentation

2012-09-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: Updating the patch again to tweak the original documentation change. I was concerned that the previous language could be construed to mean that Popen will look in *two* places for the executable (both relative to the current directory and relative to the cwd a

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2012-09-04 Thread Ezio Melotti
Ezio Melotti added the comment: I missed the initial patch. What I was thinking about was to use simply with self.assertRaises(TypeError): self.assertRaises(1) instead of: +ctx = self.assertRaises(TypeError) +with ctx: +self.assertRaises(1) +self.asser

[issue15831] comma after leading optional argument is after bracket in docs

2012-09-04 Thread Ezio Melotti
Ezio Melotti added the comment: > Do we like how these look? Is the bare star notation too obscure? > > inspect.Signature.replace(*[, parameters][, return_annotation]) > inspect.Parameter.replace(*[, name][, kind][, default][, annotation]) Note that if possible, it's better to avoid using the [

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2012-09-04 Thread R. David Murray
R. David Murray added the comment: Ezio: I don't really care whether or not it would be too meta, if you look at the two versions, it is a *lot* clearer what is being tested in the try/except version than it is in the assertRaises version. -- ___ Py

[issue15860] Use TestCase assertion methods in unittest.mock.assert* to make them easier to read

2012-09-04 Thread Julian Berman
New submission from Julian Berman: Mock's assertion failures can be extremely hard to read for a few reasons -- mostly the noisy default repr that mock objects have, but also because they don't give you the hints that `unittest.TestCase`'s `assert*` methods give you (things like diffing two li

[issue15533] subprocess.Popen(cwd) documentation

2012-09-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: Here is an updated patch. The changes I made are: (1) Update code comments in _call_popen_and_assert(). (2) Fix test failure. (3) Rename _call_popen_and_assert() to _assert_cwd() since it is a simpler name and the old name did not reflect that the method is

[issue11664] Add patch method to unittest.TestCase

2012-09-04 Thread Julian Berman
Changes by Julian Berman : -- nosy: +Julian ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue15533] subprocess.Popen(cwd) documentation

2012-09-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: Andrew, I seem to be getting a test failure for test_executable_with_cwd() with your updated patch (the child process is outputting an absolute path rather than ''). I will update the patch to fix. There are also some stylistic changes I would like to make t

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2012-09-04 Thread Ezio Melotti
Ezio Melotti added the comment: Would using assertRaises to test assertRaises in the tests be to meta? -- assignee: -> michael.foord ___ Python tracker ___ _

[issue15859] PyUnicode_EncodeFSDefault win32 inconsistancy.

2012-09-04 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +haypo type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-04 Thread Tom Lynn
Tom Lynn added the comment: I think the default has to be 0 for consistency with how other empty numeric fields are handled. In theory spaces and NULs are supposed to be equivalent terminators in numeric fields, but I've just noticed that plexus-archiver is also using leading spaces rather th

[issue15533] subprocess.Popen(cwd) documentation

2012-09-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: For future reference, here is the beginning of the e-mail thread on python-dev: http://mail.python.org/pipermail/python-dev/2012-September/121584.html We also need to know whether the Tru64 trick needs to be used in 2.7, since this documentation issue also aff

[issue15533] subprocess.Popen(cwd) documentation

2012-09-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: I believe it's trick for Tru64 platform. I've asked to support of this in python-dev. -- ___ Python tracker ___

[issue2771] Test issue

2012-09-04 Thread Ezio Melotti
Ezio Melotti added the comment: test issue linking: issue1528167 issue 1528167 #1528167 -- ___ Python tracker ___ ___ Python-bugs-list

[issue15838] make install tries to create lib2to3 grammar pickles in source directory

2012-09-04 Thread Ronald Oussoren
Ronald Oussoren added the comment: FWIW the patch is issue15645 was a patch that fixed the issue with minimal changes, as it was created close to the first 3.3 release candidate I didn't want to change code when that could be avoided. A fix that writes the generated file into the build tree in

[issue15645] 2to3 Grammar pickles not created when upgrading to 3.3.0b2

2012-09-04 Thread Ronald Oussoren
Ronald Oussoren added the comment: Is it really possible that the pickle is created after calculation of the wildcard expansion? The GNU make manual says that make will run multiple recipes in parallel when the -j option is used (that is, multiple targets are build at the same time), not that

[issue15857] memoryview: complete support for struct packing/unpacking

2012-09-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15838] make install tries to create lib2to3 grammar pickles in source directory

2012-09-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15833] most failures to write byte-compiled file no longer suppressed

2012-09-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2012-09-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14774] _sysconfigdata.py doesn't support multiple build configurations

2012-09-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15340] OSError with "import random" when /dev/urandom doesn't exist (regression from 2.6)

2012-09-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri