[issue31085] Add option for namedtuple to name its result type automatically

2017-08-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: [R David Murray] > So I vote -0.5. Put me down for a full -1: * This would be a potentially confusing addition to the API. * It may also encourage bad practices that we don't want to see in real code. * We want to be able to search for the namedtuple

[issue29902] copy breaks staticmethod

2017-08-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't think it's too important, though most py3k warnings have been DeprecationWarning. You can think of it as deprecating a misfeature. -- ___ Python tracker

[issue31100] unable to open python

2017-08-01 Thread brobby crobby
brobby crobby added the comment: i get this message while using git bash $ python C:/Users/simrash2000/AppData/Local/Programs/Python/Python36/python.exe: error while loading shared libraries: api-ms-win-crt-heap-l1-1-0.dll: cannot open shared object file: No such file or directory --

[issue30841] Fix a variable shadowing warning in Python-ast.c

2017-08-01 Thread Yuan Chao Chou
Changes by Yuan Chao Chou : -- title: A shadowing variable naming emitted for Python-ast.c -> Fix a variable shadowing warning in Python-ast.c ___ Python tracker

[issue31100] unable to open python

2017-08-01 Thread Kenneth Griffin
New submission from Kenneth Griffin: tried installing multiple versions of 3.6 on windows. the installation works. However, when trying to put python --version in the command line of powershell, i get a pop up that says python has stopped working. -- components: Installation messages:

[issue30897] Add a is_mount() to pathlib

2017-08-01 Thread Łukasz Langa
Changes by Łukasz Langa : -- pull_requests: +3022 ___ Python tracker ___ ___

[issue31080] Allow `logging.config.fileConfig` to accept kwargs

2017-08-01 Thread Preston Landers
Changes by Preston Landers : -- pull_requests: +3021 ___ Python tracker ___ ___

[issue30897] Add a is_mount() to pathlib

2017-08-01 Thread Cooper Lees
Changes by Cooper Lees : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30897] Add a is_mount() to pathlib

2017-08-01 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 173ff4a58a6b337fe8a0eb44f211f33f278d3d5f by Łukasz Langa (Cooper Lees) in branch 'master': bpo-30897: Add is_mount() to pathlib.Path (#2669) https://github.com/python/cpython/commit/173ff4a58a6b337fe8a0eb44f211f33f278d3d5f --

[issue31099] Timer error pop from empty deque/list

2017-08-01 Thread Randy Henderson
Changes by Randy Henderson : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue31099] Timer error pop from empty deque/list

2017-08-01 Thread Randy Henderson
Randy Henderson added the comment: You're right. I was expecting the code in stmt to be run only once, but I just discovered in the documentation that the default is for it to be run one million times. I provided the argument 'number=1' to the timeit() method and am now getting the behavior I

[issue20849] add exist_ok to shutil.copytree

2017-08-01 Thread Ofek Lev
Changes by Ofek Lev : -- pull_requests: +3020 ___ Python tracker ___ ___

[issue31073] Change metadata handling in check command

2017-08-01 Thread Andrew Pinkham
Andrew Pinkham added the comment: Judging from Éric's reaction on Github, I suspect there may be some reticence to changing this code. I've sub-classed the check command in the project I'm working on to demonstrate what I would like the new behavior to be.

[issue31099] Timer error pop from empty deque/list

2017-08-01 Thread R. David Murray
R. David Murray added the comment: Perhaps I'm missing something, but isn't this to be expected? Timer will run d.popleft() repeatedly until you get the error you see because the list is empty. Are you thinking that setup is run each time? That would defeat its purpose. -- nosy:

[issue31036] building the python docs requires the blurb module

2017-08-01 Thread Julien Palard
Julien Palard added the comment: Still unfixed on docs.iad1.psf.io, the venv I modified is only used for sphinx and uses Python 2. If we can easily upgrade it to Python 3 we'll be able to pass it as the PYTHON parameter for make in docsbuild-script, allowing blurb to be found. see:

[issue31099] Timer error pop from empty deque/list

2017-08-01 Thread Randy Henderson
New submission from Randy Henderson: Even when a deque is populated in the Timer setup parameter, the interpreter gives "IndexError: pop from an empty deque". IndexError is generated for lists as well. >>> Timer(stmt='d.popleft()',setup='d=deque([1,2,3])',globals=globals()).timeit()

[issue31002] IDLE: Add tests for configdialog keys tab

2017-08-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Great. It is non-trivial, so I don't expect perfection first try. Please revise docstring with explanation of how page works, like with Font and General pages. I finished tests using those explanations as a guide. They are also a guide for review.

[issue31080] Allow `logging.config.fileConfig` to accept kwargs

