[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-08 Thread Martin Panter
Martin Panter added the comment: Here is a patch including a unit test. I have only tested it on Linux. It would be awesome of other people could test it on other Unix platforms, in case the pseudoterminal stuff needs fixing. -- Added file:

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

2016-05-08 Thread James Tatum
James Tatum added the comment: FYI, NamedTemporaryFile doesn't work well with Windows. There are a handful of issues about it. -- nosy: +James.Tatum ___ Python tracker

[issue26982] Clarify forward annotations in PEP 484

2016-05-08 Thread Guido van Rossum
Changes by Guido van Rossum : -- assignee: docs@python -> gvanrossum nosy: +gvanrossum ___ Python tracker ___

[issue18531] Undocumented different between METH_KEYWORDS and **kws

2016-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Now this is just the documentation issue. I think the change of the behavior in 3.6 should be documented too, but I even don't know where. -- ___ Python tracker

[issue23213] subprocess communicate() hangs when stderr isn't closed

2016-05-08 Thread Martin Panter
Martin Panter added the comment: I suggest closing this. Depending on what the daemons are supposed to do, I think this is either a bug with “systemd” and PHP holding onto stderr when they become daemons, or a bug/misunderstanding with how Thomas was using the subprocess module and

[issue18531] Undocumented different between METH_KEYWORDS and **kws

2016-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I'm not sure PyObject_GetItem instead of PyDict_GetItem in 3.x completely > explains things, because the code in issue 6081 also works in 2.7. It doesn't work to me in current develop 2.7.11+. What version did you test? --

[issue6445] Add check parameter to subprocess.Popen.communicate

2016-05-08 Thread Martin Panter
Martin Panter added the comment: According to PEP 375, 3.1 was out on 27 June 2009, just before this report was opened (9 July). So perhaps OG7 wasn’t aware of check_output() at the time. But it sounds like they did want CalledProcessError to be raised. I suggest to close this, unless there

[issue26982] Clarify forward annotations in PEP 484

2016-05-08 Thread James Tatum
Changes by James Tatum : Removed file: http://bugs.python.org/file42786/forward_references.patch ___ Python tracker ___

[issue26982] Clarify forward annotations in PEP 484

2016-05-08 Thread James Tatum
Changes by James Tatum : Added file: http://bugs.python.org/file42787/forward_references.patch ___ Python tracker ___

[issue25901] `make test` crashes in test_httpservers

2016-05-08 Thread Martin Panter
Martin Panter added the comment: It is not clear what compiler options you changed (you just gave the entire link command lines). Does the crash occur every time, or only once? Does it occur if you run test_httpservers alone, without the other tests: ./python Tools/scripts/run_tests.py

[issue26982] Clarify forward annotations in PEP 484

2016-05-08 Thread James Tatum
Changes by James Tatum : Added file: http://bugs.python.org/file42786/forward_references.patch ___ Python tracker ___

[issue26982] Clarify forward annotations in PEP 484

2016-05-08 Thread James Tatum
Changes by James Tatum : Removed file: http://bugs.python.org/file42785/forward_references.patch ___ Python tracker ___

[issue26982] Clarify forward annotations in PEP 484

2016-05-08 Thread James Tatum
New submission from James Tatum: In https://github.com/python/typeshed/issues/180, we discussed a slight ambiguity with PEP 484's mention of forward references. It wasn't entirely clear that they don't apply unless using function annotations. This patch attempts to clear up the ambiguity.

[issue25901] `make test` crashes in test_httpservers

2016-05-08 Thread ppperry
Changes by ppperry : -- title: make test crash in test_httpservers -> `make test` crashes in test_httpservers ___ Python tracker ___

[issue26981] add compatibility shim for enum34 backport

2016-05-08 Thread Ethan Furman
Ethan Furman added the comment: It would, but that's not what we did. Currently we have _name_ and _value_; the backport uses __order__ because I didn't want the stdlib version having a hairball when someone tried to use a 2.7 Enum in 3.4 and it didn't occur to me at the time to just add and

[issue26981] add compatibility shim for enum34 backport

2016-05-08 Thread Eric V. Smith
Eric V. Smith added the comment: Doesn't namedtuple use _fields (as opposed to _fields_) for a similar purpose? Would Enum using _order be more consistent with that? -- nosy: +eric.smith ___ Python tracker

[issue26981] add compatibility shim for enum34 backport

2016-05-08 Thread Ethan Furman
New submission from Ethan Furman: _sunder_ methods are reserved for internal Enum use, and if the user tries to use any an exception is raised. Consequently, the enum34 backport uses __order__ instead of _order_ to specify a definition order for its members. I would like to do two things:

[issue26969] ascynio should provide a policy to address pass-loop-everywhere problem

2016-05-08 Thread Guido van Rossum
Guido van Rossum added the comment: No, that specifically sounds like asking for trouble to me. You don't know what else that coroutine is waiting for, and it may be waiting for some I/O whose socket is registered with the other event loop. Since the other event loop won't make progress, you'd

[issue26969] ascynio should provide a policy to address pass-loop-everywhere problem

2016-05-08 Thread Guido van Rossum
Guido van Rossum added the comment: PS. If you have something you sometimes want to run synchronously and sometimes as a coroutine, you probably need to refactor it somehow. -- ___ Python tracker

[issue18531] Undocumented different between METH_KEYWORDS and **kws

2016-05-08 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure PyObject_GetItem instead of PyDict_GetItem in 3.x completely explains things, because the code in issue 6081 also works in 2.7. But I don't think it's terribly important in any event, as long as we understand the 3.x difference. Thanks for

[issue26512] Vocabulary: Using "integral" in library/stdtypes.html

2016-05-08 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26980] The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented

2016-05-08 Thread texttheater
New submission from texttheater: The documentation does not say what this argument is for. It says "See the BaseEventLoop.create_connection() method for parameters", but that method does not have a path argument. The argument seems to be required unless the keyword argument sock is given.

[issue25745] Reference leaks in test_curses

2016-05-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue25745] Reference leaks in test_curses

2016-05-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset afed12943ddd by Serhiy Storchaka in branch '3.5': Issue #25745: Fixed leaking a userptr in curses panel destructor. https://hg.python.org/cpython/rev/afed12943ddd New changeset 1662b41e1663 by Serhiy Storchaka in branch '2.7': Issue #25745: Fixed

[issue26736] Use HTTPS protocol in links

2016-05-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26881] modulefinder should reuse the dis module

2016-05-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26881] modulefinder should reuse the dis module

2016-05-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3579cdaf56d9 by Serhiy Storchaka in branch '3.5': Issue #26881: The modulefinder module now supports extended opcode arguments. https://hg.python.org/cpython/rev/3579cdaf56d9 New changeset c27e3773d0f9 by Serhiy Storchaka in branch 'default': Issue

[issue26967] argparse: allow_abbrev=False stops -vv from working

2016-05-08 Thread paul j3
paul j3 added the comment: Someone needs to take the current argparse.py, set the default value of this parameter to False, and run the unittest file. This should turn up this case, and possibly others that fail when abbreviations are turned off. Then we have to debate whether such failures

[issue18531] Undocumented different between METH_KEYWORDS and **kws

2016-05-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset e4835b1ed7b1 by Serhiy Storchaka in branch 'default': Issue #18531: Single var-keyword argument of dict subtype was passed https://hg.python.org/cpython/rev/e4835b1ed7b1 -- nosy: +python-dev ___ Python

[issue26632] __all__ decorator

2016-05-08 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: One more diff. As I was working on tests, I realized that the decorator version wasn't returning the thing it was decorating. Changing this also allowed me to simplify the exit path. I should be putting up a PyPI package soon which implements this for

[issue26952] argparse help formatter crashes

2016-05-08 Thread paul j3
paul j3 added the comment: Argument Groups are not designed for nesting, and despite their names and subclassing, Mutually exclusive groups and Argument Groups are not meant to be used together (with one exception). I agree that the error is obscure, but it occurs in a particularly fragile

[issue21012] Figure out how to best leverage pip in devinabox

2016-05-08 Thread Brett Cannon
Brett Cannon added the comment: Devinabox has moved to its own project at https://github.com/python/devinabox/issues/3 -- resolution: -> third party status: open -> closed ___ Python tracker

[issue23721] Set up a daily test coverage run

2016-05-08 Thread Brett Cannon
Brett Cannon added the comment: Devinabox now lives at https://github.com/python/devinabox -- ___ Python tracker ___

[issue26967] argparse: allow_abbrev=False stops -vv from working

2016-05-08 Thread paul j3
Changes by paul j3 : -- priority: normal -> high ___ Python tracker ___ ___

