[Python-Dev] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()
Hi, I've written a patch that adds a new C-API call for dict.setdefault(). The reason is that there is currently no way to test for a key and insert a fallback value for it without either evaluating the hash function twice or calling through the Python function. Both may involve considerable overhead and the double hash may have side-effects. http://bugs.python.org/issue17327 It does not include an explicit test because it does not add any code over the normal dict.setdefault() implementation, which is already tested at the Python level. If you prefer having a dummy test that checks that the function is there, I don't mind adding one. Please comment and/or apply the patch. Thanks, Stefan ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
On Wed, Mar 6, 2013 at 3:32 PM, Terry Reedy wrote: > On 3/6/2013 12:29 PM, Steve Dower wrote: >> >> From: Case Van Horsen > > >>> The "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1" >>> is still available for download. It includes the command line compilers >>> that are >>> used with VS 2008. I have used to create extensions for Python 2.6 to >>> 3.2. >>> There is a later version of the SDK (for .NET >>> 4.x) that includes the compilers from VS 2010. >> >> >> This is the same response that I got internally. >> >> The download link is > >> http://www.microsoft.com/en-us/download/details.aspx?id=3138 >> and you can choose to only download and install the compilers. > > The C++ compiler appears to the the full compiler that will build both 32 > and 64 bits apps. Will downloading just the compiler(s) allow one to build > Python with the project files in PCBuild or does something else need to be > checked also? > > >>> To use the SDK compiler, you need to do a few manual steps first. >>> >>> After starting a command window, you need to run a batch file to >>> configure >>> your environment. Choose the appropriate option from >>> >>> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat >>> >>> or >>> >>> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat >>> >>> Then set two environment variables: >>> >>> set MSSdk=1 >>> set DISTUTILS_USE_SDK=1 >>> >>> After these steps, the standard python setup.py install should work. > > > This may be fine for building extensions, but it appears that more > instructions are needed for a novice to build python itself. There is a build.bat file in the PCbuild directory that will rebuild Python from a command prompt. After entering the commands listed above at a command prompt, I was able to build a debug version of Python 2.7.3 by moving to \PCbuild and entering "build -d" (the -d indicates a debug build). > > Following the instruction in the developer's guide, > http://docs.python.org/devguide/setup.html#windows > I was able to download and install vc express, double click on > /PCBuild/pcbuild.sln to bring up the VS GUI, and use the menu to > build a debug version of that branch. The new python is put in the same > directory and can be run with another menu selection. Any alternate path > should be that easy too. casevh > > > -- > Terry Jan Reedy > > ___ > Python-Dev mailing list > Python-Dev@python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/casevh%40gmail.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Introducing Electronic Contributor Agreements
On 3/4/2013 3:46 PM, Antoine Pitrou wrote: On Mon, 04 Mar 2013 15:46:48 -0500 Terry Reedy wrote: Either policy could be facilitated by tracker changes. In order to see the file upload box, one must login and the tracker knows who has a CLA on file (as indicated by a * suffix on the name). If a file is uploaded by someone without, a box could popup with the link to the e-form and a message that a CLA is required. And how about people who upload something else than a patch? Restrict the popup to filenames ending in .diff or .patch. -- Terry Jan Reedy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
On Thu, Mar 7, 2013 at 9:52 AM, Terry Reedy wrote: > On 3/6/2013 11:55 AM, Chris Angelico wrote: > >> Someone would have to check, but in most cases, software licenses >> govern the use, more than the distribution. If you're allowed to >> download it free of charge from microsoft.com, you should be able to >> get hold of it in some other way and it be exactly the same. But yeah, >> if you want to be legal you'd have to actually read the EULA. > > > As I remember, the 2008 vcexpress license specifically prohibits > redistribtion even though MS gave it away for free. So we can not document > other means of obtaining it. We went through the same issue with vc2005 when > that was pulled from the MS site. I had the file but could not legally send > it to anyone. As it is, my copy of 2008 file, which I meant to keep, seems > gone (I believe the directory I had it in got corrupted). Blah. Okay, that settles that, then. Of course, everything I said above is still possible, just not something the PSF will officially condone. ChrisA ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
On 3/6/2013 12:29 PM, Steve Dower wrote: From: Case Van Horsen The "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1" is still available for download. It includes the command line compilers that are used with VS 2008. I have used to create extensions for Python 2.6 to 3.2. There is a later version of the SDK (for .NET 4.x) that includes the compilers from VS 2010. This is the same response that I got internally. The download link is > http://www.microsoft.com/en-us/download/details.aspx?id=3138 > and you can choose to only download and install the compilers. The C++ compiler appears to the the full compiler that will build both 32 and 64 bits apps. Will downloading just the compiler(s) allow one to build Python with the project files in PCBuild or does something else need to be checked also? To use the SDK compiler, you need to do a few manual steps first. After starting a command window, you need to run a batch file to configure your environment. Choose the appropriate option from C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat or C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat Then set two environment variables: set MSSdk=1 set DISTUTILS_USE_SDK=1 After these steps, the standard python setup.py install should work. This may be fine for building extensions, but it appears that more instructions are needed for a novice to build python itself. Following the instruction in the developer's guide, http://docs.python.org/devguide/setup.html#windows I was able to download and install vc express, double click on /PCBuild/pcbuild.sln to bring up the VS GUI, and use the menu to build a debug version of that branch. The new python is put in the same directory and can be run with another menu selection. Any alternate path should be that easy too. -- Terry Jan Reedy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
On 3/6/2013 11:55 AM, Chris Angelico wrote: Someone would have to check, but in most cases, software licenses govern the use, more than the distribution. If you're allowed to download it free of charge from microsoft.com, you should be able to get hold of it in some other way and it be exactly the same. But yeah, if you want to be legal you'd have to actually read the EULA. As I remember, the 2008 vcexpress license specifically prohibits redistribtion even though MS gave it away for free. So we can not document other means of obtaining it. We went through the same issue with vc2005 when that was pulled from the MS site. I had the file but could not legally send it to anyone. As it is, my copy of 2008 file, which I meant to keep, seems gone (I believe the directory I had it in got corrupted). -- Terry Jan Reedy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Introducing Electronic Contributor Agreements
On 3/6/2013 3:06 PM, Steven D'Aprano wrote: On 05/03/13 09:08, Brett Cannon wrote: Depends on your paranoia. If you're worried about accidentally lifting IP merely by reading someone's source code, then you wouldn't want to touch code without the CLA signed. Now I'm not that paranoid, but I'm still not about to commit someone's code now without the CLA signed to make sure we are legally covered for the patch. If someone chooses not to contribute because of the CLA that's fine, but since we have already told at least Anatoly that we won't accept patches from him until he signs the CLA I'm not going to start acting differently towards others. I view legally covering our ass by having someone fill in a form is worth the potential loss of some contribution in the grand scheme of things. Pardon my ignorance, but how does a CLA protect us in the event of an IP violation? The penalty for willful copyright violation (possible punitive damages) is higher than for inadvertent violation (typically, remove the offending code). In the CLA, contributors affirm that they will only contribute code they have a legal right to contribute. This makes it clear that PSF only wants legal code. We do not grab 3rd party code without author participation even if the license would seem to make it legal to do so. Good repository software, including svn and hg, can trace every line to a specific commit. Commit messages typically have an issue number and credit (blame) any patch author other than the one making the commit. So any line should be traceable to a specific person and we should have a CLA for that person. -- Terry Jan Reedy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Introducing Electronic Contributor Agreements
Steven D'Aprano writes: > Pardon my ignorance, but how does a CLA protect us in the event of an IP > violation? By licensing the content to the PSF, the contributor implicitly claims that he has the right to do so (I think the AFL even has an explicit provenance clause). This protects the PSF against criminal infringement and statutory damages for copyright violation (which require wilful infringement). I don't know it if helps for patent infringement. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Introducing Electronic Contributor Agreements
On Wed, Mar 6, 2013 at 3:06 PM, Steven D'Aprano wrote: > On 05/03/13 09:08, Brett Cannon wrote: > > Depends on your paranoia. If you're worried about accidentally lifting IP >> merely by reading someone's source code, then you wouldn't want to touch >> code without the CLA signed. >> >> Now I'm not that paranoid, but I'm still not about to commit someone's >> code >> now without the CLA signed to make sure we are legally covered for the >> patch. If someone chooses not to contribute because of the CLA that's >> fine, >> but since we have already told at least Anatoly that we won't accept >> patches from him until he signs the CLA I'm not going to start acting >> differently towards others. I view legally covering our ass by having >> someone fill in a form is worth the potential loss of some contribution in >> the grand scheme of things. >> > > Pardon my ignorance, but how does a CLA protect us in the event of an IP > violation? Maybe it doesn't. IANAL and I was just trying to think in as paranoid of a fashion as I could. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Introducing Electronic Contributor Agreements
On 05/03/13 09:08, Brett Cannon wrote: Depends on your paranoia. If you're worried about accidentally lifting IP merely by reading someone's source code, then you wouldn't want to touch code without the CLA signed. Now I'm not that paranoid, but I'm still not about to commit someone's code now without the CLA signed to make sure we are legally covered for the patch. If someone chooses not to contribute because of the CLA that's fine, but since we have already told at least Anatoly that we won't accept patches from him until he signs the CLA I'm not going to start acting differently towards others. I view legally covering our ass by having someone fill in a form is worth the potential loss of some contribution in the grand scheme of things. Pardon my ignorance, but how does a CLA protect us in the event of an IP violation? -- Steven ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Difference in RE between 3.2 and 3.3 (or Aaron Swartz memorial)
Hi, In short, Unicode was rewritten in Python 3.3 for the PEP 393. It's not surprising that minor details like singleton differ. You should not use "is" to compare strings in Python, or your program will fail on other Python implementations (like PyPy, IronPython, or Jython) or even on a different CPython version. Anyway, you spotted a missed optimization: it's now "fixed" in Python 3.3 and 3.4 by the following commits. Copy/paste of the CIA IRC bot: 19:30 < irker555> cpython: Victor Stinner 3.3 * 82517:3dd2fa78fb89 / Objects/unicodeobject.c: _PyUnicode_Writer() now also reuses Unicode singletons: empty string and latin1 single character http://hg.python.org/cpython/rev/3dd2fa78fb89 19:30 < irker032> cpython: Victor Stinner default * 82518:fa59a85b373f / Objects/unicodeobject.c: (Merge 3.3) _PyUnicode_Writer() now also reuses Unicode singletons: empty string and latin1 single character http://hg.python.org/cpython/rev/fa59a85b373f Victor 2013/3/6 Amaury Forgeot d'Arc : >> So, in the end, I have went the long way and bisected cpython to >> find the commit which broke my tests, and it seems that the >> culprit is http://hg.python.org/cpython/rev/123f2dc08b3e so it is >> clearly something Unicode related. >> >> Unfortunately, it really doesn't tell me what exactly is broken >> (is it a known regression) and if there is known workaround. >> Could anybody suggest a way how to find bugs on >> http://bugs.python.org related to some particular commit (plain >> search for 123f2dc0 didn’t find anything). > > > I strongly suspect an incorrect usage of the "is" operator: > https://github.com/mcepl/html2text/blob/master/html2text.py#L95 > Identity of strings is not guaranteed... > > Does it change something if you use "==" instead? > > -- > Amaury Forgeot d'Arc ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
From: Case Van Horsen > On Wed, Mar 6, 2013 at 2:20 AM, Terry Reedy wrote: > > Clicking this link > > http://www.microsoft.com/en-us/download/details.aspx?id=14597 > > on this Developer Guide page > > http://docs.python.org/devguide/setup.html#windows > > now returns a > > "We are sorry, the page you requested cannot be found." > > page with search results. > > > > The first search result > > http://social.msdn.microsoft.com/Forums/nl/Vsexpressinstall/thread/2dc > > 7ae6a-a0e7-436b-a1b3-3597ffac6a97 suggests that one must first go to > > http://profile.microsoft.com which forwards to the live.com login > > page. Logging in with my un-expired non-developer account did not make > > the original link work. > > > > The mdsn page http://msdn.microsoft.com/en-US/ has Visual Studio / > > Download trial, which leads to > > https://www.microsoft.com/visualstudio/eng/downloads > > which lists 2012 and 2010 but not 2008. > > > > I suspect that an msdn account is required for most people to get 2008. > > > > A later link leads to > > https://www.dreamspark.com/Product/Product.aspx?productid=34# > > which suggests that vc++2008 express is also available to verified > > degree students. I don't qualify so I will not try. > > > > So it would appear that section "1.1.3.3. Windows" of "1. Getting Started" > > (setup.rst) needs further revision. > > > > Or perhaps we could persuade Microsoft to let us distribute it > > ourselves so Windows versions of 2.7 do not become increasingly > unusable. > > The "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1" > is still available for download. It includes the command line compilers that > are > used with VS 2008. I have used to create extensions for Python 2.6 to 3.2. > There is a later version of the SDK (for .NET > 4.x) that includes the compilers from VS 2010. This is the same response that I got internally. The download link is http://www.microsoft.com/en-us/download/details.aspx?id=3138 and you can choose to only download and install the compilers. Cheers, Steve > To use the SDK compiler, you need to do a few manual steps first. > > After starting a command window, you need to run a batch file to configure > your environment. Choose the appropriate option from > > C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat > > or > > C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat > > Then set two environment variables: > > set MSSdk=1 > set DISTUTILS_USE_SDK=1 > > > After these steps, the standard python setup.py install should work. > > casevh > > > > -- > > Terry Jan Reedy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [docs] undocumented argtypes magic in ctypes?
On Wed, Mar 6, 2013 at 8:33 AM, Andrew Svetlov wrote: > Looks like bug for me. > ctypes seems to auto-convert arguments when argtypes is specified. This fact is documented. However, I'm not sure whether this auto-conversion is advanced enough to apply byref. Because otherwise, DIRENT is certainly not convertible to DIRENT_p Eli > > On Tue, Mar 5, 2013 at 4:26 PM, Eli Bendersky wrote: > > Hello, > > > > While playing with ctypes a bit, I noticed a feature that doesn't appear > to > > be documented. Suppose I import the readdir_r function (assuming DIRENT > is a > > correctly declared ctypes.Structure): > > > > DIR_p = c_void_p > > DIRENT_p = POINTER(DIRENT) > > DIRENT_pp = POINTER(DIRENT_p) > > > > readdir_r = lib.readdir_r > > readdir_r.argtypes = [DIR_p, DIRENT_p, DIRENT_pp] > > readdir_r.restype = c_int > > > > It seems that I can then call it as follows: > > > > dirent = DIRENT() > > result = DIRENT_p() > > > > readdir_r(dir_fd, dirent, result) > > > > Note that while readdir_r takes DIRENT_p and DIRENT_pp as its second and > > third args, I pass in just DIRENT and DIRENT_p, accordingly. What I > should > > have done is use byref() on both, but ctypes seems to have some magic > > applied when argtypes declares pointer types. If I use byref, it still > > works. However, if I keep the same call and comment out the argtypes > > declaration, I get a segfault. > > > > So, is it a feature that should be documented, explicitly discouraged or > is > > it a bug? > > > > Eli > > > > > > ___ > > docs mailing list > > d...@python.org > > http://mail.python.org/mailman/listinfo/docs > > > > > > -- > Thanks, > Andrew Svetlov > ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
From: Terry Reedy > Clicking this link > http://www.microsoft.com/en-us/download/details.aspx?id=14597 > on this Developer Guide page > http://docs.python.org/devguide/setup.html#windows > now returns a > "We are sorry, the page you requested cannot be found." > page with search results. > > The first search result > http://social.msdn.microsoft.com/Forums/nl/Vsexpressinstall/thread/2dc7a > e6a-a0e7-436b-a1b3-3597ffac6a97 > suggests that one must first go to http://profile.microsoft.com which > forwards to the live.com login page. Logging in with my un-expired non- > developer account did not make the original link work. > > The mdsn page http://msdn.microsoft.com/en-US/ has Visual Studio / > Download trial, which leads to > https://www.microsoft.com/visualstudio/eng/downloads > which lists 2012 and 2010 but not 2008. > > I suspect that an msdn account is required for most people to get 2008. Worse than that, it looks like you need a subscription and then a download "helper", which will get you the web installer that then goes off and downloads it for you. > A later link leads to > https://www.dreamspark.com/Product/Product.aspx?productid=34# > which suggests that vc++2008 express is also available to verified degree > students. I don't qualify so I will not try. > > So it would appear that section "1.1.3.3. Windows" of "1. Getting Started" > (setup.rst) needs further revision. > > Or perhaps we could persuade Microsoft to let us distribute it ourselves so > Windows versions of 2.7 do not become increasingly unusable. I'll ask around and see what we can do. We clearly still have the download available, so it may just be a case of making the web installer publicly available again. Chances are if you have the installer then it will still work. We may also make just the compilers available in some other way. It looks like the Windows Development Kits (previously Platform SDK) don't have it, but IIRC the driver kits occasionally ship with compilers. I'll get back to the list when I get something. Cheers, Steve ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
On 2013-03-06 16:55, Chris Angelico wrote: On Thu, Mar 7, 2013 at 3:46 AM, Stefan Behnel wrote: Chris Angelico, 06.03.2013 17:30: On Thu, Mar 7, 2013 at 1:40 AM, Ezio Melotti wrote: I did try a few weeks ago, when I had to download a copy of Windows for a project. Long story short, after 30+ minutes and a number of confirmation emails I reached a point where I had a couple of new accounts on MSDN/Dreamspark, a "purchased" free copy of Windows in my e-cart, and some .exe I had to download in order to download and verify the purchased copy. That's where I gave up. That's the point where I'd start looking at peer-to-peer downloads. These sorts of things are often available on torrent sites; once the original publisher starts making life harder, third-party sources become more attractive. May I express my doubts that the license allows a redistribution of the software in this form? Someone would have to check, but in most cases, software licenses govern the use, more than the distribution. If you're allowed to download it free of charge from microsoft.com, you should be able to get hold of it in some other way and it be exactly the same. Sorry, but that's not how copyright works. The owner of the copyright on a work has to give you permission to allow you to distribute their work (modulo certain statutorily-defined exceptions that don't apply here). Just because you got the work from them free of charge doesn't mean that they have given you permission to redistribute it. If the agreements that you have with the copyright owner do not mention redistribution, you do not have permission to redistribute it. IANAL, TINLA. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
On Wed, Mar 6, 2013 at 2:20 AM, Terry Reedy wrote: > Clicking this link > http://www.microsoft.com/en-us/download/details.aspx?id=14597 > on this Developer Guide page > http://docs.python.org/devguide/setup.html#windows > now returns a > "We are sorry, the page you requested cannot be found." > page with search results. > > The first search result > http://social.msdn.microsoft.com/Forums/nl/Vsexpressinstall/thread/2dc7ae6a-a0e7-436b-a1b3-3597ffac6a97 > suggests that one must first go to http://profile.microsoft.com > which forwards to the live.com login page. Logging in with my un-expired > non-developer account did not make the original link work. > > The mdsn page http://msdn.microsoft.com/en-US/ > has Visual Studio / Download trial, which leads to > https://www.microsoft.com/visualstudio/eng/downloads > which lists 2012 and 2010 but not 2008. > > I suspect that an msdn account is required for most people to get 2008. > > A later link leads to > https://www.dreamspark.com/Product/Product.aspx?productid=34# > which suggests that vc++2008 express is also available to verified degree > students. I don't qualify so I will not try. > > So it would appear that section "1.1.3.3. Windows" of "1. Getting Started" > (setup.rst) needs further revision. > > Or perhaps we could persuade Microsoft to let us distribute it ourselves so > Windows versions of 2.7 do not become increasingly unusable. The "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1" is still available for download. It includes the command line compilers that are used with VS 2008. I have used to create extensions for Python 2.6 to 3.2. There is a later version of the SDK (for .NET 4.x) that includes the compilers from VS 2010. To use the SDK compiler, you need to do a few manual steps first. After starting a command window, you need to run a batch file to configure your environment. Choose the appropriate option from C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat or C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat Then set two environment variables: set MSSdk=1 set DISTUTILS_USE_SDK=1 After these steps, the standard python setup.py install should work. casevh > > -- > Terry Jan Reedy > > ___ > Python-Dev mailing list > Python-Dev@python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/casevh%40gmail.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
On Wed, Mar 6, 2013 at 10:55 AM, Chris Angelico wrote: > Is there any plan for future Python versions to use a free compiler on > Windows? That would eliminate this issue, but presumably would create > others. No plan, although there are at times patches/issues floating around to add some level of support for MinGW (or something like it) in addition to Microsoft's compiler. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
On Thu, Mar 7, 2013 at 3:46 AM, Stefan Behnel wrote: > Chris Angelico, 06.03.2013 17:30: >> On Thu, Mar 7, 2013 at 1:40 AM, Ezio Melotti wrote: >>> I did try a few weeks ago, when I had to download a copy of Windows >>> for a project. Long story short, after 30+ minutes and a number of >>> confirmation emails I reached a point where I had a couple of new >>> accounts on MSDN/Dreamspark, a "purchased" free copy of Windows in my >>> e-cart, and some .exe I had to download in order to download and >>> verify the purchased copy. That's where I gave up. >> >> That's the point where I'd start looking at peer-to-peer downloads. >> These sorts of things are often available on torrent sites; once the >> original publisher starts making life harder, third-party sources >> become more attractive. > > May I express my doubts that the license allows a redistribution of the > software in this form? Someone would have to check, but in most cases, software licenses govern the use, more than the distribution. If you're allowed to download it free of charge from microsoft.com, you should be able to get hold of it in some other way and it be exactly the same. But yeah, if you want to be legal you'd have to actually read the EULA. Is there any plan for future Python versions to use a free compiler on Windows? That would eliminate this issue, but presumably would create others. ChrisA ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
Chris Angelico, 06.03.2013 17:30: > On Thu, Mar 7, 2013 at 1:40 AM, Ezio Melotti wrote: >> I did try a few weeks ago, when I had to download a copy of Windows >> for a project. Long story short, after 30+ minutes and a number of >> confirmation emails I reached a point where I had a couple of new >> accounts on MSDN/Dreamspark, a "purchased" free copy of Windows in my >> e-cart, and some .exe I had to download in order to download and >> verify the purchased copy. That's where I gave up. > > That's the point where I'd start looking at peer-to-peer downloads. > These sorts of things are often available on torrent sites; once the > original publisher starts making life harder, third-party sources > become more attractive. May I express my doubts that the license allows a redistribution of the software in this form? Stefan ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
On Thu, Mar 7, 2013 at 1:40 AM, Ezio Melotti wrote: > I did try a few weeks ago, when I had to download a copy of Windows > for a project. Long story short, after 30+ minutes and a number of > confirmation emails I reached a point where I had a couple of new > accounts on MSDN/Dreamspark, a "purchased" free copy of Windows in my > e-cart, and some .exe I had to download in order to download and > verify the purchased copy. That's where I gave up. That's the point where I'd start looking at peer-to-peer downloads. These sorts of things are often available on torrent sites; once the original publisher starts making life harder, third-party sources become more attractive. ChrisA ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Difference in RE between 3.2 and 3.3 (or Aaron Swartz memorial)
On 2013-03-06 14:18, Amaury Forgeot d'Arc wrote: Hi, 2013/3/6 Matěj Cepl mailto:mc...@redhat.com>> On 2013-02-26, 16:25 GMT, Terry Reedy wrote: > On 2/21/2013 4:22 PM, Matej Cepl wrote: >> as my method to commemorate Aaron Swartz, I have decided to port his >> html2text to work fully with the latest python 3.3. After some time >> dealing with various bugs, I have now in my repo >> https://github.com/mcepl/html2text (branch python3) working solution >> which works all the way to python 3.2 (inclusive; >> https://travis-ci.org/mcepl/html2text). However, the last problem >> remains. This >> >> Run this command: >> ls -l *.html >> ? >> >> should lead to >> >>* Run this command: >> >> ls -l *.html >> >>* ? >> >> but it doesn’t. It leads to this (with python 3.3 only) >> >> * Run this command: >>ls -l *.html >> >> * ? >> >> Does anybody know about something which changed in modules re or >> http://docs.python.org/3.3/whatsnew/changelog.html between 3.2 and >> 3.3, which could influence this script? > > Search the changelob or 3.3 misc/News for items affecting those two > modules. There are at least 4. > http://docs.python.org/3.3/whatsnew/changelog.html > > It is faintly possible that the switch from narrow/wide builds to > unified builds somehow affected that. Have you tested with 2.7/3.2 on > both narrow and wide unicode builds? So, in the end, I have went the long way and bisected cpython to find the commit which broke my tests, and it seems that the culprit is http://hg.python.org/cpython/rev/123f2dc08b3e so it is clearly something Unicode related. Unfortunately, it really doesn't tell me what exactly is broken (is it a known regression) and if there is known workaround. Could anybody suggest a way how to find bugs on http://bugs.python.org related to some particular commit (plain search for 123f2dc0 didn’t find anything). I strongly suspect an incorrect usage of the "is" operator: https://github.com/mcepl/html2text/blob/master/html2text.py#L95 Identity of strings is not guaranteed... Does it change something if you use "==" instead? That function looks a little odd to me. Maybe I just don't understand what it's doing! :-) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
Hi, On Wed, Mar 6, 2013 at 12:20 PM, Terry Reedy wrote: > Clicking this link > http://www.microsoft.com/en-us/download/details.aspx?id=14597 > on this Developer Guide page > http://docs.python.org/devguide/setup.html#windows > now returns a > "We are sorry, the page you requested cannot be found." > page with search results. > > The first search result > http://social.msdn.microsoft.com/Forums/nl/Vsexpressinstall/thread/2dc7ae6a-a0e7-436b-a1b3-3597ffac6a97 > suggests that one must first go to http://profile.microsoft.com > which forwards to the live.com login page. Logging in with my un-expired > non-developer account did not make the original link work. > > The mdsn page http://msdn.microsoft.com/en-US/ > has Visual Studio / Download trial, which leads to > https://www.microsoft.com/visualstudio/eng/downloads > which lists 2012 and 2010 but not 2008. > > I suspect that an msdn account is required for most people to get 2008. > > A later link leads to > https://www.dreamspark.com/Product/Product.aspx?productid=34# > which suggests that vc++2008 express is also available to verified degree > students. I don't qualify so I will not try. > I did try a few weeks ago, when I had to download a copy of Windows for a project. Long story short, after 30+ minutes and a number of confirmation emails I reached a point where I had a couple of new accounts on MSDN/Dreamspark, a "purchased" free copy of Windows in my e-cart, and some .exe I had to download in order to download and verify the purchased copy. That's where I gave up. Best Regards, Ezio Melotti > So it would appear that section "1.1.3.3. Windows" of "1. Getting Started" > (setup.rst) needs further revision. > > Or perhaps we could persuade Microsoft to let us distribute it ourselves so > Windows versions of 2.7 do not become increasingly unusable. > > -- > Terry Jan Reedy > ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Difference in RE between 3.2 and 3.3 (or Aaron Swartz memorial)
Hi, 2013/3/6 Matěj Cepl > > On 2013-02-26, 16:25 GMT, Terry Reedy wrote: > > On 2/21/2013 4:22 PM, Matej Cepl wrote: > >> as my method to commemorate Aaron Swartz, I have decided to port his > >> html2text to work fully with the latest python 3.3. After some time > >> dealing with various bugs, I have now in my repo > >> https://github.com/mcepl/html2text (branch python3) working solution > >> which works all the way to python 3.2 (inclusive; > >> https://travis-ci.org/mcepl/html2text). However, the last problem > >> remains. This > >> > >> Run this command: > >> ls -l *.html > >> ? > >> > >> should lead to > >> > >>* Run this command: > >> > >> ls -l *.html > >> > >>* ? > >> > >> but it doesn’t. It leads to this (with python 3.3 only) > >> > >> * Run this command: > >>ls -l *.html > >> > >> * ? > >> > >> Does anybody know about something which changed in modules re or > >> http://docs.python.org/3.3/whatsnew/changelog.html between 3.2 and > >> 3.3, which could influence this script? > > > > Search the changelob or 3.3 misc/News for items affecting those two > > modules. There are at least 4. > > http://docs.python.org/3.3/whatsnew/changelog.html > > > > It is faintly possible that the switch from narrow/wide builds to > > unified builds somehow affected that. Have you tested with 2.7/3.2 on > > both narrow and wide unicode builds? > > So, in the end, I have went the long way and bisected cpython to > find the commit which broke my tests, and it seems that the > culprit is http://hg.python.org/cpython/rev/123f2dc08b3e so it is > clearly something Unicode related. > > Unfortunately, it really doesn't tell me what exactly is broken > (is it a known regression) and if there is known workaround. > Could anybody suggest a way how to find bugs on > http://bugs.python.org related to some particular commit (plain > search for 123f2dc0 didn’t find anything). > I strongly suspect an incorrect usage of the "is" operator: https://github.com/mcepl/html2text/blob/master/html2text.py#L95 Identity of strings is not guaranteed... Does it change something if you use "==" instead? -- Amaury Forgeot d'Arc ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Difference in RE between 3.2 and 3.3 (or Aaron Swartz memorial)
On Wed, 06 Mar 2013 14:09:54 +0100, =?UTF-8?Q?Mat=C4=9Bj?= Cepl wrote: > So, in the end, I have went the long way and bisected cpython to > find the commit which broke my tests, and it seems that the > culprit is http://hg.python.org/cpython/rev/123f2dc08b3e so it is > clearly something Unicode related. > > Unfortunately, it really doesn't tell me what exactly is broken > (is it a known regression) and if there is known workaround. > Could anybody suggest a way how to find bugs on > http://bugs.python.org related to some particular commit (plain > search for 123f2dc0 didnât find anything). If no issue number is mentioned in the commit message, then chances are there's no specific issue in the tracker related to that particular commit. Normally there will be an issue, but sometimes things are done without one (a practice we should maybe think about changing). Most likely the commit's author, Victor Stinner, will see your message or this one and respond. That particular change recently came up (by implication) in another context (unicode singletons...) --David ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] built-in Python test runner (was: Python Language Summit at PyCon: Agenda)
On Wed, Mar 6, 2013 at 4:45 PM, Lennart Regebro wrote: > Perhaps we can solve this outside distutils-sig so that distutils-sig > can concentrate on the harder problems? It's a distutils-sig problem because you need a way to publish any new testing related metadata, and because we're planning to evolve a hooks system to cover the different steps in the build process in a decoupled manner. "Run the tests" will be just another hook, but we're not up to dealing with that yet (the only hook that will be in metadata 2.0 is the post-install hook that will bring the wheel format up to the point of being a near-total replacement for "./setup.py install", and even that isn't written up formally yet - it's just a post in a thread on distutils-sig). You could, as Daniel suggested, work on defining a PEP 426 extension as a prototype concept, but it won't help you much until PEP 426 support is widespread, and by then we'll probably be looking at the meta-build system more broadly and figuring out the full set of desired hooks (including test invocation). Regards, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Difference in RE between 3.2 and 3.3 (or Aaron Swartz memorial)
On 2013-02-26, 16:25 GMT, Terry Reedy wrote: > On 2/21/2013 4:22 PM, Matej Cepl wrote: >> as my method to commemorate Aaron Swartz, I have decided to port his >> html2text to work fully with the latest python 3.3. After some time >> dealing with various bugs, I have now in my repo >> https://github.com/mcepl/html2text (branch python3) working solution >> which works all the way to python 3.2 (inclusive; >> https://travis-ci.org/mcepl/html2text). However, the last problem >> remains. This >> >> Run this command: >> ls -l *.html >> ? >> >> should lead to >> >>* Run this command: >> >> ls -l *.html >> >>* ? >> >> but it doesn’t. It leads to this (with python 3.3 only) >> >> * Run this command: >>ls -l *.html >> >> * ? >> >> Does anybody know about something which changed in modules re or >> http://docs.python.org/3.3/whatsnew/changelog.html between 3.2 and >> 3.3, which could influence this script? > > Search the changelob or 3.3 misc/News for items affecting those two > modules. There are at least 4. > http://docs.python.org/3.3/whatsnew/changelog.html > > It is faintly possible that the switch from narrow/wide builds to > unified builds somehow affected that. Have you tested with 2.7/3.2 on > both narrow and wide unicode builds? So, in the end, I have went the long way and bisected cpython to find the commit which broke my tests, and it seems that the culprit is http://hg.python.org/cpython/rev/123f2dc08b3e so it is clearly something Unicode related. Unfortunately, it really doesn't tell me what exactly is broken (is it a known regression) and if there is known workaround. Could anybody suggest a way how to find bugs on http://bugs.python.org related to some particular commit (plain search for 123f2dc0 didn’t find anything). Any thoughts? Matěj P.S.: Crossposting to python-devel in hope there would be somebody understanding more about that particular commit. For that I have also intentionally not trim the original messages to preserve context. -- http://www.ceplovi.cz/matej/, Jabber: mceplceplovi.cz GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC When you're happy that cut and paste actually works I think it's a sign you've been using X-Windows for too long. -- from /. discussion on poor integration between KDE and GNOME signature.asc Description: This is a digitally signed message part ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] VC++ 2008 Express Edition now locked away?
Clicking this link http://www.microsoft.com/en-us/download/details.aspx?id=14597 on this Developer Guide page http://docs.python.org/devguide/setup.html#windows now returns a "We are sorry, the page you requested cannot be found." page with search results. The first search result http://social.msdn.microsoft.com/Forums/nl/Vsexpressinstall/thread/2dc7ae6a-a0e7-436b-a1b3-3597ffac6a97 suggests that one must first go to http://profile.microsoft.com which forwards to the live.com login page. Logging in with my un-expired non-developer account did not make the original link work. The mdsn page http://msdn.microsoft.com/en-US/ has Visual Studio / Download trial, which leads to https://www.microsoft.com/visualstudio/eng/downloads which lists 2012 and 2010 but not 2008. I suspect that an msdn account is required for most people to get 2008. A later link leads to https://www.dreamspark.com/Product/Product.aspx?productid=34# which suggests that vc++2008 express is also available to verified degree students. I don't qualify so I will not try. So it would appear that section "1.1.3.3. Windows" of "1. Getting Started" (setup.rst) needs further revision. Or perhaps we could persuade Microsoft to let us distribute it ourselves so Windows versions of 2.7 do not become increasingly unusable. -- Terry Jan Reedy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com