2017-08-01 Thread Vinay Sajip
Vinay Sajip added the comment: Yes, seems reasonable, but don't change Misc/NEWS directly in your patch - this is now done using the "blurb" tool. Installed into a Python 3 environment using "pip install blurb". -- ___ Python tracker

[issue31051] IDLE, configdialog, General tab: re-arrange, test user entries

2017-08-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Given that I picked the page names without discussion, as part of quickly writing and merging the switch to Notebook (PR (to unblock the FontPage and GenPage conversion), I considered them subject to possible revision. I expect to review both the internal

[issue31088] regrtest.py: "${test_file_name} skipped" message printed twice for each ${test_file_name}

2017-08-01 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: This bug in output actually occurs in sequential mode. Apparently problem can be reproduced in 3.*, but only if Tools/scripts/run_tests.py is changed to run tests sequentially. (That problem reported as issue 31098.) Example from 3.7:

[issue31098] test target of Makefile always run tests in parallel mode

2017-08-01 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis: In CPython >=3.3, "test" target of Makefile calls Tools/scripts/run_tests.py script. This script contains: def is_multiprocess_flag(arg): return arg.startswith('-j') or arg.startswith('--multiprocess') ... def main(regrtest_args):

[issue1222585] C++ compilation support for distutils

2017-08-01 Thread Josef Kemetmüller
Changes by Josef Kemetmüller : Removed file: http://bugs.python.org/file47045/GARBAGE ___ Python tracker ___

[issue31097] itertools.islice not accepting np.int64

2017-08-01 Thread LB
LB added the comment: Hi Mark - I've done that here: https://github.com/matplotlib/matplotlib/issues/8973 Liam -- ___ Python tracker ___

[issue31085] Add option for namedtuple to name its result type automatically

2017-08-01 Thread R. David Murray
R. David Murray added the comment: The specialized use case is wanting to autogenerate a name with no other information provided. You suggested csv as one example where this would be used, but even in that case I'd rather see something based on the filename than a mashup of field names. I

[issue31084] QueueHandler not formatting messages

2017-08-01 Thread Vinay Sajip
Changes by Vinay Sajip : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue31084] QueueHandler not formatting messages

2017-08-01 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset adfe3440f65dfd6cf4463db6cd02cdc78e77ce17 by Vinay Sajip (favll) in branch 'master': bpo-31084: QueueHandler now formats messages correctly. (GH-2954) https://github.com/python/cpython/commit/adfe3440f65dfd6cf4463db6cd02cdc78e77ce17 --

[issue31097] itertools.islice not accepting np.int64

2017-08-01 Thread Mark Dickinson
Mark Dickinson added the comment: That actually looks as though it may be worth a bug report to the matplotlib folks. -- nosy: +mark.dickinson ___ Python tracker

[issue31002] IDLE: Add tests for configdialog keys tab

2017-08-01 Thread Cheryl Sabella
New submission from Cheryl Sabella: I'm working on the tests for this. -- nosy: +csabella ___ Python tracker ___

[issue31085] Add option for namedtuple to name its result type automatically

2017-08-01 Thread Isaac Morland
Isaac Morland added the comment: First, another note I would like to point out: this is much nicer to write within namedtuple than as a wrapper function because it is trivial to use the existing rename logic when needed, as seen in the diff I provided. I suppose I could write a wrapper which

[issue26253] tarfile in stream mode always set zlib compression level to 9

2017-08-01 Thread Yaron de Leeuw
Yaron de Leeuw added the comment: I have submitted a PR on GitHub https://github.com/python/cpython/pull/2962 -- nosy: +jarondl versions: +Python 3.7 -Python 3.6 ___ Python tracker

[issue31089] email.utils.parseaddr fails on odd double quotes in multiline header

2017-08-01 Thread R. David Murray
R. David Murray added the comment: Yes, that is mostly likely why parseaddr operates the way it does. The old email package does not do very much hand-holding, it expects you to understand the RFCs, which as you note is a rather daunting task. The new email package (the new policies) in

[issue31097] itertools.islice not accepting np.int64

2017-08-01 Thread LB
LB added the comment: Thanks Ray. The use case is here: https://stackoverflow.com/questions/45356718/saving-matplotlib-animation-leads-to-error/45438057#45438057 I'm going to suggest a workaround in matplotlib for the moment. Changing type in this use case shouldn't be a big issue, it only

[issue31085] Add option for namedtuple to name its result type automatically

2017-08-01 Thread R. David Murray
R. David Murray added the comment: I think the "vaguely" pretty much says it, and you are the at least the first person who has *requested* it :) This is one of those cost-versus-benefit calculations. It is a specialized use case, and in other specialized use cases the "automatically

[issue31097] itertools.islice not accepting np.int64

2017-08-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: See http://bugs.python.org/issue30537 -- nosy: +rhettinger ___ Python tracker ___

[issue31097] itertools.islice not accepting np.int64