[issue26967] argparse: allow_abbrev=False stops -vv from working

2016-05-08 Thread paul j3
paul j3 added the comment: It's been 2 years since I worked on this patch. In the issue discussion http://bugs.python.org/issue14910 there was no mention of short v long options. The unit tests only look at longs. The result is that with the abbrev off, it disables all use of combined

[issue18531] Undocumented different between METH_KEYWORDS and **kws

2016-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: str.format() uses PyDict_GetItem() in 2.7, but PyObject_GetItem() in 3.x. A comment before: /* Use PyObject_GetItem instead of PyDict_GetItem because this code is no longer just used with kwargs. It might be passed a non-dict

[issue26973] Dict View binops permit non-set types

2016-05-08 Thread R. David Murray
R. David Murray added the comment: In any case I think the backward compatibility argument torpedoes making the views more restrictive. Since you agree there's no real consensus on python-ideas, I'm going to close this. If there is some other consistency change that seems to make sense and

[issue26798] add BLAKE2 to hashlib

2016-05-08 Thread Dmitry Chestnykh
Dmitry Chestnykh added the comment: > I have replaced verify() with compare_digest(). +>>> compare_digesty(cookie, '0102030405060708090a0b0c0d0e0f00') Typo here. Also, this doesn't look like it compares the digest. Maybe you can keep the verify() function, but make it use compare_digest()

[issue26156] Bad name into power operator syntax

2016-05-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue26156] Bad name into power operator syntax

2016-05-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset e876ff4e9e95 by Serhiy Storchaka in branch '3.5': Issue #26156: Make expressions grammar description more semantically correct. https://hg.python.org/cpython/rev/e876ff4e9e95 New changeset 61e3160310ae by Serhiy Storchaka in branch 'default': Issue

[issue26732] multiprocessing sentinel resource leak

2016-05-08 Thread Camilla Montonen
Changes by Camilla Montonen : -- nosy: +Winterflower ___ Python tracker ___ ___

[issue26156] Bad name into power operator syntax

2016-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think "await_expr" is good. It is not new that the keyword is a part of the grammar symbol name (yield_expression, comp_for, and_expr, or_test, lambda_expr). -- assignee: docs@python -> serhiy.storchaka ___

[issue14936] PEP 3121, 384 refactoring applied to curses_panel module

2016-05-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> resolved ___ Python tracker ___ ___

[issue14936] PEP 3121, 384 refactoring applied to curses_panel module

2016-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This patch made the "_curses_panel.curses panel" type callable. Created objects were in inconsistent state and using them caused a crash. This bug is fixed in issue23815. Opened issue26979 for documenting the catch. -- nosy: +serhiy.storchaka

[issue15721] PEP 3121, 384 Refactoring applied to tkinter module

2016-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed in issue23815. Opened issue26979 for documenting the catch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue23815] Segmentation fault when create _tkinter objects

2016-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: After looking closer I found that making PyType_FromSpec() not inheriting tp_new for static types whose base class is 'object' is not an option, because this breaks examples in the documentation, and likely break some third-party code. Opened new issue26979

[issue26979] The danger of PyType_FromSpec()

2016-05-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: There is a catch when convert static types to dynamic types using PyType_FromSpec(). tp_new is not inherited for static types whose base class is 'object' (see a comment in inherit_special() in Objects/typeobject.c:4569 for explanation). Such types left

[issue19717] resolve() fails when the path doesn't exist

2016-05-08 Thread Davide Rizzo
Changes by Davide Rizzo : -- nosy: +davide.rizzo ___ Python tracker ___ ___

[issue26798] add BLAKE2 to hashlib

2016-05-08 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your review, Dmitry. I have replaced verify() with compare_digest(). Python requires a C89 compatible compiler and 32bit architecture. C89 doesn't mandate 64bit integers. As far as I remember there is (or was) one buildbot with a compiler, that

[issue23815] Segmentation fault when create _tkinter objects

2016-05-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset cd25508c62fc by Serhiy Storchaka in branch '3.5': Issue #23815: Fixed crashes related to directly created instances of types in https://hg.python.org/cpython/rev/cd25508c62fc New changeset 1c6326e81c33 by Serhiy Storchaka in branch 'default': Issue

[issue26976] pathlib equivalent for os.path.realpath()

2016-05-08 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue26978] Implement pathlib.Path.link (Using os.link)

2016-05-08 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +pitrou type: -> enhancement ___ Python tracker ___ ___

[issue26978] Implement pathlib.Path.link (Using os.link)

2016-05-08 Thread Ram Rachum
Changes by Ram Rachum : -- components: Library (Lib) nosy: cool-RR priority: normal severity: normal status: open title: Implement pathlib.Path.link (Using os.link) versions: Python 3.6 ___ Python tracker

[issue26974] Crash in Decimal.from_float

2016-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The second patch converts an instance of float subclass to exact float. Disadvantages are that this changes behavior ignoring overriding as_integer_ratio() and __abs__() and slightly slows down Python implementation. Advantages are that this fixes also

[issue23640] int.from_bytes() is broken for subclasses

2016-05-08 Thread Ethan Furman
Ethan Furman added the comment: With the patch: --> import enum --> class Huh(enum.IntEnum): ... blah = 2 ... --> Huh.blah.from_bytes(b'\04', 'big') Traceback (most recent call last): File "", line 1, in File "/home/ethan/source/python/issue23640/Lib/enum.py", line 222,

[issue23640] int.from_bytes() is broken for subclasses

2016-05-08 Thread Ethan Furman
Ethan Furman added the comment: I think the classmethod-as-constructor behavior is correct, so it's up to IntEnum (or EnumMeta, or foo, or ...), to work around the issue. -- ___ Python tracker

[issue23640] int.from_bytes() is broken for subclasses

2016-05-08 Thread Ethan Furman
Ethan Furman added the comment: 'from_bytes' is a classmethod. As such, it should return the same type as the class it is called on. If that wasn't the intent it would be a staticmethod instead. It is the responsibility of the subclass to override base class behavior, not the other way

[issue26974] Crash in Decimal.from_float

2016-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are two alternative patches that fix the crash. The first patch adds checks for as_integer_ratio() result. The only disadvantage is that error messages are quite arbitrary and differ from error messages in Python version. -- keywords: +patch

[issue23228] The tarfile module crashes when tarfile contains a symlink and unpack directory contain it too

2016-05-08 Thread Lars Gustäbel
Lars Gustäbel added the comment: I suck :-) It is hg revision bb94f6222fef. -- ___ Python tracker ___ ___

[issue23228] The tarfile module crashes when tarfile contains a symlink and unpack directory contain it too

2016-05-08 Thread Lars Gustäbel
Lars Gustäbel added the comment: TarFile.makelink() has a fallback mode in case the platform does not support links. Instead of a symlink or a hardlink it extracts the file it points to as long as it exists in the current archive. More precisely, makelink() calls os.symlink() and if one of

[issue26855] android: add platform.android_ver()

2016-05-08 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Android framework provides an SDK_INT field [1], which parses the value of `ro.build.version.sdk` and defaults to 0 if failed [2]. Should android_ver() return an integer for the `sdk` field, too? It simplifies the usage in #26935 and similar ones. [1]

[issue26935] android: test_os fails

2016-05-08 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: My implementation at #26855 returns a tuple of strings like other funcitons, including java_ver() and mac_ver(). Maybe it requires a change. -- nosy: +Chi Hsuan Yen ___ Python tracker

[issue26282] Add support for partial keyword arguments in extension functions

2016-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: On new patch applied Martin's suggestions, added entities in What's New and NEWS, added a reference to the glossary, and improved error message. -- Added file: http://bugs.python.org/file42779/pyarg_parse_positional_only_and_keywords_3.patch

[issue26975] Decimal.from_float works incorrectly for non-binary floats

2016-05-08 Thread Mark Dickinson
Mark Dickinson added the comment: > I see following ways to resolve this issue: I don't think 4. is an option: for input of exact type float, from_float should continue to produce the exact value of the float, rather than an approximation to that exact value. There's code out there that

[issue26798] add BLAKE2 to hashlib

2016-05-08 Thread Dmitry Chestnykh
Dmitry Chestnykh added the comment: Christian: yes, and I'm also happy that you kept the drawing of hash tree, as it helps a lot with understanding of terminology. I had a quick look at the patch and it looks good to me. Some comments, which you can ignore: In keyed hashing example there's:

[issue26975] Decimal.from_float works incorrectly for non-binary floats

2016-05-08 Thread Stefan Krah
Stefan Krah added the comment: As Mark hinted at, many people would say there is no issue at all. Subclassing like that often breaks the Liskov Substitution Principle. For more information, see e.g.: http://okmij.org/ftp/Computation/Subtyping/ "Alas, LSP when considered from an OOP point

[issue22274] subprocess.Popen(stderr=STDOUT) fails to redirect subprocess stderr to stdout

2016-05-08 Thread Martin Panter
Martin Panter added the comment: I think this patch is pretty good. I will try to commit it in the next few days. -- nosy: +martin.panter versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker

[issue26975] Decimal.from_float works incorrectly for non-binary floats

2016-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Once I was going to propose to make as_integer_ratio() returning a pair (n, d) with minimal positive d that n/d (as float) is exactly equal to the original float. I think this is legitimate implementation and doesn't contradict the documentation. I see

[issue26798] add BLAKE2 to hashlib

2016-05-08 Thread Christian Heimes
Christian Heimes added the comment: Here is my first patch. I have tested it on X86_64 (m64 and m32) and ARMv7. It should compile on Windows but I don't have a working Windows box on my box. Dmitry, I have copied your documentation. Are you fine with that? TODO: - set BLAKE2_USE_SSE on

[issue22274] subprocess.Popen(stderr=STDOUT) fails to redirect subprocess stderr to stdout

2016-05-08 Thread Akira Li
Akira Li added the comment: Updated the patch to address vadmium's review comments. -- versions: -Python 3.4 Added file: http://bugs.python.org/file42777/subprocess-stderr_redirect_with_no_stdout_redirect-2.diff ___ Python tracker

[issue26976] pathlib equivalent for os.path.realpath()

2016-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue19717. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> resolve() fails when the path doesn't exist ___ Python tracker

[issue26977] Unnecessary line in statistics.pvariance

2016-05-08 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed ___ Python tracker ___ ___

[issue26977] Unnecessary line in statistics.pvariance

2016-05-08 Thread Steven D'Aprano
Steven D'Aprano added the comment: Thanks Ian! I can't believe I looked at that function earlier today and couldn't see that! -- nosy: +steven.daprano stage: -> resolved status: open -> closed ___ Python tracker

[issue26977] Unnecessary line in statistics.pvariance

2016-05-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2bf4a02f3570 by Steven D'Aprano in branch 'default': Issue 26977, remove unneeded line in pvariance (duplicate call to _ss). https://hg.python.org/cpython/rev/2bf4a02f3570 -- nosy: +python-dev ___ Python

[issue26512] Vocabulary: Using "integral" in library/stdtypes.html

2016-05-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9e29034a41fa by Martin Panter in branch '3.5': Issue #26512: Clarify Integral; tidy up table of rounding functions https://hg.python.org/cpython/rev/9e29034a41fa New changeset a8883951b2ff by Martin Panter in branch 'default': Issue #26512: Merge

[issue26977] Unnecessary line in statistics.pvariance

2016-05-08 Thread Ian Foote
New submission from Ian Foote: In statistics.pvariance, the sum of squares helper function (_ss) is called twice and the first return value is unused: https://github.com/python/cpython/blob/9043c80b0daaddb5bff1e37432d503910506727f/Lib/statistics.py#L596 -- components: Library (Lib)

[issue26924] android: test_concurrent_futures fails

2016-05-08 Thread Xavier de Gaye
Xavier de Gaye added the comment: > # undef sem_open I meant of course: # undef HAVE_SEM_OPEN -- ___ Python tracker ___

[issue26976] pathlib equivalent for os.path.realpath()

2016-05-08 Thread Davide Rizzo
Changes by Davide Rizzo : -- type: -> enhancement ___ Python tracker ___ ___

[issue26924] android: test_concurrent_futures fails

2016-05-08 Thread Xavier de Gaye
Xavier de Gaye added the comment: Undefining the SEM_* macros in multiprocessing.h when __ANDROID__ is set, would allow for an easier update when those functions become implemented at a future API level. The __ANDROID_API__ macro can be used for that purpose. For example, if this happens at

[issue26976] pathlib equivalent for os.path.realpath()

2016-05-08 Thread Davide Rizzo
New submission from Davide Rizzo: pathlib doesn't provide an exact replacement for os.path.realpath(). Path.resolve() is the closest equivalent, but differs in behavior in one case: when the path does not exist. >>> os.path.realpath('/foo') '/foo' >>> Path('/foo').resolve() Traceback (most

[issue26935] android: test_os fails

2016-05-08 Thread Martin Panter
Martin Panter added the comment: Yes something like that should do the trick -- components: +Tests -Cross-Build, Library (Lib) dependencies: +android: add platform.android_ver() ___ Python tracker

[issue11063] uuid.py module import has heavy side effects

2016-05-08 Thread Martin Panter
Martin Panter added the comment: There is already Issue 20519 for that, although it looks like the proposed patch keeps ctypes as a fall-back. (My interest here is only theoretical.) -- ___ Python tracker

[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-05-08 Thread Christian Heimes
Christian Heimes added the comment: Larry, I'm with Gregory. There is no good reason to add SHA3 to Python 2.7. The SHA-2 family is still safe. Besides I'd rather add BLAKE2 to Python 2.7. It's much faster and more versatile than SHA3. Antoine, SHAKEs are XOF (extensible output function).

[issue26935] android: test_os fails

2016-05-08 Thread Xavier de Gaye
Xavier de Gaye added the comment: Since this seems to be fixed in a version of android that is more recent that API 21, maybe use the value of 'sdk.release' when platform.android_ver() is available after issue #26855 is fixed, with for example, if this is fixed at API 23: sdk_release =

[issue26975] Decimal.from_float works incorrectly for non-binary floats

2016-05-08 Thread Stefan Krah
Stefan Krah added the comment: It seems to work correctly here for non-binary floats: >>> from _pydecimal import Decimal >>> Decimal.from_float(Decimal("1.2")) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.6/_pydecimal.py", line 739, in from_float

[issue11063] uuid.py module import has heavy side effects

2016-05-08 Thread Christian Heimes
Christian Heimes added the comment: It sounds like ctypes is causing you some headache. How about we get rid of ctypes for uuid and replace it with a simple implementation in C instead? Autoconf (configure) can take care of the library detection easily. --

[issue26826] Expose new copy_file_range() syscall in os module.

2016-05-08 Thread Martin Panter
Martin Panter added the comment: There’s still something funny about your patches: the last one has a bit of configure script at the end of the posixmodule.c diff. One other thing I thought of: “in” is not a practical keyword argument name in Python, because it is a reserved word. Yes,

[issue26282] Add support for partial keyword arguments in extension functions

2016-05-08 Thread Martin Panter
Martin Panter added the comment: I made some suggestions in the documentation. I only skimmed over the C and arg clinic code, but there is nothing obviously wrong. -- ___ Python tracker

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-08 Thread Martin Panter
Martin Panter added the comment: I left a few minor comments in the code review. I agree automated testing would be awkward for Readline. It should be possible using a pseudoterminal (pty). In fact there is already very basic testing that does this in /Lib/test/test_builtin.py, class

[issue26975] Decimal.from_float works incorrectly for non-binary floats

2016-05-08 Thread Mark Dickinson
Mark Dickinson added the comment: True. Though having a subclass of float that overrides as_integer_ratio seems a fairly unlikely use-case. We could add a check for subclasses of float that the denominator is a power of 2 (using the usual trick: a positive integer n is a power of 2 if and

[issue26973] Dict View binops permit non-set types

2016-05-08 Thread Joshua Morton
Joshua Morton added the comment: There (seemed to be) consensus between the one or two on topic commenters that something was off, although much of the discussion was on a tangent. Although on looking back, there was even less discussion than I originally thought. Heh. My response was going

[issue26975] Decimal.from_float works incorrectly for non-binary floats

2016-05-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Decimal.from_float() works correctly only if the denominator of as_integer_ratio() of argument is the power of two. Example: >>> from decimal import Decimal >>> class DecimalFloat(float): ... def as_integer_ratio(self): ... return

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-08 Thread Martin Panter
Martin Panter added the comment: Your new patch calls find_library() internally in CDLL(); why? My understanding is CDLL() is a fairly lightweight wrapper around the dlopen() call. On Linux, you either pass a full library file name, or an SO-name. Both these strings can be discovered for

[issue26973] Dict View binops permit non-set types

2016-05-08 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sun, May 08, 2016 at 04:24:59AM +, Joshua Morton wrote: > Following the comments in python ideas [1] [...] > > [1] https://mail.python.org/pipermail/python-ideas/2016-April/039469.html Am I missing something? I don't see anything resembling a