Re: Proper place for everything

2012-11-04 Thread Steven D'Aprano
On Sat, 03 Nov 2012 22:19:19 -0700, Aahz wrote: In article 509441cb$0$29967$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 02 Nov 2012 04:20:20 -0700, Jason Benjamin wrote: Anybody know of the appropriate place to troll and flame about

Re: is implemented with id ?

2012-11-04 Thread 88888 Dihedral
On Wednesday, September 5, 2012 10:41:19 PM UTC+8, Steven D'Aprano wrote: On Wed, 05 Sep 2012 10:00:09 -0400, Dave Angel wrote: On 09/05/2012 09:19 AM, Franck Ditter wrote: Thanks to all, but : - I should have said that I work with Python 3. Does that matter ? - May I

Re: is implemented with id ?

2012-11-04 Thread Hans Mulder
On 4/11/12 06:09:24, Aahz wrote: In article mailman.3250.1351999198.27098.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Sun, Nov 4, 2012 at 2:10 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: /* Shortcut for empty or interned objects */ if (v == u) {

Re: Obnoxious postings from Google Groups

2012-11-04 Thread Jamie Paul Griffin
/ ru...@yahoo.com wrote on Fri 2.Nov'12 at 11:39:10 -0700 / (I also hope I haven't just been suckered by a troll attempt, windows/unix is better then unix/windows being an age-old means of trolling.) No, i'm not a troll. I was just adding my opinion to the thread, I assumed that was

Re: Proper place for everything

2012-11-04 Thread Roy Smith
In article 5096202c$0$29967$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 03 Nov 2012 22:19:19 -0700, Aahz wrote: In article 509441cb$0$29967$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info

surprising += for lists

2012-11-04 Thread Ulrich Eckhardt
Hi everybody! I was just smacked by some very surprising Python 2.7 behaviour. I was assembling some 2D points into a list: points = [] points += (3, 5) points += (4, 6) What I would have expected is to have [(3, 5), (4, 6)], instead I got [3, 5, 4, 6]. My interpretations thereof is that

Re: surprising += for lists

2012-11-04 Thread Alec Taylor
Quick aside, you can insert tuples without much effort: `points += ((3,5),)` And also that I can't do the reverse, i.e.: foo = tuple() foo += [5,6] Traceback (most recent call last): File stdin, line 1, in module TypeError: can only concatenate tuple (not list) to tuple On Sun, Nov 4, 2012

Re: who can give me some practical tutorials on django 1.4 or 1.5?

2012-11-04 Thread Albert Hopkins
On Sun, 2012-11-04 at 13:29 +0800, Levi Nie wrote: Who can give me some practical tutorials on django 1.4 or 1.5? Thank you. Is the official[1] tutorial not practical enough? [1] https://docs.djangoproject.com/en/1.4/intro/tutorial01/ -- http://mail.python.org/mailman/listinfo/python-list

Re: surprising += for lists

2012-11-04 Thread Dave Angel
On 11/04/2012 06:57 AM, Ulrich Eckhardt wrote: Hi everybody! I was just smacked by some very surprising Python 2.7 behaviour. I was assembling some 2D points into a list: points = [] points += (3, 5) points += (4, 6) What I would have expected is to have [(3, 5), (4, 6)], instead I

__unicode__() works, unicode() blows up.

2012-11-04 Thread Roy Smith
Environment: Python-2.7.3 Ubuntu Precise mongoengine 0.6.20 I have a class which includes a __unicode__() method: class User(mongoengine.Document): def __unicode__(self): return self.username If I create an instance of this class by calling the constructor directly,

Re: __unicode__() works, unicode() blows up. (Never mind!)

2012-11-04 Thread Roy Smith
In article roy-90d9a2.08321804112...@news.panix.com, Roy Smith r...@panix.com wrote: print u.__unicode__() None print unicode(u) Traceback (most recent call last): File stdin, line 1, in module TypeError: coercing to Unicode: need string or buffer, NoneType found What's going on

Missing modules compiling python3.3