2017-08-01 Thread LB
New submission from LB: The error arises when this code is used: itertools.islice( [3, 4, 5], np.int64(2) ) but not with this itertools.islice([3,4,5], 2) -- components: Library (Lib) messages: 299617 nosy: braaannigan priority: normal severity: normal status: open title:

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-01 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +3019 ___ Python tracker ___ ___

[issue31089] email.utils.parseaddr fails on odd double quotes in multiline header

2017-08-01 Thread Robert
Robert added the comment: RFC regarding this topic looks quite complicated to me, but I know that \r\n is used for line breaking in e-mail headers and \n is not. So in my opinion it shouldn't be treated the same like \n. The \r\n should be removed in parsed text, but \n should be preserved

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-01 Thread Alexander Mohr
Alexander Mohr added the comment: omg I just realized I need the default dict one too, great investigation work! -- ___ Python tracker ___

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-01 Thread INADA Naoki
INADA Naoki added the comment: Docs/extending/newtypes.rst and Docs/include/noddy3.c should be updated too. But I'm not good English writer. I need help. -- ___ Python tracker

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-01 Thread INADA Naoki
INADA Naoki added the comment: > should the base method which calls tp_dealloc do this? Maybe can kill all > birds with one stone. It may be possible, but unclear. Object finalization process is very complicated. I agree that UnTrack object as soon as refcnt=0, and Track only when

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-01 Thread Alexander Mohr
Alexander Mohr added the comment: actually another idea: could the PR for this also update https://docs.python.org/2/c-api/typeobj.html#c.PyTypeObject.tp_dealloc to mention about these macros and when they should be used? That, along with all the other locations correctly calling these

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2017-08-01 Thread Nathaniel Smith
Changes by Nathaniel Smith : -- nosy: +njs ___ Python tracker ___ ___ Python-bugs-list

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-01 Thread Alexander Mohr
Alexander Mohr added the comment: I suggest any places that don't need the calls should have comments so that future reviewers know why. -- ___ Python tracker

[issue31084] QueueHandler not formatting messages

2017-08-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list

[issue31096] asyncio.stream.FlowControlMixin._drain_helper may lead to a blocking behavior

2017-08-01 Thread Dmitry Malinovsky
New submission from Dmitry Malinovsky: When there is a huge amount of `writer.write` calls followed by `await writer.drain()` on a non-paused channel, and there are no other coroutine switches, `await writer.drain()` immediately returns without a switch. This is because

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka type: -> crash ___ Python tracker ___

[issue31012] suggestion: allow termination argument in argparse to be specified as argument

2017-08-01 Thread paul j3
paul j3 added the comment: argparse roughly follows POSIX practice: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html Guideline 10: The first -- argument that is not an option-argument should be accepted as a delimiter indicating the end of options. Any

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-01 Thread INADA Naoki
INADA Naoki added the comment: # _json module scanner_dealloc() encoder_dealloc() # _struct module unpackiter_dealloc # _ssl module context_dealloc() # Objects/ setiter_dealloc dictiter_dealloc dictview_dealloc # Parser/ ast_dealloc -- ___

[issue29902] copy breaks staticmethod

2017-08-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Benjamin for your review! But I have a design question. Is DeprecationWarning a correct warning type? DeprecationWarning is used when some feature less or more works in the current version, but will be removed in future releases. But pickling

[issue31051] IDLE, configdialog, General tab: re-arrange, test user entries

2017-08-01 Thread Louie Lu
Louie Lu added the comment: This may relate to #31050, I would like to propose to change the name `GenTab` to `GeneralTab`. `GenTab` is ambiguous to `GenerateTab` in the first glimpse. How do you think, Terry and Cheryl ? -- ___ Python tracker

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-01 Thread INADA Naoki
INADA Naoki added the comment: > dequeiter_dealloc doesn't call Untrack(), but it's safe because it only frees > deque > and deque_dealloc calls Untrack() It may be not true, while I don't have exploit yet. -- ___ Python tracker

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-01 Thread INADA Naoki
INADA Naoki added the comment: # collection module dequeiter_dealloc doesn't call Untrack(), but it's safe because it only frees deque and deque_dealloc calls Untrack() dequeiter_dealloc(dequeiterobject *dio) { Py_XDECREF(dio->deque); defdict_dealloc doesn't call

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2017-08-01 Thread Soujanya. Pasam
Soujanya. Pasam added the comment: I see test_cpickle failing with NPE while running the tests with IBM Java. Exception Stack Trace

[issue31086] Add namedattrgetter function which acts like attrgetter but uses namedtuple

2017-08-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry Issac, but I'm going to decline this feature request. I know you're enthusiastic about this or some other variation but I don't think it is worthy of becoming part of the standard library. I do encourage you to post this somewhere as recipe