[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-06 Thread Chris Angelico
Chris Angelico added the comment: You sure can! Take it, deploy it, run the test suite, and then start writing real code that uses it. When you find a problem, that's what needs help! :) -- ___ Python tracker

[issue23888] Fixing fractional expiry time bug in cookiejar

2015-05-06 Thread ssh
ssh added the comment: Attaching patch after addressing comments in code review. -- Added file: http://bugs.python.org/file39311/mywork.patch ___ Python tracker ___ _

[issue24138] Speed up range() by caching and modifying long objects

2015-05-06 Thread Larry Hastings
Larry Hastings added the comment: 10**3 doesn't show off this hack as much as other numbers would; the hack only operates from 257 to the max in that will fit in a single long "digit" (32767 on 32-bit, 2**30 on 64-bit). Anyway, freelist for one-digit longs seems nearly as good, and it's a lot

[issue1222585] C++ compilation support for distutils

2015-05-06 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: -brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue1222585] C++ compilation support for distutils

2015-05-06 Thread Erik Hvatum
Erik Hvatum added the comment: The 2012-12-31 of this patch (currently the latest) has the surprising effect of causing distutils CFLAGS to be dropped. See for reference: https://bugs.gentoo.org/show_bug.cgi?id=548776 The issue I am experiencing is resolved by changing the section of the patc

[issue24132] Direct sub-classing of pathlib.Path

2015-05-06 Thread Paul Moore
Paul Moore added the comment: > What is the good way to propose a patch ? If you have a patch, attach it here, and it will get reviewed. -- ___ Python tracker ___ __

[issue24138] Speed up range() by caching and modifying long objects

2015-05-06 Thread Mark Lawrence
Mark Lawrence added the comment: How does this apply where people like me scarcely if ever use range, it's standard for loops? There are plenty of recipes using itertools that show that you don't need range, is this really needed? No axe to grind, just curious. -- nosy: +BreamoreBoy

[issue24132] Direct sub-classing of pathlib.Path

2015-05-06 Thread Christophe BAL
Christophe BAL added the comment: OK. I will try to find a way to achieve an easier and cleaner way to sub class pathlib.Path and co. What is the good way to propose a patch ? *Christophe BAL* *Enseignant de mathématiques en Lycée **et développeur Python amateur* *---* *French math teacher in a

[issue24132] Direct sub-classing of pathlib.Path

2015-05-06 Thread Paul Moore
Paul Moore added the comment: > Are you the author of path lib ? Nope, that's Antoine. -- ___ Python tracker ___ ___ Python-bugs-list

[issue24132] Direct sub-classing of pathlib.Path

2015-05-06 Thread Christophe BAL
Christophe BAL added the comment: Are you the author of path lib ? *Christophe BAL* *Enseignant de mathématiques en Lycée **et développeur Python amateur* *---* *French math teacher in a "Lycée" **and **Python **amateur developer* 2015-05-06 21:01 GMT+02:00 Paul Moore : > > Paul Moore added th

[issue24132] Direct sub-classing of pathlib.Path

2015-05-06 Thread Paul Moore
Paul Moore added the comment: I have no problem with that - it's a style choice certainly. As I said, I'd like to see simpler subclassing of pathlib objects. I just think it'll be quite hard to do (given the complexities of classes for Windows/Unix as well as pure and concrete paths). So if it

[issue24132] Direct sub-classing of pathlib.Path

2015-05-06 Thread Christophe BAL
Christophe BAL added the comment: I don't agree with you. I prefer to add new functionalities to the paths I use. This is the power of OOP. It is easier and cleaner to use *mypath.common_with(otherpath)* than *common_with(**mypath, **other path)* . Python is highly OOP, so you can't say *"don'

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-06 Thread Yury Selivanov
Yury Selivanov added the comment: Hi Chris! Can I somehow help with the patch? -- nosy: +yselivanov ___ Python tracker ___ ___ Python-

[issue24127] Fatal error in launcher: Job information querying failed

