Re: Can't import modules

2012-10-01 Thread cjgohlke
On Sunday, September 30, 2012 5:35:02 PM UTC-7, Peter Farrell wrote: Thanks for trying to help, everybody. Sorry I didn't post the whole error message. Now my problem is I just installed VPython and I'm trying to run the very first example, bounce.py which I located. I opened it and ran it in

Re: Slicing iterables in sub-generators without loosing elements

2012-10-01 Thread Mark Lawrence
On 01/10/2012 01:58, 8 Dihedral wrote: Your question seems vague to me. If you know you are storing only immutable tuples in a list, then the way to iterate is simple. Does Python have a magic method that let's me use mutable tuples? I'd also like immutable lists. Is it worth raising

How write a IGMP V3 request

2012-10-01 Thread pedr0
Hello, I wrote this piece of code but I am not able to modify it in order to use IGMPV3 and use the source feature of IGMPV3, how can I add a membership for a group on an interface for specified source ? Something like this piece of code (C under Linux):

Re: Coexistence of Python 2.x and 3.x on same OS

2012-10-01 Thread Mark Lawrence
On 01/10/2012 04:06, Edward Diener wrote: On 9/30/2012 3:38 PM, Andrew Berg wrote: Unix-based OSes should already obey the shebang line, and on Windows, there's py.exe in 3.3 that will launch the intended version based on that shebang line. The problem with that is that one has to already

Re: Can't import modules

2012-10-01 Thread Mark Lawrence
On 01/10/2012 02:25, Steven D'Aprano wrote: On Sun, 30 Sep 2012 17:35:02 -0700, Peter Farrell wrote: Thanks for trying to help, everybody. Sorry I didn't post the whole error message. Now my problem is I just installed VPython and I'm trying to run the very first example, bounce.py which I

Re: parse an environment file

2012-10-01 Thread Ulrich Eckhardt
Am 01.10.2012 02:11, schrieb Jason Friedman: $ crontab -l * * * * * env This produces mail with the following contents: [...] SHELL=/bin/sh ^^^ [...] On the other hand $ env produces about 100 entries, most of which are provided by my .bashrc; bash != sh Instead of

Re: parse an environment file

2012-10-01 Thread Alain Ketterlin
Jason Friedman ja...@powerpull.net writes: [...] I want my python 3.2.2 script, called via cron, to know what those additional variables are. How? This is not a python question. Have a look at the crontab(5) man page, it's all explained there. -- Alain. --

Re: parse an environment file

2012-10-01 Thread Jason Friedman
I want my python 3.2.2 script, called via cron, to know what those additional variables are. How? Thank you for the feedback. A crontab line of * * * * * . /path/to/export_file /path/to/script.py does indeed work, but for various reasons this approach will not always be available to me.

Re: How to apply the user's HTML environment in a Python programme?

2012-10-01 Thread BobAalsma
Op vrijdag 21 september 2012 16:15:30 UTC+2 schreef Joel Goldstick het volgende: On Fri, Sep 21, 2012 at 9:58 AM, BobAalsma wrote: Op vrijdag 21 september 2012 15:36:11 UTC+2 schreef Jerry Hill het volgende: On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote: Thanks, Joel, yes, but

Re: parse an environment file

2012-10-01 Thread Chris Angelico
On Tue, Oct 2, 2012 at 12:12 AM, Jason Friedman ja...@powerpull.net wrote: Let me restate my question. I have a file that looks like this: export VAR1=foo export VAR2=bar # Comment export VAR3=${VAR1}${VAR2} I want this: my_dict = {'VAR1': 'foo', 'VAR2': 'bar', 'VAR3': 'foobar'} I can

Re: parse an environment file

2012-10-01 Thread Chris Angelico
On Tue, Oct 2, 2012 at 12:37 AM, Jason Friedman ja...@powerpull.net wrote: Is there a reason to use that format, rather than using Python notation? I've at times made config files that simply get imported. Instead of a dictionary, you'd have a module object: # config.py VAR1='foo'

RE: Fastest template engine

2012-10-01 Thread Andriy Kornatskyy
1. Added benchmarks for python 3.3 2. Captured total numbers of calls made by corresponding template engine and number of unique functions used. http://mindref.blogspot.com/2012/07/python-fastest-template.html Comments or suggestions are welcome. Andriy

Re: parse an environment file

