[issue25544] cleanup temporary files in distutils.has_function

2016-04-04 Thread Min RK
Min RK added the comment: Absolutely, I'll try to do that tomorrow. -- ___ Python tracker ___ ___

[issue6953] readline documentation needs work

2016-04-04 Thread Berker Peksag
Berker Peksag added the comment: readline-doc.v3.patch looks good to me. -- stage: patch review -> commit review ___ Python tracker ___

[issue26693] Exception exceptions.AttributeError '_shutdown' in

2016-04-04 Thread Martin Panter
Martin Panter added the comment: I am seeing an AssertionError, but no AttributeError. In your original post you did mention AssertionError, but that contradicts the report title. Please clarify what the problem is. $ CFLAG="$(python3.5m-config --includes)" $ LDFLAG="$(python3.5m-config

[issue26693] Exception exceptions.AttributeError '_shutdown' in

2016-04-04 Thread Zachary Ware
Zachary Ware added the comment: After your `import threading` line, try `print(threading.__file__)`. The path should be something like `/usr/local/lib/python3.4/threading.py`; if it's not (particularly if the current directory is part of the path), you've found the source of your problem,

[issue25928] Add Decimal.as_integer_ratio()

2016-04-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think a new public method should have been added. Historically, we've been careful to not grow the API beyond what is in the spec or the dunder methods required to interface with standard Python. The feature creep is at odds with the intended goals

[issue26609] Wrong request target in test_httpservers.py

2016-04-04 Thread Xiang Zhang
Xiang Zhang added the comment: Get the slash prefixed path in Setup() is a good idea. I change the patch. I retain self.tempdir_name so we can use it in a test for no leading slash. The case creating index.html is OK with self.tempdir_name since we have changed our working directory to

[issue26693] Exception exceptions.AttributeError '_shutdown' in

2016-04-04 Thread skydoom
skydoom added the comment: This is how I compile my code: CFLAG is obtained from `python3.5m-config --includes` LDFLAG is obtained from `"python-3.5m-config --ldflags` g++ ${CFLAG} ${LDFLAG} test2.C I am running on Linux. -- ___ Python tracker

[issue26693] Exception exceptions.AttributeError '_shutdown' in

2016-04-04 Thread skydoom
New submission from skydoom: I did a search and find the issue 1947, however it's set to "not a bug". In its last note, it's suggested a 'packaging/environment issue'. But since I can reliably reproduce the issue with the "official python package"(that installed by the system, such as I am

[issue3213] "pydoc -p" should listen to [::] if IPv6 is supported

2016-04-04 Thread Martin Panter
Martin Panter added the comment: I understand Windows XP isn’t so important these days. So maybe we just need to disable IPV6_V6ONLY. (Unless we want this for 2.7 maybe?) -- stage: -> needs patch versions: +Python 3.6 -Python 3.3 ___ Python tracker

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2016-04-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: * For most users, this will just be noise (even the existing float method is rarely used). It is unimportant enough that Python existed without it for a very long time and it is unimportant enough that it didn't arise during the lengthy process of

[issue26692] cgroups support in multiprocessing

2016-04-04 Thread Satrajit Ghosh
New submission from Satrajit Ghosh: multiprocessing cpucount returns the number of cpus on the system as returned by /proc/cpuinfo. this is true even on machines where linux kernel cgroups is being used to restrict cpu usage for a given process. this results in significant thread swithcing

[issue25609] Add a ContextManager ABC and type

2016-04-04 Thread Brett Cannon
Brett Cannon added the comment: Tracker issue created and assigned. -- ___ Python tracker ___ ___

[issue26691] Update the typing module to match what's in github.com/python/typing

2016-04-04 Thread Brett Cannon
New submission from Brett Cannon: The code in Lib/typing.py is outdated compared to what's at github.com/python/typing. -- assignee: gvanrossum messages: 262879 nosy: brett.cannon, gvanrossum priority: normal severity: normal status: open title: Update the typing module to match what's

[issue25609] Add a ContextManager ABC and type

2016-04-04 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +Update the typing module to match what's in github.com/python/typing ___ Python tracker

[issue26632] __all__ decorator

2016-04-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Here's my implementation based on eryksun's idea: def public(thing=None, **kws): mdict = (sys._getframe(1).f_globals if thing is None else sys.modules[thing.__module__].__dict__) dunder_all = mdict.setdefault('__all__', [])

[issue3213] "pydoc -p" should listen to [::] if IPv6 is supported

2016-04-04 Thread Josh Lee
Changes by Josh Lee : -- nosy: +jleedev ___ Python tracker ___ ___ Python-bugs-list mailing

[issue24209] Allow IPv6 bind in http.server

2016-04-04 Thread Josh Lee
Changes by Josh Lee : -- nosy: +jleedev ___ Python tracker ___ ___ Python-bugs-list

[issue25609] Add a ContextManager ABC and type

2016-04-04 Thread Guido van Rossum
Guido van Rossum added the comment: No, but feel free to create one and assign it to me -- I will take care of the rest then. -- ___ Python tracker ___

[issue25609] Add a ContextManager ABC and type

2016-04-04 Thread Brett Cannon
Brett Cannon added the comment: Is there a tracking issue I can set as a dependency? -- ___ Python tracker ___

[issue24505] shutil.which wrong result on Windows

2016-04-04 Thread Bob Alexander
Bob Alexander added the comment: Oops, clarification... I just reread my kind of long previous post, and realized it wasn't very explicit that anything concerning file extensions or prepending the current directory to the PATH apply to Windows only; not Unix (of course). The "returning

[issue25609] Add a ContextManager ABC and type

2016-04-04 Thread Guido van Rossum
Guido van Rossum added the comment: I have some significant changes to typing.py (and test_typing.py) upstream in https://github.com/python/typing/. We should coordinate our changes to stdlib (test_)typing.py. -- ___ Python tracker

[issue25609] Add a ContextManager ABC and type

2016-04-04 Thread Brett Cannon
Brett Cannon added the comment: When I have a chance I'll do up a new patch where the definition of typing.ContextManager is guarded, add a What's New entry, and commit it. My planned guard will be: if hasattr(contextlib, 'AbstractContextManager'): class ContextManager(...): ...

[issue25609] Add a ContextManager ABC and type

2016-04-04 Thread Guido van Rossum
Guido van Rossum added the comment: (Everything else looks great BTW.) -- ___ Python tracker ___ ___

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-04 Thread Martin Panter
Martin Panter added the comment: Even if we can’t agree on any behaviour change, I think it might be worth documenting how these functions behave on exceptions (interrupts) other than TimeoutExpired. Currently all I can find is “If the timeout expires, the child process will be killed and

[issue25609] Add a ContextManager ABC and type

2016-04-04 Thread Guido van Rossum
Guido van Rossum added the comment: A slight problem is that I'd really like to keep the source of typing.py identical in Python 3.5 and 3.6. So maybe the definition should be conditional on the presence of AbstractContextManager? -- ___ Python

[issue21048] Index 'as' in import and with statements

2016-04-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Second try. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue12494] subprocess: check_output() doesn't close pipes on error

