Re: [Python-Dev] PEP 443 Accepted

2013-06-05 Thread Paul Moore
On 5 June 2013 02:32, Guido van Rossum  wrote:

> Łukasz,
>
> Congratulations! I've accepted PEP 443. I've already marked it as
> Accepted in the repo. I've also applied some very minor edits in order
> to make the text flow a little better in a few places. I think this is
> a great PEP -- it's simple, doesn't overreach, and you've managed the
> bikeshedding admirably. Thank you for your great contribution to
> Python!
>

Excellent news! Congratulations.
Paul
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] PEP 443 Accepted

2013-06-05 Thread Markus Unterwaditzer
As somebody who missed the discussion about it and right now took a quick look 
at the PEP, i ask myself how subclasses are handled, as i don't see anything 
about it in the PEP, just support for ABCs.

E.g if

issubclass(Apple, Fruit)

And i call a function which has registered an implementation for the Fruits 
type with an object of type Apple, is this implementation used? I assume so, 
but as said, i don't see it mentioned anywhere.

-- Markus (from phone)

Guido van Rossum  wrote:
>Łukasz,
>
>Congratulations! I've accepted PEP 443. I've already marked it as
>Accepted in the repo. I've also applied some very minor edits in order
>to make the text flow a little better in a few places. I think this is
>a great PEP -- it's simple, doesn't overreach, and you've managed the
>bikeshedding admirably. Thank you for your great contribution to
>Python!
>
>-- 
>--Guido van Rossum (python.org/~guido)
>___
>Python-Dev mailing list
>[email protected]
>http://mail.python.org/mailman/listinfo/python-dev
>Unsubscribe:
>http://mail.python.org/mailman/options/python-dev/markus%40unterwaditzer.net

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] PEP 443 Accepted

2013-06-05 Thread Nick Coghlan
On Wed, Jun 5, 2013 at 5:29 PM, Markus Unterwaditzer
 wrote:
> As somebody who missed the discussion about it and right now took a quick 
> look at the PEP, i ask myself how subclasses are handled, as i don't see 
> anything about it in the PEP, just support for ABCs.
>
> E.g if
>
> issubclass(Apple, Fruit)
>
> And i call a function which has registered an implementation for the Fruits 
> type with an object of type Apple, is this implementation used? I assume so, 
> but as said, i don't see it mentioned anywhere.

That's covered by walking the MRO the same way method dispatch does
it, so it didn't really get discussed much (the question never came
up). The ABC handling is described explicitly as the generic dispatch
implementation that the PEP was based on didn't handle them, and
because it required a fair bit more thought than just walking the MRO.

Cheers,
Nick.

--
Nick Coghlan   |   [email protected]   |   Brisbane, Australia
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] PEP 443 Accepted

2013-06-05 Thread Łukasz Langa
On 5 cze 2013, at 09:29, Markus Unterwaditzer  wrote:

> As somebody who missed the discussion about it and right now took a quick 
> look at the PEP, i ask myself how subclasses are handled, as i don't see 
> anything about it in the PEP, just support for ABCs.
> 
> E.g if
> 
>issubclass(Apple, Fruit)
> 
> And i call a function which has registered an implementation for the Fruits 
> type with an object of type Apple, is this implementation used? I assume so, 
> but as said, i don't see it mentioned anywhere.

Yes, this is the supported behaviour. The PEP briefly explains that "Where 
there is no registered implementation for a specific type, its method 
resolution order is used to find a more generic implementation."

As Nick noted, the reason the description is so brief is that this works just 
like calling methods.

-- 
Best regards,
Łukasz Langa

WWW: http://lukasz.langa.pl/
Twitter: @llanga
IRC: ambv on #python-dev

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] New FreeBSD 10.0-CURRENT buildbot

2013-06-05 Thread Kubilay Kocak
On 2/06/2013 3:12 PM, Kubilay Kocak wrote:
> Afternoon (UTC+10),
> 
> I'd like to request a new user/pass for a FreeBSD 10.0-CURRENT VM guest
> I've just setup as a dedicated buildbot slave to complement my other
> koobs-freebsd slaves.
> 
> Also, with this and future additions to the FreeBSD buildslave set in
> mind, I think it might also be prudent for a rename to take place:
> 
> koobs-freebsd9-amd64
> koobs-freebsd9-amd64-clang (CC=clang)
> koobs-freebsd10-amd64 (clang is default here)
> 
> Convention being: koobs-freebsdX[Y]-arch[-config] (Happy for feedback here)
> 
> If there are any permutations or additions you'd like to specifically
> see for FreeBSD to increase coverage just let me know (Hint: I have a
> PandaBoard arm board here i'm getting up and running)
> 
> I have ZFS & DTrace to work with among other things, and the long term
> plan is to have FreeBSD buildbots running the full gamut of versions,
> from -RELEASE through -STABLE to HEAD branches.
> 
> I'm on #python-dev IRC if someone needs to discuss.
> 
> --
> Regards,
> 
> Koobs
> 

Ping :)
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] cpython: Add reference implementation for PEP 443