2012-10-01 Thread 88888 Dihedral
On Monday, October 1, 2012 10:42:02 PM UTC+8, Chris Angelico wrote: On Tue, Oct 2, 2012 at 12:37 AM, Jason Friedman ja...@powerpull.net wrote: Is there a reason to use that format, rather than using Python notation? I've at times made config files that simply get imported. Instead of

where to view range([start], stop[, step])'s C implementation source code ?

2012-10-01 Thread iMath
where to view range([start], stop[, step])'s C implementation source code ? -- http://mail.python.org/mailman/listinfo/python-list

Re: parse an environment file

2012-10-01 Thread Hans Mulder
On 1/10/12 16:12:50, Jason Friedman wrote: I want my python 3.2.2 script, called via cron, to know what those additional variables are. How? Thank you for the feedback. A crontab line of * * * * * . /path/to/export_file /path/to/script.py does indeed work, but for various reasons

Re: where to view range([start], stop[, step])'s C implementation source code ?

2012-10-01 Thread Ian Kelly
On Mon, Oct 1, 2012 at 9:28 AM, iMath redstone-c...@163.com wrote: where to view range([start], stop[, step])'s C implementation source code ? http://hg.python.org/cpython/file/3f739f42be51/Objects/rangeobject.c -- http://mail.python.org/mailman/listinfo/python-list

Re: Coexistence of Python 2.x and 3.x on same OS

2012-10-01 Thread Alister
On Sun, 30 Sep 2012 15:14:17 -0400, Edward Diener wrote: Has there been any official software that allows both the Python 2.x and 3.x releases to coexist on the same OS so that the end-user can easily switch between them when invoking Python scripts after each has been installed to their own

get google scholar using python