2016-04-04 Thread Martin Panter
Martin Panter added the comment: As I understand it, this change only made it to 3.3+ -- nosy: +martin.panter versions: -Python 2.7, Python 3.2 ___ Python tracker

[issue21048] Index 'as' in import and with statements

2016-04-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Test email to see if I can get tracker email at different address, now the google is dumping some tracker email. Issue selected as it is closed and I am only nosy listed. -- ___ Python tracker

[issue19944] Make importlib.find_spec load packages as needed

2016-04-04 Thread Eric Snow
Eric Snow added the comment: Yeah, I'm pretty sure that TODO is out of date. -- ___ Python tracker ___ ___

[issue26690] PyUnicode_Decode breaks when Python / sqlite3 is built with sqlite 3.12.0

2016-04-04 Thread mike bayer
mike bayer added the comment: i realized this is probably with my build overall. let me do some more testing and ill reopen if i can confirm this more closely. -- resolution: -> works for me status: open -> closed ___ Python tracker

[issue26690] PyUnicode_Decode breaks when Python / sqlite3 is built with sqlite 3.12.0

2016-04-04 Thread mike bayer
New submission from mike bayer: So I really don't know *where* the issue is in this one, because I don't know enough about the different bits. Step 1: Save this C program to demo.c: #include static PyObject * unicode_thing(PyObject *self, PyObject *value) { char *str; Py_ssize_t

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-04 Thread Sylvain Corlay
Sylvain Corlay added the comment: A new version of the patch using `NamedTemporaryFile` instead a the regular fdopen. -- Added file: http://bugs.python.org/file42367/has_flag.diff ___ Python tracker

[issue19944] Make importlib.find_spec load packages as needed

2016-04-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: pyclbr.py has this comment # XXX This will change once issue19944 lands. above the line that was changed by the patch applied. Am I correct in thinking that the comment is obsolete and should be removed? -- nosy: +terry.reedy

[issue26391] typing: Specialized sub-classes of Generic never call __init__

2016-04-04 Thread Guido van Rossum
Guido van Rossum added the comment: This is fixed upstream (https://github.com/python/typing/commit/8c6aaf30751fec28f1a7e467139ae23c9cc30c81). I'm keeping this open until I've merged typing.py into CPython 3.5 and 3.6. -- ___ Python tracker

[issue25987] collections.abc.Reversible

2016-04-04 Thread Guido van Rossum
Guido van Rossum added the comment: Done. Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue25987] collections.abc.Reversible

