[issue27163] IDLE entry for What's New in Python 3.6

2016-05-30 Thread Terry J. Reedy
New submission from Terry J. Reedy: File: Doc/whatsnew/3.6.rst Location within file: Under 'Improved Modules', as 'idlelib (IDLE)' (?) Draft test: "Idlelib is being revamped to make IDLE look better and work better and to make it easier to maintain and improve IDLE. Part of making IDLE look bett

[issue27162] Add idlelib.interface module

2016-05-30 Thread Zachary Ware
Changes by Zachary Ware : -- components: +IDLE -ctypes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue27162] Add idlelib.interface module

2016-05-30 Thread Terry J. Reedy
New submission from Terry J. Reedy: In msg243635 of the renaming issue #24225, Nick suggested "One path you may want to consider is progressively factoring out a public "idlelib.extensions" API, and treat everything else in idlelib as fair game for renaming. Folks tend to be more tolerant of d

[issue27161] Confusing exception in Path().with_name

2016-05-30 Thread Antony Lee
Antony Lee added the comment: Actually, a simpler approach may be the attached patch (pathlib-splitroot.patch), in which case the exception is AttributeError: 'dict' object has no attribute 'lstrip' which is pretty commonly seen when a wrong type is passed to a function. (Note that it is

[issue23459] Linux: expose the new execveat() syscall

2016-05-30 Thread Марк Коренберг
Марк Коренберг added the comment: Sorry, but still did not found that in official documentation. Pass fd in place of `path ` ? https://docs.python.org/3.6/library/os.html#os.execve -- ___ Python tracker _

[issue23459] Linux: expose the new execveat() syscall

2016-05-30 Thread R. David Murray
R. David Murray added the comment: By passing an fd to os.execve. Under the hood it calls fexecve. -- ___ Python tracker ___ ___ Pyth

[issue26359] CPython build options for out-of-the box performance

2016-05-30 Thread Alecsandru Patrascu
Alecsandru Patrascu added the comment: Hello Brett, I saw that there was no other activity on this issue so far. Can you please update this, as I do not have rights? -- ___ Python tracker _

[issue23459] Linux: expose the new execveat() syscall

2016-05-30 Thread Марк Коренберг
Марк Коренберг added the comment: > we are already effectvely exposing fexecve Did not found neither os.fexecve() nor os.execve() documentation about this. How I can use glibc's fexecve() ? -- ___ Python tracker

[issue27161] Confusing exception in Path().with_name

2016-05-30 Thread R. David Murray
R. David Murray added the comment: Again, I don't think so. We don't generally wrap TypeErrors or ValueErrors. On the other hand, if the try/except can *add* additional contextual information about the error, it might be worthwhile. -- ___ Python

[issue27155] '-' sign typo in example

2016-05-30 Thread Ben Kane
Ben Kane added the comment: https://docs.python.org/3/library/subprocess.html#subprocess.Popen.returncode does mention the negativeness about returncode in conjunction with POSIX signals. It would be helpful to mention this Python-specific (I think) behavior in a comment. However, returncode

[issue27113] sqlite3 connect parameter "check_same_thread" not documented

2016-05-30 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the review. Made it both singular in the updated patch. * As for why the default value was chosen to be to True, I think, the reason is pysqlite, from sqlite3 module was derived, did not support this option when it was introduced. I still do not fi

[issue27161] Confusing exception in Path().with_name

2016-05-30 Thread Ethan Furman
Ethan Furman added the comment: I think the request is to raise a single PathlibError instead of the broad range of possible errors. Something like: try: blah blah except TypeError as e: raise PathlibError(str(e)) Since pathlib is a high level library this seems appropriate. --

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Emanuel Barry
Emanuel Barry added the comment: New patch with Berker's comments. I'm really not used to Sphinx markup so thanks for that! > Is there any person who really thinks that their own patch is *not* ready for > commit review? :) Partial patches aren't that uncommon in some projects. I also sometim

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Emanuel. I left some comments about Sphinx markup on Rietveld. > Berker, I don't mind if people mark their own patches for commit review *when > they think it is ready for commit*. Is there any person who really thinks that their own patc

