[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 instead of a tuple. Nor does it provide any 
of the benefits, I have mentioned before (same API as Lock and RLock, better 
compatibility with existing code an with statement, ability to pass the shared 
or exclusive lock separetly around). But maybe we could satisfy anybody, by 
following Richard's and Antoine's suggestion of returning a named tuple. So you 
could use the ShrdExclLock both ways:

# use a single object
lock = ShrdExclLock()

with lock.shared:
  ...

with lock.exclusive:
  ...

# unpack the the object into two variables and pass them separately around
shrd_lock, excl_lock = ShrdExclLock()

Thread(target=reader, args=(shrd_lock,)).start()
Thread(target=writer, args=(excl_lock,)).start)


The majority of us seems to prefer the terms shared and exclusive. However I 
can't deny that the terms read and write are more common, even though there are 
also notable exmples where the terms shared and exclusive are used [2] [3]. But 
let us ignore how other call it for now, and get to the origin of both set of 
terms, in order to figure out which fits best into Python:

shared/exclusive - abstract description of what it is
read/write   - best known use case

The reason why I prefer the terms shared and exculsive, is that it is more 
distinct and less likely to get misunderstand. Also naming a generic 
implementation after a specific use case is bad API design and I don't know any 
other case where that was done, in the Python core library.


[1] 
http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/locks/ReadWriteLock.html
[2] http://www.postgresql.org/docs/9.2/static/explicit-locking.html
[3] http://www.unix.com/man-page/freebsd/9/SX/

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 already been updated along 
the lines of this patch.

--
keywords: +needs review
stage: needs patch - patch review
Added file: http://bugs.python.org/file27370/issue-14783-1-default.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14783
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 instance.
With this, you are stuck with employing a context manager model only.  You 
loose the flexibility to do explicit acquire_read() or acquire_write().
My latest patch has methods shared_lock(), exclusive_lock() that return proxy 
lock objects that can be used like context managers like you describe, but you 
still have the flexibility of using the lock manually.

As for the bikeshedding, let's look at the list of concrete implementations out 
there:
Windows: SRW locks (slim reader writer) 
http://msdn.microsoft.com/en-us/library/windows/desktop/aa904937(v=vs.85).aspx
Pthreads: rwlock_t (reader/writer) 
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/users_86.htm
Java: ReadWriteLock, 
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/locks/ReadWriteLock.html

Am I missing anything?
Don't see why we need to adopt a completly different name or idiom to what 
people are used to.  Also, note that the java version is quite similar to 
Richard's proposal.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 are attributes of the lock 
itself.

In that sense, reader lock and writer lock, describe attributes of the user 
of the lock, and the verbs readlock and writelock describe the operation 
being requested.

It's simply more difficult to use the more abstract concepts 'shared' and 
'exclusive' as convenient and transparent descriptors of what the thing does, 
and likely to just brew confusion.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

http://bugs.python.org/review/8800/#ps6111

which only shows changes to multiprocessing/__init__.py and 
multiprocessing/synchronize.py.

The patch looks like it was produced using git rather than hg, so perhaps 
Rietveld got confused by this.  In that case it is a bug in Rietveld that it 
produced a partial review instead of producing no review.

 # unpack the the object into two variables and pass them separately around
 shrd_lock, excl_lock = ShrdExclLock()
 
 Thread(target=reader, args=(shrd_lock,)).start()
 Thread(target=writer, args=(excl_lock,)).start)

Although using namedtuple is probably a good idea, I don't think it really adds 
much flexibility.  This example could just as easily be written

  selock = ShrdExclLock()

  Thread(target=reader, args=(selock.shared,)).start()
  Thread(target=writer, args=(selock.exclusive,)).start)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 selock.exclusive.acquire().

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 objects that are only losely bound by some shared common 
variables:  The threading.py version has to rely on c_types ints for the common 
counters.
If the two locks were merely two different views of a common RWLock object, 
this problem could go away, and you could have the threading.RWLock and the 
multiprocessing.RWLock be different concrete classes derived from a common base 
class.

I also think it is time to drop the writer preference model, since it just 
adds complexity with doubtful benefits.  Sebastian's model also does that.