2013-06-05 Thread Łukasz Langa
Dnia 5 cze 2013 o godz. 16:31 Brett Cannon  napisał(a):

> Any chance you could move your definitions for "generic function" and "single 
> dispatch" to the glossary and just link to them here?

Sure thing.

-- 
Ł
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] PEP 442 accepted

2013-06-05 Thread Benjamin Peterson
I (and Guido) are accepting PEP 442 (Safe object finalization) on the
condition that finalizers are only ever called once globally.

Congratulations to Antoine on writing yet another PEP that deeply
touches the core language in a way that everyone can agree is an
improvement.. I look forward to reviewing the code.

--
Regards,
Benjamin
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] PEP 442 accepted

2013-06-05 Thread Antoine Pitrou

Le 05/06/2013 18:10, Benjamin Peterson a écrit :

I (and Guido) are accepting PEP 442 (Safe object finalization) on the
condition that finalizers are only ever called once globally.

Congratulations to Antoine on writing yet another PEP that deeply
touches the core language in a way that everyone can agree is an
improvement.. I look forward to reviewing the code.


Thank you!

Antoine (on holiday - is anyone I know in Hungary?).




--
Regards,
Benjamin



___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Compiling Python with Python

2013-06-05 Thread Jussi Pakkanen
Hello all

I'd like to start this email by saying this is not a proposal to change
Python's build system. This is just the results of some experimentation you
might be interested it.

I have been working on a cross-platform build system called Meson, which is
implemented in Python 3. For symmetry I wanted to see if it could be used
to build Python itself. After about an evening worth of work, I got the
basic C parts (that is, the build targets in the main Makefile such as core
Python, pgen etc) built.

Main highlights:

- pyconfig.h generation in a fully cross-platform way without Autoconf (not
tested with Visual Studio but should work as Meson has unit tests for this,
tests for functions in header files and some others not done)

- builds in a separate build directory, can have arbitrarily many build
dirs with different configurations (for gcc/clang/static
analysis/debug/release/etc)

- configure time 5s, build time 8s on an i5 Macbook running Ubuntu
(Autotool-configure takes 37 s but it's not directly comparable because it
does a lot more)

- the file describing the build is 433 lines, most of which look like this:

if cc.has_header('io.h')
  pyconf.set('HAVE_IO_H', 1)
endif

- implementation of Meson is 100% Python 3, it does not have a dependency
on the shell and in fact already works on Windows

If you want to try it yourself, here are the steps (only 64 bit Linux
tested thus far):

- install python3-ply and Ninja (Ubuntu package ninja-build)
- get Meson git head: https://sourceforge.net/p/meson/code/
- get Python3 trunk
- download and extract the build files into trunk:
https://dl.dropboxusercontent.com/u/37517477/python-meson.tar.gz
- cd into Python trunk and do the following commands:

mkdir build
cd build
path/to/meson.py ..
ninja

And there you have it. You can't do much with it, though (except run pgen
to ensure that it actually did something ;) ).

If you have any questions that are not directly related to Python, feel
free to email me or the Meson mailing list.

Enjoy,
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Compiling Python with Python

2013-06-05 Thread Chris Angelico
On Thu, Jun 6, 2013 at 5:21 AM, Jussi Pakkanen  wrote:
> - implementation of Meson is 100% Python 3, it does not have a dependency on
> the shell and in fact already works on Windows

Since you're talking about a bootstrap requirement here, the obvious
question is: What version of Python 3 does it require? Will it be a
lot of hassle to get hold of (say) Python 3.2, only to uninstall it
when you have your 3.4 built?

ChrisA
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Compiling Python with Python

2013-06-05 Thread Jussi Pakkanen
On Wed, Jun 5, 2013 at 10:37 PM, Chris Angelico  wrote:


> Since you're talking about a bootstrap requirement here, the obvious
> question is: What version of Python 3 does it require? Will it be a
> lot of hassle to get hold of (say) Python 3.2, only to uninstall it
> when you have your 3.4 built?
>

The implementation does not use deep Python magic such as C extensions or
the like so it should work with future releases of Python. The current
version requires 3.3 or newer but only because it uses a couple of
pythonlib functions that were added at 3.3. Changing it to work with 3.2 or
earlier should not be a big task.
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] HAVE_FSTAT?

2013-06-05 Thread Hossein