2012-11-04 Thread Giacomo Alzetta
I'm trying to compile python3.3 on my (K)ubuntu 12.04, but some modules are missing. In particular when doing make test I get: Python build finished, but the necessary bits to build these modules were not found: _bz2 _curses_curses_panel _dbm _gdbm

Re: Missing modules compiling python3.3

2012-11-04 Thread Christian Heimes
Am 04.11.2012 15:42, schrieb Giacomo Alzetta: I'm trying to compile python3.3 on my (K)ubuntu 12.04, but some modules are missing. In particular when doing make test I get: Python build finished, but the necessary bits to build these modules were not found: _bz2 _curses

Re: Missing modules compiling python3.3

2012-11-04 Thread mm0fmf
Giacomo Alzetta wrote: I'm trying to compile python3.3 on my (K)ubuntu 12.04, but some modules are missing. In particular when doing make test I get: Python build finished, but the necessary bits to build these modules were not found: _bz2 _curses_curses_panel

Re: __unicode__() works, unicode() blows up.

2012-11-04 Thread Joshua Landau
On 4 November 2012 13:32, Roy Smith r...@panix.com wrote: Environment: Python-2.7.3 Ubuntu Precise mongoengine 0.6.20 I have a class which includes a __unicode__() method: class User(mongoengine.Document): def __unicode__(self): return self.username If I create an

Re: __unicode__() works, unicode() blows up. (Never mind!)

2012-11-04 Thread Aahz
In article roy-30ba92.08410804112...@news.panix.com, Roy Smith r...@panix.com wrote: In article roy-90d9a2.08321804112...@news.panix.com, Roy Smith r...@panix.com wrote: print u.__unicode__() None print unicode(u) Traceback (most recent call last): File stdin, line 1, in module

Re: Obnoxious postings from Google Groups

2012-11-04 Thread Virgil Stokes
On 04-Nov-2012 12:13, Jamie Paul Griffin wrote: / ru...@yahoo.com wrote on Fri 2.Nov'12 at 11:39:10 -0700 / (I also hope I haven't just been suckered by a troll attempt, windows/unix is better then unix/windows being an age-old means of trolling.) No, i'm not a troll. I was just adding my

Re: surprising += for lists

2012-11-04 Thread Terry Reedy
On 11/4/2012 7:45 AM, Dave Angel wrote: What I wonder about is why list's __add__ is so fussy. Guido's reason is that it is not clear what the types of [1,2] + (3,4), (1,2) + [3,4], [] + range(4), range(2) + [3,4], etcetera should be. Such mixtures may be bugs. Seq.__add__ exists to

Re: __unicode__() works, unicode() blows up. (Never mind!)

2012-11-04 Thread Terry Reedy
On 11/4/2012 8:41 AM, Roy Smith wrote: In article roy-90d9a2.08321804112...@news.panix.com, Roy Smith r...@panix.com wrote: print u.__unicode__() None print unicode(u) Traceback (most recent call last): File stdin, line 1, in module TypeError: coercing to Unicode: need string or

Re: who can give me some practical tutorials on django 1.4 or 1.5?

2012-11-04 Thread Terry Reedy
On 11/4/2012 7:35 AM, Albert Hopkins wrote: On Sun, 2012-11-04 at 13:29 +0800, Levi Nie wrote: Who can give me some practical tutorials on django 1.4 or 1.5? Thank you. Is the official[1] tutorial not practical enough? [1] https://docs.djangoproject.com/en/1.4/intro/tutorial01/ There is

Re: Proper place for everything

2012-11-04 Thread Jeff Jeffries
everyone on this list is troll On Sun, Nov 4, 2012 at 6:17 AM, Roy Smith r...@panix.com wrote: In article 5096202c$0$29967$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 03 Nov 2012 22:19:19 -0700, Aahz wrote: In article

Re: Obnoxious postings from Google Groups

2012-11-04 Thread Mark Lawrence
On 01/11/2012 09:55, Jamie Paul Griffin wrote: / Robert Miles wrote on Wed 31.Oct'12 at 0:39:02 -0500 / For those of you running Linux: You may want to look into whether NoCeM is compatible with your newsreader and your version of Linux. It checks newsgroups news.lists.filters and

Re: Obnoxious postings from Google Groups

2012-11-04 Thread Ian Kelly
On Sun, Nov 4, 2012 at 11:39 AM, Mark Lawrence breamore...@yahoo.co.ukwrote: Anybody serious about programming should know that an OS is a combination of the hardware and software. Can the *Nix variants now do proper clustering or are they still decades behind VMS? Never used the other

Re: install pyOpenSSL in python2.7

2012-11-04 Thread John Gleeson
On 2012-11-03, at 2:58 AM, 水静流深 wrote: i have install pyOpenSSL-0.11 in python2.7 this way: download pyOpenSSL-0.11.tar.gz #tar -zvxf pyOpenSSL-0.11.tar.gz #cd pyOpenSSL-0.11 #python setup.py install import OpenSSL Traceback (most recent call last): File stdin, line 1, in module

Re: Missing modules compiling python3.3

2012-11-04 Thread Giacomo Alzetta
Il giorno domenica 4 novembre 2012 15:56:03 UTC+1, mm0fmf ha scritto: Giacomo Alzetta wrote: I'm trying to compile python3.3 on my (K)ubuntu 12.04, but some modules are missing. In particular when doing make test I get: Python build finished, but the necessary bits to

PDFBuilder can now take multiple input files from command line

2012-11-04 Thread vasudevram
Here is the blog post about it: http://jugad2.blogspot.in/2012/11/pdfbuilder-can-now-take-multiple-input.html In short: removed the temporary hard-coding, refactored the code some. PDFBuilder can now use multiple input files (of type .csv / .tdv), specified on the command-line, to create a

Re: No more Python support in NetBeans 7.0

2012-11-04 Thread bkuberek
On Thursday, March 24, 2011 10:32:44 AM UTC-4, Kees Bakker wrote: Hi, Sad news (for me, at least), in the upcoming version 7.0 of NetBeans there will be no Python plugin anymore. I have been using NetBeans for Python development for a while now and I was very happy with it. See this

Web application for drawing directed graphs from the output of Python's cProfile

2012-11-04 Thread David Wong
I recently built startgraphi.com. It's a web application that draws directed graphs of running times and function calls from the output of Python's cProfile. It also creates a sortable table of running times and function calls. I hope someone finds it useful. --

Re: Obnoxious postings from Google Groups

2012-11-04 Thread rusi
On Nov 4, 4:14 pm, Jamie Paul Griffin ja...@kode5.net wrote: / ru...@yahoo.com wrote on Fri  2.Nov'12 at 11:39:10 -0700 / (I also hope I haven't just been suckered by a troll attempt, windows/unix is better then unix/windows being an age-old means of trolling.) No, i'm not a troll. I was

Multi-dimensional list initialization

2012-11-04 Thread Demian Brecht
So, here I was thinking oh, this is a nice, easy way to initialize a 4D matrix (running 2.7.3, non-core libs not allowed): m = [[None] * 4] * 4 The way to get what I was after was: m = [[None] * 4, [None] * 4, [None] * 4, [None * 4]] (Obviously, I could have just hardcoded the

Re: No more Python support in NetBeans 7.0

2012-11-04 Thread Demian Brecht
On 2012-11-04, at 4:45 PM, bkube...@gmail.com wrote: However I am not happy about having to use different IDEs as I find myself coding in both python and php from project to project. One of the many reasons Vim is my editor of choice. Demian Brecht @demianbrecht

Re: Obnoxious postings from Google Groups

2012-11-04 Thread Chris Angelico
On Mon, Nov 5, 2012 at 5:10 PM, rusi rustompm...@gmail.com wrote: Among people who know me, I am a linux nerd: My sister scolded me yesterday because I put files on her computer without spaces: DoesAnyoneWriteLikeThis?!?! My filenames seldom have spaces in them, but that has nothing to do with

Re: Multi-dimensional list initialization

2012-11-04 Thread Andrew Robinson
On 11/04/2012 10:27 PM, Demian Brecht wrote: So, here I was thinking oh, this is a nice, easy way to initialize a 4D matrix (running 2.7.3, non-core libs not allowed): m = [[None] * 4] * 4 The way to get what I was after was: m = [[None] * 4, [None] * 4, [None] * 4, [None * 4]] FYI: The

python destructor

2012-11-04 Thread Ferencik Ioan
Hello there folks, I have a bit of a special issue. I'll start by disclosing myself for what i am doing. I am a postgraduate student and I really have good reasons to do what I am doing. At least i think so. And not the issue. I am building a python web service. This web service has some

Re: Multi-dimensional list initialization

2012-11-04 Thread Chris Rebert
On Sun, Nov 4, 2012 at 10:27 PM, Demian Brecht demianbre...@gmail.com wrote: So, here I was thinking oh, this is a nice, easy way to initialize a 4D matrix (running 2.7.3, non-core libs not allowed): m = [[None] * 4] * 4 The way to get what I was after was: m = [[None] * 4, [None] * 4,

Re: Multi-dimensional list initialization

2012-11-04 Thread Chris Angelico
On Mon, Nov 5, 2012 at 6:07 PM, Chris Rebert c...@rebertia.com wrote: x = None x.a = 42 Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'NoneType' object has no attribute 'a' Python needs a YouGottaBeKiddingMeError for times when you do something utterly

Re: [Python-ideas] sys.py3k

2012-11-04 Thread Chris Angelico
On Mon, Nov 5, 2012 at 9:33 AM, Steven D'Aprano st...@pearwood.info wrote: On 05/11/12 08:49, anatoly techtonik wrote: if sys.py3k: # some py2k specific code pass # Bring back reload in Python 3. try: reload except NameError: from imp import reload try: any except

Re: No more Python support in NetBeans 7.0

2012-11-04 Thread Chris Angelico
On Mon, Nov 5, 2012 at 5:29 PM, Demian Brecht demianbre...@gmail.com wrote: On 2012-11-04, at 4:45 PM, bkube...@gmail.com wrote: However I am not happy about having to use different IDEs as I find myself coding in both python and php from project to project. One of the many reasons Vim is

Re: Obnoxious postings from Google Groups

2012-11-04 Thread rusi
On Nov 5, 11:40 am, Chris Angelico ros...@gmail.com wrote: On Mon, Nov 5, 2012 at 5:10 PM, rusi rustompm...@gmail.com wrote: Among people who know me, I am a linux nerd: My sister scolded me yesterday because I put files on her computer without spaces: DoesAnyoneWriteLikeThis?!?! My

Re: Applying a paid third party ssl certificate

2012-11-04 Thread Dieter Maurer
ehsmenggro...@gmail.com writes: I haven't quite figured out how to apply a paid ssl cert, say RapidSSL free SSL test from Python's recent sponsor sslmatrix.com and what to do with that to make Python happy. This good fellow suggests using the PEM format. I tried and failed.

Re: Multi-dimensional list initialization

2012-11-04 Thread Andrew Robinson
On 11/04/2012 11:27 PM, Chris Angelico wrote: On Mon, Nov 5, 2012 at 6:07 PM, Chris Rebertc...@rebertia.com wrote: x = None x.a = 42 Traceback (most recent call last): File stdin, line 1, inmodule AttributeError: 'NoneType' object has no attribute 'a' Python needs a

[issue13349] Non-informative error message in index() and remove() functions

2012-11-04 Thread Sean Ochoa
Sean Ochoa added the comment: After discussing with folks on the #python-dev tonight, I learned that I was testing with a list and I should've been using a set. I'm working on a patch now, and I'm almost ready to have it reviewed. -- ___ Python

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2012-11-04 Thread Fergus Noble
Fergus Noble added the comment: GPS time doesn't include leap seconds so I think datetime is a good representation. If datetime doesn't know about leap seconds then there would still be some issues with finding the timedelta between a GPS time and a UTC time straddling a leap second but I

[issue11842] slice.indices with negative step and default stop

2012-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: Agreed. Closing. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11842 ___

[issue12634] Random Remarks in class documentation

2012-11-04 Thread Yongzhi Pan
Changes by Yongzhi Pan fossi...@users.sourceforge.net: -- nosy: +fossilet ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12634 ___ ___

[issue11383] compilation seg faults on insanely large expressions

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: I've started looking into what would be needed to fix this. The basic problem is that the compilation process involves many recursive operations, but doesn't contain *any* calls to the recursion control functions

[issue11383] compilation seg faults on insanely large expressions

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: One caveat on this idea: it may not be possible to use the standard recursion limiting functions here, since the Python level recursion limit is generally set quite low (1000 by default on my Fedora system). While this crash *is* a design flaw in our compiler

[issue16392] import crashes on circular imports in ext modules

2012-11-04 Thread Stefan Behnel
Stefan Behnel added the comment: The problem is a) that the module does not necessarily know to which place it eventually gets installed (Cython relies on the distutils Extension not lying to it, for example, which people do from time to time), and b) that the call to Py_InitModule() only

[issue11383] compilation seg faults on insanely large expressions

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Isn't it a duplicate of issue5765? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11383 ___

[issue11383] compilation seg faults on insanely large expressions

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - duplicate superseder: - stack overflow evaluating eval(() * 3) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11383 ___

[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: We want to minimise the risk of breaking working code. Making it easy to adjust this recursion limit separately from the main recursion limit by using a scaling factor is a good way to do that. It shouldn't increase the maintenance burden in any significant

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2012-11-04 Thread Daniel Urban
Daniel Urban added the comment: I've attached a patch addressing the comments on Rietveld. I've added another modification: inspect.signature uses inspect.unwrap. (It already tried to unwrap the function, but it wasn't protected from infinite recursion. I don't know if this worth fixing in

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't understand what you mean---can you elaborate? The Python implementation of this method only 40 lines length, including blank lines, docstring and comments. The C implementation requires over 160 lines and less clear. Are there ways to use in

[issue16400] update default PyPI behavior in docs re: listing versions

2012-11-04 Thread Chris Jerdonek
New submission from Chris Jerdonek: There is a mismatch between what PyPI and the docs say regarding listing versions of packages on PyPI. The current docs say, By default PyPI will list all versions of a given package. (from http://docs.python.org/3.4/distutils/packageindex.html ) However,

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch looks good to me. Now benchmarks and special casing for Py_ssize_t values needed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14794 ___

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: Now benchmarks and special casing for Py_ssize_t values needed. I thought about that, but I don't think it's worth it. I did some quick timings, and as expected the new version of slice.indices is somewhat slower than the original. But I think adding a

[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which reverts 3.1 implementation (and adds some optimization). Microbenchmark: $ ./python -m timeit -s import re re._compile('', 0) Results: 3.1: 1.45 usec per loop 3.2: 4.45 usec per loop 3.3: 9.91 usec per loop 3.4patched: 0.89 usec per

[issue16401] mention PKG-INFO in the documentation

2012-11-04 Thread Chris Jerdonek
New submission from Chris Jerdonek: Currently, the documentation makes no mention of the PKG-INFO file. It would be useful if the documentation mentioned what this file is and how it is created (e.g. via the sdist command), and also linked to PEP 314. This can be covered somewhere in the

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Look at compute_slice_indices() in Objects/rangeobject.c. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14794 ___

[issue16401] mention PKG-INFO in the documentation

2012-11-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: PEP 345 can also be linked to (Metadata version 1.2). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16401 ___

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm: one more thing that needs to be fixed before this can be committed---the error messages for maltyped start, stop and step are less informative than they used to be. Before the patch: slice(0, 2.3, 4).indices(5) Traceback (most recent call

[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Autogenerated code could easily hit the 1000 term limit - if anything, I'd be inclined to set it *higher* than 4 rather than lower, as breaking previously working code in a maintenance release is a bad thing, regardless of our opinion of the sanity of that

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: New patch that fixes the error message for badly typed slice arguments. Also tweaks a couple of other details: - replace Py_GE with Py_GT, Py_LE with Py_LT in the out-of-range comparisons, as suggested by Serhiy; this also makes it more closely match the

[issue13424] Add examples for open’s new opener argument

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Isn't it be clearer? import os dir_fd = os.open('somedir', os.O_RDONLY) def opener(path, flags): ... return os.open(path, flags, dir_fd=dir_fd) ... with open('spamspam.txt', 'w', opener=opener) as f: ...

[issue16183] ZipExtFile object close without file handle closed

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: -Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16183 ___ ___

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: compute_slice_indices() and slice_indices() looks as partially duplicates. I think the similar code should be merged and reused. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14794

[issue16108] Include maintainer information in register/upload

2012-11-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: Previous issues like this include issue 962772 (from 5/2004) and issue 3686 (from 8/2008). Copying the nosy lists from those issues. This issue affects me also because I maintain a project that I did not author. However, PyPI lists me as the author because

[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Mark Dickinson
New submission from Mark Dickinson: class A(object): ... def __index__(self): raise ZeroDivisionError ... [66062 refs] a = A() [66065 refs] range(10)[0:a] Traceback (most recent call last): File stdin, line 1, in module TypeError: slice indices must be integers or None or have an

[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch. -- keywords: +patch stage: - patch review type: - behavior versions: +Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27879/issue16402.patch ___ Python tracker

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: Agreed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14794 ___ ___ Python-bugs-list mailing list

[issue16403] update distutils docs to say that maintainer replaces author

2012-11-04 Thread Chris Jerdonek
New submission from Chris Jerdonek: As discussed in issue 16108 and other issues referenced there, distutils lists the maintainer as the author in PKG-INFO when the maintainer is provided. However, the documentation does not state this. This issue is to update the distutils documentation to

[issue16108] Include maintainer information in register/upload

2012-11-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: I also created issue 16403 to update the distutils docs to say that distutils lists the maintainer as the author in PKG-INFO when maintainer is provided. -- ___ Python tracker rep...@bugs.python.org

[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- components: +Interpreter Core ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16402 ___ ___

[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 94d15358ad6e by Mark Dickinson in branch '3.2': Issue #16402: In range slicing, fix shadowing of exceptions from __index__ method. http://hg.python.org/cpython/rev/94d15358ad6e New changeset 2b656a2cf7ef by Mark Dickinson in branch '3.3': Issue

[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16402 ___

[issue16235] Add python-config.sh for use during cross compilation.

2012-11-04 Thread Ray Donnelly
Ray Donnelly added the comment: I agree in principle about not having to maintain two implementations but I would worry about breaking external packages that depend on the python implementation. In the meantime, please find an updated version of this patch that adds support for --configdir

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I quote from Gregory P. Smith (msg91897): The decryption provided by the zipfile module is for the worthless 32-bit crc based encryption of zipfiles. I think promoting the use of that is a bad idea. zipfile can be used by people to get their data out of

[issue16235] Add python-config.sh for use during cross compilation.

2012-11-04 Thread Ray Donnelly
Ray Donnelly added the comment: I also checked the Windows releases and python-config isn't included. However, I don't think there's a good reason for that. python-config would in theory work fine if people wanted to link their programs to Python on Windows, as would python-config.sh given a

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also criticism in the original discussion: http://mail.python.org/pipermail/python-dev/2009-August/091450.html . -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10030

[issue16108] Include maintainer information in register/upload

2012-11-04 Thread Stefan Krah
Stefan Krah added the comment: Would that result in displaying both author and maintainer info on the PyPI page? For what cases is it useful? It gives due credit to the original author if another person maintains the package. I think it's a matter of common courtesy not to suppress author

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Robert de Vries
Robert de Vries added the comment: My use case is decrypting files of 100's of megabytes. This is so slow that it is quite useless. About an hour or so. I do agree that the encryption is worthless, but that is not important for my use case where I want to discourage people from reverse

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread R. David Murray
R. David Murray added the comment: We aren't particularly interested in helping people make their files slightly harder to reverse engineer, either, so I don't think that is a good enough reason for accepting this. There might be other reasons that are good enough, but I don't think that is

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Christian Heimes
Christian Heimes added the comment: From the zlib FAQ: 38. How can I encrypt/decrypt zip files with zlib? zlib doesn't support encryption. The original PKZIP encryption is very weak and can be broken with freely available programs. To get strong encryption, use GnuPG,

[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset ab02cd145f56 by Nick Coghlan in branch '3.3': Issue #5765: Apply a hard recursion limit in the compiler http://hg.python.org/cpython/rev/ab02cd145f56 New changeset bd1db93d76e1 by Nick Coghlan in branch 'default': Issue #5765: Merge from 3.3

[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: You can take the scaling factor out if you really want, but it adds no real maintenance overhead, and better reflects the real stack usage. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5765

[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: However, agreed on the won't fix for 3.2 and 2.7, although I'd consider it at least for 2.7 if someone went through and worked out a patch that applies cleanly. For 3.2, this really isn't the kind of thing we'd want to do in the final regular maintenance

[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: You can take the scaling factor out if you really want, but it adds no real maintenance overhead, and better reflects the real stack usage. Can you also add a related snippet in Tools/scripts/find_recursionlimit.py ? --

[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: Note: if you do take the scaling factor out, don't forget to track down the reasons behind the original commit that added the test that broke *without* the scaling factor. For me, the test suite fails without it is reason enough for me to say its needed -

[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf2515d0328b by Nick Coghlan in branch '3.3': Issue #5765: Also check the compiler when finding the recursion limit http://hg.python.org/cpython/rev/cf2515d0328b New changeset 3712028a0c34 by Nick Coghlan in branch 'default': Issue #5765: Merge

[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: The sanity check in the recursion limit finding script is definitely a good idea, so I added that (as the commits show). For the record, running that script on the 3.3 branch with my 4 GB RAM Fedora 17 ASUS Zenbook finds a maximum recursion limit around 16800,

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Robert de Vries
Robert de Vries added the comment: If the encryption is so horrible why is there any support (with bad performance) at all in Python? It would be better to remove it altogether. This prevents users from building software using this feature only to find out later how bad the performance is.

[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Mark Shannon
Mark Shannon added the comment: I don't think there is any need for a scaling factor. Expressions in auto-generated trees will tend to be trees of binary operator rather lists of purely unary operators. A tree of a billion items only has a depth of ~30. There is no way an expression tree 1000

[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: The sanity check in the recursion limit finding script is definitely a good idea, so I added that (as the commits show). Didn't you make a mistake in the recursion factor there? Or is it really 10 rather than 3? --

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: If the encryption is so horrible why is there any support (with bad performance) at all in Python? It would be better to remove it altogether. We don't remove it as it would break existing programs which rely on this feature. However adding a bunch of C code

[issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever

2012-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch is probably trivial - however I would still like some verification. Would it be correct to call self.close() when fp.read returns ''? In case self.length is not present, I don't see a way around this anyway. When it is present, and fp.read returns

[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: Antoine: The scaling is deliberate higher in the recursion limit finder because we just want to ensure it hits the recursion limit (or blows the stack, if the scaling is wrong). In the tests, I cut it finer because I wanted to ensure we were straddling the

[issue16404] Uses of PyLong_FromLong that don't check for errors

2012-11-04 Thread Ned Batchelder
New submission from Ned Batchelder: Examining the CPython sources, there are a number of places where PyLong_FromLong is used without checking its return value. In places where it is done correctly, PyErr_Occurred is often used to avoid having to check every call. Here are places where it

[issue16405] Explain how to set up the whitespace commit hook locally

2012-11-04 Thread Nick Coghlan
New submission from Nick Coghlan: Setting up the same commit checks locally that the main repo enforces for incoming patch sets can save a great deal of frustration with the server rejecting hg push for changes (this can be especially frustrating if you have already merged changes across

[issue16392] import crashes on circular imports in ext modules

2012-11-04 Thread Brett Cannon
Brett Cannon added the comment: It sounds like Cython has its fix and CPython knows what should eventually be changed in Python 4 to bring extension module initialization closer to how Python module code is initialized. Maybe we should add a warning in some documentation somewhere about this

[issue16405] Explain how to set up the whitespace commit hook locally

2012-11-04 Thread Ezio Melotti
Ezio Melotti added the comment: Configuring the editor to remove trailing whitespace, and using make patchcheck are other valid solutions to this problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16405

  1   2   >