[ANNOUNCE] greenlet 0.4.0
Hi, I have uploaded greenlet 0.4.0 to PyPI: http://pypi.python.org/pypi/greenlet What is it? --- The greenlet module provides coroutines for python. coroutines allow suspending and resuming execution at certain locations. concurrence[1], eventlet[2] and gevent[3] use the greenlet module in order to implement concurrent network applications. Documentation can be found here: http://greenlet.readthedocs.org The code is hosted on github: https://github.com/python-greenlet/greenlet Changes in version 0.4.0 The NEWS file lists these changes for release 0.4.0: * Greenlet has an instance dictionary now, which means it can be used for implementing greenlet local storage, etc. However, this might introduce incompatibility if subclasses have __dict__ in their __slots__. Classes like that will fail, because greenlet already has __dict__ out of the box. * Greenlet no longer leaks memory after thread termination, as long as terminated thread has no running greenlets left at the time. * Add support for debian sparc and openbsd5-sparc64 * Add support for ppc64 linux * Don't allow greenlets to be copied with copy.copy/deepcopy * Fix arm32/thumb support * Restore greenlet's parent after kill * Add experimental greenlet tracing Many thanks to Alexey Borzenkov, who spent a lot of time on this release and everyone else that helped make this release happen. [1] http://opensource.hyves.org/concurrence/ [2] http://eventlet.net/ [3] http://www.gevent.org/ -- Cheers Ralf Schmitt -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
Announcing a minor bugfix update (v1.7) of YaMA, the meeting assistant
Hi, Yet Another Meeting Assistant (YaMA), will help you with the Agenda, Meeting Invitations, Minutes of a Meeting as well as Action Points. If you are the assigned minute taker at any meeting, this tool is for you. Checkout http://yama.sourceforge.net/ YaMA is written in Python and Tkinter, is open source software released under GPLv2, and is hosted by SourceForge (www.sourceforge.net) Whats New in version 1.7.1 : 1. Timezone related bug-fix. Regards, -- Atul -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
Can't understand python C apis
I'm trying to understand the source code of python and how it works internally. But i can't understand the python C apis. Too much macro calling there and python C api. I can't understand those. I've also read the doc for python C api. What should i do? Which file's code should i read to understand those PyObject or other type and other C apis? Any answer would be highly appreciated. Thanks. -- http://mail.python.org/mailman/listinfo/python-list
Re: Can't understand python C apis
gmspro, 23.06.2012 09:02: I'm trying to understand the source code of python and how it works internally. But i can't understand the python C apis. Too much macro calling there and python C api. I can't understand those. I've also read the doc for python C api. What should i do? Which file's code should i read to understand those PyObject or other type and other C apis? The first thing to ask yourself is: why do you want to understand it? What is the thing you are trying to do with it? Once you've answered that, it'll be easy to tell you where to look. Stefan -- http://mail.python.org/mailman/listinfo/python-list
Re: Can't understand python C apis
gmspro gms...@yahoo.com writes: I'm trying to understand the source code of python and how it works internally. But i can't understand the python C apis. Usually, you try to understand the Python C api in order to write extensions for Python in C (e.g. to interface with an existing C library or to optimize a tight loop). If this is the case for you, then there is an alternative: Cython. Cython actually is a compiler which compiles an extended Python source language (Python + type/variable declarations + extension types) into C. With its help, you can create C extensions for Python without a need to know all the details of the Python C API. It might still be necessary at some point to understand more of the API but highly likely it will take considerable time to reach that point -- and then you might already be more familiar and the understanding might be easier. -- http://mail.python.org/mailman/listinfo/python-list
cPickle - sharing pickled objects between scripts and imports
Hi all, I have a module that saves and loads data using cPickle, and I've encountered a problem. Sometimes I want to import the module and use it in the interactive Python interpreter, whereas sometimes I want to run it as a script. But objects that have been pickled by running the module as a script can't be correctly unpickled by the imported module and vice-versa, since how they get pickled depends on whether the module's __name__ is '__main__' or 'mymodule' (say). I've tried to get around this by adding the following to the module, before any calls to cPickle.load: if __name__ == '__main__': import __main__ def load(f): p = cPickle.Unpickler(f) def fg(m, c): if m == 'mymodule': return getattr(__main__, c) else: m = __import__(m, fromlist = [c]) return getattr(m, c) p.find_global = fg return p.load() else: def load(f): p = cPickle.Unpickler(f) def fg(m, c): if m == '__main__': return globals()[c] else: m = __import__(m, fromlist = [c]) return getattr(m, c) p.find_global = fg return p.load() cPickle.load = load del load It seems to work as far as I can tell, but I'll be grateful if anyone knows of any circumstances where it would fail, or can suggest something less hacky. Also, do cPickle.Pickler instances have some attribute corresponding to find_global that lets one determine how instances get pickled? I couldn't find anything about this in the docs. -- Hate music? Then you'll hate this: http://tinyurl.com/psymix -- http://mail.python.org/mailman/listinfo/python-list
Re: cPickle - sharing pickled objects between scripts and imports
Rotwang wrote: Hi all, I have a module that saves and loads data using cPickle, and I've encountered a problem. Sometimes I want to import the module and use it in the interactive Python interpreter, whereas sometimes I want to run it as a script. But objects that have been pickled by running the module as a script can't be correctly unpickled by the imported module and vice-versa, since how they get pickled depends on whether the module's __name__ is '__main__' or 'mymodule' (say). I've tried to get around this by adding the following to the module, before any calls to cPickle.load: if __name__ == '__main__': import __main__ def load(f): p = cPickle.Unpickler(f) def fg(m, c): if m == 'mymodule': return getattr(__main__, c) else: m = __import__(m, fromlist = [c]) return getattr(m, c) p.find_global = fg return p.load() else: def load(f): p = cPickle.Unpickler(f) def fg(m, c): if m == '__main__': return globals()[c] else: m = __import__(m, fromlist = [c]) return getattr(m, c) p.find_global = fg return p.load() cPickle.load = load del load It seems to work as far as I can tell, but I'll be grateful if anyone knows of any circumstances where it would fail, or can suggest something less hacky. Also, do cPickle.Pickler instances have some attribute corresponding to find_global that lets one determine how instances get pickled? I couldn't find anything about this in the docs. if __name__ == __main__: from mymodule import * But I think it would be cleaner to move the classes you want to pickle into another module and import that either from your main script or the interpreter. That may also spare you some fun with unexpected isinstance() results. -- http://mail.python.org/mailman/listinfo/python-list
Re: emded revision control in Python application?
On 23/06/12 06:45, rusi wrote: On Jun 22, 8:58 pm, duncan smithbuzz...@urubu.freeserve.co.uk wrote: Hello, I have an application that would benefit from collaborative working. Over time users construct a data environment which is a number of files in JSON format contained in a few directories (in the future I'll probably place these in a zip so the environment is contained within a single file). At the moment there is one individual constructing the data environment, and me occasionally applying corrections after being e-mailed the files. But in the future there might be several individuals in various locations. As a minimum requirement I need to embed some sort of version control, so that changes committed by one individual will be seen in the local environments of the others. Some of the work involves editing graphs which have restrictions on their structure. In this case it would be useful for edits to be committed / seen in real time. The users will not be particularly technical, so the version control will have to happen relatively quietly in the background. My immediate thoughts are to (somehow) embed Mercurial or Subversion. It would certainly be useful to be able to revert to a previous version of the data environment if an individual does something silly. But I'm not actually convinced that this is the whole solution for collaborative working. Any advice regarding the embedding of a version control system or alternative approaches would be appreciated. I haven't tried anything like this before. The desktop application is written in Python (2.6) with a wxPython (2.8) GUI. Given the nature of the application / data the machines involved might be locally networked but without web access (if this makes a difference). TIA. Duncan If you are looking at mercurial and subversion you may want to look at git also. From http://en.wikipedia.org/wiki/Git_%28software%29#Implementation (quoting Linus Torvalds) --- In many ways you can just see git as a filesystem — it's content- addressable, and it has a notion of versioning, but I really really designed it coming at the problem from the viewpoint of a filesystem person (hey, kernels is what I do), and I actually have absolutely zero interest in creating a traditional SCM system. More details https://git.wiki.kernel.org/index.php/Git#Design - Of course its good to say upfront that git is mostly C+shell ie its not python There is gitpython http://packages.python.org/GitPython/0.1/tutorial.html but I know nothing about it Thanks. I'm trying to figure out whether I'm better of with a version control system, a virtual filesystem (e.g. http://code.google.com/p/pyfilesystem/), remote procedure calls or some combination of these. What I really need is a flexible framework that I can experiment with, as it's not clear what the best strategy for collaborative working might be. e.g. It might be best to restrict working on certain elements of the data environment to a single individual. Cheers. Duncan -- http://mail.python.org/mailman/listinfo/python-list
SSL handshake hanging, despite bugfix in stdlib
Hello, http://bugs.python.org/issue5103 fixed a bug in Python2.6 where SSL's handshake would hang indefinitely if the remote end hangs. However, I'm getting hanging behavior in an IMAP script. When I Ctrl-C it after hours of hanging, I get the same stacktrace as reported in http://bugs.python.org/issue1251#msg72363 , though Antoine said that r80452 fixed issue 5103 as well as this bug. This script sends automatic response emails. Every 10 seconds it uses IMAP to check for unread messages in a GMail label, then replies via SMTP and marks the message as read. The script seems to work the first time an unread message is found; the next time there's a message to be had, it hangs trying to complete the SSL handshake. File ./main.py, line 21, in thank_new_signups the_emails = list(emails.messages('(UNSEEN)')) File ./emails.py, line 129, in messages for chunk in chunks_of_length(32, messages): File ./chunks.py, line 9, in chunks_of_length for item in iterable: File ./emails.py, line 90, in email_messages m = open_mailbox(label, readonly=True) File ./emails.py, line 30, in open_mailbox m = imaplib.IMAP4_SSL('imap.gmail.com', 993) File /usr/lib64/python2.6/imaplib.py, line 1138, in __init__ IMAP4.__init__(self, host, port) File /usr/lib64/python2.6/imaplib.py, line 163, in __init__ self.open(host, port) File /usr/lib64/python2.6/imaplib.py, line 1150, in open self.sslobj = ssl.wrap_socket(self.sock, self.keyfile, self.certfile) File /usr/lib64/python2.6/ssl.py, line 338, in wrap_socket suppress_ragged_eofs=suppress_ragged_eofs) File /usr/lib64/python2.6/ssl.py, line 120, in __init__ self.do_handshake() File /usr/lib64/python2.6/ssl.py, line 279, in do_handshake self._sslobj.do_handshake() KeyboardInterrupt (This behavior started only in the last couple of weeks after a longer period working correctly, so I suspect something changed on GMail's end to trigger the bug.) Am I do something wrong, or is this bug still not fixed? Any pointers would be appreciated. Python 2.6.6 (r266:84292, Dec 7 2011, 20:48:22) on 64-bit Linux 2.6.32. Michael -- http://mail.python.org/mailman/listinfo/python-list
Re: cPickle - sharing pickled objects between scripts and imports
On 06/23/2012 12:13 PM, Peter Otten wrote: Rotwang wrote: Hi all, I have a module that saves and loads data using cPickle, and I've encountered a problem. Sometimes I want to import the module and use it in the interactive Python interpreter, whereas sometimes I want to run it as a script. But objects that have been pickled by running the module as a script can't be correctly unpickled by the imported module and vice-versa, since how they get pickled depends on whether the module's __name__ is '__main__' or 'mymodule' (say). I've tried to get around this by adding the following to the module, before any calls to cPickle.load: if __name__ == '__main__': import __main__ def load(f): p = cPickle.Unpickler(f) def fg(m, c): if m == 'mymodule': return getattr(__main__, c) else: m = __import__(m, fromlist = [c]) return getattr(m, c) p.find_global = fg return p.load() else: def load(f): p = cPickle.Unpickler(f) def fg(m, c): if m == '__main__': return globals()[c] else: m = __import__(m, fromlist = [c]) return getattr(m, c) p.find_global = fg return p.load() cPickle.load = load del load It seems to work as far as I can tell, but I'll be grateful if anyone knows of any circumstances where it would fail, or can suggest something less hacky. Also, do cPickle.Pickler instances have some attribute corresponding to find_global that lets one determine how instances get pickled? I couldn't find anything about this in the docs. if __name__ == __main__: from mymodule import * But I think it would be cleaner to move the classes you want to pickle into another module and import that either from your main script or the interpreter. That may also spare you some fun with unexpected isinstance() results. I would second the choice to just move the code to a separately loaded module, and let your script simply consist of an import and a call into that module. It can be very dangerous to have the same module imported two different ways (as __main__ and as mymodule), so i'd avoid anything that came close to that notion. Your original problem is probably that you have classes with two leading underscores, which causes the names to be mangled with the module name. You could simply remove one of the underscores for all such names, and see if the pickle problem goes away. -- DaveA -- http://mail.python.org/mailman/listinfo/python-list
Re: cPickle - sharing pickled objects between scripts and imports
On 23/06/2012 17:13, Peter Otten wrote: Rotwang wrote: Hi all, I have a module that saves and loads data using cPickle, and I've encountered a problem. Sometimes I want to import the module and use it in the interactive Python interpreter, whereas sometimes I want to run it as a script. But objects that have been pickled by running the module as a script can't be correctly unpickled by the imported module and vice-versa, since how they get pickled depends on whether the module's __name__ is '__main__' or 'mymodule' (say). I've tried to get around this by adding the following to the module, before any calls to cPickle.load: if __name__ == '__main__': import __main__ def load(f): p = cPickle.Unpickler(f) def fg(m, c): if m == 'mymodule': return getattr(__main__, c) else: m = __import__(m, fromlist = [c]) return getattr(m, c) p.find_global = fg return p.load() else: def load(f): p = cPickle.Unpickler(f) def fg(m, c): if m == '__main__': return globals()[c] else: m = __import__(m, fromlist = [c]) return getattr(m, c) p.find_global = fg return p.load() cPickle.load = load del load It seems to work as far as I can tell, but I'll be grateful if anyone knows of any circumstances where it would fail, or can suggest something less hacky. Also, do cPickle.Pickler instances have some attribute corresponding to find_global that lets one determine how instances get pickled? I couldn't find anything about this in the docs. if __name__ == __main__: from mymodule import * But I think it would be cleaner to move the classes you want to pickle into another module and import that either from your main script or the interpreter. That may also spare you some fun with unexpected isinstance() results. Thanks. -- Hate music? Then you'll hate this: http://tinyurl.com/psymix -- http://mail.python.org/mailman/listinfo/python-list
Re: cPickle - sharing pickled objects between scripts and imports
On 23/06/2012 18:31, Dave Angel wrote: On 06/23/2012 12:13 PM, Peter Otten wrote: Rotwang wrote: Hi all, I have a module that saves and loads data using cPickle, and I've encountered a problem. Sometimes I want to import the module and use it in the interactive Python interpreter, whereas sometimes I want to run it as a script. But objects that have been pickled by running the module as a script can't be correctly unpickled by the imported module and vice-versa, since how they get pickled depends on whether the module's __name__ is '__main__' or 'mymodule' (say). I've tried to get around this by adding the following to the module, before any calls to cPickle.load: if __name__ == '__main__': import __main__ def load(f): p = cPickle.Unpickler(f) def fg(m, c): if m == 'mymodule': return getattr(__main__, c) else: m = __import__(m, fromlist = [c]) return getattr(m, c) p.find_global = fg return p.load() else: def load(f): p = cPickle.Unpickler(f) def fg(m, c): if m == '__main__': return globals()[c] else: m = __import__(m, fromlist = [c]) return getattr(m, c) p.find_global = fg return p.load() cPickle.load = load del load It seems to work as far as I can tell, but I'll be grateful if anyone knows of any circumstances where it would fail, or can suggest something less hacky. Also, do cPickle.Pickler instances have some attribute corresponding to find_global that lets one determine how instances get pickled? I couldn't find anything about this in the docs. if __name__ == __main__: from mymodule import * But I think it would be cleaner to move the classes you want to pickle into another module and import that either from your main script or the interpreter. That may also spare you some fun with unexpected isinstance() results. I would second the choice to just move the code to a separately loaded module, and let your script simply consist of an import and a call into that module. It can be very dangerous to have the same module imported two different ways (as __main__ and as mymodule), so i'd avoid anything that came close to that notion. OK, thanks. Your original problem is probably that you have classes with two leading underscores, which causes the names to be mangled with the module name. You could simply remove one of the underscores for all such names, and see if the pickle problem goes away. No, I don't have any such classes. The problem is that if the object was pickled by the module run as a script and then unpickled by the imported module, the unpickler looks in __main__ rather than mymodule for the object's class, and doesn't find it. Conversely if the object was pickled by the imported module and then unpickled by the module run as a script then the unpickler reloads the module and makes objects referenced by the original object into instances of mymodule.oneofmyclasses, whereas (for reasons unknown to me) the object itself is an instance of __main__.anotheroneofmyclasses. This means that any method of anotheroneofmyclasses that calls isinstance(attribute, oneofmyclasses) doesn't work the way it should. -- Hate music? Then you'll hate this: http://tinyurl.com/psymix -- http://mail.python.org/mailman/listinfo/python-list
Re: cPickle - sharing pickled objects between scripts and imports
On Sat, 23 Jun 2012 19:14:43 +0100, Rotwang wrote: The problem is that if the object was pickled by the module run as a script and then unpickled by the imported module, the unpickler looks in __main__ rather than mymodule for the object's class, and doesn't find it. Possibly the solution is as simple as aliasing your module and __main__. Untested: # When running as a script import __main__ sys['mymodule'] = __main__ # When running interactively import mymodule __main__ = mymodule of some variation thereof. Note that a full solution to this problem actually requires you to deal with three cases: 1) interactive interpreter, __main__ normally would be the interpreter global scope 2) running as a script, __main__ is your script 3) imported into another module which is running as a script, __main__ would be that module. In the last case, monkey-patching __main__ may very well break that script. -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Why is python source code not available on github?
Why is python source code not available on github? Make it available on github so that we can git clone and work on source code. -- http://mail.python.org/mailman/listinfo/python-list
Re: Why is python source code not available on github?
http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2 On Sat, Jun 23, 2012 at 9:16 PM, gmspro gms...@yahoo.com wrote: Why is python source code not available on github? Make it available on github so that we can git clone and work on source code. -- http://mail.python.org/mailman/listinfo/python-list -- George R. C. Silva Desenvolvimento em GIS http://geoprocessamento.net http://blog.geoprocessamento.net -- http://mail.python.org/mailman/listinfo/python-list
Re: Why is python source code not available on github?
On 6/23/2012 7:16 PM, gmspro wrote: Why is python source code not available on github? If you mean CPython, it's because the devs use Mercurial and have their own hosting on python.org. hg clone http://hg.python.org/cpython http://docs.python.org/devguide/setup.html github is far from the only place to host an open source project. -- CPython 3.3.0a4 | Windows NT 6.1.7601.17803 -- http://mail.python.org/mailman/listinfo/python-list
Re: Why is python source code not available on github?
On Sun, Jun 24, 2012 at 10:16 AM, gmspro gms...@yahoo.com wrote: Why is python source code not available on github? Make it available on github so that we can git clone and work on source code. It's done with Mercurial, not git, but the same can be done: hg clone http://hg.python.org/cpython ChrisA -- http://mail.python.org/mailman/listinfo/python-list
Re: Why is python source code not available on github?
No, I can download as .tar.bz2, but i'm talking about using git. git clone, git add ., git commit -a, git push is easier to keep track of my code. Then for git pull request. --- On Sat, 6/23/12, George Silva georger.si...@gmail.com wrote: From: George Silva georger.si...@gmail.com Subject: Re: Why is python source code not available on github? To: gmspro gms...@yahoo.com Cc: python-list@python.org Date: Saturday, June 23, 2012, 7:23 PM http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2 On Sat, Jun 23, 2012 at 9:16 PM, gmspro gms...@yahoo.com wrote: Why is python source code not available on github? Make it available on github so that we can git clone and work on source code. -- http://mail.python.org/mailman/listinfo/python-list -- George R. C. Silva Desenvolvimento em GIS http://geoprocessamento.net http://blog.geoprocessamento.net -- http://mail.python.org/mailman/listinfo/python-list
Re: Why is python source code not available on github?
On Sun, Jun 24, 2012 at 10:34 AM, gmspro gms...@yahoo.com wrote: No, I can download as .tar.bz2, but i'm talking about using git. git clone, git add ., git commit -a, git push is easier to keep track of my code. Then for git pull request. Mercurial can do all that. I'm not as familiar with it as I am with git, so I can't quote the commands, but certainly you can do all the same clone/add/commit/etc with it. I build my cpython straight from hg, mainly because I like living on the edge :) ChrisA -- http://mail.python.org/mailman/listinfo/python-list
Filenames started with _(underscore) in Modules/ why?
There are some files whose filename is started with _(underscore). Why are they started with a underscore? -- http://mail.python.org/mailman/listinfo/python-list
Re: Filenames started with _(underscore) in Modules/ why?
On 06/24/2012 02:54 AM, gmspro wrote: There are some files whose filename is started with _(underscore). Why are they started with a underscore? By convention, a leading underscore means private/internal. A module with a leading underscore is typically an implementation detail of another module with a public API, and should be ignored. -- http://mail.python.org/mailman/listinfo/python-list
Getting lazy with decorators
I'm creating a cmd.Cmd class, and I have developed a helper method to easily handle help_xxx methods. I'm trying to figure out if there is an even lazier way I could do this with decorators. Here is the code: * import cmd def add_help(func): if not hasattr(func, 'im_class'): return func #probably should raise an error cls = func.im_class setattr(cls, func.im_func.__name__.replace(do,help), None) return func class BaseCmd(cmd.Cmd): def __init__(self, *args, **kwargs): cmd.Cmd.__init__(self, *args, **kwargs) def show_help(self, func): print \n.join((line.strip() for line in func.__doc__.splitlines())) @add_help def do_done(self, line): done Quits this and goes to higher level or quits the application. I mean, what else do you expect? return True if __name__=='__main__': c = BaseCmd() print c.help_done * This generates AttributeError: BaseCmd instance has no attribute 'help_done' The show_help method is the shortcut I want to use (I'm pretty sure it's from Doug Hellman's site). I'm wondering if it's possible to use a decorator such as add_help to automatically create the appropriate help_xxx function. In the decorator, I can get the function and the name of the class, but I can't find the instance of the class that the method is attached to. Maybe this is just one step of lazy too far. Am I right in thinking that I can't do this? There is no way to access the class instance from the method? -- http://mail.python.org/mailman/listinfo/python-list
How can i call array_length to get the length of array object?
Hi, I tried this, import array from array import array arr=array('i',[5,7,8]) arr.sg_length Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'sg_length' arr=array('i'[5,8,7]) Traceback (most recent call last): File stdin, line 1, in module TypeError: string indices must be integers arr=array('i',[5,8,7]) arr.length Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'length' arr.length() Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'length' length(arr) Traceback (most recent call last): File stdin, line 1, in module NameError: name 'length' is not defined array_length(arr) Traceback (most recent call last): File stdin, line 1, in module NameError: name 'array_length' is not defined arr.array_length() Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'array_length' arr.array_length Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'array_length' I'm trying to call this function, http://hg.python.org/cpython/file/3b7230997425/Modules/arraymodule.c#l657 Is that possible to call that function? I know it's possible to do: len(arr) arr.itemsize Any asnwer will be highly appreciated. Thanks. -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i call array_length to get the length of array object?
On Sat, Jun 23, 2012 at 11:23 PM, gmspro gms...@yahoo.com wrote: Hi, I tried this, import array from array import array arr=array('i',[5,7,8]) arr.sg_length Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'sg_length' arr=array('i'[5,8,7]) Traceback (most recent call last): File stdin, line 1, in module TypeError: string indices must be integers arr=array('i',[5,8,7]) arr.length Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'length' arr.length() Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'length' length(arr) Traceback (most recent call last): File stdin, line 1, in module NameError: name 'length' is not defined array_length(arr) Traceback (most recent call last): File stdin, line 1, in module NameError: name 'array_length' is not defined arr.array_length() Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'array_length' arr.array_length Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'array_length' I'm trying to call this function, http://hg.python.org/cpython/file/3b7230997425/Modules/arraymodule.c#l657 Is that possible to call that function? I know it's possible to do: len(arr) arr.itemsize Any asnwer will be highly appreciated. Thanks. -- http://mail.python.org/mailman/listinfo/python-list Hi, something along the lines s = 'supercalifragilisticexpialidocious' len(s) 34 check http://docs.python.org/ for more on this. Ignacio -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i call array_length to get the length of array object?
@Ignacio Mondino, Doesn't it call this : http://hg.python.org/cpython/file/c0eab397f098/Python/bltinmodule.c#l1283 instead of this: http://hg.python.org/cpython/file/3b7230997425/Modules/arraymodule.c#l657 --- On Sat, 6/23/12, Ignacio Mondino ignacio.mond...@gmail.com wrote: From: Ignacio Mondino ignacio.mond...@gmail.com Subject: Re: How can i call array_length to get the length of array object? To: gmspro gms...@yahoo.com Cc: python-list python-list@python.org Date: Saturday, June 23, 2012, 10:34 PM On Sat, Jun 23, 2012 at 11:23 PM, gmspro gms...@yahoo.com wrote: Hi, I tried this, import array from array import array arr=array('i',[5,7,8]) arr.sg_length Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'sg_length' arr=array('i'[5,8,7]) Traceback (most recent call last): File stdin, line 1, in module TypeError: string indices must be integers arr=array('i',[5,8,7]) arr.length Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'length' arr.length() Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'length' length(arr) Traceback (most recent call last): File stdin, line 1, in module NameError: name 'length' is not defined array_length(arr) Traceback (most recent call last): File stdin, line 1, in module NameError: name 'array_length' is not defined arr.array_length() Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'array_length' arr.array_length Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'array.array' object has no attribute 'array_length' I'm trying to call this function, http://hg.python.org/cpython/file/3b7230997425/Modules/arraymodule.c#l657 Is that possible to call that function? I know it's possible to do: len(arr) arr.itemsize Any asnwer will be highly appreciated. Thanks. -- http://mail.python.org/mailman/listinfo/python-list Hi, something along the lines s = 'supercalifragilisticexpialidocious' len(s) 34 check http://docs.python.org/ for more on this. Ignacio -- http://mail.python.org/mailman/listinfo/python-list
Re: SSL handshake hanging, despite bugfix in stdlib
On 6/23/2012 1:29 PM, Michael Gundlach wrote: Hello, http://bugs.python.org/issue5103 fixed a bug in Python2.6 where SSL's I believe the fix first appeared in 2.6.6. handshake would hang indefinitely if the remote end hangs. However, I'm getting hanging behavior in an IMAP script. When I Ctrl-C it after hours of hanging, I get the same stacktrace as reported in http://bugs.python.org/issue1251#msg72363 , though Antoine said that r80452 fixed issue 5103 as well as this bug. He claimed that it should fix 1251, but I cannot see that there was a dependable code for making the problem appear. (This behavior started only in the last couple of weeks after a longer period working correctly, so I suspect something changed on GMail's end to trigger the bug.) Possible. Am I do something wrong, or is this bug still not fixed? Any pointers would be appreciated. Python 2.6.6 (r266:84292, Dec 7 2011, 20:48:22) on 64-bit Linux 2.6.32. Michael If you want any attention from developers, you will have to show a problem with 2.7.3 or latest 3.2+. I do not know that there is much change in 2.7, but I know there is more in change in 3.3 (the do_handshake call is moved and has a different context. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i call array_length to get the length of array object?
On Sat, Jun 23, 2012 at 8:23 PM, gmspro gms...@yahoo.com wrote: I'm trying to call this function, http://hg.python.org/cpython/file/3b7230997425/Modules/arraymodule.c#l657 Is that possible to call that function? I know it's possible to do: len(arr) You call it just like that. array_length is the C implementation of __len__ for arrays. Doesn't it call this : http://hg.python.org/cpython/file/c0eab397f098/Python/bltinmodule.c#l1283 instead of this: http://hg.python.org/cpython/file/3b7230997425/Modules/arraymodule.c#l657 Yes, and builtin_len calls PyObject_Size, which in turn calls the object's sq_length method, which is defined to be array_length for arrays. -- http://mail.python.org/mailman/listinfo/python-list
[issue15142] Fix reference leak with types created using PyType_FromSpec
Nick Coghlan ncogh...@gmail.com added the comment: That does look like it will fix the leak, but now I'm actually thinking there's more code from type_new that should also be executed in the PyType_FromSpec case. I mean things like: - ensuring __new__ is a static method - ensuring the standard attribute lookup machinery is configured - hooking up tp_as_number, tp_as_mapping, etc - ensuring GC support is configured correctly If that's all happening somehow, it could use a comment, because I certainly can't see it. If not, we probably need to factor out some helper functions that type_new and PyType_FromSpec can both call to make sure everything is fully configured. -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15142] Fix reference leak with types created using PyType_FromSpec
Changes by Nick Coghlan ncogh...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15141] IDLE horizontal scroll bar missing (Win-XPsp3)
Roger Serwy roger.se...@gmail.com added the comment: Adding a horizontal scroll bar is relatively easy. This has already been done with the Horizontal.py extension as part of a separate project called IdleX. See http://idlex.sourceforge.net/extensions.html @Terry, perhaps this should be added as an enhancement to IDLE? -- keywords: +easy nosy: +serwy, terry.reedy type: - enhancement versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15141 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15151] Documentation for Signature, Parameter and signature in inspect module
New submission from Nick Coghlan ncogh...@gmail.com: The PEP 362 implementation has been committed, but the inspect module documentation still needs to be updated. -- assignee: docs@python components: Documentation messages: 163534 nosy: docs@python, ncoghlan priority: deferred blocker severity: normal status: open title: Documentation for Signature, Parameter and signature in inspect module versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15151 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15104] Unclear language in __main__ description
Terry J. Reedy tjre...@udel.edu added the comment: As a native speaker, I agree that the sentence, in isolation, is hardly comprehensible. The previous one is also a bit flakey. The situation is that top-level code executes in a module named __main__, which has one joint global/local namespace that is the global namespace for all subsidiary contexts. '__main__':__main__ module is added to sys.modules before user code is executed. The name __main__ is not normally in the __main__ (global) namespace, hence the comment about 'anonymous' in the first sentence. (It is not anonymous in sys.modules.) However (1) __main__ or any other module/namespace can 'import __main__' and get the reference to __main__ from sys.modules and (2) __main__ does have name __name__ bound to the *string* '__main__'. Hence a module can discover whether or not it *is* the __main__ module. Part of the quoting confusion is that unquoted names in code become strings in namespace dicts, and hence quoted literals when referring to them as keys. What I did not realize until just now is that the __name__ attribute of a module *is* its name (key) in the module namespace (sys.modules dict). For instance, after 'import x.y' or 'from x import y', x.y.__name__ or y.__name is 'x.y' and that is its name (key) in sys.modules. So it appears that the __name__ of a package (sub)module is never just the filename (which I expected), and __name__ is the module name only if one considers the package name as part of the module name (which I did not). The only non-capi reference to module.__name__ in the index is 3.2. The standard type hierarchy Modules __name__ is the module’s name But what is the modules name? Its name in sys.modules, which is either __main__ or the full dotted name for modules in packages (as I just learned). Perhaps this could be explained better here. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15104 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15149] Release Schedule needs updating
Georg Brandl ge...@python.org added the comment: Updated. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15117] Please document top-level sqlite3 module variables
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15117 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15118] uname and other os functions should return a struct sequence instead of a tuple
Terry J. Reedy tjre...@udel.edu added the comment: (OT, but since you brought it up: In my opinion, deprecating the iterability of any builtin class is a horrible idea. It is a Python feature, especially in 3.x, that all *are* iterable. However, I would agree that named tuples should be iterable by name-object pairs, just like dicts. Position is not the real key.) -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11205] Evaluation order of dictionary display is different from reference manual.
Changes by Terry J. Reedy tjre...@udel.edu: -- components: +Interpreter Core -None ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11205 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable
Martin v. Löwis mar...@v.loewis.de added the comment: These things are best studied with msiexec ... /l*v python.log, then inspecting python.log. Without looking at the trace, I'd expect that the actual installation run doesn't inherit ModifyPath from the UI run. The installer runs actually twice - once in the user account, performing the UI sequence and collecting all information. Then in the context of the installer service, running the execute sequence to modify the system. Information is passed in properties. However, not all properties are passed, only secure properties (which I believe must be UPPERCASE, in addition to being listed as a secure property). However, I really recommend to not introduce another secure property, but instead use a custom action, see http://www.advancedinstaller.com/user-guide/qa-conditional-feature.html Write a VB script, and call Session.FeatureRequestState. As yet an alternative, and possibly the best one, there is an AddLocal ControlEvent, see http://msdn.microsoft.com/en-us/library/windows/desktop/aa367537(v=vs.85).aspx Associating this event with the Yes button should make the feature selected. Note that you can have multiple control events for a button, so you can proceed to the next dialog after having this control event. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3561 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15121] devguide doesn't document all bug tracker components
Terry J. Reedy tjre...@udel.edu added the comment: None has over 1300 issues, mostly old (historical). It could be removed from current use, I think (if it is possible to hide such a thing). Cross-build has just 6 issues collected together in last three months. I do not think that is really enough to justify adding it, but someone did. Mathias, can you define it? -- nosy: +doko, terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15121 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
Raymond Hettinger raymond.hettin...@gmail.com added the comment: Something like Fraction.as_decimal(prec=28) would be reasonable. -- priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15142] Fix reference leak with types created using PyType_FromSpec
Martin v. Löwis mar...@v.loewis.de added the comment: - ensuring __new__ is a static method This shouldn't be necessary. __new__ won't be a method at all, and not even exist. Instead, a type may or may not fill the tp_new slot. - ensuring the standard attribute lookup machinery is configured This is what PyType_Ready does, no? - hooking up tp_as_number, tp_as_mapping, etc This is indeed missing. Robin Schreiber is working on a patch. - ensuring GC support is configured correctly This is the responsibility of the caller, as always with C types. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15142] Fix reference leak with types created using PyType_FromSpec
Changes by Martin v. Löwis mar...@v.loewis.de: -- nosy: +Robin.Schreiber ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15142] Fix reference leak with types created using PyType_FromSpec
Martin v. Löwis mar...@v.loewis.de added the comment: In any case, one issue at a time, please. This issues is about a reference leak. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
Mark Dickinson dicki...@gmail.com added the comment: Something like Fraction.as_decimal(prec=28) would be reasonable. I'd prefer an implementation of Fraction.__format__. That solves the SO user's need exactly. Note that he/she didn't care about the Decimal type, but only wanted to be able to *print* digits of a Fraction; the __format__ method is the OOWTDI. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15135] HOWTOs doesn't link to Idioms and Anti-Idioms article
Terry J. Reedy tjre...@udel.edu added the comment: The file is 'controversial'. The link was intentionally removed (and the file deleted and restored but not relinked, pending update) in #7391 (which was closed and re-opened). Your links do not work because the comma/period that follow are considered part of the urls. To be safe, always follow with whitespace. -- nosy: +terry.reedy resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15078] Change os.sendfile so its arguments are stable
Charles-François Natali neolo...@free.fr added the comment: But at the heart of the matter, I see no benefit to exposing Python developers to the idiosyncrasies of poor C API design. I feel strongly that one way Python becomes pythonic is that it aims for the convenience of the programmer--not the language designer and not the implementer. The Python calling convention is far more flexible than the C calling convention. We should put it to good use here. I agree. However, I think Martin is a proponent of the thin wrapper approach, so it'd be nice to have his input on this. I personally like the change, except for `flags` argument collapsing. Imagine what mmap's prototype would look like if we used list of optional arguments instead of a flag... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15078] Change os.sendfile so its arguments are stable
Changes by Charles-François Natali neolo...@free.fr: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15136] Decimal accepting Fraction
Terry J. Reedy tjre...@udel.edu added the comment: I think *both* proposals are sensible. Fraction already has .from_decimal (using Decimal), so .to_decimal (also using Decimal) is sensible. It also has .from_float, with 'f.to_float' spelled f.__float__, normally called as float(f). On the other hand, part of the point of the new format system was/is to allow 'other' classes to tie into format specs with custom .__format__. Currently, Fraction inherits .__format__ from object, which only recognizes 's' specifications. (Anything else gives a misleading 'str' error message that is the subject of another issue.) I think it should get a custom .__format__, which could use f.to_decimal(prec), where prec is calculated from the format spec. -- nosy: +eric.smith, terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15092] Using enum PyUnicode_Kind
Serhiy Storchaka storch...@gmail.com added the comment: Since assert(0) always fails, return can never happen (and was not added above. So I would think remove it. This will cause a compiler warning in non-debug mode. Here is updated patch with all other comments taken into account. -- Added file: http://bugs.python.org/file26102/enum_PyUnicode_Kind-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15092 ___diff -r aa153b827d17 Include/unicodeobject.h --- a/Include/unicodeobject.h Fri Jun 22 22:49:12 2012 -0500 +++ b/Include/unicodeobject.h Sat Jun 23 11:04:31 2012 +0300 @@ -1013,7 +1013,7 @@ ); #ifndef Py_LIMITED_API -PyAPI_FUNC(void*) _PyUnicode_AsKind(PyObject *s, unsigned int kind); +PyAPI_FUNC(void*) _PyUnicode_AsKind(PyObject *s, enum PyUnicode_Kind kind); #endif #endif diff -r aa153b827d17 Modules/_csv.c --- a/Modules/_csv.cFri Jun 22 22:49:12 2012 -0500 +++ b/Modules/_csv.cSat Jun 23 11:04:31 2012 +0300 @@ -774,7 +774,7 @@ PyObject *fields = NULL; Py_UCS4 c; Py_ssize_t pos, linelen; -unsigned int kind; +enum PyUnicode_Kind kind; void *data; PyObject *lineobj; @@ -973,7 +973,8 @@ * record length. */ static Py_ssize_t -join_append_data(WriterObj *self, unsigned int field_kind, void *field_data, +join_append_data(WriterObj *self, + enum PyUnicode_Kind field_kind, void *field_data, Py_ssize_t field_len, int quote_empty, int *quoted, int copy_phase) { @@ -1093,7 +1094,7 @@ static int join_append(WriterObj *self, PyObject *field, int *quoted, int quote_empty) { -unsigned int field_kind = -1; +enum PyUnicode_Kind field_kind = -1; void *field_data = NULL; Py_ssize_t field_len = 0; Py_ssize_t rec_len; @@ -1123,7 +1124,7 @@ join_append_lineterminator(WriterObj *self) { Py_ssize_t terminator_len, i; -unsigned int term_kind; +enum PyUnicode_Kind term_kind; void *term_data; terminator_len = PyUnicode_GET_LENGTH(self-dialect-lineterminator); diff -r aa153b827d17 Modules/_elementtree.c --- a/Modules/_elementtree.cFri Jun 22 22:49:12 2012 -0500 +++ b/Modules/_elementtree.cSat Jun 23 11:04:31 2012 +0300 @@ -869,7 +869,7 @@ if (PyUnicode_Check(tag)) { const Py_ssize_t len = PyUnicode_GET_LENGTH(tag); void *data = PyUnicode_DATA(tag); -unsigned int kind = PyUnicode_KIND(tag); +enum PyUnicode_Kind kind = PyUnicode_KIND(tag); for (i = 0; i len; i++) { Py_UCS4 ch = PyUnicode_READ(kind, data, i); if (ch == '{') @@ -2947,7 +2947,7 @@ unsigned char s[256]; int i; void *data; -unsigned int kind; +enum PyUnicode_Kind kind; memset(info, 0, sizeof(XML_Encoding)); diff -r aa153b827d17 Modules/_io/_iomodule.h --- a/Modules/_io/_iomodule.h Fri Jun 22 22:49:12 2012 -0500 +++ b/Modules/_io/_iomodule.h Sat Jun 23 11:04:31 2012 +0300 @@ -55,7 +55,7 @@ Otherwise, the function will scan further and return garbage. */ extern Py_ssize_t _PyIO_find_line_ending( int translated, int universal, PyObject *readnl, -int kind, char *start, char *end, Py_ssize_t *consumed); +enum PyUnicode_Kind kind, char *start, char *end, Py_ssize_t *consumed); #define DEFAULT_BUFFER_SIZE (8 * 1024) /* bytes */ diff -r aa153b827d17 Modules/_io/textio.c --- a/Modules/_io/textio.c Fri Jun 22 22:49:12 2012 -0500 +++ b/Modules/_io/textio.c Sat Jun 23 11:04:31 2012 +0300 @@ -301,7 +301,7 @@ output_len = PyUnicode_GET_LENGTH(output); if (self-pendingcr (final || output_len 0)) { /* Prefix output with CR */ -int kind; +enum PyUnicode_Kind kind; PyObject *modified; char *out; @@ -311,7 +311,7 @@ goto error; kind = PyUnicode_KIND(modified); out = PyUnicode_DATA(modified); -PyUnicode_WRITE(kind, PyUnicode_DATA(modified), 0, '\r'); +PyUnicode_WRITE(kind, out, 0, '\r'); memcpy(out + kind, PyUnicode_DATA(output), kind * output_len); Py_DECREF(output); output = modified; /* output remains ready */ @@ -342,7 +342,7 @@ Py_ssize_t len; int seennl = self-seennl; int only_lf = 0; -int kind; +enum PyUnicode_Kind kind; in_str = PyUnicode_DATA(output); len = PyUnicode_GET_LENGTH(output); @@ -417,7 +417,7 @@ } else { void *translated; -int kind = PyUnicode_KIND(output); +kind = PyUnicode_KIND(output); void *in_str = PyUnicode_DATA(output); Py_ssize_t in, out; /* XXX: Previous in-place translation here is disabled as @@ -1600,7 +1600,7 @@ that is to the NUL character. Otherwise the function will produce incorrect results. */ static char * -find_control_char(int
[issue15078] Change os.sendfile so its arguments are stable
Serhiy Storchaka storch...@gmail.com added the comment: I personally like the change, except for `flags` argument collapsing. Imagine what mmap's prototype would look like if we used list of optional arguments instead of a flag... What's wrong with mmap? It uses list of optional arguments (`flags`, `prot`, `access`) and not only one `flags` argument. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14742] test_tools very slow
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 0e5a698d3c4c by Mark Dickinson in branch 'default': Issue #14742: test_unparse now only checks a limited number of files unless the 'cpu' resource is specified. http://hg.python.org/cpython/rev/0e5a698d3c4c -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14742] test_tools very slow
Changes by Mark Dickinson dicki...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14742] test_tools very slow
Changes by Mark Dickinson dicki...@gmail.com: -- resolution: - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15078] Change os.sendfile so its arguments are stable
Martin v. Löwis mar...@v.loewis.de added the comment: I indeed think that the code is fine as it stands, and no change is needed, and that the proposed changes make matters worse. The point of the thin wrappers approach is that you can read the manpage of your system, and immediately can trust that this is what the Python function will do. It is unfortunate that BSD and Linux have chosen to give the function the same name despite the signature differences, but there is no value in hiding this fact from the Python user. The whole point of this function is performance and zero copy. Anybody using it will need to understand well what they are doing, and that their code is highly system-dependent. If you want cross-platform code, use shutil.copyfileobj. I could agree to a higher-level function that tries to avoid system differences, but that function shouldn't be called sendfile. For example, the socket object could have a sendfd or sendstream method which would use the proper variant of sendfile if available, else uses a regular read/send loop. I always found the name sendfile confusing, anyway, since it's not the file that is being sent, but the all (or some) of the contents of the file. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15137] Cleaned source of `cmd` module
Terry J. Reedy tjre...@udel.edu added the comment: Do read PEP 8 Python style guide. http://python.org/dev/peps/pep-0008/ You violated the following: (Peeves) More than one space around an assignment (or other) operator to align it with another. Yes: x = 1 y = 2 long_variable = 3 No: x = 1 y = 2 long_variable = 3 I used to do that, but it only works with fixed-pitch fonts, which is not really possible for full-unicode fonts. Anyway, that is about half the changes, and they would have to go. Sorry. Some of your other changes make it more compliant. Some I am not sure of others without re-reading. For the other reasons David gave, I am closing this so you are not mislead into doing more work that will not be accepted. I would note that improving test coverage *is* accepted and good test-coverage is really needed before extensive re-writes. Another document to read is the developer guide http://docs.python.org/devguide/index.html Last point. Please use .diff or .patch for diff/patch files as that extension works better for people and, I believe, hg. Since you are interested in readability, you might consider contributing doc suggestions. You do not have to know .rst formatting. A good suggestion given as plain ascii in a message like this will be copied and formatted by someone who does know .rst. And in simple cases, one can even patch the source .rst withouth knowing much. -- nosy: +terry.reedy resolution: - rejected stage: - committed/rejected status: open - closed versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15142] Fix reference leak with types created using PyType_FromSpec
Nick Coghlan ncogh...@gmail.com added the comment: You're right, I was confusing what happens automatically for classes defined in Python (i.e. the full treatment in type_new) vs those defined statically (i.e. just the parts in PyType_Ready). Given that PyType_FromSpec doesn't currently support inheritance, providing a default tp_dealloc before the inherit_slots() call in PyType_Ready would work OK in the near term. However, once inheritance support is added by #15146 then it would be wrong - the default slot entry would override an inherited one. So, I think this adjustment actually needs to be handled in PyType_Ready, at some point after the inherit_slots() call. Something like: /* Sanity check for tp_dealloc. */ if ((type-tp_flags Py_TPFLAGS_HEAPTYPE) (type-tp_dealloc == type_dealloc)) { /* Type has been declared as a heap type, but has inherited the default allocator. This can happen when using the limited API to dynamically create types. */ type-tp_dealloc = subtype_dealloc; } -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree
Terry J. Reedy tjre...@udel.edu added the comment: The bug is the mismatch between doc and behavior. Unless someone can explain why the seemingly reasonable docstring is wrong, I would consider changing the behavior a possible fix. Can you add minimal test code that gives you an int? I should check windows and someone should check 2.7, doc and behavior. -- nosy: +gpolo, serwy, terry.reedy title: tkinter.BooleanVar.get() docstring is wrong - tkinter.BooleanVar.get() behavior and docstring disagree type: - behavior versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15133 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10142] Support for SEEK_HOLE/SEEK_DATA
Stefan Krah stefan-use...@bytereef.org added the comment: This looks like a bug in freebsd: http://lists.freebsd.org/pipermail/freebsd-amd64/2012-January/014332.html I tested that one already yesterday (it was late, so I forgot to mention it) and the test case attached to the bug report runs fine on the buildbot: #include unistd.h #include fcntl.h #include errno.h int main(void) { int fd = open(ccc.c, O_RDONLY); off_t offset=lseek(fd,0,SEEK_HOLE); if (offset==-1) { if (errno==ENXIO) { // No more data printf(no more data\n); close(fd); exit(-1); } } return 0; } The skip looks good to me though, I wouldn't be surprised if there is a kernel bug. This bug is still present on my machine: http://www.freebsd.org/cgi/query-pr.cgi?pr=94729 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15078] Change os.sendfile so its arguments are stable
Charles-François Natali neolo...@free.fr added the comment: What's wrong with mmap? It uses list of optional arguments (`flags`, `prot`, `access`) and not only one `flags` argument. Of course it does, as the mmap syscall(), since this arguments have nothing to do with one another. I was refering to your proposal of splitting sendfile's `flags` argument, which is currently a bitmask, into distinct arguments (diskio=True, wait=True, sync=False). If we did this for, let's say, mmap() `flags`, this would end up in a bazillion optional arguments, because there a re so many possible values for `flags` (MAP_SHARED, MAP_PRIVATE, MAP_ANONYMOUS, MAP_DENYWRITE...). Bitmasks are a clear and compact way to pass optional arguments, and should be kept. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14340] Update embedded copy of expat - fix security crash issues
Georg Brandl ge...@python.org added the comment: Deferring for beta1 at least. -- priority: release blocker - deferred blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15146] Implemented PyType_FromSpecWithBases
Changes by Nick Coghlan ncogh...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15152] test_subprocess fqailures on awfully slow builtbots
New submission from Charles-François Natali neolo...@free.fr: Some test_subprocess tests are failing on really slow buildbots, such as the Ubtuntu ARM one: == ERROR: test_wait_timeout (test.test_subprocess.ProcessTestCase) -- Traceback (most recent call last): File /var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/test/test_subprocess.py, line 718, in test_wait_timeout self.assertEqual(p.wait(timeout=3), 0) File /var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/subprocess.py, line 1494, in wait raise TimeoutExpired(self.args, timeout) subprocess.TimeoutExpired: Command '['/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/python', '-c', 'import time; time.sleep(0.1)']' timed out after 3 seconds == FAIL: test_check_output_timeout (test.test_subprocess.ProcessTestCase) -- Traceback (most recent call last): File /var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/test/test_subprocess.py, line 140, in test_check_output_timeout self.assertEqual(c.exception.output, b'BDFL') AssertionError: b'' != b'BDFL' == FAIL: test_check_output_timeout (test.test_subprocess.ProcessTestCaseNoPoll) -- Traceback (most recent call last): File /var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/test/test_subprocess.py, line 140, in test_check_output_timeout self.assertEqual(c.exception.output, b'BDFL') AssertionError: b'' != b'BDFL' The timeouts for those tests are already at 3 seconds. We could double them to 6 seconds and see if things get better: that would increase the running time on all the buildbots, though. Any other idea? -- components: Tests keywords: buildbot messages: 163557 nosy: neologix, pitrou priority: normal severity: normal stage: needs patch status: open title: test_subprocess fqailures on awfully slow builtbots type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13062] Introspection generator and function closure state
Nick Coghlan ncogh...@gmail.com added the comment: Attached patch implements both new functions, but I'm going to drop getgeneratorlocals for now and move that idea to a new issue. -- Added file: http://bugs.python.org/file26103/issue13062-combined.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13062 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10142] Support for SEEK_HOLE/SEEK_DATA
Stefan Krah stefan-use...@bytereef.org added the comment: int main(void) { int fd = open(ccc.c, O_RDONLY); off_t offset=lseek(fd,0,SEEK_HOLE); if (offset==-1) { if (errno==ENXIO) { Darn, the errno in test_posix should be ENOTTY. Indeed, with ENOTTY the test case for the bug is positive. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15153] Add inspect.getgeneratorlocals
New submission from Nick Coghlan ncogh...@gmail.com: Extracted from #13062, the proposal is add a simple API to inspect the local variables of a generator with an associated frame. -- components: Library (Lib) messages: 163560 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Add inspect.getgeneratorlocals type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15153 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15153] Add inspect.getgeneratorlocals
Nick Coghlan ncogh...@gmail.com added the comment: The intended use case is for whitebox testing of generator behaviour. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15153 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13062] Introspection generator and function closure state
Nick Coghlan ncogh...@gmail.com added the comment: I created #15153 to cover getgeneratorlocals. Attached patch is just for record keeping purposes - I'll be committing this change shortly. -- Added file: http://bugs.python.org/file26104/issue13062-getclosurevars.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13062 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15142] Fix reference leak with types created using PyType_FromSpec
Antoine Pitrou pit...@free.fr added the comment: However, once inheritance support is added by #15146 then it would be wrong - the default slot entry would override an inherited one. It would not be wrong. subtype_dealloc will properly call a base class' tp_dealloc, if necessary. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13062] Introspection generator and function closure state
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 487fe648de56 by Nick Coghlan in branch 'default': Close #13062: Add inspect.getclosurevars to simplify testing stateful closures http://hg.python.org/cpython/rev/487fe648de56 -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13062 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15152] test_subprocess fqailures on awfully slow builtbots
Antoine Pitrou pit...@free.fr added the comment: Barry (the buildbot owner) could take a look. -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12965] longobject: documentation improvements
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5ca9a51f3d85 by Mark Dickinson in branch '3.2': Issue #12965: Clean up C-API docs for PyLong_AsLong(AndOverflow); clarify that __int__ will be called for non-PyLongs http://hg.python.org/cpython/rev/5ca9a51f3d85 New changeset 63fc1552cd36 by Mark Dickinson in branch 'default': Issue #12965: Merge from 3.2 http://hg.python.org/cpython/rev/63fc1552cd36 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12965 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15153] Add inspect.getgeneratorlocals
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset dd82a910eb07 by Nick Coghlan in branch 'default': Close #15153: Added inspect.getgeneratorlocals to simplify whitebox testing of generator state updates http://hg.python.org/cpython/rev/dd82a910eb07 -- nosy: +python-dev resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15153 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14578] importlib doesn't check Windows registry for paths
Georg Brandl ge...@python.org added the comment: OTOH, I don't want it to block beta1. -- priority: release blocker - deferred blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14578 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13959] Re-implement parts of imp in pure Python
Georg Brandl ge...@python.org added the comment: OK, sounds like none of it would block beta1. -- priority: release blocker - deferred blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13959 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15114] Deprecate strict mode of HTMLParser
Georg Brandl ge...@python.org added the comment: Why not deprecate .error()? Removing it immediately as undocumented is certainly not better. Otherwise sounds good, please commit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15114 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12965] longobject: documentation improvements
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 3ace8e17074a by Mark Dickinson in branch '3.2': Issue #12965: Clean up C-API docs for PyLong_AsLongLong(AndOverflow); clarify that __int__ will be called for non-PyLongs http://hg.python.org/cpython/rev/3ace8e17074a New changeset 85683f005fc8 by Mark Dickinson in branch 'default': Issue #12965: Merge from 3.2. http://hg.python.org/cpython/rev/85683f005fc8 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12965 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15142] Fix reference leak with types created using PyType_FromSpec
Nick Coghlan ncogh...@gmail.com added the comment: True, I didn't follow the bouncing ball far enough. In that, case I think all that is needed is a comment like: subtype_dealloc walks the MRO to call the base dealloc function, so it is OK to block inheritance of the slot -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15143] Windows compile errors
Georg Brandl ge...@python.org added the comment: Seems to be fixed; at least compilation now works. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15143 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15147] Remove packaging from the stdlib
Georg Brandl ge...@python.org added the comment: Very good, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15150] Windows build does not link
Georg Brandl ge...@python.org added the comment: Doesn't occur on the buildbots; is it fixed already? -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15150 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count
Antoine Pitrou pit...@free.fr added the comment: 27f9c26fdd8b broke test_shutil on the Windows buildbots: == FAIL: test_basic (test.test_shutil.TestWhich) -- Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_shutil.py, line 1146, in test_basic self.assertEqual(rv, self.temp_file.name) AssertionError: None != 'c:\\users\\db3l\\appdata\\local\\temp\\tmpxqw4gu\\tmp7ugfmm.exe' == FAIL: test_full_path_short_circuit (test.test_shutil.TestWhich) -- Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_shutil.py, line 1152, in test_full_path_short_circuit self.assertEqual(self.temp_file.name, rv) AssertionError: 'c:\\users\\db3l\\appdata\\local\\temp\\tmpmwer14\\tmpeacfbz.exe' != None == FAIL: test_non_matching_mode (test.test_shutil.TestWhich) -- Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_shutil.py, line 1158, in test_non_matching_mode self.assertIsNone(rv) AssertionError: 'c:\\users\\db3l\\appdata\\local\\temp\\tmp7n6ojp\\tmp5tt9pa.exe' is not None == FAIL: test_pathext_checking (test.test_shutil.TestWhich) -- Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_shutil.py, line 1181, in test_pathext_checking self.assertEqual(self.temp_file.name, rv) AssertionError: 'c:\\users\\db3l\\appdata\\local\\temp\\tmpipmbe3\\tmpx43hex.exe' != None == FAIL: test_relative (test.test_shutil.TestWhich) -- Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_shutil.py, line 1166, in test_relative self.assertEqual(rv, os.path.join(tail_dir, self.file)) AssertionError: None != 'tmpcluw7l\\tmp6sy_py.exe' -- nosy: +pitrou priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14626 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13590] extension module builds fail with python.org OS X installers on OS X 10.7 and 10.6 with Xcode 4.2
Ned Deily n...@acm.org added the comment: Thanks, Ronald. Version 3 addresses various issues, including adding a search of $PATH for clang since xcrun is not useful in the case where the user has installed a standalone Command Line Tools package or has installed a Command Line Tools component from within Xcode but hasn't run xcode-select. Another problem: the SDK path is likely going to be incorrect in the common case of an installer build on 10.5 or 10.6 but run on 10.7 or later. It's tricky to get all the edge cases correct for that. For now, the solution is to delete -sdkroot parameters from the default CFLAGS and friends if the SDK path is invalid; that assumes the Command Line Tools component/package has been installed. If necessary, the user can override via env variables. Also, the compiler validity checks are now bypassed if the user has overridden CC. I'll plan to commit later today for 3.3.0b1 along with some README updates. -- stage: needs patch - commit review Added file: http://bugs.python.org/file26105/issue13950-version3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12965] longobject: documentation improvements
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e1416a4d728a by Mark Dickinson in branch '3.2': Issue #12965: More PyLong_As* clarifications. Thanks Stefan Krah. http://hg.python.org/cpython/rev/e1416a4d728a New changeset 349bc58e8c66 by Mark Dickinson in branch 'default': Issue #12965: Merge from 3.2. http://hg.python.org/cpython/rev/349bc58e8c66 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12965 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12965] longobject: documentation improvements
Mark Dickinson dicki...@gmail.com added the comment: Docs mostly fixed now for Python 3.2 and Python 3.3. That leaves 2.7, where there are some additional complications (e.g., __long__ in addition to __int__, when / whether short ints are accepted, etc.). While it would be good to fix the 2.7 docs as well, I don't see myself having time for this in the near future, so I'm unassigning for now; Stefan, I think should feel free to take this issue and check in clarifications for 2.7, if you want to. -- assignee: mark.dickinson - versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12965 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Serhiy Storchaka storch...@gmail.com added the comment: Any chance to commit the patch today and to get this feature in Python 3.3? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5067] Error msg from using wrong quotes in JSON is unhelpful
Serhiy Storchaka storch...@gmail.com added the comment: Any chance to commit the patch today and to get this feature in Python 3.3? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - pitrou stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10376] ZipFile unzip is unbuffered
Serhiy Storchaka storch...@gmail.com added the comment: Any chance to commit the patch before final feature freeze? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14923] Even faster UTF-8 decoding
Serhiy Storchaka storch...@gmail.com added the comment: Any chance to commit the patch before final feature freeze? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14923 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b1dbd8827e79 by Antoine Pitrou in branch 'default': Issue #3665: \u and \U escapes are now supported in unicode regular expressions. http://hg.python.org/cpython/rev/b1dbd8827e79 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Antoine Pitrou pit...@free.fr added the comment: Any chance to commit the patch today and to get this feature in Python 3.3? Thanks for reminding us! It's now in 3.3. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10376] ZipFile unzip is unbuffered
Changes by Antoine Pitrou pit...@free.fr: -- assignee: docs@python - nosy: +nadeem.vawda stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file25720/issue8271-3.3-fast.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14923] Even faster UTF-8 decoding
Antoine Pitrou pit...@free.fr added the comment: Any chance to commit the patch before final feature freeze? I'll defer to Mark :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14923 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Antoine Pitrou pit...@free.fr added the comment: Why is this marked fixed? Is it fixed or not? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Serhiy Storchaka storch...@gmail.com added the comment: I deleted a fast patch, since it unsafe. Issue14923 should safer compensate a small slowdown. I think this change is not a bugfix (this is not a bug, the standard allows such behavior), but a new feature, so I doubt the need to fix 2.7 and 3.2. Any chance to commit the patch today and to get this feature in Python 3.3? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14923] Even faster UTF-8 decoding
Mark Dickinson dicki...@gmail.com added the comment: Okay, will look at this this afternoon. -- assignee: - mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14923 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Serhiy Storchaka storch...@gmail.com added the comment: Thank you for the quick response. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Serhiy Storchaka storch...@gmail.com added the comment: No, it is not fully fixed. Only one bug was fixed, but the current behavior is still not conformed with the Unicode Standard *recommendations*. Non-conforming with recommendations is not a bug, conforming is a feature. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15139] Speed up threading.Condition wakeup
Georg Brandl ge...@python.org added the comment: Antoine is much more of an expert here, and I defer to his judgment that it is better to wait. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15144] Possible integer overflow in operations with addresses and sizes.
Changes by Mark Dickinson dicki...@gmail.com: -- assignee: - mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15144 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com