Re: [Python-Dev] Overriding stdlib http package

2015-01-15 Thread Brett Cannon
On Wed Jan 14 2015 at 4:58:20 PM Demian Brecht 
wrote:

> On 2015-01-14 1: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.
>
> I can understand the reasoning.
>
> > How many other modules are dependent on the http module in the stdlib
> that
> > are going to be affected by your changes? One option is you fork http
> > **and** and modules in the stdlib that are dependent on it. You don't
> > really have to change the other modules beyond their import statement of
> > using http -- you can even do `import http3 as http` or something to
> > minimize the changes -- but you at least don't have to monkeypatch
> > sys.modules for others to gain from your http changes. Plus as you patch
> > stuff in http you may find you have/want to patch other dependent modules
> > as well and so you will have already done that.
>
> It looks like there are 5 other modules dependent on the http package.
> If I understand what you're proposing, it pretty much defeats the
> purpose of what I'm trying to accomplish with a standalone httplib3
> package.
>
> That said, considering the points that you and Guido have both made, I
> think that the best course of action is to either just fork CPython as a
> whole or to continue with httplib3 but abandon overriding sys.modules,
> develop features detached from the stdlib and worry about fixing
> dependencies when integrating changes upstream.
>

If I were you I would fork and then for bugfixes send them upstream to us
while you develop API additions independently. That way if your fork gains
traction you can come to us and say "my fork has a stable API, has existed
for (at least) a year, and the community seems to have rallied behind it",
at which point we can look at drawing it in. And if you fix enough bugs we
might make you maintainer anyway while you work out API design with the
community outside of the stdlib.
___
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] Compile Python on Windows (OpenSSL)

2015-01-15 Thread Victor Stinner
Hi,

I installed the SP1 for Visual Studio 2010, and it looks like that it
broke my Windows SDK 7.1 (setenv was missing, cl.exe was also
missing). I uninstalled the SDK 7.1, and then I saw that a patch is
required to use Windows SDK 7.1 with Visual Studio 2010 SP1. Ah. Too
late.

I don't understand the link between the SDK and Visual Studio. There
are not separated directories?

And now I cannot find Windows SDK 7.1 anymore. It looks like it
disappeared from microsoft.com. The SDK 7.1 was released in 2010, so
it's now quite old, but it worked well!

Can I use the SDK 8.0 or 8.1 to build Python extensions for Python 3.3 and 3.4?

