[issue23184] Unused imports, variables, file in IDLE

2015-05-14 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: Added file: http://bugs.python.org/file39376/@unused27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23184 ___

[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-05-14 Thread Terry J. Reedy
New submission from Terry J. Reedy: Once upon a time, Idle was versioned separately from Python, though updated in lockstep with Python (#1515164, Martin's comment). The version was kept in idlever.py, with one line IDLE_VERSION = m.n.p Several years ago, the separate versioning was dropped

[issue24195] Add `Executor.filter`

2015-05-14 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24195 ___ ___ Python-bugs-list

Re: Building CPython

2015-05-14 Thread BartC
On 14/05/2015 22:55, BartC wrote: def whiletest(): i=0 while i=1: i=i+1 whiletest() Python 2.5 9.2 seconds Python 3.1 13.1 Python 3.4.317.0 Python 3.4.314.3 (under Ubuntu on same machine, using the version I built

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Steven D'Aprano
On Fri, 15 May 2015 03:32 am, Dave Farrance wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'd like to do a little survey, and get a quick show of hands. How many people have written GUI or text-based applications or scripts where a Move file to trash function would be

[issue24195] Add `Executor.filter`

2015-05-14 Thread Ethan Furman
Ethan Furman added the comment: Updated the tests (had to use real defs, not lambdas, and the expected results for filter_exception weren't right). Tests pass. Get some docs written! :) (More reviews would also be good. ;) -- Added file:

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Chris Angelico
On Fri, May 15, 2015 at 2:09 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Yes, but sometimes it's at the file system's discretion - particularly when you're working with network mounts. The application may not even know that the file got hard deleted. Citation needed.

[issue24192] unexpected system error with pep420 style namespace packages

2015-05-14 Thread Eric Snow
Eric Snow added the comment: Hmm, look like the test suite masks the issue due to the fact that importlib gets imported before running the applicable tests in test_namespace_pkgs.py. This causes _frozen_importlib.__package__ to get set properly, thus masking the problem. The problem is the

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Ian Kelly
On May 14, 2015 7:55 PM, Chris Angelico ros...@gmail.com wrote: (Though when it comes to the bikeshedding phase, I'm sure there'll be some who say if it can't be trashed, just hard delete it, and others who say if it can't be trashed, raise an exception. And neither is truly wrong.) The

[issue24195] Add `Executor.filter` to concurrent.futures

2015-05-14 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +bquinlan, jnoller, sbt title: Add `Executor.filter` - Add `Executor.filter` to concurrent.futures ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24195

[issue24187] del statement documentation doesn't mention name binding behaviour

2015-05-14 Thread R. David Murray
R. David Murray added the comment: I don't understand, what do you think is missing from the description? It certainly talks about name binding. Also, can you provide a link to the other statement, as I can't find it, and out of context I have no idea what it is talking about. --

[issue23699] Add a macro to ease writing rich comparisons

2015-05-14 Thread Petr Viktorin
Petr Viktorin added the comment: Well, as a newcomer, I think the macro makes it easier to both grok what the code does, and is about equally difficult when it comes to checking correctness of the code. But I understand that's a subjective. Marc-Andre, Barry, you expressed interest in the

[issue24190] BoundArguments facility to inject defaults

2015-05-14 Thread R. David Murray
R. David Murray added the comment: See issue 22998. The more complete and thus more complex example in the last message makes it look like including this in the library might be a good idea. -- nosy: +r.david.murray ___ Python tracker

[issue12018] No tests for ntpath.samefile, ntpath.sameopenfile

2015-05-14 Thread Francis MB
Francis MB added the comment: Can this issue be closed? IMHO it's not clear what still needs to be done. The patch seems to be there already. Thanks in advance! -- nosy: +francismb ___ Python tracker rep...@bugs.python.org

[issue23804] SSLSocket.recv(0) receives up to 1024 bytes

2015-05-14 Thread Martin Panter
Martin Panter added the comment: Here is a patch for 3.5 that changes the default size to explicitly be 1024, and tests that recv(0) and read(0) now work as I expect they should by returning nothing. -- keywords: +patch stage: - patch review Added file:

[issue22133] IDLE: Set correct WM_CLASS on X11

2015-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Just a suggestion, can we use sys.version_info to get Python major version to have uniform code? Uniform code is too verbose. WM_CLASS should be Idle on Python 2 and Idle3 on Python 3. top = Toplevel(self.root, class_='Idle' if sys.version_info[0] =

[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-05-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: That's fine. Just delete idlever.py, and I'll deal with it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24199 ___

[issue24136] document PEP 448

2015-05-14 Thread Neil Girdhar
Neil Girdhar added the comment: Just updated the what's new. Also, thank you for adding my name to Misc/Acks. Should we also add Joshua Landau's name? He helped me quite a bit with the implementation, and he wrote the PEP. -- keywords: +patch nosy: +neil.g Added file:

[issue23757] tuple function gives wrong answer when called on list subclass with custom __iter__

2015-05-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Added a patch. Needs to have the OP's test case added. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23757 ___

new devpi-server/web/client/common: wheel testing, SHA256, ...

2015-05-14 Thread holger krekel
devpi-{server-2.2,web-2.3,client-2.2}: plugins, wheel support, pypi compat With devpi-server-2.2, devpi-web-2.3, devpi-client-2.2 you'll get a host of fixes and improvements as well as some major new features for the

PyCA cryptography 0.9 released

2015-05-14 Thread Paul Kehrer
On behalf of all the contributors I am pleased to announce the release of PyCA/cryptography (https://github.com/pyca/cryptography) 0.9! Changelog: * Removed support for Python 3.2. This version of Python is rarely used and caused support headaches. Users affected by this should upgrade to

[issue23757] tuple function gives wrong answer when called on list subclass with custom __iter__

2015-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And it would be nice to add the same test for list, set, etc (if they don't exist). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23757 ___

[issue23985] Crash when deleting slices from duplicated bytearray

2015-05-14 Thread Martin Panter
Martin Panter added the comment: Antoine, would you have a chance to review my patches? I assume you were responsible for adding the ob_start field. It would be nice to see this bug fixed in the next 3.4 and 3.5 releases. As well as the original poster’s problem, I suspect this bug may be the

[issue23985] Crash when deleting slices from duplicated bytearray

2015-05-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sorry. I'll take a look! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23985 ___ ___ Python-bugs-list mailing

[issue24185] Add Function for Sending File to Trash (or Recycling Bin)

2015-05-14 Thread R. David Murray
R. David Murray added the comment: Heh, dangerous is in the eye of the beholder. I don't even have a trash bin on my system (no desktop, just X and shell windows). It is almost always the case that an application written in python that wants to get rid of a file *does* want to really

[issue23995] msvcrt could not be imported

2015-05-14 Thread R. David Murray
R. David Murray added the comment: You'll note that the problem shows up in the getpass module, which does have tests, but which does not have a test that discovers this. That's because writing tests that *use* these functions is not really practical :) Someone could open an issue about

[issue24187] del statement documentation doesn't mention name binding behaviour

2015-05-14 Thread Jon
New submission from Jon: The documentation for the del keyword in the language reference doesn't mention the name binding behaviour: https://docs.python.org/3/reference/simple_stmts.html#grammar-token-del_stmt It is mentioned in section 4.1 where it says: A target occurring in a del

[issue24188] Signature objects not hashable

2015-05-14 Thread Antoine Pitrou
New submission from Antoine Pitrou: inspect.Signature objects are immutable, but they are not hashable. It would be useful if they were. (I would have a similar request for bound arguments but unfortunately their mutability may make it less desirable) -- components: Library (Lib)

[issue23698] Multiprocessing.Manager: fix behavior and doc inconsistencies

2015-05-14 Thread Anand B Pillai
Anand B Pillai added the comment: @sbt - Any comments on this ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23698 ___ ___ Python-bugs-list

[issue24190] BoundArguments facility to inject defaults

2015-05-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: My example forgets the function declaration, which is: def f(a, b=5, *c, d=5): pass ... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24190 ___

[issue24188] Signature objects not hashable

2015-05-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: But that kind of makes my point. While ([],) is not hashable, other tuples are hashable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24188 ___

[issue24188] Signature objects not hashable

2015-05-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Also, a workaround would be to id() the defaults when hashing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24188 ___

[issue24189] Parameter doesn't expose its index

2015-05-14 Thread Antoine Pitrou
New submission from Antoine Pitrou: A signature Parameter object only exposes its name, not its index in the signature. I think that would be a useful information to have. -- components: Library (Lib) messages: 243166 nosy: pitrou, yselivanov priority: normal severity: normal status:

[issue24190] BoundArguments facility to inject defaults

2015-05-14 Thread Antoine Pitrou
New submission from Antoine Pitrou: The recipe to inject default values in a BoundArguments instance is given in the doc, but it's not trivial. Furthermore, it's actually incomplete: it doesn't handle any star-arguments, e.g.: sig = inspect.signature(f) ba = sig.bind(2, d=4) for param in

[issue24188] Signature objects not hashable

2015-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: ([],) is immutable, but is not hashable. If default values affect the hash, the signature can't be always hashable. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org

[issue24191] BoundArguments.signature not documented

2015-05-14 Thread Antoine Pitrou
New submission from Antoine Pitrou: The signature property on BoundArguments seems to be deliberately public (since there's also a private _signature attribute), but it's not documented. -- assignee: docs@python components: Documentation keywords: easy messages: 243168 nosy:

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Terry Reedy
On 5/14/2015 10:03 PM, Steven D'Aprano wrote: The idea is that the library will hide that complexity from you, so your python code will just say: import shutil shutil.move_to_trash(filename) Since 'trash' is (or is used as) a verb, shutil.trash(filename) seems sufficient. and it will work

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Chris Angelico
On Fri, May 15, 2015 at 12:49 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On May 14, 2015 7:55 PM, Chris Angelico ros...@gmail.com wrote: (Though when it comes to the bikeshedding phase, I'm sure there'll be some who say if it can't be trashed, just hard delete it, and others who say if it

Re: Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea?

2015-05-14 Thread Rustom Mody
On Wednesday, May 13, 2015 at 8:14:39 PM UTC+5:30, zipher wrote: On Tuesday, May 12, 2015 at 10:35:29 PM UTC-5, Rustom Mody wrote: On Wednesday, May 13, 2015 at 8:00:50 AM UTC+5:30, Steven D'Aprano wrote: Why can't a language be designed with a *practical and concrete* need in mind? As

Python: How to find out values of all feasible x under constraints.

2015-05-14 Thread Xiang Zhang
Dear all, I am writing a code using Python now. I want to know how to find out values of all feasible x under constraints. x = [x_1, x_2, x_3,..., x_10] constraints: x_i = 0,1,2,3 or 4, where i=1,2,10 x_1 + x_2 + x_3 +...+x_10 = 15 How to find out all the feasible solutions x

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Steven D'Aprano
On Fri, 15 May 2015 12:56 pm, Chris Angelico wrote: On Fri, May 15, 2015 at 12:49 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On May 14, 2015 7:55 PM, Chris Angelico ros...@gmail.com wrote: (Though when it comes to the bikeshedding phase, I'm sure there'll be some who say if it can't be

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Steven D'Aprano
On Fri, 15 May 2015 01:59 am, Chris Angelico wrote: On Fri, May 15, 2015 at 1:49 AM, Grant Edwards invalid@invalid.invalid wrote: On 2015-05-14, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'd like to do a little survey, and get a quick show of hands. How many people have

[issue24197] minidom parses comments wrongly

2015-05-14 Thread Ned Deily
Ned Deily added the comment: Thanks for your report. Alas, according to the W3C XML 1.0 specification: For compatibility, the string -- (double-hyphen) MUST NOT occur within comments. So, it appears minidom (and other XML parsers) are correct in rejecting your example as not well-formed

[issue24195] Add `Executor.filter` to concurrent.futures

2015-05-14 Thread Brian Quinlan
Brian Quinlan added the comment: This feature seems unnecessary to me but couldn't the implementation be simplified to work in terms of map? i.e. (pseudocode): def filter(self, fn, iterable, timeout=None): l = list(iterable) return (item for (item, keep) in zip(l, self.map(fn, l, timeout))

Re: Feature Request: Reposition Execution

2015-05-14 Thread Skybuck Flying
Steven D'Aprano wrote in message news:5553145b$0$9$c3e8...@news.astraweb.com... On Wednesday 13 May 2015 17:27, Christian Gollwitzer wrote: A clean way to exit your script could be to raise an exception. It should propagate to the toplevel and halt your script. However it is not

<    1   2