Hi. My 2 cents about this: (well I'm only a noob)

I had this problem; I don't know about other people's environment, but 
my environment's problem was that it was actually not POSIX-compliant: 
it didn't have other file functions as well, but anyway the `fstat` 
error is the FIRST error you get when you compile in such environments, 
so people as unaware as me think the problem is with fstat only.


Anyway I think if you are going to remove anything, you should think in 
terms of POSIX-compliancy of the target system. Removing HAVE_FSTAT 
might be fine (as user can easily write his own version of the function 
and have it included into the python's sources), but if you instead 
provide the user with the ability to use his custom functions when POSIX 
one's aren't available, it would help make python compile on even more 
platforms. Sorry if this last one was off-topic.


Best regards.
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Compiling Python with Python

2013-06-05 Thread Antonio Cavallo
What's the advantage in writing a new build tool? I'm asking this because I'm 
doing the same using scons:

  https://bitbucket.org/cavallo71/fatpython

At the moment I'm very interested into this problem: the main advantages I see 
so far are (in scons) are node dependencies and the fact it is plain python 
syntax.

Thanks



On 5 Jun 2013, at 20:21, Jussi Pakkanen  wrote:

> Hello all
> 
> I'd like to start this email by saying this is not a proposal to change 
> Python's build system. This is just the results of some experimentation you 
> might be interested it.
> 
> I have been working on a cross-platform build system called Meson, which is 
> implemented in Python 3. For symmetry I wanted to see if it could be used to 
> build Python itself. After about an evening worth of work, I got the basic C 
> parts (that is, the build targets in the main Makefile such as core Python, 
> pgen etc) built.
> 
> Main highlights:
> 
> - pyconfig.h generation in a fully cross-platform way without Autoconf (not 
> tested with Visual Studio but should work as Meson has unit tests for this, 
> tests for functions in header files and some others not done)
> 
> - builds in a separate build directory, can have arbitrarily many build dirs 
> with different configurations (for gcc/clang/static 
> analysis/debug/release/etc)
> 
> - configure time 5s, build time 8s on an i5 Macbook running Ubuntu 
> (Autotool-configure takes 37 s but it's not directly comparable because it 
> does a lot more)
> 
> - the file describing the build is 433 lines, most of which look like this:
> 
> if cc.has_header('io.h')
>   pyconf.set('HAVE_IO_H', 1)
> endif
> 
> - implementation of Meson is 100% Python 3, it does not have a dependency on 
> the shell and in fact already works on Windows
> 
> If you want to try it yourself, here are the steps (only 64 bit Linux tested 
> thus far):
> 
> - install python3-ply and Ninja (Ubuntu package ninja-build)
> - get Meson git head: https://sourceforge.net/p/meson/code/
> - get Python3 trunk
> - download and extract the build files into trunk:
> https://dl.dropboxusercontent.com/u/37517477/python-meson.tar.gz
> - cd into Python trunk and do the following commands:
> 
> mkdir build
> cd build
> path/to/meson.py ..
> ninja
> 
> And there you have it. You can't do much with it, though (except run pgen to 
> ensure that it actually did something ;) ).
> 
> If you have any questions that are not directly related to Python, feel free 
> to email me or the Meson mailing list.
> 
> Enjoy,
> 
> ___
> Python-Dev mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-dev/a.cavallo%40cavallinux.eu

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Compiling Python with Python

2013-06-05 Thread Chris Angelico
On Thu, Jun 6, 2013 at 6:00 AM, Jussi Pakkanen  wrote:
>
> On Wed, Jun 5, 2013 at 10:37 PM, Chris Angelico  wrote:
>
>>
>> Since you're talking about a bootstrap requirement here, the obvious
>> question is: What version of Python 3 does it require? Will it be a
>> lot of hassle to get hold of (say) Python 3.2, only to uninstall it
>> when you have your 3.4 built?
>
>
> The implementation does not use deep Python magic such as C extensions or
> the like so it should work with future releases of Python. The current
> version requires 3.3 or newer but only because it uses a couple of pythonlib
> functions that were added at 3.3. Changing it to work with 3.2 or earlier
> should not be a big task.

Newer versions shouldn't be a problem, older ones will. I'm mainly
thinking about systems that can't just casually apt-get a Python 3.3.
With Ubuntu, most people probably don't even need to worry about
building from source, as there'll be a decently-recent Python in the
repo; but what happens when you're on Debian Squeeze and the only
Python 3 you can get is 3.1.3? Even Wheezy (the current stable Debian)
comes with only 3.2.

I do like the symmetry of using Python to build Python. But I also
like using Python 3.3+ for everything, and not having to support the
older Pythons. Unfortunately those two capacities clash, my lords,
they clash!

ChrisA
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com