Re: [Python-Dev] Overriding stdlib http package

2015-01-23 Thread Nick Coghlan
On 15 January 2015 at 07:35, Donald Stufft  wrote:
>
> On Jan 14, 2015, at 4:19 PM, Brett Cannon  wrote:
>
> But as Guido pointed out, we _like_ it being difficult to do because we
> don't want this kind of substitution happening as code ends up depending on
> bugs and quirks that you may fix.
>
> Not all of us, I hate the default order of sys.path.

It's mostly an opinion that arises from debugging other people's
problems after they've managed to import the wrong thing without
realising it (cf. the "don't use 'socket.py' as the name of your
script for learning about how TCP sockets work" problem). We're aware
that annoys power users, but they're far better equipped to handle the
problem than if we inverted the situation.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] C ABI and #ifndef Py_LIMITED_API

2015-01-23 Thread Nick Coghlan
On 15 January 2015 at 02:24, Ethan Furman  wrote:
> On 01/14/2015 12:13 AM, Georg Brandl wrote:
>> On 01/14/2015 08:32 AM, Ethan Furman wrote:
>>>
>>> In the CPython source code I see
>>>
>>> #ifndef Py_LIMITED_API
>>>
>>> Is there a section in the docs that explains the purpose?  If not, can
>>> someone give me the cliff notes version?
>>
>> PEP 384, and in particular [1] should get you started.
>>
>> [1]
>> https://www.python.org/dev/peps/pep-0384/#header-files-and-preprocessor-definitions
>
> Nice, that answered other questions as well!  :)

It's worth noting that https://docs.python.org/3/c-api/stable.html is
the relevant reference in the main C API docs.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] New Windows installer for Python 3.5

2015-01-23 Thread Nick Coghlan
On 13 January 2015 at 06:02, Steve Dower  wrote:
>> On Sat, Jan 10, 2015 at 3:28 AM, Nick Coghlan  wrote:
>>> For the time being, things like PyInstaller, PyRun, Portable Python,
>>> etc are going to offer a better solution than anything we provide in
>>> the standard installers.
>>
>> See also Anaconda and Enthought Canopy. I think miniconda, for instance, may
>> give you just what you need, if you don't want to go the py2exe/PyInstaller
>> approach (though you probably do want to go that way, as far as I can tell 
>> from
>> your description of your use-case.
>
> Actually, both Anaconda and Canopy suffer from the initialization process 
> issues. You can't really use virtualenv with either of them unless they set 
> the registry PythonPath value (since they won't find the libraries they need 
> to launch), and if you install both then they'll fight over the registry key 
> and you'll get Canopy launching with Anaconda's path or vice-versa.
>
>> I'm inclined to think that this does not belong as part of the standard
>> installer.
>
> The problems are inherent to the standard python.exe, and are likely part of 
> the standard pythonXY.dll. Nick's scared of fixing it, so I'm absolutely 
> petrified :)

Technically, I'm not scared of fixing it per se, I'm just wary of
trying to fix it without first refactoring it and writing some more
tests :)

Finding the roundtuits for PEP 432 is an eternal struggle though - so
many things end up edging ahead of it on the personal priority list :(

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] rst files

2015-01-23 Thread Ethan Furman
Many thanks to all responders!

--
~Ethan~



signature.asc
Description: OpenPGP digital signature
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] rst files

2015-01-23 Thread Terry Reedy

On 1/23/2015 7:15 PM, R. David Murray wrote:

On Fri, 23 Jan 2015 15:55:29 -0800, Guido van Rossum  wrote:

This adds entries to the index of the document -- similar to the index at
the end of a book. I think single vs. double refers to different types of
entries. Check out this page: https://docs.python.org/3/genindex.html

On Fri, Jan 23, 2015 at 3:43 PM, Ethan Furman  wrote:


Can somebody please explain this?