It took me several hours to have a working platform to build my Python
extensions for Python 2.7, 3.3 and 3.4, in 32 and 64 bits with
automated scripts to run all commands. And now it doesn't work anymore
:-(

Victor

2015-01-13 23:46 GMT+01:00 M.-A. Lemburg :
> On 13.01.2015 23:42, Brian Curtin wrote:
>> On Tue, Jan 13, 2015 at 4:36 PM, Victor Stinner
>>  wrote:
>>> 2015-01-13 23:18 GMT+01:00 Steve Dower :
 Technically, Python 3.5 requires Visual Studio 2015
>>>
>>> For me, it's *very* difficult to find how to install Visual Studio.
>>> There are many different websites and web pages which mention Visual
>>> Studio with a lot of versions and "flavors" (Express, Community,
>>> Ultimate, etc.).
>>>
>>> Visual Studio 2015 was not released yet :-/
>>>
>>> My VM has only a disk of 40 GB. Only 12 GB are free. I already have VS
>>> 2008 Express and VS 2010 Express installed. I understood that
>>> "Ultimate" includes a *lot* of things, not only a C compiler.
>>>
>>> I found a "free" Visual Studio which is in fact Visual Studio 2013
>>> Community and I read that it's not free.
>>>
>>> I sent an email to Brian Curtin to ask to renew my MSDN account. He
>>> didn't reply yet.
>>
>> I saw that and will send it on, but it's still going to take some time
>> to process - usually a week or so.
>>
>> In the meantime, the first result searching for Visual Studio 2015
>> came up with 
>> http://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx,
>> which seems to give you VS2015. I haven't tried to run it since I'm
>> not on Windows at the moment, but it looks correct.
>
> Just a note of caution: for older preview releases of VS the
> only way to get back to a clean system was to reinstall
> Windows.
>
> I don't know whether this will be different with VS 2015,
> but if you care for your VM, you should probably create
> a snapshot before installing VS 2015 preview to make it
> easy to revert back, e.g. to install the final VS 2015
> version.
>
> --
> Marc-Andre Lemburg
> eGenix.com
>
> Professional Python Services directly from the Source  (#1, Jan 13 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/
> 
> 2015-01-09: Released eGenix pyOpenSSL 0.13.7 ...  http://egenix.com/go68
> 2015-01-20: Python Meeting Duesseldorf ...http://egenix.com/go69
>
> : 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] Compile Python on Windows (OpenSSL)

2015-01-15 Thread Ryan Gonzalez
On Thu, Jan 15, 2015 at 3:30 PM, Victor Stinner 
wrote:

> Hi,
>
> I installed the SP1 for Visual Studio 2010, and it looks like that it
> broke my Windows SDK 7.1 (setenv was missing, cl.exe was also
> missing). I uninstalled the SDK 7.1, and then I saw that a patch is
> required to use Windows SDK 7.1 with Visual Studio 2010 SP1. Ah. Too
> late.
>
> I don't understand the link between the SDK and Visual Studio. There
> are not separated directories?
>
> And now I cannot find Windows SDK 7.1 anymore. It looks like it
> disappeared from microsoft.com. The SDK 7.1 was released in 2010, so
> it's now quite old, but it worked well!
>

http://www.mathworks.com/matlabcentral/answers/101105-how-do-i-install-microsoft-windows-sdk-7-1
http://www.microsoft.com/en-us/download/details.aspx?id=8279

Both are about Windows SDK 7.1. The latter is a download link; the former
says what to do if you have VS 2010 installed.


>
> Can I use the SDK 8.0 or 8.1 to build Python extensions for Python 3.3 and
> 3.4?
>
> It took me several hours to have a working platform to build my Python
> extensions for Python 2.7, 3.3 and 3.4, in 32 and 64 bits with
> automated scripts to run all commands. And now it doesn't work anymore
> :-(
>
> Victor
>
> 2015-01-13 23:46 GMT+01:00 M.-A. Lemburg :
> > On 13.01.2015 23:42, Brian Curtin wrote:
> >> On Tue, Jan 13, 2015 at 4:36 PM, Victor Stinner
> >>  wrote:
> >>> 2015-01-13 23:18 GMT+01:00 Steve Dower :
>  Technically, Python 3.5 requires Visual Studio 2015
> >>>
> >>> For me, it's *very* difficult to find how to install Visual Studio.
> >>> There are many different websites and web pages which mention Visual
> >>> Studio with a lot of versions and "flavors" (Express, Community,
> >>> Ultimate, etc.).
> >>>
> >>> Visual Studio 2015 was not released yet :-/
> >>>
> >>> My VM has only a disk of 40 GB. Only 12 GB are free. I already have VS
> >>> 2008 Express and VS 2010 Express installed. I understood that
> >>> "Ultimate" includes a *lot* of things, not only a C compiler.
> >>>
> >>> I found a "free" Visual Studio which is in fact Visual Studio 2013
> >>> Community and I read that it's not free.
> >>>
> >>> I sent an email to Brian Curtin to ask to renew my MSDN account. He
> >>> didn't reply yet.
> >>
> >> I saw that and will send it on, but it's still going to take some time
> >> to process - usually a week or so.
> >>
> >> In the meantime, the first result searching for Visual Studio 2015
> >> came up with
> http://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx
> ,
> >> which seems to give you VS2015. I haven't tried to run it since I'm
> >> not on Windows at the moment, but it looks correct.
> >
> > Just a note of caution: for older preview releases of VS the
> > only way to get back to a clean system was to reinstall
> > Windows.
> >
> > I don't know whether this will be different with VS 2015,
> > but if you care for your VM, you should probably create
> > a snapshot before installing VS 2015 preview to make it
> > easy to revert back, e.g. to install the final VS 2015
> > version.
> >
> > --
> > Marc-Andre Lemburg
> > eGenix.com
> >
> > Professional Python Services directly from the Source  (#1, Jan 13 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/
> > 
> > 2015-01-09: Released eGenix pyOpenSSL 0.13.7 ...  http://egenix.com/go68
> > 2015-01-20: Python Meeting Duesseldorf ...http://egenix.com/go69
> >
> > : 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/rymg19%40gmail.com
>



-- 
Ryan
If anybody ever asks me why I prefer C++ to C, my answer will be simple:
"It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was
nul-terminated."
Personal reality distortion fields are immune to contradictory evidence. -
srean
Check out my website: http://kirbyfan64.github.io/
___
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] Compile Python on Windows (OpenSSL)

2015-01-15 Thread Victor Stinner
2015-01-15 22:39 GMT+01:00 Ryan Gonzalez :
> http://www.microsoft.com/en-us/download/details.aspx?id=8279

"Microsoft Windows SDK for Windows 7 and .NET Framework 4"

Are you sure that it is SDK 7.1, and not 7.0?

--

The SDK 7.0 works for Python 2.7 which is compiled with Visual Studio 2008.

I used the SDK 7.1 for Python 3.3 and 3.4 which are compiled with
Visual Studio 2010.

It looks likt SDK 8 is more for Visual Studio 2012.

If you use the wrong SDK, you will depend on a "MSVCRxxx.dll" which is
not provided by Python x.x (ex: MSVCR100.dll for SDK 7.1/Python 3.3 &
3.4).

Victor
___
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] Compile Python on Windows (OpenSSL)

2015-01-15 Thread Zachary Ware
On Thu, Jan 15, 2015 at 3:30 PM, Victor Stinner
 wrote:
> Hi,
>
> I installed the SP1 for Visual Studio 2010, and it looks like that it
> broke my Windows SDK 7.1 (setenv was missing, cl.exe was also
> missing). I uninstalled the SDK 7.1, and then I saw that a patch is
> required to use Windows SDK 7.1 with Visual Studio 2010 SP1. Ah. Too
> late.

Doing a 'repair' on VS2010 might get the SDK back for you; I'm not
sure.  I believe this link should be what's needed to fix the SDK
after installing VS2010SP1:
http://www.microsoft.com/en-us/download/details.aspx?id=4422

> I don't understand the link between the SDK and Visual Studio. There
> are not separated directories?

If I'm not mistaken, Visual Studio uses the SDK for all of its
building and will install its preferred SDK as a dependency.  It can
use other SDKs as well, though.

> And now I cannot find Windows SDK 7.1 anymore. It looks like it
> disappeared from microsoft.com. The SDK 7.1 was released in 2010, so
> it's now quite old, but it worked well!

Web installer:
http://www.microsoft.com/en-us/download/details.aspx?id=8279
ISOs:
http://www.microsoft.com/en-us/download/details.aspx?id=8442

Extension building in general is still a mess on Windows, I hope the
links above are enough to get you going again!

-- 
Zach
___
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] Compile Python on Windows (OpenSSL)