I'll provide a new example patch presently.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 to synchronize access to a protected object or 
context. So naming a lock after its type of protection absolutely makes sense. 
Those names are also not supposed to be attributes of the lock, rather two 
locks (a shared and an exclusive lock) should be created, that might be 
returned as a namedtuple for convenience.

 In that sense, reader lock and writer lock, describe attributes
 of the user of the lock, and the verbs readlock and writelock
 describe the operation being requested.

The user of the lock isn't necessarily a reader or writer. This is just one of 
many possible use cases. For example in a server application a shared/exclusive 
lock might be used to protect a connection to the client. So every time a 
thread wants to use the connection, a shared lock must be acquired and when a 
thread wants to shutdown the connection, the exclusive lock must be acquired, 
in order to ensure that it doesn't interrupt any thread still processing a 
request for that connection. In that case you clearly wouldn't call the users 
reader and writer.


 The patch looks like it was produced using git rather than hg, so
 perhaps Rietveld got confused by this.  In that case it is a bug
 in Rietveld that it produced a partial review instead of producing
 no review.

Yes, I have imported the Python 3.3.0 tree into a local git repository and 
created the patch that way. Since patches generated with git are still 
compatible with the 'patch' program in order to apply them, I hope that isn't a 
problem.


 Although using namedtuple is probably a good idea, I don't think it
 really adds much flexibility.  This example could just as easily be
 written

  selock = ShrdExclLock()

  Thread(target=reader, args=(selock.shared,)).start()
  Thread(target=writer, args=(selock.exclusive,)).start()

Yes, that is true, but in some cases it is more convenient to be able unpack 
the shared/exclusive lock into two variables, with a one-liner. And defining a 
namedtuple doesn't require any extra code compared to defining a class that 
holds both locks. In fact it needs less code to be implemented.

However the flexibility comes from having two lock objects, doesn't matter how 
they are accessed, instead as suggested by Kristján to have a single lock 
object, which just provides proxies for use with the with statement.


 I also think it is time to drop the writer preference model, since
 it just adds complexity with doubtful benefits.  Sebastian's model
 also does that.

I have implemented the simplest possible acquisition order. The lock acquired 
first will be granted first. Without that (or a more advanced policy) in 
applications with concurrent threads/processes that are heavily using the 
shared lock, the exclusive lock can never be acquired, because of there is 
always a shared lock acquired and before it is released the next shared lock 
will be acquired.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 - 
https://build.opensuse.org/package/view_file?file=python3.specpackage=python3project=devel%3Alanguages%3Apython%3AFactoryrev=cb7b94b33478cb8add5a5eb3ab3068dc):

# support lib-vs-lib64 distinction
Patch02:Python-3.3.0b2-multilib.patch

The URL for that patch is 
https://build.opensuse.org/package/view_file?file=Python-3.3.0b2-multilib.patchpackage=python3project=devel%3Alanguages%3Apython%3AFactoryrev=cb7b94b33478cb8add5a5eb3ab3068dc

I haven't verified it, but I'm guessing that patch has something to do with the 
issue.

The top level directory for the sources for their RPMs are at 
https://build.opensuse.org/package/files?package=python3project=devel%3Alanguages%3Apython%3AFactory

--
nosy: +nathanr

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15631
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 fix in comment in codecs.py
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file27371/comment-codecs-fix.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16097
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2012-10-01 Thread Will Haldean Brown

New submission from Will Haldean Brown:

The implementation of nsmallest in heapq contains an optimization for when n is 
an order of magnitude less than the size of the data, which uses bisect to find 
the n-smallest elements. This optimization is guarded by a check to ensure that 
the data iterable has a length method.

This method is then decorated to add support for the key kwarg. The decorator 
creates a zip object and passes the zip object to the decorated nsmallest. As 
zip objects are generators, they do not have a __len__ attribute, and the 
bisect optimization is never used.

The attached patch file detects whether the data passed to the decorator has a 
length attribute, and if it does, it creates a list with the data before 
passing it to the decorated nsmallest. This is my first patch, so if I've done 
something wrong please let me know. Thanks!

--
components: 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-bisect.20121001.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16098
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 if it would help.

--
nosy: +esc24

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16000
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 (num_got_lock == 1 and excl_count == 0).
  Now num_got_lock == 1.

* Thread-3 does non-blocking acquire of shared lock but fails.
  Now num_got_lock == 2.