[issue22558] Missing doc links to source code

2016-05-30 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue27161] Confusing exception in Path().with_name

2016-05-30 Thread R. David Murray
R. David Murray added the comment: I don't think so. Python uses duck typing, and one of the consequences of that is you can get weird errors if you pass in a type that sort-of-works but doesn't really. Arbitrarily restricting the input type is not something we do (that's what the whole stat

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread R. David Murray
R. David Murray added the comment: Berker, I don't mind if people mark their own patches for commit review *when they think it is ready for commit*. (Just as with reviewers, if they start being consistently right, they are ready for commit privs :) However, a non-committer setting a patch to

[issue22331] test_io.test_interrupted_write_text() hangs on the buildbot FreeBSD 7.2

2016-05-30 Thread Martin Panter
Martin Panter added the comment: Found the same hang on the 3.6 branch, which was definitely running separate processes: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/4210/steps/test/logs/stdio == CPython 3.6.0a0 (default:ed6345cb08ab, Apr 29 2016, 18:35:36) [GCC 4.

[issue27161] Confusing exception in Path().with_name

2016-05-30 Thread Antony Lee
New submission from Antony Lee: `Path().with_name` can fail with a lot of different exceptions: >>> Path("foo").with_name(0) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/pathlib.py", line 800, in with_name raise ValueError("Invalid name

[issue22331] test_io.test_interrupted_write_text() hangs on the buildbot FreeBSD 7.2

2016-05-30 Thread Martin Panter
Martin Panter added the comment: Thanks, that is a very good point about threads. I remember that testing tkinter leaves an internal TK or TCL thread running in the background. And I understand Free BSD delivers process signals to arbitrary threads (not necessarily the main thread). But the F

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Berker Peksag
Berker Peksag added the comment: Please don't mark your own patch as 'commit review'. -- nosy: +berker.peksag stage: commit review -> patch review ___ Python tracker ___

[issue23459] Linux: expose the new execveat() syscall

2016-05-30 Thread R. David Murray
R. David Murray added the comment: You can currently call os.execve with a file pointer. How is that different from adding an execveat with AS_EMPTY_PATH, functionally? I think we don't need to add this syscall, because it is intended to allow more robust implementation of fexecve, and we ar

[issue23459] Linux: expose the new execveat() syscall

2016-05-30 Thread Марк Коренберг
Марк Коренберг added the comment: It is actual to me due to it's AT_EMPTY_PATH feature (I download script, verify signature, and want to run it) See also `man 3 fexecve` Why not to add `dir_fd=None` ? (as in `os.rmdir()` for example). It should be very small patch, as I think. Reopen please

[issue26667] Update importlib to accept pathlib.Path objects

2016-05-30 Thread Brett Cannon
Brett Cannon added the comment: It's informed. I need to go through the API and see what does or does not makes sense based on PEP 519. -- ___ Python tracker ___ ___

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

2016-05-30 Thread aixtools
aixtools added the comment: On 28-May-16 04:04, Martin Panter wrote: > Martin Panter added the comment: > > Strictly speaking, Python 2.7 never had special support for RTLD_MEMBER or > find_library(). That is why I am unsure about many of these changes being > done in 2.7. They seem more like n

[issue18117] Missing symlink:Current after Mac OS X 3.3.2 package installation

2016-05-30 Thread R. David Murray
R. David Murray added the comment: Ned, can this issue be closed or is there still something to discuss here? -- nosy: +r.david.murray ___ Python tracker ___

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2016-05-30 Thread Torsten Landschoff
Torsten Landschoff added the comment: For demonstration purposes, here is a small example specifically for Linux which shows how each request starts a new thread even though the client blocks for each result. -- nosy: +torsten Added file: http://bugs.python.org/file43061/many_threads.p

[issue12691] tokenize.untokenize is broken

2016-05-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: If there are, I can't remember. This was one or 7 or 8 untokenize issues with about 5 separate bugs between them. If there are any current untokenize issues not covered by some other open issue, then a new issue should be opened. -- resolution: -> f

[issue12691] tokenize.untokenize is broken

2016-05-30 Thread R. David Murray
R. David Murray added the comment: Is there anything left to do here? -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-

[issue27159] Python 3.5.1's websocket's lib crashes in event that internet connection stops.

2016-05-30 Thread R. David Murray
R. David Murray added the comment: Yes, please open only single focus issues. websockets is not part of the standard library, so that's not appropriate for this tracker ((unless you've found an underlying bug in python, in which case report that please). For the bytecode questions you shoul

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Emanuel Barry
Changes by Emanuel Barry : Added file: http://bugs.python.org/file43060/type_one_argument_3.patch ___ Python tracker ___ ___ Python-bugs-list

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Emanuel Barry
Emanuel Barry added the comment: New patch with tests and documentation. I didn't really know where to put the tests; test_types seemed reasonable to me (other option was test_metaclass). -- stage: test needed -> commit review ___ Python tracker

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Emanuel Barry
Changes by Emanuel Barry : -- Removed message: http://bugs.python.org/msg266711 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Eryk Sun
Changes by Eryk Sun : -- Removed message: http://bugs.python.org/msg266710 ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Emanuel Barry
Emanuel Barry added the comment: Let me just make sure I got you right - you're fine with `type` and only `type` being able to use the one-argument form in 3.6, but prefer 3.5 and 2.7 to be even more permissive than they currently are? Regardless, I don't think this should go into a bugfix rel

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Eryk Sun
Eryk Sun added the comment: > Please treat this as a new feature (just in case) and only > apply it to 3.6. How about changing PyType_CheckExact to PyType_Check for 2.7 and 3.5? It solves the original problem by expanding the single-argument case to metaclasses that aren't an exact instance o

[issue27160] str.format: Silent truncation of kwargs when passing keywords containing colons

2016-05-30 Thread Kenneth Lim
Kenneth Lim added the comment: Ah, so the truncation is fully intended behavior. As for the name, a touch too many comic-books in the past might be the reason I latched onto "Barry" as a first name. Thanks for the clarification. On Tue, May 31, 2016 at 12:37 AM, Emanuel Barry wrote: > > Eman

[issue25566] asyncio reference cycles after ConnectionResetError

2016-05-30 Thread Guido van Rossum
Guido van Rossum added the comment: Please submit a patch to the upstream asyncio repo, github.com/Python/asyncio. --Guido (mobile) On May 30, 2016 3:46 AM, "Sean Hunt" wrote: > > Sean Hunt added the comment: > > I am 1 of those people who want to handle the error with reconnect code as > it h

[issue27160] str.format: Silent truncation of kwargs when passing keywords containing colons

2016-05-30 Thread Emanuel Barry
Emanuel Barry added the comment: The behaviour is correct, it's your assumptions that aren't :) The code for str.format only checks for what's before the colon (here, "HGNC") and checks if that's part of the dict provided. It isn't, so it raises a KeyError. It doesn't even get to the format sp

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Needed tests and updating the documentation. -- nosy: +serhiy.storchaka stage: commit review -> test needed ___ Python tracker ___ ___

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Guido van Rossum
Guido van Rossum added the comment: No, just an entry in Misc/NEWS. --Guido (mobile) -- ___ Python tracker ___ ___ Python-bugs-list m

[issue5996] abstract class instantiable when subclassing dict

2016-05-30 Thread Xiang Zhang
Xiang Zhang added the comment: I think subclassing builtin types and making it abstract is rare. And when there is a need, we can mimic this in application level (this may also apply to types having custom __new__): In [2]: class CustomDict(dict, metaclass=abc.ABCMeta): ...: def __new__

[issue27160] str.format: Silent truncation of kwargs when passing keywords containing colons

2016-05-30 Thread Kenneth Lim
Kenneth Lim added the comment: Hi Barry, I was aware of that. However, I was alluding to the KeyError produced, and the silent truncation of the text. Rather than failing at the colon step (SyntaxError when on run), truncated arguments pass this step, causing errors downstream. On Mon, May 30,

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Emanuel Barry
Emanuel Barry added the comment: Fair enough. Should this get a note in What's new? Possibly in the "Changes in Python API" section. -- stage: patch review -> commit review versions: +Python 3.6 -Python 2.7, Python 3.4 ___ Python tracker

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Guido van Rossum
Guido van Rossum added the comment: OK, the patch looks fine. Please treat this as a new feature (just in case) and only apply it to 3.6. -- ___ Python tracker ___ _

[issue27137] Python implementation of `functools.partial` is not a class

2016-05-30 Thread Emanuel Barry
Emanuel Barry added the comment: New patch after Serhiy's comments. I kept the __dict__ in pickling to properly pickle attributes that aren't defined by 'partial' itself; but if 'func', 'args' or 'keywords' are present and don't match the provided arguments, an error will be raised, as it shou

[issue22558] Missing doc links to source code

2016-05-30 Thread Yoni Lavi
Yoni Lavi added the comment: Ping. Please advise on next step to get this submitted. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue27160] str.format: Silent truncation of kwargs when passing keywords containing colons

2016-05-30 Thread Emanuel Barry
Emanuel Barry added the comment: In other words, you cannot use keys containing a colon in str.format - you'll need to replace the colons by something else (for example an underscore, that works fine). -- nosy: +ebarry ___ Python tracker

[issue27160] str.format: Silent truncation of kwargs when passing keywords containing colons

2016-05-30 Thread Emanuel Barry
Changes by Emanuel Barry : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-b

[issue27160] str.format: Silent truncation of kwargs when passing keywords containing colons

2016-05-30 Thread STINNER Victor
Changes by STINNER Victor : -- title: Silent truncation of kwargs when passing keywords containing colons -> str.format: Silent truncation of kwargs when passing keywords containing colons ___ Python tracker _

[issue27160] Silent truncation of kwargs when passing keywords containing colons

2016-05-30 Thread STINNER Victor
STINNER Victor added the comment: IMHO the error is very explicit: Traceback (most recent call last): File "poc.py", line 6, in print(a.format(**r)) KeyError: 'HGNC' Your "r" directory has no "HGNC" key. I think that you misunderstood the formatting of str.format: https://docs.python.or

[issue27160] Silent truncation of kwargs when passing keywords containing colons

2016-05-30 Thread Kenneth Lim
New submission from Kenneth Lim: Passing a dict with colon-containing keys as kwargs to a function results in a KeyError stemming from a silent truncation of the keys. Error does not clearly describe the issue in this case. -- components: Interpreter Core files: poc.py messages: 266696

[issue27159] Python 3.5.1's websocket's lib crashes in event that internet connection stops.

2016-05-30 Thread ppperry
ppperry added the comment: This issue should really be split into (at least) four seperate issues. The third problem (reloading relatively imported modules), can be done by doing `someclass = getattr(importlib.reload(sys.modules[someclass.__module__]),someclass.__name__)`. It also has nothing

[issue27140] Opcode for creating dict with constant keys

2016-05-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Perhaps BUILD_CONST_KEY_MAP? LGTM. > Ideally the opcode could ellide the LOAD_CONST for the tuple. ie have > LOAD_CONST 2 (1, 2, 3), BUILD_CONST_KEY_MAP 3 be BUILD_CONST_KEY_MAP 2 (1, 2, > 3). However that'd require stack_effect to somehow lookup the cons

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Emanuel Barry
Emanuel Barry added the comment: Yes, `metatype == &PyType_Type` makes sure that only `type` itself is valid for the one-argument part, whereas subclasses can also do so right now. I clarified that in a comment in the new patch, so that someone doesn't accidentally revert this, thinking PyType

[issue27137] Python implementation of `functools.partial` is not a class

2016-05-30 Thread ppperry
Changes by ppperry : -- title: functools.partial: Inconsistency between Python and C implementations -> Python implementation of `functools.partial` is not a class ___ Python tracker __

[issue22331] test_io.test_interrupted_write_text() hangs on the buildbot FreeBSD 7.2

2016-05-30 Thread STINNER Victor
STINNER Victor added the comment: I also modified Python 3.6 to run each test file in a fresh process to avoid leaking too much things between tests, to isolate them better. -- ___ Python tracker _

[issue22331] test_io.test_interrupted_write_text() hangs on the buildbot FreeBSD 7.2

2016-05-30 Thread STINNER Victor
STINNER Victor added the comment: When we talk about signals, we must always be careful of threads. Python unit tests are known (at least by me ;-)) to "leak" threads. IMO the first step to make the test more reliable is to start it in a fresh process to control exactly the number of threads.

[issue23680] Sporadic freeze in test_interrupted_write_retry_text

2016-05-30 Thread Martin Panter
Martin Panter added the comment: I found a relatively recent case of this failing on a buildbot: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/4339/steps/test/logs/stdio == CPython 3.6.0a1+ (default:eaee5aed6fbc, May 27 2016, 05:52:21) [GCC 4.2.1 20070831 patched [F

[issue27140] Opcode for creating dict with constant keys

2016-05-30 Thread Demur Rumed
Demur Rumed added the comment: Perhaps BUILD_CONST_KEY_MAP? Ideally the opcode could ellide the LOAD_CONST for the tuple. ie have LOAD_CONST 2 (1, 2, 3), BUILD_CONST_KEY_MAP 3 be BUILD_CONST_KEY_MAP 2 (1, 2, 3). However that'd require stack_effect to somehow lookup the const tuple Thinking to

[issue22331] test_io.test_interrupted_write_text() hangs on the buildbot FreeBSD 7.2

2016-05-30 Thread Martin Panter
Martin Panter added the comment: This recently hung AMD64 FreeBSD 9.x 3.5. The stack trace was different, and there is only one thread: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.5/builds/828/steps/test/logs/stdio [398/398] test_io Timeout (0:15:00)! Thread 0x00080180

[issue25566] asyncio reference cycles after ConnectionResetError

2016-05-30 Thread Sean Hunt
Sean Hunt added the comment: I am 1 of those people who want to handle the error with reconnect code as it happens when using discord.py when the stupid connection is aborted due to Cloudflare being stupid and them thinking a bot made in python is a DDoS like litterally. So, I know of this err

[issue27159] Python 3.5.1's websocket's lib crashes in event that internet connection stops.

2016-05-30 Thread Sean Hunt
New submission from Sean Hunt: I know that websockets has a issue with when a internet connection is dropped and prints a bad traceback. However I have to manually recreate it when the exception happens which is a pain as when it does it crashes aiohttp sessions as well. Also I wonder how I c

[issue27140] Opcode for creating dict with constant keys

2016-05-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch adds the BUILD_MAP_EX opcode (maybe somebody propose better name?). It takes values from the stack and keys from the tuple on the top of the stack. Currently it affects only creating a dict with const keys and calling a function with keywords

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Eryk Sun
Eryk Sun added the comment: > why write `metatype == &PyType_Type` rather than > PyType_CheckExact(metatype)`? If only `type` should implement this special case, then it needs to be `metatype == &PyType_Type`. This was actually how it was implemented in 2.2a3: https://hg.python.org/cpython/fi

[issue10908] Improvements to trace._Ignore

2016-05-30 Thread SilentGhost
SilentGhost added the comment: I closed the issue because it's outdated: i) patch no longer applies cleanly; ii) changes to cmd line parsing where done in issue 22642; iii) remaining changes are largely cosmetic. As for issue 10896, a much more trivial patch would have to be produced against