[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2017-02-27 Thread INADA Naoki
INADA Naoki added the comment: When using import, (namespace) package name is explicitly specified. Only specified name is searched. In test loader's case, there are no such limit. Loader may search millions of completely unrelated directories. It may include directories in NFS or samba over

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2017-02-27 Thread INADA Naoki
INADA Naoki added the comment: I'm afraid this change makes testloader searches unrelated directory contains massive files (like node_modules). I don't think loading all tests from whole namespace package is not usual use case. -- nosy: +inada.naoki

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2017-02-27 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Raymond. I would like to keep the example style another issue, not this one. :-) And I hope someone is willing to review the PR. -- assignee: -> xiang.zhang stage: needs patch -> patch review versions: +Python 3.7 -Python 3.6

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is 2.7 free from this bug? -- ___ Python tracker ___ ___ Python-bugs-list

[issue29655] Certain errors during IMPORT_STAR can leak a reference

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: But it is *very easy* to fix this bug in 2.7. -- keywords: +patch resolution: fixed -> stage: resolved -> patch review status: closed -> open versions: +Python 2.7 -Python 3.5, Python 3.6, Python 3.7 Added file:

[issue28231] zipfile does not support pathlib

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch is backported to 3.6.1. -- versions: +Python 3.6 Added file: http://bugs.python.org/file46677/zipfile-pathlib-3.6.1.patch ___ Python tracker

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2017-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for the decorator idea. It feels very natural. A little off topic, I do not like the with-statement example that we currently have in the docs. I think it is bad design to put some much code inside with-block. In the micro-webframeworks, we register

[issue29669] Missing import of bisect in the documentation examples

2017-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, but I think this is a waste. A number of the example sections presume that the module under discussion has been imported. Also, these docs have been around for a long time without the slightest indication of confusion. -- nosy:

[issue17894] Edits to descriptor howto

2017-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: I will work on it thank you. -- versions: +Python 3.7 -Python 3.4 ___ Python tracker ___

[issue28231] zipfile does not support pathlib

2017-02-27 Thread Ned Deily
Ned Deily added the comment: > Note that Ned gave us a permission to get this into 3.6.1. I may have although I don't remember specifically discussing zipfile. In any case, I'm willing to consider it. I think you can make good arguments for and against. Yes, it could smell like adding a

[issue29661] Typo in the docstring of timeit.Timer.autorange

2017-02-27 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Raymond! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue29661] Typo in the docstring of timeit.Timer.autorange

2017-02-27 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +302 ___ Python tracker ___ ___ Python-bugs-list

[issue29673] Some gdb macros are broken in 3.6

2017-02-27 Thread Skip Montanaro
Skip Montanaro added the comment: Note that these macros were always expected to be fragile. They depend to a great extent on the layout of the functions in Python/ceval.c. I've had to tweak them a couple times over the years. I'm pretty sure the gdb instance I have available to me at work

[issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted

2017-02-27 Thread Jakub Wilk
Jakub Wilk added the comment: Deleting non-existent files in /tmp is an indicator of a security hole. This kind of error must never pass silently. -- nosy: +jwilk ___ Python tracker

[issue29673] Some gdb macros are broken in 3.6

2017-02-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I tried to simply replace _PyUnicode_AsString with PyUnicode_AsUTF8, but it looks like code structure has changed and the pyframe and pystack macros don't work anymore. -- ___ Python tracker

[issue29673] Some gdb macros are broken in 3.6

2017-02-27 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: Some gdb macros defined in Misc/gdbinit got broken when _PyUnicode_AsString was renamed to PyUnicode_AsUTF8. (gdb) pystack No symbol "_PyUnicode_AsString" in current context. -- messages: 288684 nosy: belopolsky priority: normal severity:

[issue29626] Issue with spacing in argparse module while using help

2017-02-27 Thread paul j3
Changes by paul j3 : -- status: closed -> open ___ Python tracker ___ ___

[issue29626] Issue with spacing in argparse module while using help

2017-02-27 Thread paul j3
paul j3 added the comment: Sorry, I missed that. For some reason I looking something bigger. That's coming from the `metavar=""'. If I specify `metavar="xxx" that help line will have -p xxx, --projectid xxx Replace the 'xxx` with '', and you still have space between '-p' and ','. Now

[issue29639] test suite intentionally avoids referring to localhost, destroying abstraction away from IPv6 vs IPv4

2017-02-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: great! that makes me feel much less bad about fixing this in the way i desire. :) -- ___ Python tracker ___

[issue29626] Issue with spacing in argparse module while using help

2017-02-27 Thread Falguniben Jhaveri
Falguniben Jhaveri added the comment: There is an extra spacing here if you look carefully. I have commented above the code. Similarly it happens for "-o" too but not for other alphabets. 1427:~/mypy/argdev$ python3 issue29626.py delete -h usage: cli delete [-h] [-p] userid Deletes a user in

[issue29672] `catch_warnings` context manager causes warnings to be reprinted

2017-02-27 Thread Gerrit Holl
Gerrit Holl added the comment: To clarify, this behaviour crosses module boundaries. So even if some piece of code many layers deep buried in a module uses this context manager, it has global consequences. -- ___ Python tracker

[issue29626] Issue with spacing in argparse module while using help

2017-02-27 Thread paul j3
paul j3 added the comment: This help looks normal: 1427:~/mypy/argdev$ python3 issue29626.py delete -h usage: cli delete [-h] [-p] userid Deletes a user in your organization. positional arguments: userid The userid of user. optional arguments: -h, --help show this

[issue29672] `catch_warnings` context manager causes warnings to be reprinted

2017-02-27 Thread Gerrit Holl
Gerrit Holl added the comment: I suppose this is a consequence of the change in: http://bugs.python.org/issue4180 and although I can see why the warnings filter would be reset when entering the context manager, I don't think it is desirable to have side effects for modules that are entirely

[issue29672] `catch_warnings` context manager causes warnings to be reprinted

2017-02-27 Thread Gerrit Holl
New submission from Gerrit Holl: Entering the `catch_warnings` context manager is causing warnings to be printed over and over again, rather than just once as it should. Without such a context manager, the behaviour is as expected: $ cat ./mwe.py #!/usr/bin/env python3.5

[issue29626] Issue with spacing in argparse module while using help

2017-02-27 Thread Falguniben Jhaveri
Falguniben Jhaveri added the comment: Sample code to repro this: import argparse parser = argparse.ArgumentParser(prog='cli') subparsers = parser.add_subparsers(dest="command") subparsers_user_delete = subparsers.add_parser("delete", help="Deletes a user in your organization.",

[issue28791] update sqlite to 3.17.0

2017-02-27 Thread Big Stone
Big Stone added the comment: python-3.7 should include the latest stable sqlite, at the time of last alpha. -- title: update sqlite to 3.15.2 -> update sqlite to 3.17.0 ___ Python tracker

[issue29626] Issue with spacing in argparse module while using help

2017-02-27 Thread paul j3
paul j3 added the comment: With this setup import argparse parser=argparse.ArgumentParser(prog='cli') parser.add_argument('nodes') sp=parser.add_subparsers() p1 = sp.add_parser('list', description='Lists nodes in your current project') p1.add_argument('-p','--projectid', action='store_true')

[issue29626] Issue with spacing in argparse module while using help

2017-02-27 Thread paul j3
Changes by paul j3 : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26389] Expand traceback module API to accept just an exception as an argument

2017-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Comments probably apply to format_exception and in part, format_exception_only (both also patched in PR237) but I have not checked behavior or code at all. -- ___ Python tracker

[issue29671] Add function to gc module to check if any reference cycles have been reclaimed.

2017-02-27 Thread Kevin Mills
Kevin Mills added the comment: gc.disable() at the beginning and then analyzing the results of gc.collect() actually does do what I was wanting, thank you. Reference cycles in and of themselves aren't the problem. It's only a problem if garbage contains reference cycles. In a normal program,

[issue26389] Expand traceback module API to accept just an exception as an argument

2017-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: The print_exception API goes back to when exception values were (or at least, could be) strings. Its doc is incomplete as to the requirements on the args and, at least by 3.5, erroneous. To modify it, we need to understand how it actually works now. In

[issue29671] Add function to gc module to check if any reference cycles have been reclaimed.

2017-02-27 Thread Mark Dickinson
Mark Dickinson added the comment: An addendum: I'd note that avoiding reference cycles altogether is hard in modern-day Python. For example, any dynamically-created class creates a reference cycle between the class and its MRO: >>> import gc >>> gc.disable() >>> gc.collect() 0 >>> class

[issue29671] Add function to gc module to check if any reference cycles have been reclaimed.

2017-02-27 Thread Mark Dickinson
Mark Dickinson added the comment: If I understand correctly, you can already achieve what you want by: 1. Disabling gc (with gc.disable()) at the beginning of your code, and possibly adding a `gc.collect()` immediately afterwards for good measure. 2. Doing a gc.collect() (and taking note of

[issue29671] Add function to gc module to check if any reference cycles have been reclaimed.

2017-02-27 Thread Kevin Mills
New submission from Kevin Mills: The intro paragraph for the gc module's documentation says: > Since the collector supplements the reference counting already used in > Python, you can disable the collector if you are sure your program does not > create reference cycles. How would you ever be

[issue29670] argparse: does not respect required args pre-populated into namespace

2017-02-27 Thread Matthew Hall
New submission from Matthew Hall: I have some Python code which takes advantage of the ability to prepopulate the argparse Namespace before passing it to argparse. This allows me to read sensitive settings such as usernames and passwords from DBs, environment variables, etc. in addition to

[issue17894] Edits to descriptor howto

2017-02-27 Thread Ned Batchelder
Ned Batchelder added the comment: I'm still interested in moving this forward. I can make a GitHub pull request if that would help. -- ___ Python tracker

[issue29655] Certain errors during IMPORT_STAR can leak a reference

2017-02-27 Thread Berker Peksag
Berker Peksag added the comment: I ignored 2.7 because you know... it's 2.7 :) And you said [1] that it doesn't have a big effect on real applications. [1] https://github.com/python/cpython/pull/301#issuecomment-282789185 -- nosy: +berker.peksag

[issue29659] Expose the `length` arg from shutil.copyfileobj for public use

2017-02-27 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- components: +Library (Lib) ___ Python tracker ___

[issue29655] Certain errors during IMPORT_STAR can leak a reference

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks to me that 2.7 has this bug. -- ___ Python tracker ___ ___

[issue28231] zipfile does not support pathlib

2017-02-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +ned.deily ___ Python tracker ___ ___

[issue29669] Missing import of bisect in the documentation examples

2017-02-27 Thread Marco Buttu
New submission from Marco Buttu: There is no import of bisect.bisect() and bisect.bisect_left() in the documentation. IMHO the examples are clearer and more complete if we import these functions, as in the attached patch. -- assignee: docs@python components: Documentation files:

[issue28791] update sqlite to 3.15.2

2017-02-27 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Is this something we want to include for the upcoming 3.6.1 release? The latest sqlite version is 3.17.0. -- nosy: +Mariatta ___ Python tracker

[issue24700] array compare is hideously slow

2017-02-27 Thread lou1306
lou1306 added the comment: I noticed the issue is still there in Python 3.6. But I can't see why array subclasses should be the reason for this implementation. By looking at getarrayitem, it looks like __getitem__ does not play any role in how the elements are accessed. Consider the attached

[issue29655] Certain errors during IMPORT_STAR can leak a reference

2017-02-27 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: -Python 2.7 ___ Python tracker

[issue26389] Expand traceback module API to accept just an exception as an argument

2017-02-27 Thread Brett Cannon
Brett Cannon added the comment: I don't think supporting both approaches is worth it; we should just choose one of them. As for which one, I'm torn. The single argument one is the most pragmatic, but changing types like has always bugged me. But as Martin points out, the `raise` syntax

[issue29668] f-strings don't change the values as expected.

2017-02-27 Thread Rafael Capucho
Rafael Capucho added the comment: Serhiy Storchaka, Thank you for your explanation. -- ___ Python tracker ___

[issue29668] f-strings don't change the values as expected.

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The expression is a concatenation of f-string expression f"SELECT COUNT(*) " and three string literals. If you want to substitute the "a" value, convert string literals into f-string expressions: query = (f"SELECT COUNT(*) " f"FROM `{a}` entry "

[issue29668] f-strings don't change the values as expected.

2017-02-27 Thread Rafael Capucho
Rafael Capucho added the comment: I got: SELECT COUNT(*) FROM `{a}` entry WHERE entry.type == 'device' AND entry.instance == {a} I expect the value of `{a}` changed, like: SELECT COUNT(*) FROM `some_underscored_value` entry WHERE entry.type == 'device' AND entry.instance ==

[issue28231] zipfile does not support pathlib

2017-02-27 Thread Berker Peksag
Berker Peksag added the comment: Note that Ned gave us a permission to get this into 3.6.1. -- ___ Python tracker ___

[issue29668] f-strings don't change the values as expected.

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What you get? What you expect? -- ___ Python tracker ___ ___

[issue28231] zipfile does not support pathlib

2017-02-27 Thread Steve Dower
Steve Dower added the comment: Why can't we fix this in 3.6? We were meant to support pathlike in that version, and this is an oversight, not a new feature. -- ___ Python tracker

[issue29668] f-strings don't change the values as expected.

2017-02-27 Thread Rafael Capucho
Rafael Capucho added the comment: ``` a = "some_underscored_value" u = (f" hello `{a}` cruel world" " hi") print(u) query = (f"SELECT COUNT(*) " "FROM `{a}` entry " "WHERE entry.type == 'device' " "AND entry.instance == {a}") print(query) ``` --

[issue28231] zipfile does not support pathlib

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I consider this a new feature. Some modules got the support of path-like objects for free after implementing the support of path-like objects in os, os.path and io modules. But others need additional work for implementing it, writing tests and

[issue29639] test suite intentionally avoids referring to localhost, destroying abstraction away from IPv6 vs IPv4

2017-02-27 Thread Steve Dower
Steve Dower added the comment: As far as I recall, there's a hosts file that resolves localhost to 127.0.0.1 on Windows, which means a user could break their own configuration if they so desired. Definitely on all supported versions we should be able to assume localhost can be resolved. I

[issue29668] f-strings don't change the values as expected.

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please provide your example as a text. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue29668] f-strings don't change the values as expected.

2017-02-27 Thread Rafael Capucho
New submission from Rafael Capucho: In the attached file, the lines 4 and 6 have the same structure, the line 4 changes the value of {a} properly, the line 6 didn't. Thank you. -- components: Interpreter Core files: crazy.png messages: 288649 nosy: Rafael Capucho priority: normal

[issue29667] socket module sometimes loses response packets

2017-02-27 Thread Bob Kline
New submission from Bob Kline: The socket module does not always return response packets which are successfully delivered to the client host. We ran into this problem with an HTTP request for which socket.recv() raised an exception instead of returning the 301 redirection response which the

[issue29655] Certain errors during IMPORT_STAR can leak a reference

2017-02-27 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +301 ___ Python tracker ___ ___

[issue29655] Certain errors during IMPORT_STAR can leak a reference

2017-02-27 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +300 ___ Python tracker ___ ___

[issue29666] Issue in enum documentation

2017-02-27 Thread Ethan Furman
Ethan Furman added the comment: `Flag` and `IntFlag` are indeed the correct (and missing) names. -- nosy: +ethan.furman ___ Python tracker ___

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2017-02-27 Thread Berker Peksag
Changes by Berker Peksag : -- versions: -Python 2.7 ___ Python tracker ___ ___

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2017-02-27 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2017-02-27 Thread Martijn Pieters
Changes by Martijn Pieters : -- pull_requests: +299 ___ Python tracker ___ ___

[issue29636] Specifying indent in the json.tool command

2017-02-27 Thread Daniel Himmelstein
Daniel Himmelstein added the comment: For discussion on how to implement this, see + https://github.com/python/cpython/pull/201#discussion_r102146742 + https://github.com/python/cpython/pull/201#discussion_r102840190 + https://github.com/python/cpython/pull/201#discussion_r102891428

[issue29636] Specifying indent in the json.tool command

2017-02-27 Thread Daniel Himmelstein
Changes by Daniel Himmelstein : -- pull_requests: -230 ___ Python tracker ___

[issue26389] Expand traceback module API to accept just an exception as an argument

2017-02-27 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > Another point is that it may be better to keep the existing parameter name > “value”, rather than (eventually?) replacing it with “exc”. I think both of > these things could be accomplished by juggling the “value” and “etype” > parameters: I agreed,

[issue29636] Specifying indent in the json.tool command

2017-02-27 Thread Daniel Himmelstein
Changes by Daniel Himmelstein : -- pull_requests: +298 ___ Python tracker ___

[issue29660] Document that print/format_exception ignore etype

2017-02-27 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +297 ___ Python tracker ___

[issue22594] Add a link to the regex module in re documentation

2017-02-27 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue29414] Change 'the for statement is such an iterator' in Tutorial

2017-02-27 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> patch review type: -> enhancement ___ Python tracker ___

[issue29455] Mention coverage.py in trace module documentation

2017-02-27 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> patch review versions: +Python 3.6, Python 3.7 ___ Python tracker ___

[issue24241] webbrowser default browser detection and/or public API for _trylist.

2017-02-27 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +296 ___ Python tracker ___ ___

[issue28609] argparse claims '*' positional argument is required in error output

2017-02-27 Thread Ben Hoyt
Ben Hoyt added the comment: I definitely agree with Reuben here -- I just ran into this issue while creating a "production quality" tool, and the help message produced by argparse with nargs='*' confused me too. It's pretty clear that this is a simple bug in argparse's production of that

[issue27788] platform module's version number doesn't match its docstring

2017-02-27 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +295 ___ Python tracker ___ ___

[issue28609] argparse claims '*' positional argument is required in error output

2017-02-27 Thread Ben Hoyt
Changes by Ben Hoyt : -- nosy: +benhoyt ___ Python tracker ___ ___ Python-bugs-list

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2017-02-27 Thread Martijn Pieters
Changes by Martijn Pieters : -- pull_requests: +294 ___ Python tracker ___ ___

[issue29666] Issue in enum documentation

2017-02-27 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Yup, `IntFlags` is a typo, that's why the reference to it doesn't show too. Also, the fourth enum must be `Flag` which must of been omitted when it was added in `3.6`. -- nosy: +Jim Fasarakis-Hilliard ___

[issue29665] how to edit or delete issues created by me in bug tracker ?!

2017-02-27 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29666] Issue in enum documentation

2017-02-27 Thread STINNER Victor
New submission from STINNER Victor: https://docs.python.org/dev/library/enum.html "This module defines four enumeration classes that can be used to define unique sets of names and values: Enum, IntEnum, and IntFlags" Enum, IntEnum, IntFlag: I count 3 classes, no 4? Moreover, the correct

[issue29658] Combining thread and process, process hangs (sometimes)

2017-02-27 Thread djstrong
djstrong added the comment: Thank you! I couldn't find information about first forking then launching threads. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue29639] test suite intentionally avoids referring to localhost, destroying abstraction away from IPv6 vs IPv4

2017-02-27 Thread Brian Curtin
Brian Curtin added the comment: I echo Paul. I think the last time I would have seen a problem was on Windows 2000, which is unsupported per PEP-11. +1 to using localhost -- nosy: +brian.curtin ___ Python tracker

[issue27840] functools.partial: don't copy keywoard arguments in partial_call()?

2017-02-27 Thread Berker Peksag
Berker Peksag added the comment: PR 253 has been merged. -- nosy: +berker.peksag resolution: -> rejected status: open -> closed ___ Python tracker ___

[issue29639] test suite intentionally avoids referring to localhost, destroying abstraction away from IPv6 vs IPv4

2017-02-27 Thread Paul Moore
Paul Moore added the comment: I have a vague recollection of once working on a (Windows) system that mis-resolved localhost. But it was a long time ago, and I'm 100% OK with calling such a system broken. +1 on using localhost -- ___ Python tracker

[issue28911] Clarify the behaviour of assert_called_once_with

2017-02-27 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: -153957 resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25452] Add __bool__() method to subprocess.CompletedProcess

2017-02-27 Thread STINNER Victor
STINNER Victor added the comment: For all reasons alread given in the previous comment and my comment below, I reject the proposed change. Serhiy> See also issue26748. Classes usually have True boolean value, but empty enum classes were False-y by accident. This was considered a bug.

[issue29664] zip() python 3 documentation not working at all !

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Your example works for me. >>> x = [1, 2, 3] >>> y = [4, 5, 6] >>> zipped = zip(x, y) >>> print(zipped) >>> print(list(zipped)) [(1, 4), (2, 5), (3, 6)] I guess you have overridden the builtin function "zip" by setting the global variable "zip". >>> zip =

[issue29663] Make collections.deque json serializable

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue20774. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> collections.deque should ship with a stdlib json serializer

[issue25452] Add __bool__() method to subprocess.CompletedProcess

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue26748. Classes usually have True boolean value, but empty enum classes were False-y by accident. This was considered a bug. -- ___ Python tracker

[issue29665] how to edit or delete issues created by me in bug tracker ?!

2017-02-27 Thread Muhammad Salem
Changes by Muhammad Salem : -- title: how to edit or delete issues created by me in bug tracker -> how to edit or delete issues created by me in bug tracker ?! ___ Python tracker

[issue29665] how to edit or delete issues created by me in bug tracker

2017-02-27 Thread Muhammad Salem
Changes by Muhammad Salem : -- nosy: Muhammad Salem priority: normal severity: normal status: open title: how to edit or delete issues created by me in bug tracker ___ Python tracker

[issue29664] zip() python 3 documentation not working at all !

2017-02-27 Thread Muhammad Salem
Muhammad Salem added the comment: --- TypeError Traceback (most recent call last) in () 6 x = [1, 2, 3] 7 y = [4, 5, 6] > 8 zip(x, y) TypeError: 'tuple' object is not

[issue27645] Supporting native backup facility of SQLite

2017-02-27 Thread Lele Gaifax
Lele Gaifax added the comment: Now that we are is officially on GH, would you welcome a PR rebasing this patch on top of the master branch? -- ___ Python tracker

[issue29664] zip() python 3 documentation not working at all !

2017-02-27 Thread Muhammad Salem
New submission from Muhammad Salem: this code from the python documentation itself not working! >>> x = [1, 2, 3] >>> y = [4, 5, 6] >>> zipped = zip(x, y) this code is copied from the python 3 official documentation itself even though it is working for me I am using python 3.5.2 on ubuntu

[issue29663] Make collections.deque json serializable

2017-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 This isn't really different that how we handle tuples and I can see that it would be useful to be able to dump a deque into JSON. I concur that it is reasonable to ignore maxlen because that is primarily a convenience feature (auto-popping on overflow)

[issue29663] Make collections.deque json serializable

2017-02-27 Thread Tarek Ziadé
New submission from Tarek Ziadé: collections.deque could be serialized in JSON as a simple array. The only thing we can lose in the process is the maxlen value, but I think it's a decent behaviour to ignore it when encoding and to set it to None when decoding. -- components: Library

[issue29639] test suite intentionally avoids referring to localhost, destroying abstraction away from IPv6 vs IPv4

2017-02-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure how much of the original analysis was right. I've just fired up a network-less Windows VM and 'localhost' seems to resolve just fine: >>> socket.gethostbyname('localhost') '127.0.0.1' >>> socket.getaddrinfo('localhost', 80, socket.AF_UNSPEC,

[issue29661] Typo in the docstring of timeit.Timer.autorange

2017-02-27 Thread Xiang Zhang
Xiang Zhang added the comment: Of course that is okay. I didn't do what you propose since I thought it's somewhat superfluous, what is returned is mentioned below. I choose 'calculate' when I see 'Automatically determine how many times to call timeit()' in the documentation. --

[issue25452] Add __bool__() method to subprocess.CompletedProcess

2017-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: > The change can break existing code that uses boolean testing > instead of checking for None. For this reason, I think Guido would oppose this proposal. In the past he has objected to iterators having a True boolean value to indicate that there were

[issue29661] Typo in the docstring of timeit.Timer.autorange

2017-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: How about: Return the number of loops and time taken so that total time >= 0.2. Instead of: Return the number of loops so that total time >= 0.2. The proposed "calculate" instead of "return" isn't really correct. -- nosy: +rhettinger

[issue29658] Combining thread and process, process hangs (sometimes)

2017-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Unless I'm misreading what you're trying to do, this doesn't seem like a bug to me. In general, when combining threading with multiple processes, the rule is to fork first and then launch threads (so that none of the thread ids or locks accidentally get

  1   2   >