.. index::
single: formatting, string (%)
single: interpolation, string (%)
single: string; formatting
single: string; interpolation
single: printf-style formatting
single: sprintf-style formatting
single: % formatting
single: % interpolation

Specifically, what does index mean?  What does single vs double vs triple
mean?  Is there a reference somewhere I can read?


It is explained in the Sphinx documentation:
http://sphinx-doc.org/contents.html

Specifically:

http://sphinx-doc.org/markup/misc.html#directive-index


The devguide has a cpython doc oriented intro to .rst that includes
https://docs.python.org/devguide/documenting.html#index-generating-markup


--
Terry Jan Reedy

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


Re: [Python-Dev] rst files

2015-01-23 Thread Carol Willing

Hello Ethan,

In addition to Guido's suggestion, the Python Developer Guide's Section 
7.4.9 should be helpful. Here's a link to Section 7 on Restructured Text 
https://docs.python.org/devguide/documenting.html#restructuredtext-primer
You may also find the Sphinx project documentation helpful if you need 
additional details.


Carol

On 23/01/2015 15:55, Guido van Rossum wrote:
This adds entries to the index of the document -- similar to the index 
at the end of a book. I think single vs. double refers to different 
types of entries. Check out this page: 
https://docs.python.org/3/genindex.html


On Fri, Jan 23, 2015 at 3:43 PM, Ethan Furman > wrote:


Can somebody please explain this?

.. index::
   single: formatting, string (%)
   single: interpolation, string (%)
   single: string; formatting
   single: string; interpolation
   single: printf-style formatting
   single: sprintf-style formatting
   single: % formatting
   single: % interpolation

Specifically, what does index mean?  What does single vs double vs
triple mean?  Is there a reference somewhere I can read?

--
~Ethan~


___
Python-Dev mailing list
Python-Dev@python.org 
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
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/willingc%40willingconsulting.com



--
*Carol Willing*
Developer | Willing Consulting
https://willingconsulting.com
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] rst files

2015-01-23 Thread Gary Herron

On 01/23/2015 03:43 PM, Ethan Furman wrote:

Can somebody please explain this?

.. index::
single: formatting, string (%)
single: interpolation, string (%)
single: string; formatting
single: string; interpolation
single: printf-style formatting
single: sprintf-style formatting
single: % formatting
single: % interpolation

Specifically, what does index mean?  What does single vs double vs triple mean? 
 Is there a reference somewhere I can read?


In restructured text (rst), the .. syntax starts a directive.  There are 
a number of built-in directives, and there is the ability to extend the 
syntax with domain specific directives.


That must be the case here (since there doesn't appear to be a built-in 
directive named index), so we'll need more information about the source 
of your rst file before we can answer anything about that particular add 
on directive.


Gary Herron

--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418

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


Re: [Python-Dev] rst files

2015-01-23 Thread R. David Murray
On Fri, 23 Jan 2015 15:55:29 -0800, Guido van Rossum  wrote:
> This adds entries to the index of the document -- similar to the index at
> the end of a book. I think single vs. double refers to different types of
> entries. Check out this page: https://docs.python.org/3/genindex.html
> 
> On Fri, Jan 23, 2015 at 3:43 PM, Ethan Furman  wrote:
> 
> > Can somebody please explain this?
> >
> > .. index::
> >single: formatting, string (%)
> >single: interpolation, string (%)
> >single: string; formatting
> >single: string; interpolation
> >single: printf-style formatting
> >single: sprintf-style formatting
> >single: % formatting
> >single: % interpolation
> >
> > Specifically, what does index mean?  What does single vs double vs triple
> > mean?  Is there a reference somewhere I can read?

It is explained in the Sphinx documentation:
http://sphinx-doc.org/contents.html

Specifically:

http://sphinx-doc.org/markup/misc.html#directive-index

--David
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] rst files

2015-01-23 Thread Guido van Rossum
This adds entries to the index of the document -- similar to the index at
the end of a book. I think single vs. double refers to different types of
entries. Check out this page: https://docs.python.org/3/genindex.html

On Fri, Jan 23, 2015 at 3:43 PM, Ethan Furman  wrote:

> Can somebody please explain this?
>
> .. index::
>single: formatting, string (%)
>single: interpolation, string (%)
>single: string; formatting
>single: string; interpolation
>single: printf-style formatting
>single: sprintf-style formatting
>single: % formatting
>single: % interpolation
>
> Specifically, what does index mean?  What does single vs double vs triple
> mean?  Is there a reference somewhere I can read?
>
> --
> ~Ethan~
>
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> 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
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] rst files

2015-01-23 Thread Ethan Furman
Can somebody please explain this?

.. index::
   single: formatting, string (%)
   single: interpolation, string (%)
   single: string; formatting
   single: string; interpolation
   single: printf-style formatting
   single: sprintf-style formatting
   single: % formatting
   single: % interpolation

Specifically, what does index mean?  What does single vs double vs triple mean? 
 Is there a reference somewhere I can read?

--
~Ethan~



signature.asc
Description: OpenPGP digital signature
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] PEP 484

2015-01-23 Thread Mario Figueiredo
Please don't clutter executable code. We need to read it without growing an
headache.

Much better is:

  def myfunction(arg1, arg2):
  """
  Normal docstring...
  @hint: (str, int) -> bool
  """
  return True

While I agree type hinting, for the purposes of static analysis, has no
place in __doc__, I think that we could live with that. Otherwise:

  def myfunction(arg1, arg2):
  """
  Normal docstring...
  """
  "@hint: (str, int) -> bool"
  return True
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-23 Thread Gregory P. Smith
On Fri Jan 23 2015 at 11:20:02 AM M.-A. Lemburg  wrote:

> On 23.01.2015 19:48, Matthias Klose wrote:
> > On 01/23/2015 06:30 PM, Cyd Haselton wrote:
> >> Related to my earlier question regarding building Python on Android
> >> and an undefined reference to dlopen error...I have the following
> >> question:  Is it possible to build and install Python without having
> >> to build and install...or use...distutils?
> >>
> >> Some background:
> >> I can build the python interpreter on my device, and I can build a
> >> bunch of modules.  The problem appears when make reaches the part
> >> where setup.py is used to build and import modules...specifically when
> >> setup.py attempts to import distutils.core.
> >
> > you can do this using Setup.local. This works for me building additional
> > extensions as builtins.  It might require some tweaking to build
> everything.
>
> You may want to have a look at the Setup files we're using
> in eGenix PyRun, which uses them to force static builds of the
> various built-in extensions.
>
> Look for these files:
>
> PyRun/Runtime/Setup.PyRun-2.7
> PyRun/Runtime/Setup.PyRun-3.4
>
> in the source archives:
>
> http://www.egenix.com/products/python/PyRun/
>
> > Otoh, I would like to get rid off the setup.py altogether (/me ducks
> ...).
>
> Why ? It's great for finding stuff on your system and configuring
> everything without user intervention (well, most of the time :-)).
>

Because our setup.py is a nightmare of arbitrary code run in a linear
fashion with ad-hoc checks for things that are unlike how any other project
on the planet determines what is available on your system.  It may have
seemed "great" when it was created in 2001.  It really shows its age now.

It defeats build parallelism and dependency declaration.
It also prevents cross compilation.

Building an interpreter with a limited standard library on your build host
so that you can run said interpreter to have it drive the remainder of your
build is way more self hosting that we rightfully need to be for CPython.

-gps


> --
> Marc-Andre Lemburg
> eGenix.com
>
> Professional Python Services directly from the Source  (#1, Jan 23 2015)
> >>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
> >>> mxODBC Plone/Zope Database Adapter ...   http://zope.egenix.com/
> >>> mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/
> 
>
> : Try our mxODBC.Connect Python Database Interface for free ! ::
>
>eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
> D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
>Registered at Amtsgericht Duesseldorf: HRB 46611
>http://www.egenix.com/company/contact/
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
> greg%40krypto.org
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-23 Thread Cyd Haselton
On Fri, Jan 23, 2015 at 1:19 PM, M.-A. Lemburg  wrote:
> On 23.01.2015 19:48, Matthias Klose wrote:
>> On 01/23/2015 06:30 PM, Cyd Haselton wrote:
>>> Related to my earlier question regarding building Python on Android
>>> and an undefined reference to dlopen error...I have the following
>>> question:  Is it possible to build and install Python without having
>>> to build and install...or use...distutils?
>>>
>>> Some background:
>>> I can build the python interpreter on my device, and I can build a
>>> bunch of modules.  The problem appears when make reaches the part
>>> where setup.py is used to build and import modules...specifically when
>>> setup.py attempts to import distutils.core.
>>
>> you can do this using Setup.local. This works for me building additional
>> extensions as builtins.  It might require some tweaking to build everything.
>
> You may want to have a look at the Setup files we're using
> in eGenix PyRun, which uses them to force static builds of the
> various built-in extensions.
>
> Look for these files:
>
> PyRun/Runtime/Setup.PyRun-2.7
> PyRun/Runtime/Setup.PyRun-3.4
>
> in the source archives:
>
> http://www.egenix.com/products/python/PyRun/

Do you have a browseable git repo?
>
>> Otoh, I would like to get rid off the setup.py altogether (/me ducks ...).
>
> Why ? It's great for finding stuff on your system and configuring
> everything without user intervention (well, most of the time :-)).
>
> --
> Marc-Andre Lemburg
> eGenix.com
>
> Professional Python Services directly from the Source  (#1, Jan 23 2015)
 Python Projects, Coaching and Consulting ...  http://www.egenix.com/
 mxODBC Plone/Zope Database Adapter ...   http://zope.egenix.com/
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-23 Thread M.-A. Lemburg
On 23.01.2015 21:56, Cyd Haselton wrote:
> On Fri, Jan 23, 2015 at 1:19 PM, M.-A. Lemburg  wrote:
>> On 23.01.2015 19:48, Matthias Klose wrote:
>>> On 01/23/2015 06:30 PM, Cyd Haselton wrote:
 Related to my earlier question regarding building Python on Android
 and an undefined reference to dlopen error...I have the following
 question:  Is it possible to build and install Python without having
 to build and install...or use...distutils?

 Some background:
 I can build the python interpreter on my device, and I can build a
 bunch of modules.  The problem appears when make reaches the part
 where setup.py is used to build and import modules...specifically when
 setup.py attempts to import distutils.core.
>>>
>>> you can do this using Setup.local. This works for me building additional
>>> extensions as builtins.  It might require some tweaking to build everything.
>>
>> You may want to have a look at the Setup files we're using
>> in eGenix PyRun, which uses them to force static builds of the
>> various built-in extensions.
>>
>> Look for these files:
>>
>> PyRun/Runtime/Setup.PyRun-2.7
>> PyRun/Runtime/Setup.PyRun-3.4
>>
>> in the source archives:
>>
>> http://www.egenix.com/products/python/PyRun/
> 
> Do you have a browseable git repo?

No, but we're thinking of mirroring our open-source packages on
Github or Bitbucket.

>>> Otoh, I would like to get rid off the setup.py altogether (/me ducks ...).
>>
>> Why ? It's great for finding stuff on your system and configuring
>> everything without user intervention (well, most of the time :-)).

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jan 23 2015)
>>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>>> mxODBC Plone/Zope Database Adapter ...   http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


: Try our mxODBC.Connect Python Database Interface for free ! ::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-23 Thread M.-A. Lemburg
On 23.01.2015 19:48, Matthias Klose wrote:
> On 01/23/2015 06:30 PM, Cyd Haselton wrote:
>> Related to my earlier question regarding building Python on Android
>> and an undefined reference to dlopen error...I have the following
>> question:  Is it possible to build and install Python without having
>> to build and install...or use...distutils?
>>
>> Some background:
>> I can build the python interpreter on my device, and I can build a
>> bunch of modules.  The problem appears when make reaches the part
>> where setup.py is used to build and import modules...specifically when
>> setup.py attempts to import distutils.core.
> 
> you can do this using Setup.local. This works for me building additional
> extensions as builtins.  It might require some tweaking to build everything.

You may want to have a look at the Setup files we're using
in eGenix PyRun, which uses them to force static builds of the
various built-in extensions.

Look for these files:

PyRun/Runtime/Setup.PyRun-2.7
PyRun/Runtime/Setup.PyRun-3.4

in the source archives:

http://www.egenix.com/products/python/PyRun/

> Otoh, I would like to get rid off the setup.py altogether (/me ducks ...).

Why ? It's great for finding stuff on your system and configuring
everything without user intervention (well, most of the time :-)).

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jan 23 2015)
>>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>>> mxODBC Plone/Zope Database Adapter ...   http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


: Try our mxODBC.Connect Python Database Interface for free ! ::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-23 Thread Cyd Haselton
On Fri, Jan 23, 2015 at 12:48 PM, Matthias Klose  wrote:
> On 01/23/2015 06:30 PM, Cyd Haselton wrote:
>> Related to my earlier question regarding building Python on Android
>> and an undefined reference to dlopen error...I have the following
>> question:  Is it possible to build and install Python without having
>> to build and install...or use...distutils?
>>
>> Some background:
>> I can build the python interpreter on my device, and I can build a
>> bunch of modules.  The problem appears when make reaches the part
>> where setup.py is used to build and import modules...specifically when
>> setup.py attempts to import distutils.core.
>
> you can do this using Setup.local. This works for me building additional
> extensions as builtins.  It might require some tweaking to build everything.
> Otoh, I would like to get rid off the setup.py altogether (/me ducks ...).
>
>   Matthias
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> https://mail.python.org/mailman/options/python-dev/chaselton%40gmail.com

Thanks!  I'll give this a shot.  Any documentation on the non-distutils build?
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-23 Thread Matthias Klose
On 01/23/2015 06:30 PM, Cyd Haselton wrote:
> Related to my earlier question regarding building Python on Android
> and an undefined reference to dlopen error...I have the following
> question:  Is it possible to build and install Python without having
> to build and install...or use...distutils?
> 
> Some background:
> I can build the python interpreter on my device, and I can build a
> bunch of modules.  The problem appears when make reaches the part
> where setup.py is used to build and import modules...specifically when
> setup.py attempts to import distutils.core.

you can do this using Setup.local. This works for me building additional
extensions as builtins.  It might require some tweaking to build everything.
Otoh, I would like to get rid off the setup.py altogether (/me ducks ...).

  Matthias

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


[Python-Dev] Can Python Be Built Without Distutils

2015-01-23 Thread Cyd Haselton
Related to my earlier question regarding building Python on Android
and an undefined reference to dlopen error...I have the following
question:  Is it possible to build and install Python without having
to build and install...or use...distutils?

Some background:
I can build the python interpreter on my device, and I can build a
bunch of modules.  The problem appears when make reaches the part
where setup.py is used to build and import modules...specifically when
setup.py attempts to import distutils.core.

Thanks,
Cyd
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Summary of Python tracker Issues

2015-01-23 Thread Python tracker

ACTIVITY SUMMARY (2015-01-16 - 2015-01-23)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open4760 (+24)
  closed 30307 (+30)
  total  35067 (+54)

Open issues with patches: 2228 


Issues opened (38)
==

#23095: [Windows] asyncio: race condition when cancelling a _WaitHandl
http://bugs.python.org/issue23095  reopened by haypo

#23252: Add support of writing to unseekable file in zipfile
http://bugs.python.org/issue23252  opened by serhiy.storchaka

#23253: Delay-load ShellExecute
http://bugs.python.org/issue23253  opened by steve.dower

#23254: Document how to close the TCPServer listening socket
http://bugs.python.org/issue23254  opened by vadmium

#23255: SimpleHTTPRequestHandler refactor for more extensible usage.
http://bugs.python.org/issue23255  opened by last-ent

#23257: Update Windows build/setup instructions in devguide
http://bugs.python.org/issue23257  opened by steve.dower

#23258: Cannot Install Python 3.4.2 on Windows 7 64 bit / screen print
http://bugs.python.org/issue23258  opened by 20scanman

#23260: Update Windows installer
http://bugs.python.org/issue23260  opened by steve.dower

#23262: webbrowser module broken with Firefox 36+
http://bugs.python.org/issue23262  opened by ssokolow

#23263: Python 3 gives misleading errors when validating unicode ident
http://bugs.python.org/issue23263  opened by Matt.Bachmann

#23264: Add pickle support of dict views
http://bugs.python.org/issue23264  opened by serhiy.storchaka

#23267: multiprocessing pool.py doesn't close inqueue and outqueue pip
http://bugs.python.org/issue23267  opened by shanip

#23268: Fix comparison of ipaddress classes
http://bugs.python.org/issue23268  opened by serhiy.storchaka

#23270: Use the new __builtin_mul_overflow() of Clang and GCC 5 to che
http://bugs.python.org/issue23270  opened by haypo

#23273: traceback: formatting a traceback stats the filesystem
http://bugs.python.org/issue23273  opened by rbcollins

#23274: make_ssl_data.py in Python 2.7.9 needs Python 3 to run
http://bugs.python.org/issue23274  opened by schlenk

#23275: Can assign [] = (), but not () = []
http://bugs.python.org/issue23275  opened by Devin Jeanpierre

#23276: hackcheck is broken in association with __setattr__
http://bugs.python.org/issue23276  opened by devkid

#23277: Cleanup unused and duplicate imports in tests
http://bugs.python.org/issue23277  opened by jdufresne

#23278: multiprocessing maxtasksperchild=1 + logging = task loss
http://bugs.python.org/issue23278  opened by nelson

#23279: test_site/test_startup_imports fails when mpl_toolkit or logil
http://bugs.python.org/issue23279  opened by drudd

#23282: Slightly faster set lookup
http://bugs.python.org/issue23282  opened by serhiy.storchaka

#23283: Backport Tools/clinic to 3.4
http://bugs.python.org/issue23283  opened by zach.ware

#23284: curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS
http://bugs.python.org/issue23284  opened by pooryorick

#23285: PEP 475 - EINTR handling
http://bugs.python.org/issue23285  opened by neologix

#23286: A typo in the tutorial
http://bugs.python.org/issue23286  opened by aruseni

#23287: ctypes.util.find_library needlessly call crle on Solaris
http://bugs.python.org/issue23287  opened by jbeck

#23289: concurrent.futures.Executor.map is not equivalent to map.
http://bugs.python.org/issue23289  opened by majkrzak

#23290: Faster set copying
http://bugs.python.org/issue23290  opened by serhiy.storchaka

#23291: Documentation about Py_Finalize(): Freeing objects
http://bugs.python.org/issue23291  opened by Albert.Zeyer

#23292: Enum doc suggestion
http://bugs.python.org/issue23292  opened by mark

#23295: [Windows] asyncio: add UDP support to ProactorEventLoop
http://bugs.python.org/issue23295  opened by haypo

#23297: ‘tokenize.detect_encoding’ is confused between text and by
http://bugs.python.org/issue23297  opened by bignose

#23298: Add ArgumentParser.add_mutually_dependence_group
http://bugs.python.org/issue23298  opened by dongwm

#23300: httplib is using a method that doesn't exist
http://bugs.python.org/issue23300  opened by guohua

#23303: test_license_exists_at_url() of test_site fails on "x86 XP-4 3
http://bugs.python.org/issue23303  opened by haypo

#23304: Unused Superclass in calendar.py
http://bugs.python.org/issue23304  opened by CliffM

#23305: RotatingFileHandler does not rotate if backupCount is 0
http://bugs.python.org/issue23305  opened by Juha.Lemmetti



Most recent 15 issues with no replies (15)
==

#23305: RotatingFileHandler does not rotate if backupCount is 0
http://bugs.python.org/issue23305

#23304: Unused Superclass in calendar.py
http://bugs.python.org/issue23304

#23291: Documentation about Py_Finalize(): Freeing objects
http://bugs.python.org/issue23291

#23289: concurrent.futures.Executor.map is not equivalent t

Re: [Python-Dev] Undefined dlopen When Building Module On Android

2015-01-23 Thread Cyd Haselton
I guess I'll keep waiting...given the zero responses I've gotten from
the android side. :-(.

In the meantime...in case anyone is interested... since I have the
working binary, I executed it and went through each command in
setup.py to see what throws the 'undefined reference to dlopen' error.
Turns out that the distutils module is the culprit...specifically
distutils.core.


On Thu, Jan 22, 2015 at 8:33 AM, Brett Cannon  wrote:
> A mobile SIG is being formed, but it doesn't have a mailing list yet, else
> that would be a good place to ask this question.
>
> On Wed Jan 21 2015 at 5:54:39 PM Guido van Rossum  wrote:
>>
>> Maybe try a list focused on Android development? Few people in the Python
>> core development community have any Android experience. But the issues and
>> context you offer seem to be related to the Android world, not to Python.
>> (dlopen is used by a lot of systems, not just Python.)
>>
>> On Wed, Jan 21, 2015 at 2:43 PM, Cyd Haselton  wrote:
>>>
>>> On Mon, Jan 19, 2015 at 5:23 PM, Cyd Haselton 
>>> wrote:
>>> > On Mon, Jan 19, 2015 at 8:51 AM, Cyd Haselton 
>>> > wrote:
>>> >> Hello,
>>> >> I'm struggling with a build issue on Android; I've posted to the
>>> >> general python list with no result, so I'm re-posting here in hopes
>>> >> that someone can help.  If this is the wrong place feel free to let me
>>> >> know.
>>> >>
>>> >> I'm attempting to build Python 2.7.8 on my Android device; I'm using
>>> >> an environment that simulates a Linux filesystem within the Android
>>> >> terminal using a port of fakechroot.  Within that environment I've
>>> >> ported and/or bootstrapped a number of Linux utilities (curl, git,
>>> >> openssl, gcc)
>>> >>
>>> >> I run ./configure, then make, and the executable and library are
>>> >> built.  The problem occurs when build_ext is run; the newly built
>>> >> python executable builds, then links _struct, and immediately
>>> >> afterwards I get an 'undefined reference to dlopen' error.
>>> >>
>>> >> If I run ./python setup.py --verbose -library-dirs /path/to/lib
>>> >> --libraries='c dl m' -f, the 'undefined reference to dlopen' error is
>>> >> thrown again.
>>> >>
>>> >> If I run ./python setup.py --verbose -library-dirs /path/to/lib
>>> >> --libraries='-lc -ldl -lm' -f the build continues past _struct...even
>>> >> though ld throws the expected 'unable to find -l-lc' and other errors.
>>> >>
>>> >> Let me know if you need me to provide additional information.  Any
>>> >> help would be greatly appreciated.
>>> >>
>>> >> Cyd
>>> >
>>> >
>>> > Additionally I took a strace of the error producing command. The
>>> > following is (hopefully) a relevant portion minus the various 'no such
>>> > file' lines before the correct lib is found (which it always is)
>>> >
>>> > 16513
>>> > open("/data/data/jackpal.androidterm/kbox2/bld/python/Python-2.7.8/Lib/distutils/unixccompiler.py",
>>> > O_RDONLY|O_LARGEFILE) = 3   16513
>>> >
>>> > open("/data/data/jackpal.androidterm/kbox2/bld/python/Python-2.7.8/Lib/distutils/unixccompiler.pyc",
>>> > O_RDONLY|O_LARGEFILE) = 4   16513 vfork()
>>> >  = 16525
>>> > 16513 wait4(16525,  
>>> > 16525 open("/data/data/jackpal.androidterm/kbox2/bin/sh",
>>> > O_RDONLY|O_LARGEFILE) = 3
>>> > 16525 execve("/data/data/jackpal.androidterm/kbox2/bin/sh", ["sh",
>>> > "-c", "gcc --sysroot=/usr/gcc-4.9.2/sysroot -print-multiarch >
>>> > build/temp.linux-armv7l-2.7/multiarch 2> /dev/null"], [/* 58 vars */])
>>> > = 0
>>> >
>>> > *snip call to libc intercepted by libfakechroot*
>>> >
>>> > 16525 open("/system/lib/libc.so", O_RDONLY|O_LARGEFILE|0x8) = 3
>>> > 16525 open("/system/lib/libm.so", O_RDONLY|O_LARGEFILE|0x8) = 3
>>> > 16525 open("/dev/__properties__",
>>> > O_RDONLY|O_LARGEFILE|O_NOFOLLOW|0x8) = 3
>>> > 16525 open("build/temp.linux-armv7l-2.7/multiarch",
>>> > O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
>>> > 16525 open("/data/data/jackpal.androidterm/kbox2/dev/null",
>>> > O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
>>> > 16525 fork()= 16526
>>> > 16525 wait4(-1,  
>>> > 16526 open("/acct/uid/10186/tasks", O_RDWR|O_CREAT|O_LARGEFILE, 0666)
>>> > = -1 EACCES (Permission denied)
>>> >
>>> > See attached for remainder
>>>
>>> Should I be posting this issue elsewhere?
>>> Is more information needed?
>>>
>>> ___
>>> Python-Dev mailing list
>>> Python-Dev@python.org
>>> 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
>> Python-Dev@python.org
>> https://mail.python.org/mailman/listinfo/python-dev
>> Unsubscribe:
>> https://mail.python.org/mailman/options/python-dev/brett%40python.org
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mai

Re: [Python-Dev] PEP 448 (almost finished!) — Question regarding test_ast

2015-01-23 Thread Walter Dörwald

On 22 Jan 2015, at 23:03, Neil Girdhar wrote:

Thanks for taking a look.  I looked at inspect and I can't see 
anything
that needs to change since it's the caller rather than the receiver 
who has

more options after this PEP.


You are probably right. And for calling via Signature.bind() your patch 
takes care of business.



Did you see anything in particular?


No, I was just using inspect.signature lately and reading the PEP 
reminded me of it.



Best,

Neil


Servus,
   Walter

On Thu, Jan 22, 2015 at 12:23 PM, Walter Dörwald 


wrote:


On 20 Jan 2015, at 17:34, Neil Girdhar wrote:


My question first:
test_ast is mostly generated code, but I can't find where it is 
being
generated.  I am pretty sure I know how to fix most of the 
introduced

problems.  Who is generating test_ast??

Update:

So far, I've done the following:

Updated the patch to 3.5
Fixed the grammar to accept final commas in argument lists always, 
and to

work with the already implemented code.
Fixed the ast to accept what it needs to accept and reject according 
to

the

limitation laid down by Guido.
Fixed the parsing library.

Fixed these tests:
test_ast.py
test_extcall.py
test_grammar.py
test_syntax.py
test_unpack_ex.py

As far as I can tell, all I have left is to fix test_ast and 
possibly

write
some more tests (there are already some new tests and some of the 
old

negative tests expecting SyntaxError are now positive tests).


inspect.signature might need an update.

Servus,
 Walter


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