2015-01-15 Thread Paul Moore
On 15 January 2015 at 22:26, Zachary Ware  wrote:
> Extension building in general is still a mess on Windows, I hope the
> links above are enough to get you going again!

For building extensions, I have a powershell script that, starting
with a clean machine, downloads and installs everything needed to
build extensions for Python 2.7-3.4 (Python, 32 and 64-bit, SDK
compilers and Visual C for Python 2.7, and some support packages).
It's available at https://github.com/pfmoore/pybuild It's pretty
fragile (largely because the SDK installs are pretty fragile, but also
because it doesn't check if things it wants to install are already
there), but it's good for setting up a new VM from scratch.

It isn't designed for building Python, and I've no idea how well it
would work for that. But you might be able to pick out some parts of
it that would be useful (if nothing else, it includes direct download
URLs for the various components needed).

Paul
___
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] Compile Python on Windows (OpenSSL)

2015-01-15 Thread Steve Dower
Victor Stinner wrote:
> 2015-01-15 22:39 GMT+01:00 Ryan Gonzalez :
> > http://www.microsoft.com/en-us/download/details.aspx?id=8279
> 
> "Microsoft Windows SDK for Windows 7 and .NET Framework 4"
> 
> Are you sure that it is SDK 7.1, and not 7.0?

The naming is horrible, and the bugs between VS and the SDK are also horrible. 
I'm sorry.

SDK 7.0 == "Windows SDK for Windows 7 and .NET Framework 3.5"
SDK 7.1 == "Windows SDK for Windows 7 and .NET Framework 4"

