[issue24589] Wrong behavior for list of lists

2015-07-08 Thread Martin Panter
Martin Panter added the comment: This is how Python is meant to work; see https://docs.python.org/2.7/faq/programming.html#how-do-i-create-a-multidimensional-list. Unless there is something in the documentation that gave you the wrong impression, I suggest we close this. -- nosy:

[issue24589] Wrong behavior for list of lists

2015-07-08 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24589 ___

[issue24590] Customized attribute access causes infinite loop

2015-07-08 Thread Zorceta
New submission from Zorceta: Code and result: ``` class A: def __init__(self): self.data = {'a': 1, 'b': 2, 'c': 3} def __getattr__(self, name): print('in __getattr__, getting %s' % name) if name in self.data:

[issue24589] Wrong behavior for list of lists

2015-07-08 Thread Zorceta
Zorceta added the comment: FYI: ll = [[]]*10 [id(l) for l in ll] [67940296, 67940296, 67940296, 67940296, 67940296, 67940296, 67940296, 67940296, 67940296, 67940296] -- nosy: +zorceta ___ Python tracker rep...@bugs.python.org

[issue24136] document PEP 448: unpacking generalization

2015-07-08 Thread Martin Panter
Martin Panter added the comment: FWIW, I still emails from the tracker, even the ones with my own comments and changes. All I can suggest is check the address you have set, check for spam, etc. I don’t @mentioning will do anything here. But as long as the person is in the nosy list they

[issue24589] Wrong behavior for list of lists

2015-07-08 Thread Jos Dechamps
New submission from Jos Dechamps: After creating a list of lists, changing one element, leads to changes of all the elements: v=[[]]*10 v [[], [], [], [], [], [], [], [], [], []] v[3].append(3) v [[3], [3], [3], [3], [3], [3], [3], [3], [3], [3]] v=[[]]*10 v [[], [], [], [], [], [],

[issue24590] Unappropriate issue

2015-07-08 Thread Zorceta
Changes by Zorceta zorc...@gmail.com: -- title: Customized attribute access causes infinite loop - Unappropriate issue ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24590 ___

[issue24589] Wrong behavior for list of lists

2015-07-08 Thread Bastiaan Albarda
Bastiaan Albarda added the comment: The * operator lets you use the same object multiple times, thereby saving resources. If you want unique objects use comprehension: v = [[] for x in range(10)] v[3].append(3) v [[], [], [], [3], [], [], [], [], [], []] v[3] += [3] v [[], [], [], [3,

[issue24590] Customized attribute access causes infinite loop

2015-07-08 Thread Zorceta
Changes by Zorceta zorc...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24590 ___ ___ Python-bugs-list

[issue24588] Unable to pass argument to python script from Java program

2015-07-08 Thread R. David Murray
R. David Murray added the comment: For help with programming, please try the python-list mailing list, or in this case probably a java forum. If you find that there is really is a bug (this is very unlikely) you can reopen this issue with more information about the problem you found.

[issue24551] byte conversion

2015-07-08 Thread Padmanabhan Tr
Padmanabhan Tr added the comment: On Wednesday, July 8, 2015 7:56 PM, padmanabhan T R trp...@yahoo.com wrote: Dear Mr Steven D'ApranoI have not gone through the relevant Source Codes; purely based on my working with Python3 (Version 3.4.2) and the 'The Python Library Reference manual,

[issue24563] Encoding declaration: doc supported encodings

2015-07-08 Thread Sameer Kulkarni
Sameer Kulkarni added the comment: I have added link to Standard Encodings : https://docs.python.org/3/library/codecs.html#standard-encodings and Python Specific Encodings : https://docs.python.org/3/library/codecs.html#python-specific-encodings -- keywords: +patch nosy: +ksameersrk

[issue24583] Crash when source set is changed during merging

2015-07-08 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: Added file: http://bugs.python.org/file39883/index_to_entry.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24583 ___

[issue24592] global var defined in module not returned by function

2015-07-08 Thread Steve Dower
Steve Dower added the comment: You should start by posting this to python-list or StackOverflow, and I'd suggest including code that can actually be run - it's far more precise than pseudocode. (Functions and modules get used a lot. It's far more likely there's a bug in your code than in

[issue24583] Crash when source set is changed during merging

2015-07-08 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24583 ___

[issue24591] offer option to suppress clean --all output relating to nonexistent dirs

2015-07-08 Thread alanf
New submission from alanf: The command setup.py clean --all writes out information about nonexistent directories that the script tried to clean but couldn't find. Example: 'build/bdist.linux-x86_64' does not exist -- can't clean it 'build/scripts-2.7' does not exist -- can't clean it It would

[issue24592] global var defined in module not returned by function

2015-07-08 Thread arthur
New submission from arthur: defined global var, glob.myVar, in separated module imported module containing glob.myVar in function1, func1(): glob.myVar = func1Var = func2() in function2, func2(): if (...): glob.myVar+= abc func2() # call func2() again - recursive else: return glob.myVar I

[issue24593] [3.5.0b3] stdlib on Windows mismatches compiled version

2015-07-08 Thread Emanuel Barry
New submission from Emanuel Barry: On Windows and with the pre-compiled stdlib, the 'collections/__init__.py' file doesn't match the compiled one, as hinted by the presence of OrderedDict, even though it is now part of _collections. The interpreter works just as intended since it uses the

[issue24593] [3.5.0b3] stdlib on Windows mismatches compiled version

2015-07-08 Thread Zachary Ware
Zachary Ware added the comment: I'm not sure I follow what you think is wrong. Are you expecting there to be no OrderedDict in Lib/collections/__init__.py? That's an incorrect expectation; even though there is now a C implementation of OrderedDict, the Python implementation will be kept

[issue24593] [3.5.0b3] stdlib on Windows mismatches compiled version

2015-07-08 Thread Emanuel Barry
Emanuel Barry added the comment: I guess I misexplained myself; I meant that the file hints that there is no C implementation of it (it doesn't import the name from _collections), even though '_collections.OrderedDict is collections.OrderedDict'. --

[issue24581] Crash when a set is changed during iteration

2015-07-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8644744f53ce by Serhiy Storchaka in branch '3.4': Added regression test for issue24581. https://hg.python.org/cpython/rev/8644744f53ce New changeset cfb84be6c7fc by Serhiy Storchaka in branch '2.7': Added regression test for issue24581.

[issue24583] Crash when source set is changed during merging

2015-07-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM for 3.4. But 3.5 has other bug. Changeset 637e197be547 looks incorrect to me. key should be increfed before calling PyObject_RichCompareBool() for the same reason as startkey. -- ___ Python tracker

[issue24583] Crash when source set is changed during merging

2015-07-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Can you produce a test case? Perhaps the incref/decref pair ought to be moved into PyObject_RichCompareBool(). It doesn't make much sense for the callers to do the work. -- ___ Python tracker

[issue24583] set.update(): Crash when source set is changed during merging

2015-07-08 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: Crash when source set is changed during merging - set.update(): Crash when source set is changed during merging ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24583

[issue24581] Crash when a set is changed during iteration

2015-07-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks. -- stage: needs patch - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24581 ___ ___

[issue23319] Missing SWAP_INT in I_set_sw

2015-07-08 Thread Matthieu Gautier
Changes by Matthieu Gautier d...@mgautier.fr: -- versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23319 ___ ___

[issue23189] Set docstrings to empty string when optimizing with -OO.

2015-07-08 Thread Erik Bray
Erik Bray added the comment: For what it's worth (since it was mentioned toward the end of this thread as an offending package) Astropy has a patch now to fix its misbehavior with respect to this issue. I do feel like this would be nice to fix though, since I think it's awkward to have code

[issue24583] Crash when source set is changed during merging

2015-07-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM for 3.5. But 3.6 has other bug. Changeset 637e197be547 looks incorrect to me. key should be increfed before calling PyObject_RichCompareBool() for the same reason as startkey. -- ___ Python tracker

[issue24551] byte conversion

2015-07-08 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24551 ___ ___ Python-bugs-list

[issue24551] byte conversion

2015-07-08 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- components: -Demos and Tools ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24551 ___ ___

[issue24585] Windows installer does not detect existing installs

2015-07-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8e18d615988e by Steve Dower in branch '3.5': Issue #24585: Enables build-to-build upgrades that preserve settings. https://hg.python.org/cpython/rev/8e18d615988e New changeset 2a8a39640aa2 by Steve Dower in branch 'default': Issue #24585: Enables

[issue24551] byte conversion

2015-07-08 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm sorry, but I believe that you have misunderstood what happens here. This has nothing to do with the hex codec, or int.to_bytes() etc. This is the standard property of byte strings in Python, that they are displayed using ASCII as much as possible. The

[issue24583] set.update(): Crash when source set is changed during merging

2015-07-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The same test is crashed in 3.6 even with index_to_entry.diff. ./python -m test.regrtest -F -m test_merge_and_mutate test_set -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24583

[issue24585] Windows installer does not detect existing installs

2015-07-08 Thread Steve Dower
Steve Dower added the comment: Doesn't touch anything significant outside the installer, so I just committed it. Feel free to read over the change and comment here if you want, but we unfortunately won't get complete testing of this until rc1. I added some helpers for faking out version

[issue24157] test_urandom_fd_reopened failure if OS X crash reporter default set to Developer

2015-07-08 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24157 ___ ___ Python-bugs-list

[issue24594] msilib.OpenDatabase Type Confusion

2015-07-08 Thread JohnLeitch
New submission from JohnLeitch: The msilib.OpenDatabase method suffers from a type confusion vulnerability caused by the behavior of MsiOpenDatabase(), the underlying win32 function utilized. This is due to the unorthodox handling of the szPersist parameter: when an MSIDBOPEN_* value is

[issue24594] msilib.OpenDatabase Type Confusion

2015-07-08 Thread JohnLeitch
JohnLeitch added the comment: Attaching repro file. -- Added file: http://bugs.python.org/file39886/msilib.OpenDatabase_Type_Confusion.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24594

[issue24583] Crash when source set is changed during merging

2015-07-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- Removed message: http://bugs.python.org/msg246469 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24583 ___

[issue15014] smtplib: add support for arbitrary auth methods

2015-07-08 Thread R. David Murray
R. David Murray added the comment: Only one question, about a possible missing test. Otherwise this looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15014 ___

[issue24593] [3.5.0b3] stdlib on Windows mismatches compiled version

2015-07-08 Thread R. David Murray
R. David Murray added the comment: The import is not at the top of the file, it is after the definition. -- nosy: +r.david.murray resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue24590] Customized attribute access causes infinite loop

2015-07-08 Thread Ethan Furman
Ethan Furman added the comment: The error in the example code was in def __init__(self): self.data = ... In order to get around that issue, either `data` needs to be declared at class scope, or special cased in __getattr__. -- nosy: +ethan.furman resolution: - not a bug