Now, since num_got_lock == 2, the predicate that Thread-2 is waiting for will 
not happen until num_got_lock overflows.

This is probably fixable if we just prevent a failed non-blocking acquire from 
modifying num_acq_lock and num_got_lock.  (But I don't see how to extend the 
algorithm to allow timeouts.)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 threading API.

--
nosy: +christian.heimes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
)

crawl_delay(useragent) - Returns time in seconds that you need to wait for 
crawling
if none is specified, or doesn't apply to this user agent, returns -1
request_rate(useragent) - Returns a list in the form [request,seconds].
if none is specified, or doesn't apply to this user agent, returns -1

--
components: Library (Lib)
files: robotparser.patch
keywords: patch
messages: 171711
nosy: XapaJIaMnu
priority: normal
severity: normal
status: open
title: robotparser doesn't support request rate and crawl delay parameters
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file27373/robotparser.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16099
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16099
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 plenty of implementations for threading only, but they won't work 
with multiprocessing, due to the limitations in the ways you can share data 
between processes.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16099
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 starting point for the various implementations. The page also mentions a 
seqlock which looks interesting to me as it's fast for few writers with lots of 
readers.

[1] http://linux.die.net/man/3/pthread_rwlock_init 
[2] http://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 a binary semaphore).
We follow POSIX when exposing POSIX APIs (as in the os module), but
otherwise we have our own abstractions, for example the 3.x I/O stack.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 UNIX-like systems and not 
an industry standard for implementing anything, including high-level languages 
like Python.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16099
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 high-level language like 
Python.
The problem is that, despite its name, it's not a lock, but it's based on 
retries, which means that:
- the critical section must be idempotent (no side effect like incrementing a 
variable, or crediting a bank account :-)
- your critical section is simple enough so that it can tolerate inconsistent 
views, e.g.:

with seqlock.rlock():
z = 1/(x-y)

if the writer threads make sure that x!=y when they hold the seqlock, you can 
still, if you're unlucky, fall at the wrong time and x==y, then you get a nice 
ZeroDivisionError.

(And yes, you have the same kind of issues with transational memory, as well as 
others...).


Otherwise, having a rwlock would be a nice addition, but since the GIL 
serializes everything anyway, this isn't likely to benefit many situations 
(unless you do I/O, of course), on CPython at least.
That's why it's definitely important to have the equivalent for multiprocessing.

Also, I prefer reader-writer lock because that's how everyone calls it (not 
only POSIX), and RWLock looks better than SELock (well, at least to me).

--
nosy: +neologix

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 of the API.

