[issue30640] NULL + 1 in _PyFunction_FastCallDict(), PyEval_EvalCodeEx()

2017-07-30 Thread Zackery Spytz
Zackery Spytz added the comment: As mentioned in PR 2919, this is an issue in PyEval_EvalCodeEx() as well. -- nosy: +ZackerySpytz title: NULL + 1 in _PyFunction_FastCallDict() -> NULL + 1 in _PyFunction_FastCallDict(), PyEval_EvalCodeEx() ___ Python

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

2017-07-30 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___

[issue31087] asyncio.create_subprocess_* do not honor `encoding`

2017-07-30 Thread Alex
Changes by Alex : -- components: +asyncio nosy: +yselivanov versions: +Python 3.6 ___ Python tracker ___

[issue31087] asyncio.create_subprocess_* do not honor `encoding`

2017-07-30 Thread Alex
New submission from Alex: Regardless of the value of `encoding`, StreamReaders returned for the `asyncio.subprocess.Process`'s `stdout` and `stderr` would be in binary mode. import sys import asyncio import subprocess async def main(): sp = await

[issue30987] Support for ISO-TP protocol in SocketCAN

2017-07-30 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3004 ___ Python tracker ___

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

2017-07-30 Thread Steven D'Aprano
Steven D'Aprano added the comment: If you don't care about the name, just pass '_' for it. -- nosy: +steven.daprano ___ Python tracker ___

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

2017-07-30 Thread Isaac Morland
Isaac Morland added the comment: Here is the diff. Note that I assume implementation of #31085, which allows me to push determination of a name for the namedtuple down into namedtuple itself: diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 62cf708..d507d23 100644

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

2017-07-30 Thread Isaac Morland
New submission from Isaac Morland: This is meant to replace my proposal in #30020 to change attrgetter to use namedtuple. By creating a new function implemented in Python, I avoid making changes to the existing attrgetter, which means that both the need of implementing a C version and the

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

2017-07-30 Thread Ned Deily
Changes by Ned Deily : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list

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

2017-07-30 Thread Isaac Morland
Isaac Morland added the comment: I'm hoping to make a pull request but while I figure that out here is the diff: diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 8408255..62cf708 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -384,7

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