So this is the correct link for building Python 3.3 and 3.4. It's also the one 
you want to keep building the latest code with the old compiler.

> --
> 
> The SDK 7.0 works for Python 2.7 which is compiled with Visual Studio 2008.
> 
> I used the SDK 7.1 for Python 3.3 and 3.4 which are compiled with Visual 
> Studio
> 2010.
> 
> It looks likt SDK 8 is more for Visual Studio 2012.
> 
> If you use the wrong SDK, you will depend on a "MSVCRxxx.dll" which is not
> provided by Python x.x (ex: MSVCR100.dll for SDK 7.1/Python 3.3 & 3.4).

This information is all entirely correct. Worse, if you depend on the wrong 
runtime version, you'll get unexpected crashes and other errors.

Cheers,
Steve

> Victor
___
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] Compile Python on Windows (OpenSSL)

2015-01-15 Thread Victor Stinner
Oh by the way, the tool that I wrote to build wheel packages on Windows is here:
https://code.google.com/p/tulip/source/browse/release.py

It was too annoying to have to open 6 times the Windows SDK shell, and
type each time between 2 and 4 commands.

release.py help:
--
Usage: release.py [options] command

Options:
  -h, --helpshow this help message and exit
  -v, --verbose verbose
  -t TAG, --tag=TAG Mercurial tag or revision, required to release
  -p PYTHON, --python=PYTHON
Only build/test one specific Python version, ex:
"2.7:32"
  -C, --no-compile  Don't compile the module, this options implies
--running
  -r, --running Only use the running Python version
  --ignore  Ignore local changes

Commands:

- build: build asyncio in place, imply --running
- test: run tests
- test_wheel: test building wheel packages
- release: run tests and publish wheel packages,
  require the --tag option
- clean: cleanup the project
--

I wrote the tool for Tulip but it should be easy to make it more generic.

Victor

2015-01-15 23:34 GMT+01:00 Paul Moore :
> On 15 January 2015 at 22:26, Zachary Ware  
> wrote:
>> Extension building in general is still a mess on Windows, I hope the
>> links above are enough to get you going again!
>
> For building extensions, I have a powershell script that, starting
> with a clean machine, downloads and installs everything needed to
> build extensions for Python 2.7-3.4 (Python, 32 and 64-bit, SDK
> compilers and Visual C for Python 2.7, and some support packages).
> It's available at https://github.com/pfmoore/pybuild It's pretty
> fragile (largely because the SDK installs are pretty fragile, but also
> because it doesn't check if things it wants to install are already
> there), but it's good for setting up a new VM from scratch.
>
> It isn't designed for building Python, and I've no idea how well it
> would work for that. But you might be able to pick out some parts of
> it that would be useful (if nothing else, it includes direct download
> URLs for the various components needed).
>
> Paul
> ___
> 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/victor.stinner%40gmail.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] Compile Python on Windows (OpenSSL)

2015-01-15 Thread Ryan Gonzalez
If you expand the Details section, it says the version is 7.1.

On Thu, Jan 15, 2015 at 3:58 PM, Victor Stinner 
wrote:

> 2015-01-15 22:39 GMT+01:00 Ryan Gonzalez :
> > http://www.microsoft.com/en-us/download/details.aspx?id=8279
>
> "Microsoft Windows SDK for Windows 7 and .NET Framework 4"
>
> Are you sure that it is SDK 7.1, and not 7.0?
>
> --
>
> The SDK 7.0 works for Python 2.7 which is compiled with Visual Studio 2008.
>
> I used the SDK 7.1 for Python 3.3 and 3.4 which are compiled with
> Visual Studio 2010.
>
> It looks likt SDK 8 is more for Visual Studio 2012.
>
> If you use the wrong SDK, you will depend on a "MSVCRxxx.dll" which is
> not provided by Python x.x (ex: MSVCR100.dll for SDK 7.1/Python 3.3 &
> 3.4).
>
> Victor
>



-- 
Ryan
If anybody ever asks me why I prefer C++ to C, my answer will be simple:
"It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was
nul-terminated."
Personal reality distortion fields are immune to contradictory evidence. -
srean
Check out my website: http://kirbyfan64.github.io/
___
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