Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-02-27 Thread Georg Brandl
Am 27.02.2013 17:51, schrieb Michael Foord: > Hello all, > > PyCon, and the Python Language Summit, is nearly upon us. We have a good > number of people confirmed to attend. If you are intending to come to the > language summit but haven't let me know please do so. > > The agenda of topics for

Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-02-27 Thread Barry Warsaw
On Feb 27, 2013, at 04:51 PM, Michael Foord wrote: >If you have other items you'd like to discuss please let me know and I can >add them to the agenda. I'd like to have some discussions around promotion of Python 3, how we can accelerate its adoption, availability of supporting packages, what cri

Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-02-27 Thread Barry Warsaw
On Feb 27, 2013, at 11:33 AM, fwierzbi...@gmail.com wrote: >I am suggesting that we push forward on the "shared library" approach to the >files in the Lib/* directory, so that would certainly include IronPython and >PyPy as well I hope. +1 >The easy part for Jython is pushing some of our "if is_

Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-02-27 Thread Eric Snow
On Wed, Feb 27, 2013 at 12:33 PM, fwierzbi...@gmail.com wrote: > There are a couple of spots that might be more controversial. For > example, Jython has a file Lib/zlib.py that implements zlib in terms > of the existing Java support for zlib. I do wonder if such a file is > acceptable in CPython's

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Neil Hodgson
Armin Rigo: > So the general answer to your question is: we google MessageBox and > copy that line from the microsoft site, and manually remove the > unnecessary WINAPI and _In_opt declarations: Wouldn't it be better to understand the SAL annotations like _In_opt so that spurious NULLs (for e

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Armin Rigo
Hi Paul, On Wed, Feb 27, 2013 at 9:31 PM, Paul Moore wrote: > from ctypes import windll > MessageBox = windll.User32.MessageBoxW > MessageBox(0, "Hello, world!", "Title", 0) You are right that it's a bit cumbersome in cffi up to and including 0.5, but in the cffi trunk all standard Windows types

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Terry Reedy
On 2/27/2013 3:31 PM, Paul Moore wrote: from ctypes import windll MessageBox = windll.User32.MessageBoxW MessageBox(0, "Hello, world!", "Title", 0) > Note - I wrote this from memory, Gee, that is pretty easy. Worked perfectly -- Terry Jan Reedy ___

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Greg Ewing
Antoine Pitrou wrote: We have to find sufficiently silly species of snakes, though. Glancing through http://en.wikipedia.org/wiki/List_of_snakes, we have: Wart snakes Java wart snakes Pipe snakes Stiletto snakes Rubber boas Dog-faced water snakes Shovel-nosed snakes Hook-nosed snakes Leaf-nose

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Paul Moore
On 27 February 2013 19:26, Paul Moore wrote: > On 27 February 2013 19:08, Armin Rigo wrote: >> That's not correct: you can't indeed give the calling convention, but >> it is not needed for the common case. What is not supported is only >> Python-defined callbacks using the Windows-specific conve

Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-02-27 Thread anatoly techtonik
On Wed, Feb 27, 2013 at 7:51 PM, Michael Foord wrote: > Hello all, > > PyCon, and the Python Language Summit, is nearly upon us. We have a good > number of people confirmed to attend. If you are intending to come to the > language summit but haven't let me know please do so. > > The agenda of topi

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Daniel Holth
On Wed, Feb 27, 2013 at 4:18 AM, Ronald Oussoren wrote: > > On 27 Feb, 2013, at 10:06, Maciej Fijalkowski wrote: > >> On Wed, Feb 27, 2013 at 9:29 AM, Ronald Oussoren >> wrote: >>> >>> On 26 Feb, 2013, at 16:13, Maciej Fijalkowski wrote: >>> Hello. I would like to discuss on the

Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-02-27 Thread fwierzbi...@gmail.com
On Wed, Feb 27, 2013 at 11:21 AM, Brett Cannon wrote: > Do you mean more generally getting more pure Python implementations of > modules in the stdlib? If so then as a reference there is > http://bugs.python.org/issue16651 which lists the modules in the stdlib w/ > only extension module implementa

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Paul Moore
On 27 February 2013 19:08, Armin Rigo wrote: > That's not correct: you can't indeed give the calling convention, but > it is not needed for the common case. What is not supported is only > Python-defined callbacks using the Windows-specific convention --- as > documented, there is a workaround fo

Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-02-27 Thread Brett Cannon
On Wed, Feb 27, 2013 at 2:01 PM, fwierzbi...@gmail.com < fwierzbi...@gmail.com> wrote: > On Wed, Feb 27, 2013 at 8:51 AM, Michael Foord > wrote: > > If you have other items you'd like to discuss please let me know and I > can add them to the agenda. > > I'd like to discuss merging Jython's standa

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Armin Rigo
Hi Paul, On Wed, Feb 27, 2013 at 7:24 PM, Paul Moore wrote: > On 27 February 2013 11:53, Maciej Fijalkowski wrote: >> I think it means you can't use the ABI version and specify the calling >> convention. It's a reasonable bug report (the calling convention on >> API version works though) > > Tha

Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-02-27 Thread fwierzbi...@gmail.com
On Wed, Feb 27, 2013 at 8:51 AM, Michael Foord wrote: > If you have other items you'd like to discuss please let me know and I can > add them to the agenda. I'd like to discuss merging Jython's standard Lib (the *.py files). We have in the past had agreement that this would be a good idea - I ju

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Paul Moore
On 27 February 2013 18:50, Brett Cannon wrote: >> One other use case for the ABI level over the API level - the ABI >> level (no C extension) can be used across Python versions, where the >> API level needs a separate compiled extension per Python version. This >> can be a big deal on Windows at l

Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-02-27 Thread Antoine Pitrou
On Wed, 27 Feb 2013 16:51:16 + Michael Foord wrote: > Hello all, > > PyCon, and the Python Language Summit, is nearly upon us. We have a good > number of people confirmed to attend. If you are intending to come to the > language summit but haven't let me know please do so. > > The agenda

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Brett Cannon
On Wed, Feb 27, 2013 at 1:28 PM, Paul Moore wrote: > 27 February 2013 18:24, Paul Moore wrote: > > On 27 February 2013 11:53, Maciej Fijalkowski wrote: > >> I think it means you can't use the ABI version and specify the calling > >> convention. It's a reasonable bug report (the calling convent

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Paul Moore
27 February 2013 18:24, Paul Moore wrote: > On 27 February 2013 11:53, Maciej Fijalkowski wrote: >> I think it means you can't use the ABI version and specify the calling >> convention. It's a reasonable bug report (the calling convention on >> API version works though) > > That would be a deal-

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Paul Moore
On 27 February 2013 11:53, Maciej Fijalkowski wrote: > I think it means you can't use the ABI version and specify the calling > convention. It's a reasonable bug report (the calling convention on > API version works though) That would be a deal-breaker for my use case of quick scripts working wit

Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-02-27 Thread Brian Curtin
On Wed, Feb 27, 2013 at 10:51 AM, Michael Foord wrote: > Hello all, > > PyCon, and the Python Language Summit, is nearly upon us. We have a good > number of people confirmed to attend. If you are intending to come to the > language summit but haven't let me know please do so. > > The agenda of t

[Python-Dev] Python Language Summit at PyCon: Agenda

2013-02-27 Thread Michael Foord
Hello all, PyCon, and the Python Language Summit, is nearly upon us. We have a good number of people confirmed to attend. If you are intending to come to the language summit but haven't let me know please do so. The agenda of topics for discussion so far includes the following: * A report on p

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-27 Thread Anders J. Munch
Hi, offering my DKK 0.50 on the subject. I've used an in-house enum type for the better part of a decade - put up at http://unicollect.dk/download/oss/dc_enum.zip for inspiration. I'm partial to an int subclass, or at least something very int-like, because wrapping C libraries is such a major use

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Maciej Fijalkowski
On Wed, Feb 27, 2013 at 5:57 PM, Eli Bendersky wrote: > >> > I read the cffi docs once again and went through some of the examples. I >> > want to divide this to two topics. >> > >> > One is what you call the "ABI" level. IMHO, it's hands down superior to >> > ctypes. Your readdir demo demonstrate

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Eli Bendersky
> > I read the cffi docs once again and went through some of the examples. I > > want to divide this to two topics. > > > > One is what you call the "ABI" level. IMHO, it's hands down superior to > > ctypes. Your readdir demo demonstrates this very nicely. I would > definitely > > want to see this

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Eli Bendersky
On Tue, Feb 26, 2013 at 11:29 PM, Ronald Oussoren wrote: > > On 26 Feb, 2013, at 16:13, Maciej Fijalkowski wrote: > > > Hello. > > > > I would like to discuss on the language summit a potential inclusion > > of cffi[1] into stdlib. > > The API in general looks nice, but I do have some concens w.r

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-27 Thread Fred Drake
On Wed, Feb 27, 2013 at 8:30 AM, Antoine Pitrou wrote: > I don't think extra-strong typing of constants is really useful in > practice; it smells a bit like private methods to me. I think checking that a value comes from a particular enum *is* a degree of hand-holding. For libraries or framework

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Armin Rigo
Hi Guido, On Tue, Feb 26, 2013 at 8:24 PM, Guido van Rossum wrote: > From a software engineering perspective, 10 years is indistinguishable > from infinity, so I don't care what happens 10 years from now -- as > long as you don't blame me. :-) I can't resist: around today it is the 10th annivers

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Joao S. O. Bueno
On 27 February 2013 10:31, Antoine Pitrou wrote: > Le Wed, 27 Feb 2013 12:15:05 +1300, > Greg Ewing a écrit : > > Antoine Pitrou wrote: > > > Or we'll go straight to 5. > > > (or switch to date-based numbering :-)) > > > > We could go the Apple route and start naming them after > > species of sn

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Xavier Morel
On 2013-02-27, at 14:31 , Antoine Pitrou wrote: > Le Wed, 27 Feb 2013 12:15:05 +1300, > Greg Ewing a écrit : >> Antoine Pitrou wrote: >>> Or we'll go straight to 5. >>> (or switch to date-based numbering :-)) >> >> We could go the Apple route and start naming them after >> species of snake. > >

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-27 Thread Antoine Pitrou
Le Wed, 27 Feb 2013 12:33:35 +0900, "Stephen J. Turnbull" a écrit : > > As far as I can see, what you (Antoine) want is an identifier with a > constant value, no more and no less. Grouping into an enum is merely > a lexical convention, since you are happy to compare enums of > different enum cla

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Antoine Pitrou
Le Wed, 27 Feb 2013 12:15:05 +1300, Greg Ewing a écrit : > Antoine Pitrou wrote: > > Or we'll go straight to 5. > > (or switch to date-based numbering :-)) > > We could go the Apple route and start naming them after > species of snake. We have to find sufficiently silly species of snakes, though

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Nick Coghlan
On Wed, Feb 27, 2013 at 7:00 PM, Maciej Fijalkowski wrote: > On Wed, Feb 27, 2013 at 6:53 AM, Eli Bendersky wrote: >> 2. Using a function called "verify" to create stuff. This may sound like a >> naming bikeshed, but it's not. It ties in to the question - why is this >> needed? > > We welcome a b

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Maciej Fijalkowski
On Wed, Feb 27, 2013 at 2:39 PM, Nick Coghlan wrote: > On Wed, Feb 27, 2013 at 7:06 PM, Maciej Fijalkowski wrote: >>> 3. Cffi basicly contains a (limited) C parser, and those are notoriously >>> hard to get exactly right. Luckily cffi only needs to interpret >>> declarations and not the full la

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Nick Coghlan
On Wed, Feb 27, 2013 at 7:06 PM, Maciej Fijalkowski wrote: >> 3. Cffi basicly contains a (limited) C parser, and those are notoriously >> hard to get exactly right. Luckily cffi only needs to interpret declarations >> and not the full language, but even so this can be a risk of subtle bugs. > >

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Maciej Fijalkowski
On Wed, Feb 27, 2013 at 1:45 PM, Richard Oudkerk wrote: > On 27/02/2013 9:21am, Maciej Fijalkowski wrote: >>> >>> >That's somehting that will have to be resolved before cffi can be >>> > included in the stdlib, fat binaries are supported by CPython and are used >>> > the binary installers. >>> > >

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Richard Oudkerk
On 27/02/2013 9:21am, Maciej Fijalkowski wrote: >That's somehting that will have to be resolved before cffi can be included in the stdlib, fat binaries are supported by CPython and are used the binary installers. > >Ronald if cpython supports it and you can load it using dlopen, it does work t

Re: [Python-Dev] PLY in stdlib (was cffi in stdlib)

2013-02-27 Thread Michael Foord
On 27 Feb 2013, at 11:00, David Beazley wrote: >> >> From: Eli Bendersky >> >> I'll be the first one to admit that pycparser is almost certainly not >> generally useful enough to be exposed in the stdlib. So just using it as an >> implementation detail is absolutely fine. PLY is a more intere

[Python-Dev] PLY in stdlib (was cffi in stdlib)

2013-02-27 Thread David Beazley
> > From: Eli Bendersky > > I'll be the first one to admit that pycparser is almost certainly not > generally useful enough to be exposed in the stdlib. So just using it as an > implementation detail is absolutely fine. PLY is a more interesting > question, however, since PLY is somewhat more ge

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Maciej Fijalkowski
On Wed, Feb 27, 2013 at 11:18 AM, Ronald Oussoren wrote: > > On 27 Feb, 2013, at 10:06, Maciej Fijalkowski wrote: > >> On Wed, Feb 27, 2013 at 9:29 AM, Ronald Oussoren >> wrote: >>> >>> On 26 Feb, 2013, at 16:13, Maciej Fijalkowski wrote: >>> Hello. I would like to discuss on th

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Ronald Oussoren
On 27 Feb, 2013, at 10:06, Maciej Fijalkowski wrote: > On Wed, Feb 27, 2013 at 9:29 AM, Ronald Oussoren > wrote: >> >> On 26 Feb, 2013, at 16:13, Maciej Fijalkowski wrote: >> >>> Hello. >>> >>> I would like to discuss on the language summit a potential inclusion >>> of cffi[1] into stdlib.

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Maciej Fijalkowski
On Wed, Feb 27, 2013 at 9:29 AM, Ronald Oussoren wrote: > > On 26 Feb, 2013, at 16:13, Maciej Fijalkowski wrote: > >> Hello. >> >> I would like to discuss on the language summit a potential inclusion >> of cffi[1] into stdlib. > > The API in general looks nice, but I do have some concens w.r.t. i

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Maciej Fijalkowski
On Wed, Feb 27, 2013 at 6:53 AM, Eli Bendersky wrote: > > * Work either at the level of the ABI (Application Binary Interface) >> >> or the API (Application Programming Interface). Usually, C libraries >> have a specified C API but often not an ABI (e.g. they may document a >> “struct” as having a

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Maciej Fijalkowski
On Wed, Feb 27, 2013 at 3:39 AM, Terry Reedy wrote: > On 2/26/2013 10:13 AM, Maciej Fijalkowski wrote: > >> I would like to discuss on the language summit a potential inclusion >> of cffi[1] into stdlib. > > > How does it compare in terms of speed. One reason ctypes has not replaces > hand-tuned s