[issue32532] improve sys.settrace and sys.setprofile documentation

2018-01-10 Thread Xiang Zhang
New submission from Xiang Zhang : I propose to mention the behaviour that "if exception raised in tracefunc or profilefunc, the handler will be unset" in the documentation of sys.settrace and sys.setprofile. I encounter this behaviour and surprised by it since I can't get

[issue32320] Add default value support to collections.namedtuple()

2018-01-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32320] Add default value support to collections.namedtuple()

2018-01-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 3948207c610e931831828d33aaef258185df31db by Raymond Hettinger in branch 'master': bpo-32320: Add default value support to collections.namedtuple() (#4859)

[issue32531] gdb.execute can not put string value.

2018-01-10 Thread callmekohei
New submission from callmekohei : Hello! I'm callmekohei! (^_^)/ Problems summary gdb.execute can not put string value. Steps to Reproduce // create $ gcc -g

[issue32530] How ro fix the chm encoding in Non western european codepage(cp1252) Windows

2018-01-10 Thread Hery
New submission from Hery : Start from Python 3.6.3, the offical chm document is full of corrputed character. Example: the first page which is `What’s New In Python 3.6` `’`is `0x92` in cp1252 and will not display correctly in non western european code page. An another

[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-10 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- pull_requests: -5006 ___ Python tracker ___ ___

[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-10 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: @bbayles: I don't think PR 5149 is related to this issue. -- ___ Python tracker ___

[issue13214] Cmd: list available completions from the cmd.Cmd subclass and filter out EOF handler(s)

2018-01-10 Thread Daniel
Daniel added the comment: If you write a handler for EOF like so: from cmd import Cmd class FooShell(Cmd): def do_EOF(self, args): # exit on EOF raise SystemExit() shell = FooShell() shell.cmdloop() Then when running the shell, you

[issue32529] Call readinto in shutil.copyfileobj

2018-01-10 Thread Martin Panter
Martin Panter added the comment: Looks like you want to use a "readinto" method to reduce data copying. One problem is that it is not specified exactly what kind of object "copyfileobj" supports reading from. The documentation only says "file-like". According to the

[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-10 Thread bbayles
Change by bbayles : -- pull_requests: +5006 ___ Python tracker ___ ___ Python-bugs-list

[issue32004] Allow specifying code packing order in audioop adpcm functions

2018-01-10 Thread Nick Coghlan
Nick Coghlan added the comment: Adjusting target versions, as even though the status quo leads to mishandling some input data, the fix is a feature request to make the behaviour configurable, which restricts the change to 3.7+. -- nosy: +ncoghlan versions:

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-10 Thread Nick Coghlan
Nick Coghlan added the comment: While I do think it makes sense to enhance `dis` in this regard, I'm also thinking it might be better to have that automatically fall back to a `python -m inspect module:qualname` style lookup in the event that `os.path.exists(infile)` is

[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +5005 ___ Python tracker ___ ___

[issue32529] improved shutil.py function

2018-01-10 Thread YoSTEALTH
New submission from YoSTEALTH : improved "copyfileobj" function to use less memory -- messages: 309784 nosy: YoSTEALTH priority: normal pull_requests: 5004 severity: normal status: open title: improved shutil.py function type: performance versions: Python 3.7

[issue32526] Closing async generator while it is running does not raise an exception

2018-01-10 Thread Nathaniel Smith
Nathaniel Smith added the comment: It looks like Python's tracking the "running" state of async generators wrong: we should have ag_running set to True when we enter asend/athrow/aclose and False when we exit, but instead it's being toggled back and forth on each *inner*

[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2cba6b85797ba60d67389126f184aad5c9e02ff3 by Victor Stinner in branch 'master': bpo-29240: readline now ignores the UTF-8 Mode (#5145) https://github.com/python/cpython/commit/2cba6b85797ba60d67389126f184aad5c9e02ff3

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-10 Thread Mario Corchero
Mario Corchero added the comment: Thanks Nick. I've sent patches for all of them but `dis`. `dis` does not "run" the code. Adding the -m option is basically identical to just running it on the __main__.py if the module is runnable or on the __init__ if it is not. If you

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2018-01-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -4951 ___ Python tracker ___

[issue32525] Empty tuples are not optimized as constant expressions

2018-01-10 Thread Brett Cannon
Change by Brett Cannon : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29137] Fix fpectl-induced ABI breakage

2018-01-10 Thread Nathaniel Smith
Nathaniel Smith added the comment: Yes, they're intentionally retained as no-ops, so that it remains possible to load old extensions that were compiled against an fpe build and refer to those symbols. Is there a problem? -- ___

[issue32528] Change base class for futures.CancelledError

2018-01-10 Thread Guido van Rossum
Guido van Rossum added the comment: I agree with Yury, this feels too risky to consider. The "except Exception: " code is at fault. -- ___ Python tracker

[issue32525] Empty tuples are not optimized as constant expressions

2018-01-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: This looks like it was already fixed in Python 3.7: $ ./python.exe Python 3.7.0a3+ (heads/master:7f7de371f9, Jan 6 2018, 21:35:03) [Clang 9.0.0 (clang-900.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for

[issue32528] Change base class for futures.CancelledError

2018-01-10 Thread Yury Selivanov
Yury Selivanov added the comment: While I understand the reasons for the proposed change, I'd still be -1 for it. Solely on the basis of "we don't know how much this change will break, but it will surely break something in very subtle ways". Another problem is that

[issue32528] Change base class for futures.CancelledError

2018-01-10 Thread Марк Коренберг
Марк Коренберг added the comment: Will you accept PR if I fix that ? I think we may merge that in Python 3.8 Who can also judge us? @asvetlov, what do you think about my idea ? -- ___ Python tracker

[issue32528] Change base class for futures.CancelledError

2018-01-10 Thread Yury Selivanov
Yury Selivanov added the comment: This is a backwards incompatible change. IMO it's too late to change this. -- ___ Python tracker

[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +5003 ___ Python tracker ___ ___

[issue22552] ctypes.CDLL returns singleton objects, resulting in usage conflicts

2018-01-10 Thread Ivan Pozdeev
Change by Ivan Pozdeev : -- type: crash -> behavior ___ Python tracker ___ ___

[issue31900] localeconv() should decode numeric fields from LC_NUMERIC encoding, not from LC_CTYPE encoding

2018-01-10 Thread STINNER Victor
STINNER Victor added the comment: I completed my change. It now fixes locale.localeconv(), str.format() for int, float, complex and decimal.Decimal: vstinner@apu$ ./python lc_numeric.py LC_CTYPE: ('fr_FR', 'ISO8859-1') LC_NUMERIC: ('es_MX', 'UTF-8') decimal_point:

[issue32528] Change base class for futures.CancelledError

2018-01-10 Thread Марк Коренберг
Change by Марк Коренберг : -- components: +Library (Lib) ___ Python tracker ___ ___

[issue31140] Insufficient error message with incorrect formated string literal

2018-01-10 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: I can confirm that the problem still exists in Python 3.6.4 and 3.7.0a4. Here is another way to demonstrate it: Create the following file test.py: # test hello = f"{world)}" Note that there is a syntax error in the f-string in

[issue32528] Change base class for futures.CancelledError

2018-01-10 Thread Марк Коренберг
Change by Марк Коренберг : -- type: -> enhancement ___ Python tracker ___ ___

[issue32528] Change base class for futures.CancelledError

2018-01-10 Thread Марк Коренберг
New submission from Марк Коренберг : I have discoverd one very ugly pattern connected with asyncio. Many times I see code like this: try: await something() except Exception: log.error('Opertaion failed -- will retry later.') Seems, everything is fine, but

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2018-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Please let's stick with PR 5006. -- ___ Python tracker ___

[issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE

2018-01-10 Thread STINNER Victor
STINNER Victor added the comment: > I prefer to close the issue and wait until more users ask for it before > considering again the patch, or find a different way to implement the feature > (support LC_NUMERIC and LC_CTYPE locales using a different encoding). Here

[issue29137] Fix fpectl-induced ABI breakage

2018-01-10 Thread Matthias Klose
Matthias Klose added the comment: reopening. this patch introduces two new symbols unconditionally, which were not defined for non-pyfpe builds before (PyFPE_counter and PyFPE_jbuf). -- nosy: +doko status: closed -> open ___ Python

[issue32527] windows 7 python 3.6 : after some security updates, import ibm_db fails

2018-01-10 Thread Christian Heimes
Christian Heimes added the comment: ibm_db is a third-party module. Please contact the authors of the module. The C code of the module has a bug. It's returning NULL without setting an exception with PyExc_*(). -- nosy: +christian.heimes

[issue32527] windows 7 python 3.6 : after some security updates, import ibm_db fails

2018-01-10 Thread Christian Heimes
Change by Christian Heimes : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___

[issue32007] nis module fails to build against glibc-2.26

2018-01-10 Thread Charalampos Stratakis
Change by Charalampos Stratakis : -- nosy: +cstratak ___ Python tracker ___ ___

[issue32527] windows 7 python 3.6 : after some security updates, import ibm_db fails

2018-01-10 Thread TJG
TJG added the comment: The error is coming from the extension module's "connect" function (which is the standard DB API entry point for Python database interfaces). Presumably from your description, some environmental situation leaves it with an unconsidered code path.

[issue29992] Expose parse_string in JSONDecoder

2018-01-10 Thread Adrián Orive
Adrián Orive added the comment: Third file -- Added file: https://bugs.python.org/file47376/__init__.py ___ Python tracker ___

[issue29992] Expose parse_string in JSONDecoder

2018-01-10 Thread Adrián Orive
Adrián Orive added the comment: Second file -- Added file: https://bugs.python.org/file47375/decoder.py ___ Python tracker ___

[issue32527] windows 7 python 3.6 : after some security updates, import ibm_db fails

2018-01-10 Thread Saba Kauser
New submission from Saba Kauser : Hello, I have a user who is complaining that python ibm_db module import fails after some windows 7 security update. I am not sure if this is a bug or some other setup issue but I could not find any other forum where I can post this

[issue29992] Expose parse_string in JSONDecoder

2018-01-10 Thread Adrián Orive
Adrián Orive added the comment: I found the same problem. My case seems to be less exotic, as what I'm trying to do is parse some of these strings into decimal.Decimal or datetime.datetime formats. Returning a decimal as a string is becoming quite common in REST APIs to

[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not using Windows, so I'm unable to test using pythonw. You'll have to provide a fix, or someone else will have to. -- ___ Python tracker

[issue18543] urllib.parse.urlopen shouldn't ignore installed opener when called with any SSL argument

2018-01-10 Thread Bernhard Reiter
Bernhard Reiter added the comment: Yesterday I ran into the same problem and I agree that it should be solved, by either documenting the issue or fixing it. As the code in https://github.com/python/cpython/blob/master/Lib/urllib/request.py#L199 still shows the branch

[issue32526] Closing async generator while it is running does not raise an exception

2018-01-10 Thread Joongi Kim
New submission from Joongi Kim : Here is the minimal example code: https://gist.github.com/achimnol/965a6aecf7b1f96207abf11469b68965 Just run this code using "python -m pytest -s test.py" to see what happens. (My setup uses Python 3.6.4 and pytest 3.3.2 on macOS High

[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2018-01-10 Thread Pox TheGreat
Pox TheGreat added the comment: Retested it with a freshly installed 3.6.4 version. Used the following code to test: import sys import multiprocessing def foo(): return 'bar' if __name__ == '__main__': proc = multiprocessing.Process(target=foo)

[issue32526] Closing async generator while it is running does not raise an exception

2018-01-10 Thread Joongi Kim
Change by Joongi Kim : -- components: asyncio nosy: achimnol, asvetlov, njs, yselivanov priority: normal severity: normal status: open title: Closing async generator while it is running does not raise an exception type: behavior versions: Python 3.6