2015-05-06 Thread Paul Moore
Paul Moore added the comment: Adding Jason Coombs and Vinay Sajip, as if this needs a fix to the launcher code, then the launchers used by distlib and setuptools (for exe wrappers of console entry points) will need to be changed as well. It would be really useful if all 3 projects used a singl

[issue24132] Direct sub-classing of pathlib.Path

2015-05-06 Thread Paul Moore
Paul Moore added the comment: For that type of function, I'd suggest you use a standalone function rather than subclassing and methods or operator overloading. You don't gain enough to be worth the complexity of having to subclass path objects. And duck typing means that your function works fo

[issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses

2015-05-06 Thread David Watson
David Watson added the comment: Attaching patches for 3.5. -- Added file: http://bugs.python.org/file39309/enable-unterminated-3.5-2015-05-06.diff Added file: http://bugs.python.org/file39310/fix-overrun-3.5-2015-05-06.diff ___ Python tracker

[issue23888] Fixing fractional expiry time bug in cookiejar

2015-05-06 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the follow up on that. In light of your findings, I agree with the path you've taken in your patch (and yeah, you'd have to deal with conversions in the output if you were to take my suggestion). I've left a couple minor comments in Reitveld. Other t

[issue24070] Exceptions and arguments disappear when using argparse inside with statement

2015-05-06 Thread R. David Murray
R. David Murray added the comment: What is happening here is that the __exit__ method gets passed the exception, and then instead of returning and allowing the exception to propagate and be printed, it raises SystemExit (via parse_args), which causes Python to immediately shut down, *before* _

[issue24070] Exceptions and arguments disappear when using argparse inside with statement

2015-05-06 Thread Roy Hyunjin Han
Roy Hyunjin Han added the comment: The behavior may not be surprising from a technical perspective, but it is unintuitive. I think exceptions inside a with statement should trigger a traceback, unless you are saying that it is the responsibility of the author to catch and raise the exception

[issue24138] Speed up range() by caching and modifying long objects

2015-05-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch Added file: http://bugs.python.org/file39308/long_free_list.patch ___ Python tracker ___ ___

[issue24138] Speed up range() by caching and modifying long objects

2015-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that adds a free list for 1-digit long objects. $ ./python -m timeit -s "r = range(10**3)" -- "for i in r: pass" Unpatched: 1 loops, best of 3: 54.4 usec per loop With free list: 1 loops, best of 3: 38 usec per loop With hacked range: 1

[issue9517] Make test.script_helper more comprehensive, and use it in the test suite

2015-05-06 Thread Christie
Christie added the comment: Thanks very much @berker.peksag! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24132] Direct sub-classing of pathlib.Path

2015-05-06 Thread Christophe BAL
Christophe BAL added the comment: Here are for example two extra methods that I have implemented. def __sub__(cls, path): """ This magic method allows to use ``onepath - anotherpath`` instead of the long version ``onepath.relative_to(anotherpath)`` given by ``pathlib.Path``. """ retu

[issue23346] shutil.rmtree doesn't work correctly on FreeBSD.

2015-05-06 Thread sumpfralle
sumpfralle added the comment: I experience the same issue on a virtualized server (based on Virtuozzo) with Linux kernel 2.6.32. The following command fails: echo "import os; os.listdir(os.open('/tmp', os.O_RDONLY))" | python3 Traceback (most recent call last): File "", line 1, in OSErr

[issue24138] Speed up range() by caching and modifying long objects

2015-05-06 Thread Stefan Behnel
Stefan Behnel added the comment: See issue 24076. -- nosy: +scoder ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue24138] Speed up range() by caching and modifying long objects

2015-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This regression was just discussed in issue24076. General suggestion about free list for small ints was proposed. It could speed up other integer computations, but comprehensive benchmarking results are needed. See also similar issue23507 for tuples. Perhaps

[issue24138] Speed up range() by caching and modifying long objects

2015-05-06 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue24138] Speed up range() by caching and modifying long objects

2015-05-06 Thread Larry Hastings
New submission from Larry Hastings: This probably shouldn't be checked in. But it was an interesting experiment, and I did get it to work. My brother forwarded me this question from Stack Overflow: http://stackoverflow.com/questions/23453133/is-there-a-reason-python-3-enumerates-slower-th