2017-07-30 Thread Isaac Morland
New submission from Isaac Morland: I would like to have the possibility of creating a namedtuple type without explicitly giving it a name. I see two major use cases for this: 1) Automatic creation of namedtuples for things like CSV files with headers (see #1818) or SQL results (see #13299).

[issue26732] multiprocessing sentinel resource leak

2017-07-30 Thread Kevin Quick
Kevin Quick added the comment: Hi Antoine, > ... an implementation detail rather than a documented feature I understand your desire, but this is a leaky abstraction and I would still suggest that it should be more clear that the fork method will inherit *all* resources from the parent,

[issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog

2017-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Much easier the 2nd time ;-) -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog

2017-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 8c4e5be1dfb4d1c74e8cc7ac925e3196818e07ac by Terry Jan Reedy in branch '3.6': [3.6] bpo-31050: IDLE: Factor GenPage class from ConfigDialog (GH-2952) (#2955) https://github.com/python/cpython/commit/8c4e5be1dfb4d1c74e8cc7ac925e3196818e07ac

[issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog

2017-07-30 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +3003 ___ Python tracker ___ ___

[issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog

2017-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset e8eb17b2c11dcd1550a94b175e557c234a804482 by Terry Jan Reedy (csabella) in branch 'master': bpo-31050: IDLE: Factor GenPage class from ConfigDialog (#2952) https://github.com/python/cpython/commit/e8eb17b2c11dcd1550a94b175e557c234a804482

[issue30842] pyenv activate for bash and tcsh

2017-07-30 Thread Arnon Sela
Arnon Sela added the comment: The procedure: pushd $fullpath fullpath=$(pwd -P) popd Can be made sh (and other shells) friendly by: here=$PWD # or $(pwd) cd $fullpath fullpath=$(pwd -P) cd $here More to write, but should work, right? --

[issue31084] QueueHandler not formatting messages

2017-07-30 Thread favll
Changes by favll : -- pull_requests: +3001 ___ Python tracker ___ ___

[issue26617] Assertion failed in gc with __del__ and weakref

2017-07-30 Thread Alexander Mohr
Alexander Mohr added the comment: I'm tracking something very similar issue to this in bug: http://bugs.python.org/issue31061 Given its similarities, anyone have any ideas? Based on the second callstack I'm starting to think this is an issue with defaultdict -- nosy: +thehesiod

[issue31084] QueueHandler not formatting messages

2017-07-30 Thread favll
New submission from favll: QueueHandler does not seem to format messages when setting a Formatter and attaching the QueueHandler to a logger. See attachement for a concise example. According to the internal documentation of the QueueHandler's prepare method it is expected that

[issue31083] IDLE: document new TabPage(Frame) design for configdialog

2017-07-30 Thread Terry J. Reedy
New submission from Terry J. Reedy: We are in the process of moving blocks of ConfigDialog methods pertaining to one tab page to a separate class. FontPage is more or less done. GenPage is in process. This issue is about documenting the generic structure of the classes in a comment block.

[issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog

2017-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I intentionally left using non-default options other than traversal for a new issue or issues, after we finish ttk replacement. I imagine there will be discussions about choices, and I will invite other participants. I would like to direct visual design

[issue31061] asyncio segfault when using threadpool and "_asyncio" native module

2017-07-30 Thread Alexander Mohr
Alexander Mohr added the comment: btw got slightly difference stacktrace on second core file -- Added file: http://bugs.python.org/file47051/python crash2.txt ___ Python tracker

[issue31082] reduce takes iterable, not just sequence

2017-07-30 Thread Stefan Pochmann
New submission from Stefan Pochmann: functools.reduce has a parameter called "iterable" and it only needs to be an iterable, not a sequence. The paragraph documenting it says "sequence" instead of "iterable" six times: https://docs.python.org/3/library/functools.html#functools.reduce The help

[issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog

2017-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I did not refresh this before writing the above. It still applies, including deleting the commented out code once tests pass. See review. Whoops: I forgot that using make_default means that we can (and should) delete the replaced var_changed defs. I added

[issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog

2017-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Above, I left out the last step, "* remove old general block". The old configdialog had an unwritten and undocumented template and rules for pages on the dialog. It went something like the following. # def create_widgets(): * Pick names for the pages. They

[issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog

2017-07-30 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +3000 ___ Python tracker ___ ___

[issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog

2017-07-30 Thread Cheryl Sabella
Cheryl Sabella added the comment: Made all the changes without any issue. One thing - I noticed that the var_changed_autosave, etc for the General tab were back, even though they aren't used by VarTrace. I know I had deleted them, so I'm not sure how they came back. Unless you re-added

[issue31061] asyncio segfault when using threadpool and "_asyncio" native module

2017-07-30 Thread Alexander Mohr
Alexander Mohr added the comment: hmm, how would I do that? btw I'm not 100% sure this is due to asyncio. -- ___ Python tracker ___

[issue31061] asyncio segfault when using threadpool and "_asyncio" native module

2017-07-30 Thread Alexander Mohr
Alexander Mohr added the comment: this is the comment on the assert: /* Python's cyclic gc should never see an incoming refcount * of 0: if something decref'ed to 0, it should have been * deallocated immediately at that time. * Possible cause (if the assert triggers): a tp_dealloc *

[issue31061] asyncio segfault when using threadpool and "_asyncio" native module

2017-07-30 Thread Yury Selivanov
Yury Selivanov added the comment: >ok got a full debug core file, let me know what other information I can >provide. Thank you. Does the crash happen with python versions of Tasks and Future? -- ___ Python tracker

[issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog

2017-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: At last! On to the next one. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue30842] pyenv activate for bash and tcsh

2017-07-30 Thread Vinay Sajip
Vinay Sajip added the comment: Note that the activate script currently also works with /bin/sh (using . venv-dir/bin/activate) but pushd and popd are not supported there, and introducing them would presumably break this script on /bin/sh. -- ___

[issue31061] asyncio segfault when using threadpool and "_asyncio" native module

2017-07-30 Thread Alexander Mohr
Alexander Mohr added the comment: ok got a full debug core file, let me know what other information I can provide. -- status: closed -> open Added file: http://bugs.python.org/file47049/python crash.txt ___ Python tracker

[issue31081] Release Build Failure on Ubuntu 14.04

2017-07-30 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___

[issue31081] Release Build Failure on Ubuntu 14.04

2017-07-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, if it's really a compiler bug, there's nothing we can do against it. You should still be able to build without the --with-optimizations flag, which will give you a build perhaps 20% slower but still fully functional. --

[issue29256] Windows select() errors out when given no fds to select on, which breaks SelectSelector

2017-07-30 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> needs patch type: -> behavior ___ Python tracker ___

[issue31081] Release Build Failure on Ubuntu 14.04

2017-07-30 Thread Scott Colby
Scott Colby added the comment: You make a fair point. I didn't realize that my version of gcc was so far behind. Perhaps I ought to seek out a binary distribution of Python 3.6, since upgrading the whole of gcc doesn't seem quite worth my time. If you don't think there is anything else to be

[issue31081] Release Build Failure on Ubuntu 14.04

2017-07-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, as the log you posted shows, this seems to be a gcc bug. Of course, I don't know if the gcc project still accepts bug reports for gcc 4.8, but we're unlikely to be able to help you here. -- nosy: +pitrou ___

[issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog

2017-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 7582226a92481ca63dedbfe14ef465d1349d66a9 by Terry Jan Reedy in branch '3.6': [3.6] bpo-31004: IDLE: Factor out FontPage class from configdialog (step 1) (GH-2905) (#2950)

[issue31081] Release Build Failure on Ubuntu 14.04

2017-07-30 Thread Scott Colby
New submission from Scott Colby: After downloading and decompressing the latest 3.6.2 source release, I attempted to build as follows: $ ./configure --enable-optimizations --enable-ipv6 # seems fine $ make -s -j$(nproc) At the end of the build I have this error reported: Failed

[issue31079] mathematically wrong results from int and long bit_length methods

2017-07-30 Thread Stefan Krah
Stefan Krah added the comment: Thank you for your expertise. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue31079] mathematically wrong results from int and long bit_length methods

2017-07-30 Thread vinsci
vinsci added the comment: >>> (0).bit_length.__doc__ "int.bit_length() -> int\n\nNumber of bits necessary to represent self in binary.\n>>> bin(37)\n'0b100101'\n>>> (37).bit_length()\n6" The library documentation has clearly been written in disregard of the advertised functionality in the

[issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog

2017-07-30 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2999 ___ Python tracker ___ ___

[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset c9c85321df7803137a413d26db41aaa377b13d79 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30928: Update IDLE News.txt. (GH-2948) (#2949) https://github.com/python/cpython/commit/c9c85321df7803137a413d26db41aaa377b13d79 --

[issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog

2017-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 9397e2a87ed6e0e724ad71a0c751553620cb775e by Terry Jan Reedy (csabella) in branch 'master': bpo-31004: IDLE: Factor out FontPage class from configdialog (step 1) (#2905)

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

2017-07-30 Thread Preston Landers
New submission from Preston Landers: The function `logging.config.fileConfig` accepts `args` but it would be nice if it also accepted `kwargs`. A simple patch seems to do it: diff --git a/Lib/logging/config.py b/Lib/logging/config.py index d692514..4672b48 100644 ---

[issue31079] mathematically wrong results from int and long bit_length methods

2017-07-30 Thread Stefan Krah
Stefan Krah added the comment: Look at Include/longobject.h and https://docs.python.org/3/library/stdtypes.html?highlight=bit_length#int.bit_length . -- nosy: +skrah ___ Python tracker

[issue31079] mathematically wrong results from int and long bit_length methods

2017-07-30 Thread vinsci
New submission from vinsci: It takes as many bits to store the number 0 as the number 1, but the implementation claims it takes no bits at all to store a 0. >>> (1).bit_length() == (0).bit_length() and True or False False It takes one extra bit to store the sign for negative numbers, but this

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

2017-07-30 Thread paul j3
paul j3 added the comment: Another pre-existing namespace issue http://bugs.python.org/issue28734 When positional nargs='?' or '*', the default (or []) overwrites the namespace value. That's because the posiitonals are always 'seen' (by an empty string), and `get_values` has special

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

2017-07-30 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list

[issue29504] blake2: compile error with -march=bdver2

2017-07-30 Thread devurandom
Changes by devurandom : -- nosy: +devurandom ___ Python tracker ___ ___ Python-bugs-list

[issue24827] round(1.65, 1) return 1.6 with decimal

2017-07-30 Thread Huan Wang
Huan Wang added the comment: Hi Mark, Thank you for your reply. I went over again the answer from Zachary Ware published on 2015-08-08 09:36. I got the point that it is better to use string type of number. >>> from decimal import Decimal, ROUND_HALF_UP >>> Decimal("1.45") Decimal('1.45')

[issue24827] round(1.65, 1) return 1.6 with decimal

2017-07-30 Thread Mark Dickinson
Mark Dickinson added the comment: Huan, This isn't a bug: see the earlier comments from Zachary Ware on this issue for explanations. When you compute `rounded(1.45, 0.1)`, you convert the *float* 1.45 to a Decimal instance. Thanks to the What You See Is Not What You Get nature of binary

[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-07-30 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2998 ___ Python tracker ___ ___

[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset c3aa47f655abe564a2c2fb6d091ab19bdc0113b5 by Terry Jan Reedy in branch 'master': bpo-30928: Update IDLE News.txt. (#2948) https://github.com/python/cpython/commit/c3aa47f655abe564a2c2fb6d091ab19bdc0113b5 --

[issue30962] Add caching to logging.Logger.isEnabledFor()

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

[issue30522] Allow replacing a logging.StreamHandler's stream

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

[issue30522] Allow replacing a logging.StreamHandler's stream

2017-07-30 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 2543f50033208c1a8df04999082b11aa09e82a04 by Vinay Sajip in branch 'master': bpo-30522: Implemented a method to allow setting a logging.StreamHander's stream. (GH-2921)

[issue30962] Add caching to logging.Logger.isEnabledFor()

2017-07-30 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 78c18a9b9a1445f7c755929917a790ba02b4a5e0 by Vinay Sajip (Avram Lubkin) in branch 'master': bpo-30962: Added caching to Logger.isEnabledFor() (GH-2752) https://github.com/python/cpython/commit/78c18a9b9a1445f7c755929917a790ba02b4a5e0 --

[issue24827] round(1.65, 1) return 1.6 with decimal

2017-07-30 Thread Huan Wang
Huan Wang added the comment: Hello, I was confused by the decimal module. The problem is that I want to from decimal import Decimal, ROUND_HALF_UP def rounded(number, n): ''' Round the digits after the n_th decimal point by using decimal module in python. For example:

[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-07-30 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2997 ___ Python tracker ___ ___