2016-04-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 07f73360ea8e by Guido van Rossum in branch 'default': Add collections.Reversible. Patch by Ivan Levkivskyi. Fixes issue #25987. https://hg.python.org/cpython/rev/07f73360ea8e -- nosy: +python-dev ___

[issue25987] collections.abc.Reversible

2016-04-04 Thread Guido van Rossum
Guido van Rossum added the comment: Looks good. I'll merge this in a sec. -- ___ Python tracker ___ ___

[issue26623] JSON encode: more informative error

2016-04-04 Thread Mahmoud Lababidi
Mahmoud Lababidi added the comment: Serhiy, I've attached a patch without the Object representation. Choose whichever you feel is better. -- Added file: http://bugs.python.org/file42366/json_encode.patch ___ Python tracker

[issue25544] cleanup temporary files in distutils.has_function

2016-04-04 Thread SilentGhost
SilentGhost added the comment: Hi Min RK, could you please update your patch so that it would cleanly apply to the tip of default branch. Also since you're re-writing a big chunk of that function, could I ask you to use with context manager for the temporary source file. -- nosy:

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-04 Thread SilentGhost
SilentGhost added the comment: I guess it would make sense to depend on issue25544 and implement the has_flag with minrk's patch in mind. I guess his patch didn't get a second look because it didn't apply cleanly. In any case, for implementing has_flag using current best practice is what I'd

[issue24505] shutil.which wrong result on Windows

2016-04-04 Thread Bob Alexander
Bob Alexander added the comment: Since there seems to be ongoing work on the "which" function, here are a few more thoughts on this function's future: - The existing version does not prepend the current directory to the path if it is already in the path. If the current directory is in

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-04 Thread Sylvain Corlay
Sylvain Corlay added the comment: @minrk submitted http://bugs.python.org/file40933/0001-cleanup-temporary-files-in-ccompiler.has_function.patch doing what you describe for `has_function`. I don't know much about the process to contribute to cpython. I would be glad to open a "PR"

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-04 Thread Robert Cope
Changes by Robert Cope : -- nosy: +rpcope1 ___ Python tracker ___ ___ Python-bugs-list

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2016-04-04 Thread Stefan Krah
Stefan Krah added the comment: I agree that Robert's "absurdity" argument was unfortunate and could be reversed: Many people would consider an (10).is_integer() method absurd. I'm also only moderately interested in OOP or classification in general, but we *do* have a numeric tower modeled

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-04 Thread SilentGhost
SilentGhost added the comment: I understand that you're copying approach of has_function, but shouldn't you remove this temporary file at the end of the function? Perhaps using tempfile.NamedTemporaryFile would be a better solution (both in has_flag and has_function). Also import can be moved

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2016-04-04 Thread Robert Smallshire
Robert Smallshire added the comment: To be clear, I'm not arguing that is_integer is in the same category as hex and fromhex; is_integer is a mathematical property of the number, whereas hex and from hex are representational. Nobody expects interoperability of string representations of the

[issue26257] Eliminate buffer_tests.py

2016-04-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And would be nice to backport these changes to 2.7. This will help backporting new future tests. -- assignee: -> martin.panter stage: patch review -> commit review ___ Python tracker

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2016-04-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I think the reasoning in http://bugs.python.org/issue1093 applies here as well. The need is insufficient to warrant inclusion in the numeric tower and propagation to types like int and Fraction. -- ___

[issue26257] Eliminate buffer_tests.py

2016-04-04 Thread Martin Panter
Martin Panter added the comment: Okay you convinced me to leave those methods in the same relative position as in your patch. I can sympathize with keeping the Mercurial history small. :) The only disadvantage is a couple extra microseconds wasted doing redundant tests. I will try and work on

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2016-04-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > the functions are so simple and self-explanatory > that API-complexity does not really increase. It increases complexity because it will show-up everywhere including places where it makes little sense. One place is int objects where its meaning and

[issue26257] Eliminate buffer_tests.py

2016-04-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Unfortunately Mercurial can't handle moving file fragments. The history of these methods will be lost. That is why I prefer the patch with minimal moving. Are there any disadvantages of having test_additional_(r)split() and test_strip() in BaseTest?

[issue23863] Fix EINTR Socket Module issues in 2.7

2016-04-04 Thread Robert Cope
Changes by Robert Cope : -- nosy: +rpcope1 ___ Python tracker ___ ___ Python-bugs-list

[issue13285] signal module ignores external signal changes

2016-04-04 Thread Robert Cope
Changes by Robert Cope : -- nosy: +rpcope1 ___ Python tracker ___ ___ Python-bugs-list

[issue26257] Eliminate buffer_tests.py

2016-04-04 Thread Martin Panter
Martin Panter added the comment: I see what you meant about making the diff smaller. However in your patch you also moved three extra methods into BaseTest: test_additional_(r)split() and test_strip(). I prefer to handle these three methods in a separate patch that deals with