[issue24134] assertRaises can behave differently

2015-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you David for your corrections. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker __

[issue24134] assertRaises can behave differently

2015-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 111ec3d5bf19 by Serhiy Storchaka in branch '2.7': Issue #24134: assertRaises() and assertRaisesRegexp() checks are not longer https://hg.python.org/cpython/rev/111ec3d5bf19 New changeset 5418ab3e5556 by Serhiy Storchaka in branch '3.4': Issue #24134

[issue24127] Fatal error in launcher: Job information querying failed

2015-05-06 Thread Henrik Heimbuerger
Henrik Heimbuerger added the comment: To your earlier question: yes, I can reproduce this with Python 3.4.3. This is all on Windows 10.0.10074, 64-bit. I don't have a 32-bit system to test. UAC configuration is unmodified and on the default setting (third of the four steps on the slider). Pyt

[issue24134] assertRaises can behave differently

2015-05-06 Thread R. David Murray
R. David Murray added the comment: Made a couple of review comments on the English in the test comments. Patch looks good to me. -- ___ Python tracker ___ __

[issue24137] Force not using _default_root in IDLE

2015-05-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Perhaps explicitly calling NoDefaultRoot() in IDLE will help to catch some possible bugs (in IDLE or in Tkinter). It should be called only when IDLE is ran in subprocess mode, so it will not affect user code that uses Tkinter. _default_root is used mainly

[issue22334] test_tcl.test_split() fails on "x86 FreeBSD 7.2 3.x" buildbot

2015-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The test no longer failed since fixing full Tcl version parsing in cebe15821a0c/5bf0d9086cfc/9f13e9385186. It is now just skipped on non-final Tcl 8.6. In any case I suggest to upgrade Tcl/Tk on this buildbot. -- resolution: -> out of date stage:

[issue23815] Segmentation fault when create _tkinter objects

2015-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyType_Ready() is called inside PyType_FromSpec(). -- ___ Python tracker ___ ___ Python-bugs-list

[issue24127] Fatal error in launcher: Job information querying failed

2015-05-06 Thread Paul Moore
Paul Moore added the comment: Cheers. I missed a bit of code, job comes from "job = CreateJobObject(NULL, NULL)" so it shouldn't be NULL unless that call failed. Rather than speculate though, I'll leave it with you. Shout if I can help. -- ___ Pytho

[issue24127] Fatal error in launcher: Job information querying failed

2015-05-06 Thread Steve Dower
Steve Dower added the comment: Null is a valid value for job here (indicates the current process's job), so that's probably the check that's failing. When I can sit down with a VM and a debugger I'll check, but that won't be until next week. -- ___

[issue24134] assertRaises can behave differently

2015-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch includes tests for the function is None. There were no tests for assertRaises(), the patch adds them, based on tests for assertWarns(). > Why not sentinel = Object()? Only for better repr in the case the sentinel is leaked. Other variants are t

[issue23888] Fixing fractional expiry time bug in cookiejar

2015-05-06 Thread ssh
ssh added the comment: Wouldn't int(float(expires) * 1e6) set the date much further in the future? I'm not sure why you'd do that unless the plan is to change the internal time unit to microseconds (which seems like a much bigger change, and overkill for handling this special case). Cookie str

[issue24134] assertRaises can behave differently

2015-05-06 Thread Magnus Carlsson
Magnus Carlsson added the comment: "The solution to that is to always have a test that your decorator actually returns a function. That's what I do." Yes, I agree that with more tests I would have found the problem, but sometimes you forget things. And to me I want the tests to fail by default

[issue24127] Fatal error in launcher: Job information querying failed

2015-05-06 Thread Paul Moore
Paul Moore added the comment: It looks like something in the QueryInformationJobObject API has changed with Windows 10. The code says: ok = QueryInformationJobObject(job, JobObjectExtendedLimitInformation, &info, sizeof(info), &rc); if (!ok || (rc != si

[issue24135] Policy for altering sys.path

2015-05-06 Thread R. David Murray
R. David Murray added the comment: My guess, unfortunately, is give up. There is too much code in the field that replaces sys.path with a regular list. What you propose is effectively an impossible social engineering problem. You may well also run into issues where the Python C code calls l

[issue24127] Fatal error in launcher: Job information querying failed

2015-05-06 Thread Henrik Heimbuerger
Henrik Heimbuerger added the comment: I can confirm this issue for pip 6.1.1 on Windows 10.0.10074 for both Python 2.7.9 as well as 3.4.3. As a workaround, using "python -m pip" works fine (as suggested on http://stackoverflow.com/a/26428562/6278 for a different issue). -- nosy: +hhei

[issue2292] Missing *-unpacking generalizations

2015-05-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Wed, May 6, 2015, at 09:15, Thomas Wouters wrote: > > Thomas Wouters added the comment: > > FYI, I meant last Monday, but I forgot it was May 4th (Dutch Memorial > day) and May 5th (Dutch Liberation day), so that got in the way :P > > Should we keep this

[issue24136] document PEP 448

2015-05-06 Thread Benjamin Peterson
New submission from Benjamin Peterson: PEP 448 has been implemented (#2292), but the documentation hasn't been updated. Updating the documentation will improve looking through Doc/reference/* and making sure the documentation (and grammar) for calls and assignments is updated for PEP 448's ne

[issue24122] Install fails after configure sets the extending/embedding install directory to NONE

2015-05-06 Thread Matthias Klose
Matthias Klose added the comment: fixed for 3.4 and 3.5. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Py

[issue2292] Missing *-unpacking generalizations

2015-05-06 Thread Thomas Wouters
Thomas Wouters added the comment: FYI, I meant last Monday, but I forgot it was May 4th (Dutch Memorial day) and May 5th (Dutch Liberation day), so that got in the way :P Should we keep this bug open for docs changes, or is there a separate issue for that? --

[issue24134] assertRaises can behave differently

2015-05-06 Thread R. David Murray
R. David Murray added the comment: Why not sentinel = Object()? +1 for the patch, once tests are added. This may "break" code in maintenance releases, but presumably that will be finding real bugs. It is hard to imagine someone intentionally passing None to get the context manager behavior,

[issue24135] Policy for altering sys.path

2015-05-06 Thread Thomas Güttler
New submission from Thomas Güttler: I am missing a policy how sys.path should be altered. We run a custom sub class of list in sys.path. We set it in sitecustomize.py This instance get replace by a common list in lines like this: sys.path = glob.glob(os.path.join(WHEEL_DIR, "*.whl")) + sys.pat

[issue24133] Add 'composable' decorator to functools (with @ matrix multiplication syntax)

2015-05-06 Thread R. David Murray
R. David Murray added the comment: This should be taken to python-ideas (and probably pypi) first. You can reopen if there is agreement that this should be done. IMO it should not be done for 3.5 in any case. -- nosy: +r.david.murray resolution: -> later stage: -> resolved status:

[issue21800] Implement RFC 6855 (IMAP Support for UTF-8) in imaplib.

2015-05-06 Thread R. David Murray
R. David Murray added the comment: An explicit call to enable with an argument string that contains 'UTF8=ACCEPT'. I did not go far enough through the BNF to determine if enable can be passed more than one capability at a time, but I suspect it can. In which case we should factor out the cap

[issue24134] assertRaises can behave differently

2015-05-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch looks like a nice improvement. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-b

[issue24134] assertRaises can behave differently

2015-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Possible solution is to use special sentinel instead of None. -- keywords: +patch nosy: +ezio.melotti, michael.foord, rbcollins, serhiy.storchaka stage: -> patch review versions: +Python 3.4, Python 3.5 Added file: http://bugs.python.org/file39305/ass

[issue24134] assertRaises can behave differently

2015-05-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: I don't think this is a bug. I think it is just a case that you have to be careful when calling functions, you actually do call the function. And that it returns what you think it does. I think the critical point is this: "It turned our that I forgot to retu

[issue24134] assertRaises can behave differently

2015-05-06 Thread Magnus Carlsson
New submission from Magnus Carlsson: Hi I have a little issue with the current assertRaises implementation. It seems that it might produce a little different results depending on how you use it. self.assertRaises(IOError, None) will not produce the same result as: with self.assertRaises(IOEr

[issue24132] Direct sub-classing of pathlib.Path

2015-05-06 Thread Christophe BAL
Christophe BAL added the comment: Hello. I will give a real example in 5 hours after my job. I will try tomorrow a solution to ease the subclassing using another dedicazted class PathPlus, sorry for the name. The idea would be to use this new class for customization, and also to define WindowsPa

[issue24132] Direct sub-classing of pathlib.Path

2015-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: The Path classes were not designed to be subclassable by the user. I'm not against making subclassing easier, but someone will have to propose a viable approach for that. -- versions: +Python 3.5 -Python 3.4 ___ Pyth

[issue23880] Tkinter: getint and getdouble should support Tcl_Obj

2015-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Committed in the default branch only. If other issues with Tcl/Tk 8.5 or 8.6 will be reported, we could apply general solution instead of particular workarounds in maintained branches too. -- assignee: -> serhiy.storchaka resolution: -> fixed stage

[issue23880] Tkinter: getint and getdouble should support Tcl_Obj

2015-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset cb80dd82d3da by Serhiy Storchaka in branch 'default': Issue #23880: Tkinter's getint() and getdouble() now support Tcl_Obj. https://hg.python.org/cpython/rev/cb80dd82d3da -- nosy: +python-dev ___ Python t

[issue24133] Add 'composable' decorator to functools (with @ matrix multiplication syntax)

2015-05-06 Thread levkivskyi
New submission from levkivskyi: The matrix multiplication operator @ is going to be introduced in Python 3.5 and I am thinking about the following idea: The semantics of matrix multiplication is the composition of the corresponding linear transformations. A linear transformation is a particula

[issue24009] Get rid of rare format units in PyArg_Parse*

2015-05-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: Note that these format characters can also be used outside of CPython. -- nosy: +ronaldoussoren ___ Python tracker ___

[issue24132] Direct sub-classing of pathlib.Path

2015-05-06 Thread Paul Moore
Paul Moore added the comment: One issue with your code - what would you expect str(test) to produce? "dir/test.txt" or "dir\test.txt"? That's the point of the "flavour" - is it a Windows path or a Unix path? Agreed that an easier method of creating Path subclasses that handle this type of thi

[issue24124] Two versions of instructions for installing Python modules

2015-05-06 Thread Nick Coghlan
Nick Coghlan added the comment: As far as I'm aware, it's only confusing if you're poking around in the source tree, rather than using the built docs at docs.python.org (where the link to the legacy docs is now hidden away inside the distutils module docs). The legacy docs remain in place to p

[issue20178] Derby #9: Convert 52 sites to Argument Clinic across 11 files

2015-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For Modules/_curses_panel.c there is special issue, #20171, with the patch. issue20178-sqlite-01.patch is applied almost clearly, but due to changes to Argument Clinic it should be updated. Perhaps more functions can be converted (functions that don't use Py

[issue21800] Implement RFC 6855 (IMAP Support for UTF-8) in imaplib.

2015-05-06 Thread Maciej Szulik
Maciej Szulik added the comment: Yes, I can update that (that IMAP testing bug - http://bugs.python.org/issue22137, is taking me longer than I expected it ;)). I just want to make sure if I understand you correctly what's needs to be done is removing the utf8_enable code from init, we will ena

[issue24125] Fix for #23865 breaks docutils

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

[issue12202] Check status returns in msilib.SummaryInformation.GetProperty()

2015-05-06 Thread Mark Lawrence
Mark Lawrence added the comment: The code change to _msi.c is minimal, the bulk of the patch is additional test code. I think we could still use this. Thoughts? See also #1104. -- components: +Windows nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware ___

[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2015-05-06 Thread Mark Lawrence
Changes by Mark Lawrence : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 ___ Python tracker _