2012-10-01 Thread রুদ্র ব্যাণার্জী
If I am trying to access a google scholar search result using python, I get the following error(403): $ python Python 2.7.3 (default, Jul 24 2012, 10:05:38) [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2 Type help, copyright, credits or license for more information. from HTMLParser import

RE: get google scholar using python

2012-10-01 Thread Nick Cash
urllib2.urlopen('http://scholar.google.co.uk/scholar?q=albert ... urllib2.HTTPError: HTTP Error 403: Forbidden Will you kindly explain me the way to get rid of this? Looks like Google blocks non-browser user agents from retrieving this query. You *could* work around it by setting the

Re: print or write on a text file ?

2012-10-01 Thread nn
On Sep 28, 2:42 pm, Franck Ditter fra...@ditter.org wrote: Hi ! Here is Python 3.3 Is it better in any way to use print(x,x,x,file='out') or out.write(x) ? Any reason to prefer any of them ? There should be a printlines, like readlines ? Thanks,     franck There is out.writelines(lst) --

Re: get google scholar using python

2012-10-01 Thread Grant Edwards
On 2012-10-01, Nick Cash nick.c...@npcinternational.com wrote: urllib2.urlopen('http://scholar.google.co.uk/scholar?q=albert ... urllib2.HTTPError: HTTP Error 403: Forbidden Will you kindly explain me the way to get rid of this? Looks like Google blocks non-browser user agents from

Re: get google scholar using python

2012-10-01 Thread রুদ্র ব্যাণার্জী
I know one more python app that do the same thing http://www.icir.org/christian/downloads/scholar.py and few other app(Mendeley desktop) for which I found an explanation: (from http://academia.stackexchange.com/questions/2567/api-eula-and-scraping-for-google-scholar ) that: I know how Mendley

Re: get google scholar using python

2012-10-01 Thread Jerry Hill
On Mon, Oct 1, 2012 at 1:28 PM, রুদ্র ব্যাণার্জী bnrj.ru...@gmail.com wrote: So, If I manage to use the User-Agent as shown by you, will I still violating the google EULA? Very likely, yes. The overall Google Terms of Services (http://www.google.com/intl/en/policies/terms/) say Don’t misuse

Re: Coexistence of Python 2.x and 3.x on same OS

2012-10-01 Thread David Robinow
On Sun, Sep 30, 2012 at 11:55 PM, Dave Angel d...@davea.name wrote: The problem with that is that one has to already being using 3.3 to use this facility. I was hoping for a solution which was backwards compatible with Python 2.x. ... That does not solve the problem for Python 2.x

Re: Coexistence of Python 2.x and 3.x on same OS

2012-10-01 Thread Mark Lawrence
On 01/10/2012 20:36, David Robinow wrote: On Sun, Sep 30, 2012 at 11:55 PM, Dave Angel d...@davea.name wrote: The problem with that is that one has to already being using 3.3 to use this facility. I was hoping for a solution which was backwards compatible with Python 2.x. ... That does not

Re: Slicing iterables in sub-generators without loosing elements

2012-10-01 Thread Joshua Landau
On 1 October 2012 09:19, Mark Lawrence breamore...@yahoo.co.uk wrote: On 01/10/2012 01:58, 8 Dihedral wrote: Your question seems vague to me. If you know you are storing only immutable tuples in a list, then the way to iterate is simple. Does Python have a magic method that let's me

[issue1185124] pydoc doesn't find all module doc strings

2012-10-01 Thread Manuel Pégourié-Gonnard
Changes by Manuel Pégourié-Gonnard m...@elzevir.fr: -- nosy: +mpg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1185124 ___ ___ Python-bugs-list

[issue8800] add threading.RWLock

2012-10-01 Thread Sebastian Noack
Sebastian Noack added the comment: Yes, you could also look at the shared/exclusive lock as one lock with different states. But this approach is neither more common, have a look at Java's ReadWriteLock [1] for example, which works just like my patch does, except that a factory is returned

[issue14783] Make int() and str() docstrings correct

2012-10-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching proposed patch. This updates the docstrings for int() and str(), as well as for range() and slice() in a similar way. It also makes the documentation for str() closer to that of the docstring. The documentation for int(), range(), and slice() has

[issue8800] add threading.RWLock

2012-10-01 Thread Sebastian Noack
Sebastian Noack added the comment: @richard: I'm sorry, but both of my patches contain changes to 'Lib/threading.py' and can be applied on top of Python 3.3.0. So can you explain what do you mean, by missing the changes to threading.py? -- ___

[issue8800] add threading.RWLock

2012-10-01 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Personally, I would prefer to make the shared and exclusive locks attributes of the same object, so one could do with selock.shared: ... with selock.exclusive: ... Please note, the same object could simply be a namedtuple

[issue8800] add threading.RWLock

2012-10-01 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: shared/exclusive - abstract description of what it is If you want to argue it this way, I counter that the attributes shared and exclusive apply to the type of access to the protected object you are talking about, and yet, the name suggest that they

[issue8800] add threading.RWLock

2012-10-01 Thread Richard Oudkerk
Richard Oudkerk added the comment: @richard: I'm sorry, but both of my patches contain changes to 'Lib/threading.py' and can be applied on top of Python 3.3.0. So can you explain what do you mean, by missing the changes to threading.py? I was reading the Rietveld review page

[issue8800] add threading.RWLock

2012-10-01 Thread Richard Oudkerk
Richard Oudkerk added the comment: With this, you are stuck with employing a context manager model only. You loose the flexibility to do explicit acquire_read() or acquire_write(). You are not restricted to the context manager model. Just use selock.shared.acquire() or

[issue8800] add threading.RWLock

2012-10-01 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Perhaps I should have pointed out, for Sebastian's benefit, that my second patch uses timeout rather than blocking since that is the new black in python 3. Also, I think the threading implementation shows clearly the problem of having two independent

[issue9957] SpooledTemporayFile.truncate should take size parameter

2012-10-01 Thread Wael Al Jishi
Wael Al Jishi added the comment: Shouldn't this issue be closed, or is there more to be done? -- nosy: +Wael.Al.Jishi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9957 ___

[issue16007] Improved Error message for failing re expressions

2012-10-01 Thread Wael Al Jishi
Wael Al Jishi added the comment: The attached file is very different to the current source, including the docstring. Is this from python 2.x? -- nosy: +Wael.Al.Jishi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16007

[issue8800] add threading.RWLock

2012-10-01 Thread Sebastian Noack
Sebastian Noack added the comment: If you want to argue it this way, I counter that the attributes shared and exclusive apply to the type of access to the protected object you are talking about, and yet, the name suggest that they are attributes of the lock itself. A lock's sole purpose is

[issue15631] Python 3.3 beta 1 installation issue lib/lib64 folders

2012-10-01 Thread Nathan Robertson
Nathan Robertson added the comment: This is also an issue on openSUSE 12.2 with the release version of Python 3.3 when compiling from sources. OBS (openSUSE Build Service) has RPMs for 3.3rc1. I'm assuming they've got a patch which fixes this issue, and looking at the spec file (lines 61, 62

[issue16097] Minor fix in comment in codecs.py

2012-10-01 Thread Wael Al Jishi
New submission from Wael Al Jishi: Minor fix to a comment in the read() function definition in codecs.py Diff attached. -- components: None files: comment-codecs-fix.patch keywords: patch messages: 171705 nosy: Wael.Al.Jishi priority: normal severity: normal status: open title: Minor

[issue16098] Bisect optimization in heapq.nsmallest is never used

2012-10-01 Thread Will Haldean Brown
: Library (Lib) files: heapq-use-bisect.20121001.patch keywords: patch messages: 171706 nosy: haldean priority: normal severity: normal status: open title: Bisect optimization in heapq.nsmallest is never used type: performance versions: Python 3.4 Added file: http://bugs.python.org/file27372/heapq-use

[issue16000] test_curses should use unittest

2012-10-01 Thread Ed Campbell
Ed Campbell added the comment: I'd suggest using unittest.TestCase.assertRaises() as a context manager to remove some try-excepts. For example I think function test_userptr_without_set() on line 245 could use: with self.assertRaises(curses.panel.error): p.userptr() I could create a patch

[issue8800] add threading.RWLock

2012-10-01 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think Sebastian's algorithm does not correctly deal with the non-blocking case. Consider the following situation: * Thread-1 successfully acquires exclusive lock. Now num_got_lock == 1. * Thread-2 blocks waiting for shared lock. Will block until

[issue8800] add threading.RWLock

2012-10-01 Thread Richard Oudkerk
Richard Oudkerk added the comment: My previous comment applied to Sebastian's first patch. The second seems to fix the issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8800 ___

[issue8800] add threading.RWLock

2012-10-01 Thread Christian Heimes
Christian Heimes added the comment: I wonder, why are you creating your own algorithm here? There must be plenty of reference implementations that are already used in production code. Don't be a shamed to copy a Java implementation! :) The entire threading module is a rip-off of the Java

[issue16099] robotparser doesn't support request rate and crawl delay parameters

2012-10-01 Thread Nikolay Bogoychev
New submission from Nikolay Bogoychev: Robotparser doesn't support two quite important optional parameters from the robots.txt file. I have implemented those in the following way: (Robotparser should be initialized in the usual way: rp = robotparser.RobotFileParser() rp.set_url(..) rp.read )

[issue16099] robotparser doesn't support request rate and crawl delay parameters

2012-10-01 Thread Christian Heimes
Christian Heimes added the comment: Thanks for the patch. New features must be implemented in Python 3.4. Python 2.7 is in feature freeze mode and therefore doesn't get new features. -- keywords: +gsoc nosy: +christian.heimes stage: - test needed versions: +Python 3.4 -Python 2.7

[issue8800] add threading.RWLock

2012-10-01 Thread Sebastian Noack
Sebastian Noack added the comment: I would love to see how other people would implement a shared/exclusive lock that can be acquired from different processes. However it really seems that nobody did it before. If you know a reference implementation I would be more than happy. There are

[issue16098] Bisect optimization in heapq.nsmallest is never used

2012-10-01 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +rhettinger, stutzbach stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16098 ___

[issue8800] add threading.RWLock

2012-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: On the naming front: shorthands like Shrd and Excl are a bit frown upon. Since SharedExclusiveLock is on the long side, I would suggest calling the API SELock. -- ___ Python tracker rep...@bugs.python.org

[issue16099] robotparser doesn't support request rate and crawl delay parameters

2012-10-01 Thread Nikolay Bogoychev
Nikolay Bogoychev added the comment: Okay, sorry didn't know that (: Here's the same patch (Same functionality) for python3 Feedback is welcome, as always (: -- Added file: http://bugs.python.org/file27374/robotparser.patch ___ Python tracker

[issue8800] add threading.RWLock

2012-10-01 Thread Christian Heimes
Christian Heimes added the comment: A RW lock is part of POSIX threads [1]. It's usually a good idea to either use POSIX functions or to mimic their behavior. After all POSIX is an industry standard. Boost and Java have several lock and rw lock implementations. Wikipedia [2] is a good

[issue8800] add threading.RWLock

2012-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: A RW lock is part of POSIX threads [1]. It's usually a good idea to either use POSIX functions or to mimic their behavior. After all POSIX is an industry standard. We've already departed from that. Our Lock is nothing like a mutex, for example (it's more of

[issue8800] add threading.RWLock

2012-10-01 Thread Sebastian Noack
Sebastian Noack added the comment: Thanks, but as I already said there are a lot of implementations for shared/exclusive lock that can be acquired from different threads. But we need with threading as well as with multiprocessing. And by the way POSIX is the standard for implementing

[issue16099] robotparser doesn't support request rate and crawl delay parameters

2012-10-01 Thread Christian Heimes
Christian Heimes added the comment: We have a team that mentors new contributors. If you are interested to get your patch into Python 3.4, please read http://pythonmentors.com/ . The people are really friendly and will help you with every step of the process. -- keywords: +easy -gsoc

[issue16097] Minor fix in comment in codecs.py

2012-10-01 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- assignee: - tim.golden nosy: +tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16097 ___

[issue8800] add threading.RWLock

2012-10-01 Thread Charles-François Natali
Charles-François Natali added the comment: The page also mentions a seqlock which looks interesting to me as it's fast for few writers with lots of readers. A seqlock is suitable for consistent views of simple data structures (e.g. a counter in the Linux kernel), but it won't fly for a

[issue16086] tp_flags: Undefined behaviour with 32 bits long

2012-10-01 Thread Martin v . Löwis
Martin v. Löwis added the comment: What matters is that precompiled stay compatible; in addition, existing source code should continue to compile unmodified. In the specific case, the flags type also shows up in PyType_Spec. As a consequence, the actual TPFLAGS_ values *do* constitute a part

[issue16100] Compiling vim with Python 3.3 support fails

2012-10-01 Thread Sascha
New submission from Sascha: Hello there, I hope I'm right here. I tried to compile vim with Python 3.3 32bit support. OS: Windows 7 64bit Compiler: MinGW Compiling vim with Python 3.2 32bit support works! The error message: obj/if_python3.o:if_python3.c:(.text+0x739): undefined reference to

[issue16086] tp_flags: Undefined behaviour with 32 bits long

2012-10-01 Thread STINNER Victor
STINNER Victor added the comment: tp_flags type is long, not int. Le 1 oct. 2012 16:42, Martin v. Löwis rep...@bugs.python.org a écrit : Martin v. Löwis added the comment: What matters is that precompiled stay compatible; in addition, existing source code should continue to compile

[issue15897] zipimport.c doesn't check return value of fseek()

2012-10-01 Thread Felipe Cruz
Felipe Cruz added the comment: Hello! Just sent the Contributor Agreement Form. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15897 ___ ___

[issue16097] Minor fix in comment in codecs.py

2012-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset bb77400af434 by Tim Golden in branch '3.3': Issue16097 Fix small typo in comment (patch by Wael Al Jishi) http://hg.python.org/cpython/rev/bb77400af434 New changeset cbf651ab3e21 by Tim Golden in branch 'default': Issue16097 Fix small typo in

[issue16097] Minor fix in comment in codecs.py

2012-10-01 Thread Tim Golden
Tim Golden added the comment: Committed in bb77400af434. Thanks -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16097 ___

[issue16100] Compiling vim with Python 3.3 support fails

2012-10-01 Thread R. David Murray
R. David Murray added the comment: We don't currently support mingw, and I don't think any of our active developers have experience with it. If this actually worked in 3.2 then the fix *might* be relatively easy. Hopefully you or someone else will be interested enough to work out a patch.

[issue12322] ElementPath 1.3 expressions documentation

2012-10-01 Thread Mike Hoy
Mike Hoy added the comment: Here is a link to our docs page with the info that needs to be changed: http://docs.python.org/py3k/library/xml.etree.elementtree.html#supported-xpath-syntax I was going to work on a patch but in irc we decided to wait to see what people had to say about this. Also

[issue16100] Compiling vim with Python 3.3 support fails

2012-10-01 Thread Sascha
Sascha added the comment: Actually I'd have no problem using 3.2 Though with 3.2 I got the problem described here: https://groups.google.com/forum/?fromgroups=#!topic/vim_dev/5MYb23t9ZBM I was hoping this is fixed in 3.3, but now I can't even compile it --

[issue16100] Compiling vim with Python 3.3 support fails

2012-10-01 Thread R. David Murray
R. David Murray added the comment: Well, that looks like a bug in VIM, not Python. Though if that order of calls is required and it is not documented, that would be a doc bug (especially if it used to work in the other order in python2.) -- ___

[issue16000] test_curses should use unittest

2012-10-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: Ed, yes, switching all of test_curses to using unittest patterns is the eventual goal of this issue, though this may be done in more than one stage. As I said in my previous comment, I limited the first patch to focusing on the proper setUp(), tearDown(),

[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2012-10-01 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- priority: normal - high stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16076 ___

[issue16000] test_curses should use unittest

2012-10-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: Ed, yes, switching all of test_curses to using unittest patterns is the eventual goal of this issue, though this may be done in more than one stage. As I said in my previous comment, I limited the first patch to focus on the proper setUp(), tearDown(), etc

[issue16101] Verify all imported modules at startup are needed

2012-10-01 Thread Brett Cannon
New submission from Brett Cannon: It's probably time to examine what modules are imported at startup and whether they are necessary or if some can be trimmed off so as to avoid the overhead. -- messages: 171733 nosy: brett.cannon priority: normal severity: normal status: open title:

[issue16079] list duplicate test names with patchcheck

2012-10-01 Thread Xavier de Gaye
Xavier de Gaye added the comment: The attached script, named duplicate_code_names.py, takes a file name list as argument and prints duplicate code names found in these files ordered by function, class, method and nested class or function. The script output on the whole std lib (see the result

[issue16079] list duplicate test names with patchcheck

2012-10-01 Thread Xavier de Gaye
Changes by Xavier de Gaye xdeg...@gmail.com: Added file: http://bugs.python.org/file27376/std_lib_duplicates.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16079 ___

[issue16086] tp_flags: Undefined behaviour with 32 bits long

2012-10-01 Thread Martin v . Löwis
Martin v. Löwis added the comment: tp_flags type is long, not int. Indeed, and PyType_Spec.flags is int, not long. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16086 ___

[issue16102] uuid._netbios_getnode() is outdated

2012-10-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Function uuid._netbios_getnode() in Lib/uuid.py is not properly ported from Python 2. At least it uses indexing on map result. Perhaps there are other errors. The function obviously not been tested for years. -- components: Library (Lib), Windows

[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2012-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In 3.2 repr(xml.etree.ElementTree.Element) is class 'xml.etree.ElementTree.Element'. In 3.3 repr(xml.etree.ElementTree.Element) is class 'Element'. -- versions: +Python 3.4 ___ Python tracker

[issue16089] _elementtree causes segfault in GC

2012-10-01 Thread Georg Brandl
Georg Brandl added the comment: Let's make sure this gets into 3.3.1. -- priority: critical - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16089 ___

[issue16089] _elementtree causes segfault in GC

2012-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a collection of assorted small fixes for celementtree. There are probably other problems lurking (the coding style there is quite old). I cannot say anything about the crasher until there's a simple reproducer :) -- nosy: +pitrou Added file:

[issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0

2012-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Antoine, are you OK with setting the switch interval to 1e-5 for all platforms? Otherwise we'll probably have many platform specific workarounds. Yes, I'm ok with it. -- ___ Python tracker rep...@bugs.python.org

[issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0

2012-10-01 Thread Stefan Krah
Stefan Krah added the comment: I can't reproduce it either even on the machine that magically caught every problem in #15781. FWIW, the Gentoo bot also had a completely isolated segfault in test_ssl lately. Antoine, are you OK with setting the switch interval to 1e-5 for all platforms?

[issue16089] _elementtree causes segfault in GC

2012-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: More assorted celementtree cleanups. -- Added file: http://bugs.python.org/file27378/ctree2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16089 ___

[issue16103] Help() fails at raw_input readline (IDLE 2.7.3, Win7, pythonw)

2012-10-01 Thread Terry J. Reedy
New submission from Terry J. Reedy: Problem is only 2.7.3 (not 3.2.3, 3.3.0), tested on Windows Command Line Window help() ... help _ The _ is blinking, waiting for input. IDLE Shell help() ... help Traceback (most recent call last): File pyshell#0, line 1, in module help() File

[issue16104] Use multiprocessing in compileall script

2012-10-01 Thread Daniel Holth
New submission from Daniel Holth: compileall would benefit approximately linearly from additional CPU cores. There should be an option. The noisy output would have to change. Right now it prints compiling and then done synchronously with doing the actual work. -- messages: 171744

[issue16105] Pass read only FD to signal.set_wakeup_fd

2012-10-01 Thread Felipe Cruz
New submission from Felipe Cruz: It's possible to set a read only FD to signal.set_wakeup_fd(fd) Since write call[1] inside 'trip_signal' return code is ignored, no error will be raised. An untested solution is to call fcntl in this FD to check presence of write flags. 1 -

[issue16089] _elementtree causes segfault in GC

2012-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, the crash involves an _ElementInterface subclass named SimpleElementTreeVar: #0 0x00524c0f in visit_decref (op=Traceback (most recent call last): File /home/antoine/cpython/33/python-gdb.py, line 1298, in to_string pyop =

[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

2012-10-01 Thread Nadeem Vawda
Nadeem Vawda added the comment: Ah, nice - I didn't think of that optimization. Neater and faster. I've committed this patch [e6d872b61c57], along with a minor bugfix [7252f9f95fe6], and another optimization for readline()/readlines() [6d7bf512e0c3]. [merge with default: a19f47d380d2] If

[issue16089] _elementtree causes segfault in GC

2012-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, the problem is that _elementtree.TreeBuilder expects to receive _elementtree.Element instances, but simpleTAL's element_factory instead gives _ElementInterface instances. In other words, TreeBuilder is completely broken. --

[issue16089] _elementtree causes segfault in GC

2012-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Example of this is the following code in treebuilder_handle_start: if (this != Py_None) { if (element_add_subelement((ElementObject*) this, node) 0) goto error; (note the overly optimistic cast) but this is really a pervasive problem,

[issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0

2012-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 484a4b9349af by Stefan Krah in branch '3.3': Issue #15599: Increase the switch interval. Several systems cannot handle http://hg.python.org/cpython/rev/484a4b9349af -- ___ Python tracker

[issue16089] _elementtree causes segfault in GC

2012-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'll still commit my cleanup patch in the meantime :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16089 ___

[issue16089] _elementtree causes segfault in GC

2012-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset f9224f23f473 by Antoine Pitrou in branch '3.3': Sanitize and modernize some of the _elementtree code (see issue #16089). http://hg.python.org/cpython/rev/f9224f23f473 New changeset 9fb0a8fc5d79 by Antoine Pitrou in branch 'default': Sanitize and

[issue16089] _elementtree causes segfault in GC

2012-10-01 Thread Eli Bendersky
Eli Bendersky added the comment: Thank you, Antoine, for looking into this. I wish I could participate in a meaningful way, but alas it will be days or weeks before I can recreate a suitable setup to get back hacking on Python. -- ___ Python

[issue16105] Pass read only FD to signal.set_wakeup_fd

2012-10-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16105 ___ ___ Python-bugs-list

[issue15609] Format string: add more fast-path

2012-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 559a430e563c by Victor Stinner in branch 'default': Issue #15609: Optimize str%args for integer argument http://hg.python.org/cpython/rev/559a430e563c -- nosy: +python-dev ___ Python tracker

[issue15609] Format string: add more fast-path

2012-10-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15609 ___

[issue15766] _imp.load_dynamic() does crash with non-ASCII path and uses the wrong encoding

2012-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset f3ed5e211fcc by Victor Stinner in branch 'default': Close #15766: Catch exceptions while raising the ImportError in imp.load_dynamic() http://hg.python.org/cpython/rev/f3ed5e211fcc -- resolution: - fixed stage: - committed/rejected

[issue13572] import _curses fails because of UnicodeDecodeError('utf8' codec can't decode byte 0xb5 ...') on ARM Ubuntu 3.x

2012-10-01 Thread STINNER Victor
STINNER Victor added the comment: What is the status of this issue? Is anyone able to reproduce it? If not, I would like to close it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13572

[issue12069] test_signal.test_without_siginterrupt() failure on AMD64 OpenIndiana 3.x

2012-10-01 Thread STINNER Victor
STINNER Victor added the comment: I didn't see this issue recently, 'm unable to reproduce it, so I close this issue. -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12069

[issue16104] Use multiprocessing in compileall script

2012-10-01 Thread Brett Cannon
Brett Cannon added the comment: This should probably use concurrent.futures instead of multiprocessing directly, but yes it would be useful. Then again, the whole module should probably be rewritten to use importlib as well. -- components: +Library (Lib) nosy: +brett.cannon priority:

[issue13572] import _curses fails because of UnicodeDecodeError('utf8' codec can't decode byte 0xb5 ...') on ARM Ubuntu 3.x

2012-10-01 Thread Brett Cannon
Brett Cannon added the comment: I can't, so setting to pending so that if no one speaks up the issue will close. -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13572

  1   2   >