[Python-Dev] use cases for "python-config" versus "pkg-config python"

2014-05-28 Thread Michael Haubenwallner
Hello!

Stumbling over problems on AIX (Modules/python.exp not found) building libxml2 
as python module
let me wonder about the intended use-cases for 'python-config' and 'pkg-config 
python'.

FWIW, I can see these distinct use cases here, and I'm kindly asking if I got 
them right:

* Build an application containing a python interpreter (like python$EXE itself):
  + link against libpython.so
  + re-export symbols from libpython.so for python-modules (platform-specific)
  + This is similar to build against any other library, thus
  = 'python.pc' is installed (for 'pkg-config python').

* Build a python-module (like build/lib.-/*.so):
  + no need to link against libpython.so, instead
  + expect symbols from libpython.so to be available at runtime, 
platform-specific either as
  + undefined symbols at build-time (Linux, others), or
  + a list of symbols to import from "the main executable" (AIX)
  + This is specific to python-modules, thus
  = 'python-config' is installed.

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


[Python-Dev] Download Counts (was: Language Summit notes)

2014-05-28 Thread Brian Curtin
On Fri, Apr 18, 2014 at 1:31 PM, Antoine Pitrou  wrote:
> I don't think we have recent download numbers since the Website
> overhaul (do we?), but Python 3 isn't an "experimental concept
> language" anymore (it hasn't been since 3.3 or 3.2, I'd say).

Using the old logs, which are still good through 2013, I've found the following:

The first year of a release series (month of final release month + 12mos):
2.6.x - 10.3 Million
2.7.x - 10.26M
3.2.x - 5.84M
3.3.x - 13.1M

2013 downloads (out of 34.79M across all possible versions):
2.6.x - 1.9M
2.7.x - 14.3M
3.2.x - 1.03M
3.3.x - 13.85M

3.3 had a big first year of availability (Oct '12-'13), and throughout
2013 it represented 48% of those versions listed above.
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Download Counts (was: Language Summit notes)

2014-05-28 Thread Brian Curtin
On May 28, 2014 12:49 PM, "Brian Curtin"  wrote:
>
> On Fri, Apr 18, 2014 at 1:31 PM, Antoine Pitrou 
wrote:
> > I don't think we have recent download numbers since the Website
> > overhaul (do we?), but Python 3 isn't an "experimental concept
> > language" anymore (it hasn't been since 3.3 or 3.2, I'd say).
>
> Using the old logs, which are still good through 2013, I've found the
following:
>
> The first year of a release series (month of final release month + 12mos):
> 2.6.x - 10.3 Million
> 2.7.x - 10.26M
> 3.2.x - 5.84M
> 3.3.x - 13.1M
>
> 2013 downloads (out of 34.79M across all possible versions):
> 2.6.x - 1.9M
> 2.7.x - 14.3M
> 3.2.x - 1.03M
> 3.3.x - 13.85M
>
> 3.3 had a big first year of availability (Oct '12-'13), and throughout
> 2013 it represented 48% of those versions listed above.

Sorry for not being explicit: these are download counts for Windows
installers.
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Download Counts (was: Language Summit notes)

2014-05-28 Thread Guido van Rossum
Is the Windows/Mac ratio still 70/30, with Linux in the single digits?


On Wed, May 28, 2014 at 10:57 AM, Brian Curtin  wrote:

> On May 28, 2014 12:49 PM, "Brian Curtin"  wrote:
> >
> > On Fri, Apr 18, 2014 at 1:31 PM, Antoine Pitrou 
> wrote:
> > > I don't think we have recent download numbers since the Website
> > > overhaul (do we?), but Python 3 isn't an "experimental concept
> > > language" anymore (it hasn't been since 3.3 or 3.2, I'd say).
> >
> > Using the old logs, which are still good through 2013, I've found the
> following:
> >
> > The first year of a release series (month of final release month +
> 12mos):
> > 2.6.x - 10.3 Million
> > 2.7.x - 10.26M
> > 3.2.x - 5.84M
> > 3.3.x - 13.1M
> >
> > 2013 downloads (out of 34.79M across all possible versions):
> > 2.6.x - 1.9M
> > 2.7.x - 14.3M
> > 3.2.x - 1.03M
> > 3.3.x - 13.85M
> >
> > 3.3 had a big first year of availability (Oct '12-'13), and throughout
> > 2013 it represented 48% of those versions listed above.
>
> Sorry for not being explicit: these are download counts for Windows
> installers.
>
> ___
> Python-Dev mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/guido%40python.org
>
>


-- 
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Download Counts (was: Language Summit notes)

2014-05-28 Thread Eli Bendersky
On Wed, May 28, 2014 at 11:10 AM, Guido van Rossum  wrote:

> Is the Windows/Mac ratio still 70/30, with Linux in the single digits?
>
>
Most Linux installs go through package managers which don't count here, no?

Eli


>
> On Wed, May 28, 2014 at 10:57 AM, Brian Curtin  wrote:
>
>> On May 28, 2014 12:49 PM, "Brian Curtin"  wrote:
>> >
>> > On Fri, Apr 18, 2014 at 1:31 PM, Antoine Pitrou 
>> wrote:
>> > > I don't think we have recent download numbers since the Website
>> > > overhaul (do we?), but Python 3 isn't an "experimental concept
>> > > language" anymore (it hasn't been since 3.3 or 3.2, I'd say).
>> >
>> > Using the old logs, which are still good through 2013, I've found the
>> following:
>> >
>> > The first year of a release series (month of final release month +
>> 12mos):
>> > 2.6.x - 10.3 Million
>> > 2.7.x - 10.26M
>> > 3.2.x - 5.84M
>> > 3.3.x - 13.1M
>> >
>> > 2013 downloads (out of 34.79M across all possible versions):
>> > 2.6.x - 1.9M
>> > 2.7.x - 14.3M
>> > 3.2.x - 1.03M
>> > 3.3.x - 13.85M
>> >
>> > 3.3 had a big first year of availability (Oct '12-'13), and throughout
>> > 2013 it represented 48% of those versions listed above.
>>
>> Sorry for not being explicit: these are download counts for Windows
>> installers.
>>
>> ___
>> Python-Dev mailing list
>> [email protected]
>> https://mail.python.org/mailman/listinfo/python-dev
>> Unsubscribe:
>> https://mail.python.org/mailman/options/python-dev/guido%40python.org
>>
>>
>
>
> --
> --Guido van Rossum (python.org/~guido)
>
> ___
> Python-Dev mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/eliben%40gmail.com
>
>
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Download Counts (was: Language Summit notes)

2014-05-28 Thread Brian Curtin
On May 28, 2014 4:06 PM, "Eli Bendersky"  wrote:
>
>
>
>
> On Wed, May 28, 2014 at 11:10 AM, Guido van Rossum 
wrote:
>>
>> Is the Windows/Mac ratio still 70/30, with Linux in the single digits?
>>
>
> Most Linux installs go through package managers which don't count here,
no?

I'll have to run something for the other non-Windows files, but the single
digit Linux downloads he meant are the tarballs. We'll (probably) never
know the true counts in the Linux world because of how pervasive Python is
within basically every distro, but that's also likely the case on Mac.

With Windows, since you must download Python it to use it, the numbers we
see are probably the most useful on their own. I'm giving a talk at PyCon
Russia that covers some of these numbers, so I'll probably try to dig up
more and turn it into a blog post.
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Download Counts (was: Language Summit notes)

2014-05-28 Thread Victor Stinner
2014-05-28 22:05 GMT+02:00 Eli Bendersky :
> Most Linux installs go through package managers which don't count here, no?

For Debian, there is the "popcorn" project which provides some statistics:

http://qa.debian.org/popcon.php?package=python2.6
http://qa.debian.org/popcon.php?package=python2.7
http://qa.debian.org/popcon.php?package=python3.2
http://qa.debian.org/popcon.php?package=python3.3
http://qa.debian.org/popcon.php?package=python3.4

It looks like python2.6 is installed more often than python2.7 ! (if
you look at the "Inst" column, not in the "Recent" column.)

Python 3.4 recently became the default python3 package on Debian
Unstable ("sid"). Debian Stable (Wheezy) still uses Python 3.2. I
guess that Debian Testing uses Python 3.3.

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


Re: [Python-Dev] Download Counts (was: Language Summit notes)

2014-05-28 Thread Chris Angelico
On Thu, May 29, 2014 at 7:27 AM, Victor Stinner
 wrote:
> 2014-05-28 22:05 GMT+02:00 Eli Bendersky :
>> Most Linux installs go through package managers which don't count here, no?
>
> For Debian, there is the "popcorn" project which provides some statistics:
>
> http://qa.debian.org/popcon.php?package=python2.6
> http://qa.debian.org/popcon.php?package=python2.7
> http://qa.debian.org/popcon.php?package=python3.2
> http://qa.debian.org/popcon.php?package=python3.3
> http://qa.debian.org/popcon.php?package=python3.4
>
> It looks like python2.6 is installed more often than python2.7 ! (if
> you look at the "Inst" column, not in the "Recent" column.)
>
> Python 3.4 recently became the default python3 package on Debian
> Unstable ("sid"). Debian Stable (Wheezy) still uses Python 3.2. I
> guess that Debian Testing uses Python 3.3.

2.6 is the default in oldstable (Squeeze), so every Debian system that
hasn't upgraded from there is likely to be counted as a 2.6 and not a
2.7. (And Python 2 is a dependency of all sorts of things, so it's
likely to get installed.) Wheezy ships 2.6.8, and I seem to have both
that and 2.7.3 installed, so it's possible that even though 2.7 is the
default, a lot of 2.6 installations are happening.

Debian Testing (Jessie) ships both 3.3 and 3.4, with the 'python3'
package pulling in 3.3. That may change before Jessie becomes stable,
I don't know.

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


Re: [Python-Dev] Download Counts (was: Language Summit notes)

2014-05-28 Thread Barry Warsaw
On May 29, 2014, at 07:37 AM, Chris Angelico wrote:

>Debian Testing (Jessie) ships both 3.3 and 3.4, with the 'python3'
>package pulling in 3.3. That may change before Jessie becomes stable,
>I don't know.

It already has:

https://lists.debian.org/debian-python/2014/05/msg00162.html

The question remains whether Jessie will drop Python 3.3, but I expect it to.

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


Re: [Python-Dev] Download Counts (was: Language Summit notes)

2014-05-28 Thread Chris Angelico
On Thu, May 29, 2014 at 9:05 AM, Barry Warsaw  wrote:
> On May 29, 2014, at 07:37 AM, Chris Angelico wrote:
>
>>Debian Testing (Jessie) ships both 3.3 and 3.4, with the 'python3'
>>package pulling in 3.3. That may change before Jessie becomes stable,
>>I don't know.
>
> It already has:
>
> https://lists.debian.org/debian-python/2014/05/msg00162.html
>
> The question remains whether Jessie will drop Python 3.3, but I expect it to.

Well, there you go! :) I was almost going to say that my information
was up to 24 hours out of date, because I hadn't run daily updates
yet, and it turns out it was exactly that wrong :)

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


[Python-Dev] Language Summit Follow-Up

2014-05-28 Thread Glyph Lefkowitz
At the language summit, Alex and I volunteered to put together some 
recommendations on what changes could be made to Python (the language) in order 
to facilitate a smoother transition from Python 2 to Python 3.  One of the 
things that motivated this was the (surprising, to us) consideration that 
features like ensurepip might be added to the future versions of the 2.7 
installers from python.org.

The specific motivations for writing this are:

Library maintainers have a rapidly expanding matrix that requires an increasing 
number of branches to satisfy.
People with large corporate codebases absolutely cannot port all at once.

If you don't have perfect test coverage then you can't make any progress.  So 
these changes are intended to make porting from python 2 to python 3 more 
guided and incremental.  We believe that these attributes are necessary.

We would like to stress that we don't believe anything on this list is as 
important as the continuing efforts that everyone in the broader ecosystem is 
making.  If you just want to ease the transition by working on anything at all, 
the best use of your time right now is porting 
https://warehouse.python.org/project/MySQL-python/ to Python 3. :)

Nevertheless there are some things that the language and CPython could do.

Unfortunately we had to reject any proposal that involved new __future__ 
imports, since unknown __future__ imports are un-catchable SyntaxErrors.

Here are some ideas for Python 2.7+.

Add ensurepip to the installers.  Having pip reliably available increases the 
availability of libraries that help with porting, and will generally strengthen 
the broader ecosystem in the (increasingly long) transition period.
Add some warnings about python 3 compatibility.
It should at least be possible to get a warning for every single implicit 
string coercion.
Old-style classes.
Old-style division.
Print statements.
Old-style exception syntax.
buffer().
bytes(memoryview(b'abc'))
Importing old locations from the stdlib (see point 4.)
Long integer syntax.
Use of variables beyond the lifetime of an 'except Exception as e' block or a 
list comprehension.
Backport 'yield from' to allow people to use Tulip and Tulip-compatible code, 
and to facilitate the development of Tulip-friendly libraries and a Tulip 
ecosystem.  A robust Tulip ecosystem requires the participation of people who 
are not yet using Python 3.
Add aliases for the renamed modules in the stdlib.  This will allow people to 
"just write python 3" in a lot more circumstances.
(re-)Enable warnings by default, including enabling -3 warnings.  Right now all 
warnings are silent by default, which greatly reduces discoverability of future 
compatibility issues.  I hope it's not controversial to say that most new 
Python code is still being written against Python 2.7 today; if people are 
writing that code in such a way that it's not 3-friendly, it should be a more 
immediately noticeable issue.
Get rid of 2to3. Particularly, of any discussion of using 2to3 in the 
documentation.  More than one very experienced, well-known Python developer in 
this discussion has told me that they thought 2to3 was the blessed way to port 
their code, and it's no surprise that they think so, given that the first 
technique  mentions is still 
2to3.  We should replace 2to3 with something like 
. 2to3 breaks your code on 
python 2, and doesn't necessarily get it running on python 3.  A more 
conservative approach that reduced the amount of work to get your code 2/3 
compatible but was careful to leave everything working would be a lot more 
effective.
Add a new 'bytes' type that actually behaves like the Python 3 bytes type 
(bytes(5)).

We have rejected any changes for Python 3.5, simply because of the extremely 
long time to get those features into users hands.  Any changes for Python 3 
that we're proposing would need to get into a 3.4.x release, so that, for 
example, they can make their way into Ubuntu 14.04 LTS.

Here are some ideas for Python 3.4.x:

Usage of Python2 style syntax (for example, a print statement) or stdlib module 
names (for example, 'import urllib2') should result in a specific, informative 
warning, not a generic SyntaxError/ImportError.  This will really help new 
users.
Add 'unicode' back as an alias for 'str'.  Just today I was writing some 
documentation where I had to resort to some awkward encoding tricks just to get 
a bytes object out without explaining the whole 2/3 dichotomy in some unrelated 
prose.

We'd like to thank all the individuals who gave input and feedback in creating 
this list.

-glyph & Alex Gaynor

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


Re: [Python-Dev] Language Summit Follow-Up

2014-05-28 Thread Eric Snow
Thanks for for putting this together.

On Wed, May 28, 2014 at 4:26 PM, Glyph Lefkowitz
 wrote:
> At the language summit, Alex and I volunteered to put together some
> recommendations on what changes could be made to Python (the language) in
> order to facilitate a smoother transition from Python 2 to Python 3.  One of
> the things that motivated this was the (surprising, to us) consideration
> that features like ensurepip might be added to the future versions of the
> 2.7 installers from python.org.
>
> The specific motivations for writing this are:
>
> 1. Library maintainers have a rapidly expanding matrix that requires an
> increasing number of branches to satisfy.
> 2. People with large corporate codebases absolutely cannot port all at once.
>
>
> If you don't have perfect test coverage then you can't make any progress.
> So these changes are intended to make porting from python 2 to python 3 more
> guided and incremental.  We believe that these attributes are necessary.

One of the parallel discussions that came out of the language summit
centers on basically the same idea:

https://mail.python.org/pipermail/python-dev/2014-April/133986.html

The key points are that there would be a separate tool that wraps the
2.7 interpreter and enforces the 2.7/3.x subset language but only for
source files that have are tagged (a la the coding cookie).  So there
would be no need to make changes to Python itself.  Some have also
suggested this could also be accomplished via a pylint plugin.  I'm
working on an implementation called (for now) "pymigrate" that should
eventually be available via the cheeseshop.  A lot of what you've
written here is really useful.

> Here are some ideas for Python 2.7+.
>
> 1. Add ensurepip to the installers.  Having pip reliably available increases
> the availability of libraries that help with porting, and will generally
> strengthen the broader ecosystem in the (increasingly long) transition
> period.

My understanding is that this is already the plan.

> 2. Add some warnings about python 3 compatibility.
>
> 1. It should at least be possible to get a warning for every single 
> implicit
> string coercion.
> 2. Old-style classes.
> 3. Old-style division.
> 4. Print statements.
> 5. Old-style exception syntax.
> 6. buffer().
> 7. bytes(memoryview(b'abc'))
> 8. Importing old locations from the stdlib (see point 4.)
> 9. Long integer syntax.
>   10. Use of variables beyond the lifetime of an 'except Exception as e' 
> block or
> a list comprehension.

+1 to improving the coverage of the -3 option in 2.7.

>
> 3. Backport 'yield from' to allow people to use Tulip and Tulip-compatible
> code, and to facilitate the development of Tulip-friendly libraries and a
> Tulip ecosystem.  A robust Tulip ecosystem requires the participation of
> people who are not yet using Python 3.

What about Trellis?  Regardless, adding yield from to 2.7 is going to
be a tough sell.

> 4. Add aliases for the renamed modules in the stdlib.  This will allow people
> to "just write python 3" in a lot more circumstances.

I like this, but it seems to me to be a better fit for something like
six or even pymigrate.

> 5. (re-)Enable warnings by default, including enabling -3 warnings.  Right now
> all warnings are silent by default, which greatly reduces discoverability of
> future compatibility issues.

This is also something that fits better with a separate tool.

> We have rejected any changes for Python 3.5, simply because of the extremely
> long time to get those features into users hands.  Any changes for Python 3
> that we're proposing would need to get into a 3.4.x release

Good luck with that one! 

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


Re: [Python-Dev] Language Summit Follow-Up

2014-05-28 Thread Benjamin Peterson


On Wed, May 28, 2014, at 15:26, Glyph Lefkowitz wrote:
> Add some warnings about python 3 compatibility.
> It should at least be possible to get a warning for every single implicit
> string coercion.
> Old-style classes.
> Old-style division.

Fun fact: This can be achieved with the -Qwarn command line option.
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Language Summit Follow-Up

2014-05-28 Thread INADA Naoki
> We would like to stress that we don't believe anything on this list is as
> important as the continuing efforts that everyone in the broader ecosystem
> is making.  If you just want to ease the transition by working on anything
> at all, the best use of your time right now is porting
> https://warehouse.python.org/project/MySQL-python/ to Python 3. :)
>

I've did it.

https://github.com/PyMySQL/mysqlclient-python
https://pypi.python.org/pypi/mysqlclient


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


Re: [Python-Dev] Language Summit Follow-Up

2014-05-28 Thread Terry Reedy

On 5/29/2014 1:22 AM, INADA Naoki wrote:

We would like to stress that we don't believe anything on this list is as
important as the continuing efforts that everyone in the broader ecosystem
is making.  If you just want to ease the transition by working on anything
at all, the best use of your time right now is porting
https://warehouse.python.org/project/MySQL-python/ to Python 3. :)



I've did it.

https://github.com/PyMySQL/mysqlclient-python
https://pypi.python.org/pypi/mysqlclient


I don't think that most people interpret
Programming Language :: Python
as indicating support for Python 3. So I suggest adding
Programming Language :: Python :: 3
or even the more specific 3.3 and 3.4

--
Terry Jan Reedy

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