OTOH, a number of the flags are not considered part of the API at all 
(unfortunately, they aren't explicitly excluded, either). Before we make such a 
change, we should really declare what flags are meant to be by an extension 
module, and what flags are implementation details only to be used by the object 
runtime itself.

Wrt. the proposed change: changing tp_flags to unsigned int is fine. I cannot 
see any real problem with changing PyType_Spec.flags to unsigned int - changing 
it to unsigned long would be incompatible on some systems.

Wrt. changing the existing flags: I'd prefer some deprecation procedure that 
just bans them from being used in an extension module (ultimately wrapping them 
within Py_BUILD_CORE). Once they are deprecated, changing their type is clearly 
fine.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16086
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
`__imp__PyUnicode_AsUnicode'

--
components: Windows
messages: 171722
nosy: v_core
priority: normal
severity: normal
status: open
title: Compiling vim with Python 3.3 support fails
type: compile error
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16100
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 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 of the API.

 OTOH, a number of the flags are not considered part of the API at all
 (unfortunately, they aren't explicitly excluded, either). Before we make
 such a change, we should really declare what flags are meant to be by an
 extension module, and what flags are implementation details only to be used
 by the object runtime itself.

 Wrt. the proposed change: changing tp_flags to unsigned int is fine. I
 cannot see any real problem with changing PyType_Spec.flags to unsigned int
 - changing it to unsigned long would be incompatible on some systems.

 Wrt. changing the existing flags: I'd prefer some deprecation procedure
 that just bans them from being used in an extension module (ultimately
 wrapping them within Py_BUILD_CORE). Once they are deprecated, changing
 their type is clearly fine.

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue16086
 ___


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16086
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 comment (patch by Wael Al Jishi)
http://hg.python.org/cpython/rev/cbf651ab3e21

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16097
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16100
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 we think documenting the Error you receive (if any) 
when trying to go above the found element may be a necessary part of the doc 
change.

--
nosy: +mikehoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12322
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16100
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16100
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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(), etc that we should be using.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16000
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 that we should be using.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16000
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: Verify all imported modules at startup are needed
type: resource usage
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16101
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 in the
attached file std_lib_duplicates.txt):

$ time ./python Tools/scripts/duplicate_code_names.py $(find Lib -name *py)  
std_lib_duplicates.txt
Lib/test/badsyntax_future4.py: compile error: from __future__ imports must 
occur at the beginning of the file (badsyntax_future4.py, line 3)
Lib/test/badsyntax_future6.py: compile error: from __future__ imports must 
occur at the beginning of the file (badsyntax_future6.py, line 3)
Lib/test/badsyntax_future3.py: compile error: future feature rested_snopes is 
not defined (badsyntax_future3.py, line 3)
Lib/test/badsyntax_future9.py: compile error: not a chance 
(badsyntax_future9.py, line 3)
Lib/test/bad_coding.py: compile error: unknown encoding for 
'Lib/test/bad_coding.py': uft-8
Lib/test/badsyntax_future8.py: compile error: future feature * is not defined 
(badsyntax_future8.py, line 3)
Lib/test/badsyntax_3131.py: compile error: invalid character in identifier 
(badsyntax_3131.py, line 2)
Lib/test/badsyntax_future7.py: compile error: from __future__ imports must 
occur at the beginning of the file (badsyntax_future7.py, line 3)
Lib/test/bad_coding2.py: compile error: encoding problem for 
'Lib/test/bad_coding2.py': utf-8
Lib/test/badsyntax_pep3120.py: compile error: invalid or missing encoding 
declaration for 'Lib/test/badsyntax_pep3120.py'
Lib/test/badsyntax_future5.py: compile error: from __future__ imports must 
occur at the beginning of the file (badsyntax_future5.py, line 4)
Lib/lib2to3/tests/data/different_encoding.py: compile error: invalid syntax 
(different_encoding.py, line 3)
Lib/lib2to3/tests/data/py2_test_grammar.py: compile error: invalid token 
(py2_test_grammar.py, line 31)
Lib/lib2to3/tests/data/bom.py: compile error: invalid syntax (bom.py, line 2)
Lib/lib2to3/tests/data/crlf.py: compile error: invalid syntax (crlf.py, line 1)
Lib/__phello__.foo.py: __phello__.foo not a valid module name

real6m14.854s
user6m14.455s
sys 0m0.392s


FWIW running the same command with python 3.2 takes about 2.5
minutes instead of more than 6 minutes (importlib ?).

--
Added file: http://bugs.python.org/file27375/duplicate_code_names.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16079
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
messages: 171736
nosy: storchaka
priority: normal
severity: normal
status: open
title: uuid._netbios_getnode() is outdated
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16102
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16076
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: http://bugs.python.org/file27377/ctree.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16089
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue15599
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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? Otherwise we'll probably have many platform specific
workarounds.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15599
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 C:\Programs\Python27\lib\site.py, line 467, in __call__
return pydoc.help(*args, **kwds)
  File C:\Programs\Python27\lib\pydoc.py, line 1750, in __call__
self.interact()
  File C:\Programs\Python27\lib\pydoc.py, line 1762, in interact
request = self.getline('help ')
  File C:\Programs\Python27\lib\pydoc.py, line 1773, in getline
return raw_input(prompt)
UnsupportedOperation: readline

There is no blinking _, at that is from the raw_input() call that failed. There 
is no problem with help() in IDLE for 3.2, 3.3.

I see two possibilities:
1. This has nothing to do with Idle directly, but is a problem with pythonw and 
raw_input/readline that was later fixed.
2. This is a result of how stdin is proxied by Idle and that there is a 
difference between 2.7 and 3.x.

builtin_raw_input in bltinmodule.c calls
  s = PyOS_Readline(PyFile_AsFile(fin), PyFile_AsFile(fout), prompt);
and I presume PyOS_Readline eventually calls fin.readline()

UnsupportedOperation is defined (in 2.7, at least) in _pyio.py
_pyio._unsupported(self, name) raises it with names.
That in turn is the default body for every operation. In particular,
def readline(self):
self._unsupported(readline)

So I presume 2. is the problem and the proxy in the pythonw process is an io 
subclass that needs readline defined for help() to work.
(Is proxying same on all OSes? Or would problem be Windows only?)

--
components: IDLE, Windows
messages: 171743
nosy: serwy, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Help() fails at raw_input readline (IDLE 2.7.3, Win7, pythonw)
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16103
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
nosy: dholth
priority: normal
severity: normal
status: open
title: Use multiprocessing in compileall script

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 - http://hg.python.org/cpython/file/fb90e2ff95b7/Modules/signalmodule.c#l187

--
components: Library (Lib)
messages: 171745
nosy: felipecruz
priority: normal
severity: normal
status: open
title: Pass read only FD to signal.set_wakeup_fd
type: behavior
versions: Python 2.6, Python 2.7, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16105
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 = PyObjectPtr.from_pyobject_ptr(self.gdbval)
  File /home/antoine/cpython/33/python-gdb.py, line 370, in from_pyobject_ptr
cls = cls.subclass_from_type(p.type())
  File /home/antoine/cpython/33/python-gdb.py, line 318, in subclass_from_type
tp_name = t.field('tp_name').string()
  File /usr/lib64/python2.7/encodings/utf_8.py, line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x95 in position 1: invalid 
start byte
, data=0x0) at Modules/gcmodule.c:361
#1  0x005bcbc5 in BaseException_traverse (self=0x7f08f390a8b0, 
visit=0x524b98 visit_decref, arg=0x0)
at Objects/exceptions.c:104
#2  0x004336d9 in subtype_traverse (self=
SimpleElementTreeVar(attrib={}, tag='root', ourValue=None, _children=[]) 
at remote 0x7f08f390a8b0, 
visit=0x524b98 visit_decref, arg=0x0) at Objects/typeobject.c:837
#3  0x00524cba in subtract_refs (containers=0x8dcf40) at 
Modules/gcmodule.c:386
#4  0x00525afa in collect (generation=0, n_collected=0x7fffed18be00, 
n_uncollectable=0x7fffed18bdf8)
at Modules/gcmodule.c:891
#5  0x005260b2 in collect_with_callback (generation=0) at 
Modules/gcmodule.c:1048
#6  0x0052615c in collect_generations () at Modules/gcmodule.c:1071
#7  0x0052707d in _PyObject_GC_Malloc (basicsize=48) at 
Modules/gcmodule.c:1580
[snip]

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16089
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 you're wondering why the Roundup Robot didn't update the issue 
automatically, it's because I made a typo in each of the commit messages. 
Apparently 16304 isn't the same as 16034. Who would have thought it? :P

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16034
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16089
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, since in many places TreeBuilder is 
hard-wired to use a Element instance and nothing else (despite the 
element_factory).

Note that simpleTAL cannot use the _elementtree.Element class, since their 
subclass also inherits from an exception subclass, and the object layouts 
conflict with each other (yeah, crappy design).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16089
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue15599
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 modernize some of the _elementtree code (see issue #16089).
http://hg.python.org/cpython/rev/9fb0a8fc5d79

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16089
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker rep...@bugs.python.org
http://bugs.python.org/issue16089
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue15609
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15766
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: normal - low
versions: +Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16105] Pass read only FD to signal.set_wakeup_fd

2012-10-01 Thread STINNER Victor

STINNER Victor added the comment:

Is it really a bug? A file descriptor is just an integer, it may be replaced 
later. Passed fd may be writable when set_wakeup_fd() is called, but then 
become read-only.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16105
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16101] Verify all imported modules at startup are needed

2012-10-01 Thread STINNER Victor

STINNER Victor added the comment:

See also issues #9548 and #14057.

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16101
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16106] antigravity tests

2012-10-01 Thread Ezio Melotti

New submission from Ezio Melotti:

The attached patch adds tests for antigravity.

--
assignee: ezio.melotti
components: Library (Lib)
files: antigravity_tests.diff
keywords: patch
messages: 171762
nosy: ezio.melotti, michael.foord
priority: normal
severity: normal
stage: patch review
status: open
title: antigravity tests
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file27379/antigravity_tests.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16106
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

Oh, I misunderstood what MvL wrote, sorry. I missed PyType_Spec structure.

Here is an updated and more complete patch. I changed the return code of 
PyType_GetFlags(), instead of changing PyType_HasFeature() macro.

 OTOH, a number of the flags are not considered part of the API at all 
 (unfortunately, they aren't explicitly excluded, either). Before we make such 
 a change, we should really declare what flags are meant to be by an extension 
 module, and what flags are implementation details only to be used by the 
 object runtime itself.

Can't we decide that later? (in other issue?)

--
Added file: http://bugs.python.org/file27380/unsigned_tp_flags-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16086
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14468] Update cloning guidelines in devguide

2012-10-01 Thread Ezio Melotti

Ezio Melotti added the comment:

FTR I now switched to hg share, and while I think it's a better option for 
committers that work on several branches on a daily basis, it might not be the 
same for contributors that usually prepare patches against default.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16107] distutils2.version doesn't str() 1.0.post1 correctly

2012-10-01 Thread Richard Jones

New submission from Richard Jones:

The attached simple patch demonstrates the problem:

 str(NormalizedVersion('1.0.post1'))
'1.0.post1.z'

and includes a fix.

--
assignee: eric.araujo
components: Distutils2
files: post-fix.patch
keywords: patch
messages: 171765
nosy: alexis, eric.araujo, richard, tarek
priority: normal
severity: normal
stage: patch review
status: open
title: distutils2.version doesn't str() 1.0.post1 correctly
type: behavior
Added file: http://bugs.python.org/file27381/post-fix.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16107
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15979] Improve timeit documentation

2012-10-01 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage: patch review - commit review
Added file: http://bugs.python.org/file27382/issue15979-2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15979
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2012-10-01 Thread Roger Serwy

Roger Serwy added the comment:

Terry, I am unable to reproduce this error under Win7 Ultimate (no SP1) with 
either the 32-bit or 64-bit install of 2.7.3. Calling help() produces an 
interactive prompt in all my test cases. I launched IDLE from the start menu 
shortcut, with python.exe -m idlelib.idle, and pythonw.exe -m idlelib.idle.

Running IDLE without a subprocess doesn't trigger the bug either.

IDLE 2.7.3 works as well on Arch Linux with 2.7.3 (64-bit). 

(Also, I get a blinking vertical bar for the cursor, not an underscore on Win7. 
This minor detail is likely not relevant, only provided since it is an observed 
difference.)

Does raw_input() work from a regular python shell for you?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16103
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2012-10-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I'm not sure a semantically neutral automatic fix is possible:

   f = lambda (a, b), c: a + b + c # Py2.x

   f = lambda t, c: t[0] + t[1] + c# Py3.x


The former will unpack any iterable, not just sequences:

 def g():
yield 'a'
yield 'b'   
 f(g(), 'c')
'abc'

Also, the former will validate the number of arguments:

 f((1,2,3), 4)

Traceback (most recent call last):
  File pyshell#11, line 1, in module
f((1,2,3), 4)
  File pyshell#0, line 1, in lambda
f = lambda (a, b), c: a + b + c
ValueError: too many values to unpack

I don't see a way to automatically include those capabilities in an automatic 
2-to-3 transformation.

--
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16094
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15979] Improve timeit documentation

2012-10-01 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I copy-edited the patch just looking for minor things like punctuation, etc:

+a :ref:`command-line-interface` as well as :ref:`callable python-interface`

a callable one

+See also Tim Peters' introduction to the Algorithms chapter in the Python
+Cookbook, published by O'Reilly.

italicize or underline book titles (is there a reST directive for books?)

+The following example shows how the :ref:`command-line-interface`,

no comma

+Python interface

Python Interface

+   Create a :class:`Timer` instance with the given statement, setup code and 
timer
+   function and run its :meth:`.timeit` method with *number* executions.

stars around setup and timer like there is with *number*?

+   Create a :class:`Timer` instance with the given statement, setup code and 
timer
+   function and run its :meth:`.repeat` method with the given *repeat* count 
and

ditto

+   Define a default timer, in a platform specific manner. On Windows,

platform-specific

+   :func:`time.clock` has microsecond granularity but :func:`time.time`'s

granularity, but

+   granularity is 1/60th of a second; on Unix, :func:`time.clock` has 1/100th 
of

I would just split this into two sentences since it already combines two 
compound sentences (i.e. it is effectively four sentences):

second.  On Unix,

+   a second granularity and :func:`time.time` is much more precise.  On either

granularity, and

+   Time *number* executions of the main statement. This executes the setup

statement.  This

+   statement once, and then returns the time it takes to execute the main 
statement
+   a number of times, measured in seconds as a float.  The argument is the 
number

*number* times

+   baseline overhead can be measured by invoking the program without arguments 
and

arguments, and

--
nosy: +chris.jerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15979
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16104] Use multiprocessing in compileall script

2012-10-01 Thread Steven D'Aprano

Changes by Steven D'Aprano steve+pyt...@pearwood.info:


--
nosy: +stevenjd

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11109] socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass

2012-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 991c24b8969d by R David Murray in branch '3.3':
#11109: clean up docs, add whatsnew entry, and fix Justin's last name.
http://hg.python.org/cpython/rev/991c24b8969d

New changeset 1234300bc056 by R David Murray in branch 'default':
Merge #11109: clean up docs, add whatsnew entry, and fix Justin's last name.
http://hg.python.org/cpython/rev/1234300bc056

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11109
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16105] Pass read only FD to signal.set_wakeup_fd

2012-10-01 Thread Felipe Cruz

Felipe Cruz added the comment:

I would not say that is a bug, but there is a write(wakeup_fd) call with 
ignored return code and maybe this can be improved to an output to stderr, or 
maybe a better solution.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16105
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15979] Improve timeit documentation

2012-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 60c831305e73 by Ezio Melotti in branch '2.7':
#15979: improve timeit documentation.
http://hg.python.org/cpython/rev/60c831305e73

New changeset d5a4300702c1 by Ezio Melotti in branch '3.2':
#15979: improve timeit documentation.
http://hg.python.org/cpython/rev/d5a4300702c1

New changeset ff32d390f897 by Ezio Melotti in branch '3.3':
#15979: merge with 3.2.
http://hg.python.org/cpython/rev/ff32d390f897

New changeset 85b6c1c19cb8 by Ezio Melotti in branch 'default':
#15979: merge with 3.3.
http://hg.python.org/cpython/rev/85b6c1c19cb8

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15979
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15979] Improve timeit documentation

2012-10-01 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the review!

--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed
versions: +Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15979
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-10-01 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
assignee:  - rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16049
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2012-10-01 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
assignee:  - rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16098
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2012-10-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Since heapq uses the C version of nsmallest, this micro-optimization doesn't 
actually help any real code.  Am marking this as low priority and will come 
back to it at some point and will review the pure python version.  Ideally, it 
should parallel the C version which doesn't use bisect at all.

--
priority: normal - low

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16098
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16108] Include maintainer information in register/upload

2012-10-01 Thread Richard Jones

New submission from Richard Jones:

The attached patch includes the maintainer information in the data sent to PyPI 
in a register or upload submission.

--
assignee: eric.araujo
components: Distutils2
files: maintainer.patch
keywords: patch
messages: 171774
nosy: alexis, eric.araujo, richard, tarek
priority: normal
severity: normal
stage: patch review
status: open
title: Include maintainer information in register/upload
type: behavior
Added file: http://bugs.python.org/file27383/maintainer.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16108
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2012-10-01 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
nosy:  -stutzbach

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16098
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2012-10-01 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
Removed message: http://bugs.python.org/msg171773

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16098
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14003] __self__ on built-in functions is not as documented

2012-10-01 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14003
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14730] Implementation of the PEP 419: Protecting cleanup statements from interruptions

2012-10-01 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +asvetlov
stage:  - patch review
versions: +Python 3.4 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14730
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13299] namedtuple row factory for sqlite3

2012-10-01 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage: needs patch - patch review
versions: +Python 3.4 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13299
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7686] redundant open modes 'rbb', 'wbb', 'abb' no longer work on Windows

2012-10-01 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7686
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6911] Document changes in asynchat

2012-10-01 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti
stage:  - patch review
type:  - enhancement
versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.0, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6911
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >