Re: [Python-Dev] Backquote deprecation warning
Christian Heimes schrieb: > Hello! > > I'm having a bit of a trouble getting the deprecation warning for > backquotes `repr` right. Neither the ast_for_* functions in Python/ast.c > nor the node structures have access to the filename. On a related note, every time you start a Python interpreter with -3 you get 8 instances of warning: callable() not supported in 3.x They come from copy_reg.py:pickle/constructor. Py3k has a hasattr('__call__') there. Am I correct that for Py2, that must be hasattr(object, '__call__') or isinstance(object, types.ClassType) ? Or are there other callable objects without a __call__ method? Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out. ___ 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] .pyc location?
Hi - I'm having a few problems with our (embedded) Python interpreter trying to write .pyc files in the installation of our product (which actually sometimes works and sometimes doesn't depending on OS and paranoia level involved). This can give raise to a few very confusing situations and I'd like to be able to specify an explicit location for the .pyc files. Ideally, this would be a cache location where all .pyc files are created under an hashed (MD5 or similar) name of the original source file so that the cache location can be used for all of the compiled Python files. While googling this issue, I noticed that the status of PEP 304 says "withdrawn" but since most of the discussion around it seems to be a couple of years old, I thought I'd ask if anyone has done something in this area recently. If not, a pointer to the place which manages these mappings (or a starting point for further digging) would be greatly welcome. Cheers, - Andreas ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
I have just built the current trunk version of Python on Windows, using the new PCBuild9 directory, and Visual Studio 2008 Express Edition. Everything went extremely well. I include below my notes on what I did, for reference. To be honest, there's nothing in here that really warrants a change to the readme.txt - to all intents and purposes, the process "just works". OK, here are my notes: Install Visual C++ 2008 Express Edition. Only select Silverlight from the options (no documentation or SQL Server - Silverlight probably isn't actually needed either). I already had the Platform SDK installed, but did nothing to tell VS about it, or to integrate it. I doubt this is relevant. I am using Python trunk at revision 59132. (But I hit an issue fixed in 59136, so better to use that). Start VC. Open project PCBuild9\pcbuild.sln Message "Solution Folders are not supported in this version of Visual Studio. Solution folder 'Solution Items' will be displayed as unavailable." Select OK. Select the release build (Build > Configuration Manager) Right click pythoncore > Build make_buildinfo - succeeded 1 warning (unlink vs _unlink) make_versioninfo - succeeded pythoncore - I hit an error in ast.c so I needed to svn up (to 59136). Succeeded. Right click python > Build. Succeeded. Right click pythonw > Build. Succeeded. Right click _socket > Build. Succeeded. Right click _testcapi > Build. Succeeded. Right click pyexpat > Build. Succeeded. Right click select > Build. Succeeded. Right click unicodedata > Build. Succeeded. Right click winsound > Build. Succeeded. At this point, we have finished the modules documented as "build out of the box" in PCBuild9\readme.txt. The modules _tkinter, bz2, _bsddb, _sqlite3, _ssl are documented as having dependencies. See below. Modules _ctypes, _ctypes_test, _elementtree, _msi, w9xpopen are not mentioned in readme.txt. They all build without error. bz2 --- The include dir is a macro, and I can't work out how to override the default (which is bzip2-1.0.3). So I stuck to 1.0.3 and exported it from Python svn, as per the instructions. Built OK. _sqlite3 Again, couldn't work out how to change the macro, so I stuck with the external from svn (sqlite-source-3.3.4). The pre-link step failed with an error about not finding TCL. I edited the prelink step to include a /DNO_TCL flag on the cl command. There may be a better approach - I don't know if not having TCL is an issue for Python's use of sqlite. _tkinter and _bsddb --- The instructions suggest using VS 2003 to build the dependencies. I don't have VS 2003 and don't have the time at the moment to investigate further. _ssl Christian has been making changes to allow this to build without Perl, so I gave it a try. I used openssl 0.9.8g, which I extracted to the build directory (I noticed afterwards that this is the same version as in Python svn, so I could have used the svn external!) I needed to download nasm (nasm.sf.net) version 2.00rc1, and rename nasm.exe to nasmw.exe and put it on my PATH. Build succeeded, no issues. Tests - Running the tests, all succeed except test_tcl and test_bsddb, which are because I didn't build those two extensions, and test_os. The test_os failure is just because it looks for C:\pagefile.sys and my pagefile is on D:\. (There's also a problem with test_socket_ssl hanging, but this is present in the standard 2.6 snapshot build. I've raised a separate bug report for this). Paul. ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
Paul Moore wrote: > On 23/11/2007, Christian Heimes <[EMAIL PROTECTED]> wrote: >> I really like to throw out the old junk to have a clean script. Maybe I >> could leave the old msvccompiler alone and put the new code into >> distutils.msvc9compiler? > > That might work. I'm not sure if throwing the old stuff out is OK. As > long as we have a VC6 directory (however unmaintained it may be) I'd > say we need the equivalent distutils support. Presumably the advantage of a new compiler flavour is that you could set your pydistutils.cfg to that compiler (or use --compiler= or whatever) and put whatever specifics you want in a new class without having to disturb the unstable equilibrium which is msvccompiler. TJG ___ 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] .pyc location?
Andreas Raab schrieb: > Hi - > > I'm having a few problems with our (embedded) Python interpreter trying > to write .pyc files in the installation of our product (which actually > sometimes works and sometimes doesn't depending on OS and paranoia level > involved). This can give raise to a few very confusing situations and > I'd like to be able to specify an explicit location for the .pyc files. > Ideally, this would be a cache location where all .pyc files are created > under an hashed (MD5 or similar) name of the original source file so > that the cache location can be used for all of the compiled Python files. > > While googling this issue, I noticed that the status of PEP 304 says > "withdrawn" but since most of the discussion around it seems to be a > couple of years old, I thought I'd ask if anyone has done something in > this area recently. If not, a pointer to the place which manages these > mappings (or a starting point for further digging) would be greatly welcome. There is this issue: http://bugs.python.org/issue602345 which contains a patch that adds a Python option to not write .pyc files at all. As far as I know, there is no further work in the direction of PEP 304. Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out. ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
Christian Heimes wrote: > M.-A. Lemburg wrote: >> Why not include the prebuilt libraries of all external libs in SVN >> as well ? > > For one I'm still using Beta 2 of the standard edition and I'm not > allowed to distribute binaries build with the Beta. With the new > pre-build steps it's also very easy to build the dependencies. I don't > like to add more binaries to the svn repos. > >> BTW: Are you including the patented algorithms in the standard >> OpenSSL build or excluding them ? >> >> The patented ones are RC5, IDEA and MDC2: > > [snip] > >> I'd opt for not including these algorithms, as it's just >> too easy for the user to overlook this license requirement. > > Thanks for thinking about license problems! I didn't even think about > checking the licenses since I was under the impression that restricted > algorithms are disabled by default. > > I've disabled IDEA in the makefiles and configure headers of openssl. > I've also added another step to the makefile patcher in build_ssl. It > makes sure that the three algorithms are disabled. > I believe the patent on MDC2 expired this year, though this is not an authoritative opinion. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.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] Build Notes for building trunk with Visual Studio 2008 Express Edition
On 2007-11-23 18:40, Christian Heimes wrote: > M.-A. Lemburg wrote: >> Why not include the prebuilt libraries of all external libs in SVN >> as well ? > > For one I'm still using Beta 2 of the standard edition and I'm not > allowed to distribute binaries build with the Beta. With the new > pre-build steps it's also very easy to build the dependencies. I don't > like to add more binaries to the svn repos. Fair enough - was just thinking that people compiling Python on Windows are probably more interested in compiling the Python code itself, rather than getting the 3rd party tools to compile :-) >> BTW: Are you including the patented algorithms in the standard >> OpenSSL build or excluding them ? >> >> The patented ones are RC5, IDEA and MDC2: > > [snip] > >> I'd opt for not including these algorithms, as it's just >> too easy for the user to overlook this license requirement. > > Thanks for thinking about license problems! I didn't even think about > checking the licenses since I was under the impression that restricted > algorithms are disabled by default. > > I've disabled IDEA in the makefiles and configure headers of openssl. > I've also added another step to the makefile patcher in build_ssl. It > makes sure that the three algorithms are disabled. Thanks. Much appreciated. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 23 2007) >>> Python/Zope Consulting and Support ...http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/ Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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 ___ 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] Backquote deprecation warning
Martin v. Löwis wrote: > I think struct compiling should carry the file name, starting in > PyAST_FromNode. Thanks! I was trying to add the filename to node but it required too many changes. I really wonder why I wasn't touching the compiling struct. Christian ___ 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] Should we do away with unbound methods in Py3k?
> It looks like we're in agreement to drop unbound methods +1 It is a bit cleaner to simply return the unmodified function. Raymond ___ 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] Should we do away with unbound methods in Py3k?
On Nov 22, 2007 11:12 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > It looks like we're in agreement to drop unbound methods and have a > > reasonable set or arguments around it (e.g. keep staticmethod, no > > changes to methods of builtin types, etc.). Do we need a PEP? It's > > essentially a 2-line change in funcobject.c (func_descr_get()) -- plus > > fixing up half a dozen or so unittests that specifically seem to test > > the behavior of unbound methods. > > I'd like to help but after staring at the code for 10 minutes I still > don't get how the descriptor function should be altered. Can you please > give an example to a mer mortal? :) Index: Objects/funcobject.c === --- Objects/funcobject.c(revision 59154) +++ Objects/funcobject.c(working copy) @@ -643,8 +643,10 @@ static PyObject * func_descr_get(PyObject *func, PyObject *obj, PyObject *type) { - if (obj == Py_None) - obj = NULL; + if (obj == Py_None || obj == NULL) { + Py_INCREF(func); + return func; + } return PyMethod_New(func, obj, type); } [well, except those should be tabs not spaces] -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ 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] test_doctest failing
Brett> Looks like Skip's r59137 fix for working with tracing has led to Brett> test_doctest to be broken on 2.5 and the trunk (at least Brett> according to the buildbots). Can someone either revert the Brett> commit or fix it? I would normally do it myself but US Brett> Thanksgiving has me tied up to not do too much beyond bitching Brett> about the amount of buildbot emails I have been getting. =) Sorry. I did verify that it solved the problem I was having with trace & doctest, but I completely forgot to make test after applying that patch. The checkins have been reverted. Skip ___ 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] Decimal news: speedup and stabilization
Facundo Batista wrote: > Mark Dickinson found out that a lot of time was lost internally in > decimal.py when dealing with the Decimal mantissas. > > He changed the way that mantissa was stored, from a tuple of ints, to > a plain string (each character a digit). This achieved a speedup of > around a 40%!!! Given the frequent conversion to and from long integers needed to actually do the calculations, I can actually see how that would be the case. Excellent news. Did you change the Decimal repr to use the same format for the mantissa? > > Three notes: > > - The speedup was measured using two tools I created [*], one > basically tries a lot of use cases, the other use the specification > test cases. Both generate a .py which actually measures the times. Could you also check the performance gain against the telco benchmark which is in the sandbox? [1] The 10-number file is checked into svn along with the test script, and the million-number file is available from Cowlishaw's decimal site [2]. Cheers, Nick. [1] http://svn.python.org/projects/sandbox/trunk/decimal/telco/ [2] http://www2.hursley.ibm.com/decimal/telco.html -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ 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] test_doctest failing
Looks like Skip's r59137 fix for working with tracing has led to test_doctest to be broken on 2.5 and the trunk (at least according to the buildbots). Can someone either revert the commit or fix it? I would normally do it myself but US Thanksgiving has me tied up to not do too much beyond bitching about the amount of buildbot emails I have been getting. =) -Brett ___ 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] Backquote deprecation warning
Christian Heimes wrote: > Should the node structure gain an additional field to drag the filename > around? Why not? Early on in the design of the Pyrex compiler, I made the decision that every parse tree node would contain a source filename and position, down to character resolution. It's paid off enormously, as I can produce highly pinpointed error messages for just about anything at any stage of processing. -- Greg ___ 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] Should we do away with unbound methods in Py3k?
Phillip J. Eby wrote: > class MoneyField(Field): > # does need staticmethod because two_decimal_places > # doesn't take a self > converter = staticmethod(two_decimal_places) Okay, I see what you mean now. But you could just as well wrap it in a function that takes self and discards it, so I still don't think staticmethod is essential in the absence of unbound methods. Not that I would object if it stayed around -- I don't really mind one way or the other. -- Greg ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
On 23/11/2007, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > On 2007-11-23 18:40, Christian Heimes wrote: > > M.-A. Lemburg wrote: > >> Why not include the prebuilt libraries of all external libs in SVN > >> as well ? > > > > For one I'm still using Beta 2 of the standard edition and I'm not > > allowed to distribute binaries build with the Beta. With the new > > pre-build steps it's also very easy to build the dependencies. I don't > > like to add more binaries to the svn repos. > > Fair enough - was just thinking that people compiling Python > on Windows are probably more interested in compiling the Python > code itself, rather than getting the 3rd party tools to compile :-) I'd agree with that, but for the ones I've tried so far, Christian has made it simple enough that it's not really an issue - you simply svn export the externals, and then the build just works. It's possible that TCL/Tk may be harder (particularly as there are 3 packages, TCL, Tk and Tix) - if so, then having binaries for that may be useful. But for the rest, it makes little difference. Paul. ___ 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] ssl module integration with asyncore
Hi there, since ssl module is still in development I thought it would have been better asking such question here instead of on comp.lang.python. I'm interested in using the ssl module with asyncore but since there's no real documentation about it yet I've been not able to write something useful with it. Currently I'm trying to add the SSL support to an asyncore-based FTP server I wrote. I tried to write some code by watching the ssl-related test-suite scripts with no luck since there are no available tests for asyncore available. I tried to play with the wrap_socket() function a little bit but different type of errors are raised every time. I'm sure this happens because I'm not doing things in the right way. Could someone please show me an example code about how the ssl module could be integrated with asyncore? ___ 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] Summary of Tracker Issues
ACTIVITY SUMMARY (11/16/07 - 11/23/07) Tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue number. Do NOT respond to this message. 1321 open (+20) / 11654 closed (+20) / 12975 total (+40) Open issues with patches: 413 Average duration of open issues: 697 days. Median duration of open issues: 825 days. Open Issues Breakdown open 1314 (+19) pending 7 ( +1) Issues Created Or Reopened (41) ___ Python does not honor "CFLAGS" environment variable 11/16/07 CLOSED http://bugs.python.org/issue1453created tebeka Generators break trace functionality 11/17/07 CLOSED http://bugs.python.org/issue1454created cortesi VS2008, quick hack for distutils.msvccompiler11/17/07 http://bugs.python.org/issue1455created tiran py3k, patch unexpected iterator behavior with removal11/18/07 CLOSED http://bugs.python.org/issue1456created JosephArmbruster IDLE - configDialog - new layout for key config 11/18/07 http://bugs.python.org/issue1457created taleinat installer crashes on attempted cancellation 11/18/07 http://bugs.python.org/issue1458created JosephArmbruster Bugs lost on migration from Sourceforge 11/18/07 CLOSED http://bugs.python.org/issue1459created gagenellina codecs utf7 decoding error 11/19/07 CLOSED http://bugs.python.org/issue1460created arnimar 0**0 should raise an error 11/19/07 CLOSED http://bugs.python.org/issue1461created jmgillet About this document refers to SourceForge tracker11/19/07 CLOSED http://bugs.python.org/issue1462created kjohnson Minor error in mimetypes docs11/19/07 CLOSED http://bugs.python.org/issue1463created kjohnson inet_pton redefined while building with windows SDK 6.0 11/19/07 CLOSED http://bugs.python.org/issue1464created weck py3k, patch building python 2.6 with VC Express 2008 Beta2 11/19/07 http://bugs.python.org/issue1465created weck patch Special reporting of NotImplementedError in unittest 11/19/07 CLOSED http://bugs.python.org/issue1466created erik_andersen error in TestResult.addError and TestResult.addFailure 11/19/07 http://bugs.python.org/issue1467created draghuram MSI installer does not include SSL test .pem files 11/19/07 http://bugs.python.org/issue1468created pmoore SSL tests leak memory11/19/07 http://bugs.python.org/issue1469created janssen py3k py3k unit tests are removing %TEMP% dir on Windows 11/20/07 CLOSED http://bugs.python.org/issue1470created tiran py3k ioctl doesn't work properly on 64-bit OpenBSD11/20/07 http://bugs.python.org/issue1471created fbvortex Small bat files to build docs on Windows 11/20/07
Re: [Python-Dev] .pyc location?
Nick> As I recall, the PEP was withdrawn because Skip didn't have the Nick> time and/or level of interest needed to champion it any more, and Nick> nobody else was interested in taking on the task. Correct. I only implemented what I did because it seemed like an interesting concept arising out of a discussion on c.l.py. I personally have never encountered the problems it tries to address so the fact that it remains unaccepted is not a problem for me. It would be better if PEP 304 scratched an itch for its champion. Skip ___ 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] 1324 bugs in the tracker
Facundo Batista schrieb: > 2007/11/23, Christian Heimes <[EMAIL PROTECTED]>: > >> Well, I'm exaggerating a bit but you probably get my point. The core >> developers can't keep up with new bugs and check old bugs at the same >> time. The resources are already stretched thin. But Brett gave me an > > One *fantastic* tool that exists is the subscription to the > "bugs-announce" mail list. > > I wasn't aware of this before. But I subscribed to it, and now I know > about a lot of bugs that potentially interests me. Even better is that you don't even need to subscribe to the mailing list (whose daily traffic may be a bit annoying); reading the gmane.comp.python.bugs newsgroup via gmane is equally useful. Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out. ___ 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] 1324 bugs in the tracker
2007/11/23, Christian Heimes <[EMAIL PROTECTED]>: > Well, I'm exaggerating a bit but you probably get my point. The core > developers can't keep up with new bugs and check old bugs at the same > time. The resources are already stretched thin. But Brett gave me an One *fantastic* tool that exists is the subscription to the "bugs-announce" mail list. I wasn't aware of this before. But I subscribed to it, and now I know about a lot of bugs that potentially interests me. Ok, I don't care about a 80% of the bugs that I receive. But I read the other 20%, and even I solve a small amount of that. It increased my bug-hunting activity a lot! Maybe we should publicize this more. Regards, -- .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
Paul Moore wrote: > Install Visual C++ 2008 Express Edition. Only select Silverlight from > the options (no documentation or SQL Server - Silverlight probably > isn't actually needed either). > I already had the Platform SDK installed, but did nothing to tell VS > about it, or to integrate it. I doubt this is relevant. Even the VS 2008 Express Edition comes with the necessary bits and pieces to build everything. I don't think you need an extra installation of the platform SDK anymore. It should only be required for developers with the Express Edition who want to build a 64bit build. > Start VC. > Open project PCBuild9\pcbuild.sln > Message "Solution Folders are not supported in this version of Visual > Studio. Solution folder 'Solution Items' will be displayed as > unavailable." Select OK. That's harmless but disappointing. The solution folder contains the README.txt for quick access. > Select the release build (Build > Configuration Manager) > > Right click pythoncore > Build > make_buildinfo - succeeded 1 warning (unlink vs _unlink) > make_versioninfo - succeeded > pythoncore - I hit an error in ast.c so I needed to svn up (to > 59136). Succeeded. > > Right click python > Build. Succeeded. > Right click pythonw > Build. Succeeded. > Right click _socket > Build. Succeeded. > Right click _testcapi > Build. Succeeded. > Right click pyexpat > Build. Succeeded. > Right click select > Build. Succeeded. > Right click unicodedata > Build. Succeeded. > Right click winsound > Build. Succeeded. Why are you building the projects step by step? "Build solution" or F6 builds everything in the right order. > bz2 > --- > > The include dir is a macro, and I can't work out how to override the > default (which is bzip2-1.0.3). So I stuck to 1.0.3 and exported it > from Python svn, as per the instructions. You can alter the user macros from the Property Manager. It's a bit hidden in the GUI under View -> Other Windows -> Property Manager. In the property manager pick a random project and configuration and edit the pyproject property file. Almost every project inherits settings directly or indirectly from pyproject. The macros are under "User Macros". You have to safe the property file all by yourself. My Beta 2 doesn't save the property file with "Save All". > _sqlite3 > > > Again, couldn't work out how to change the macro, so I stuck with the > external from svn (sqlite-source-3.3.4). > > The pre-link step failed with an error about not finding TCL. I edited > the prelink step to include a /DNO_TCL flag on the cl command. There > may be a better approach - I don't know if not having TCL is an issue > for Python's use of sqlite. Hey, that's a good idea. The TCL error isn't a critical error although VS reports it so. > _tkinter and _bsddb > --- > > The instructions suggest using VS 2003 to build the dependencies. I > don't have VS 2003 and don't have the time at the moment to > investigate further. bsddb is automatically build by a build step. But you have to convert the project files in build_win32 to VS 2008 first. Simply open the solution file and let VS convert the projects. tcl/tk isn't integrated in the new build process yet. I think we have to update the dependencies first. > _ssl > > > Christian has been making changes to allow this to build without Perl, > so I gave it a try. I used openssl 0.9.8g, which I extracted to the > build directory (I noticed afterwards that this is the same version as > in Python svn, so I could have used the svn external!) > > I needed to download nasm (nasm.sf.net) version 2.00rc1, and rename > nasm.exe to nasmw.exe and put it on my PATH. > > Build succeeded, no issues. You still need Perl if you are using an official download of openssl. I've added the pre-build assembly and makefiles in the svn external at svn.python.org Christian ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
On 23/11/2007, Christian Heimes <[EMAIL PROTECTED]> wrote: > I've a preliminary patch for distutils.msvccompiler at > http://bugs.python.org/issue1455. I haven't applied the patch because > it's not backward compatible with VC 7 and VS 6. We haven't yet agreed > how to address backward compatibility. I looked at this, and it seems like more of a change than is really needed. But it's a LONG time since I looked at the distutils compiler stuff. I think that the VC7 stuff has provision for checking the registry first, then looking for one specific key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0 would be the VS 2008 equivalent) and if it's there but no others, asking the user to run vsvars.bat (and then relying on PATH being set right). Something like that might work for VS 2008 as well. > I really like to throw out the old junk to have a clean script. Maybe I > could leave the old msvccompiler alone and put the new code into > distutils.msvc9compiler? That might work. I'm not sure if throwing the old stuff out is OK. As long as we have a VC6 directory (however unmaintained it may be) I'd say we need the equivalent distutils support. Paul. ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
On 2007-11-23 16:59, Christian Heimes wrote: > Paul Moore wrote: >> _ssl >> >> >> Christian has been making changes to allow this to build without Perl, >> so I gave it a try. I used openssl 0.9.8g, which I extracted to the >> build directory (I noticed afterwards that this is the same version as >> in Python svn, so I could have used the svn external!) >> >> I needed to download nasm (nasm.sf.net) version 2.00rc1, and rename >> nasm.exe to nasmw.exe and put it on my PATH. >> >> Build succeeded, no issues. > > You still need Perl if you are using an official download of openssl. > I've added the pre-build assembly and makefiles in the svn external at > svn.python.org Why not include the prebuilt libraries of all external libs in SVN as well ? BTW: Are you including the patented algorithms in the standard OpenSSL build or excluding them ? The patented ones are RC5, IDEA and MDC2: http://svn.python.org/view/external/openssl-0.9.8g/README Here's a previous discussion: http://mail.python.org/pipermail/python-dev/2006-August/068055.html Here's what MediaCrypt has to say about requiring a license for IDEA: http://www.mediacrypt.com/_contents/20_support/204010_faq_bus.asp Note that in the case of IDEA, any commercial use will require getting a license to the patented algorithm first (costs start at EUR 15 for a single use license). I'd opt for not including these algorithms, as it's just too easy for the user to overlook this license requirement. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 23 2007) >>> Python/Zope Consulting and Support ...http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/ Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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 ___ 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] 1324 bugs in the tracker
2007/11/23, Christian Heimes <[EMAIL PROTECTED]>: > The Python bug tracker contains more than 1,300 bugs and it's growing. > And growing ... and growing. I'm picking a bug once in a while or > tossing some invalid bugs away but it's a helpless cause. The bugs are > augmenting with anybody stopping them. Yes. I even created a web page to facilitate the view of how much each bug is considered, and I normally use it to take a random pick: http://www.taniquetil.com.ar/facundo/py_tickets.html > won't need developer access to the svn. Instead their task is cleaning > up the tracker, categorizing bugs and checking patches. The tracker sure > contains a lot of outdated junk and already fixed bugs. One way to do this is to create a monthly (or each two months) a bug day. This way we can invite people that starts working on this (and with luck they'll continue with it). Regards, -- .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
Paul Moore wrote: > I have just built the current trunk version of Python on Windows, > using the new PCBuild9 directory, and Visual Studio 2008 Express > Edition. > > Everything went extremely well. I include below my notes on what I > did, for reference. To be honest, there's nothing in here that really > warrants a change to the readme.txt - to all intents and purposes, the > process "just works". My experience also. Thanks v. much to Christian for the work on this one. > _ssl > > > Christian has been making changes to allow this to build without Perl, > so I gave it a try. I used openssl 0.9.8g, which I extracted to the > build directory (I noticed afterwards that this is the same version as > in Python svn, so I could have used the svn external!) > > I needed to download nasm (nasm.sf.net) version 2.00rc1, and rename > nasm.exe to nasmw.exe and put it on my PATH. Ah. Thanks for that last bit. I thought this might not build without the full VS, so I didn't try poking round for a nasm-alike. I managed to fudge distutils around sufficiently to build the standard Pyrex primes testcase as an extension. I noticed that Christian has committed patches to the py3k trunk which do useful things with the vcvars.bat file to pick up the compiler environment, so I was going to email him privately to look at backporting those into 2.6. This, my first experience of hacking distutils, felt a little like clambering over a construction site, with lots of ungainly "if it's v6; if it's v7" stuff obviously reflecting the vagaries of Microsoft's registry layout changes over the different compiler flavours. For practicality's sake I'd very much like to help get this to the point where you can build Python *and* extensions with the VS Express compilers (including, critically, the pywin32 stuff). TJG ___ 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] Should we do away with unbound methods in Py3k?
At 08:19 PM 11/22/2007 -0800, Guido van Rossum wrote: >It looks like we're in agreement to drop unbound methods and have a >reasonable set or arguments around it (e.g. keep staticmethod, no >changes to methods of builtin types, etc.). Do we need a PEP? It's >essentially a 2-line change in funcobject.c (func_descr_get()) -- plus >fixing up half a dozen or so unittests that specifically seem to test >the behavior of unbound methods. Since the only meaningful difference between an unbound method and a function is the availability of the im_class attribute, I Googled 'im_class ext:py' to see what's using it. There were 314 hits uses in published code, and I skimmed the first 60 or 70 of those. Of the ones I looked at, relatively few actually do anything with unbound methods specifically. Most are just custom pickling or persistence for methods, or method replacements like a "weakref method" that doesn't keep a strong reference to im_self. However, a few uses relevant to unbound methods turned up, however. Some documentation tools, an AOP library, an xreload()-like module reloader from Enthought, plus one usage in the stdlib. There were also a few modules where it was difficult to tell if unbound methods were actually important. While for most of the documentation tools it was probably not relevant, there were some (like a method deprecation utility) that looked like they would lose functionality by not being able to get the im_class of an object. The stdlib usage is in the unittest module: the test loading machinery needs to know the class of an unbound method so it knows what TestCase subclass to instantiate, when loading a single test by name. This could probably be worked around by making the routine keep track of the object from which the target object was retrieved. This is far from a comprehensive survey; 'UnboundMethodType ext:py' turns up 102 more hits, including another testing tool that uses unbound methods in a different way. There are also usage patterns that can't easily be searched for. For example, code that wants to be able to distinguish static methods and instance methods at the class level. Most of these use cases could probably be worked around, with sufficient effort. Many will probably have bigger problems porting to 3.0 than the absence of unbound methods. And I don't personally have a horse in this race, as my own code is surprisingly free of im_class use. Actually, given how many places my code is peppered with '.im_func' calls to *unwrap* unbound methods and reuse them in other classes, I probably lean more towards getting rid of them. :) ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
On 23/11/2007, Christian Heimes <[EMAIL PROTECTED]> wrote: > bsddb is automatically build by a build step. But you have to convert > the project files in build_win32 to VS 2008 first. Simply open the > solution file and let VS convert the projects. VS 2008 Express doesn't have a devenv command, so the pre-link step doesn't work. You need to open the bsddb project file, and build db_static by hand. For a debug Python, you need the Debug configuration, for a release Python you need the Release configuration. Beware - the default config is Debug_ASCII which is not checked by the pre-link step. So, from a checkout of Python, plus the various svn externals: - dowload nasm, install it somewhere on your PATH, and copy nasm.exe to nasmw.exe (Why did you use nasmw.exe rather than nasm.exe? Is there a difference in the version you have?) - Open the bsddb solution file, and build debug and release versions of db_static - Open the Python pcbuild solution file, and build the solution. You'll get a total of 2 failures and 18 successes. Of the failures, one (_sqlite3) is not actually fatal (the pre-link step fails, and that only the first time), and the module is actually built correctly. The other is _tkinter, which isn't sorted out yet. You can then run the tests with rt.bat. If you have an openssl.exe on your path, test_socket_ssl may hang. Otherwise, everything should pass, apart from test_tcl. (Actually, there's a failure in test_doctest right now, seems to have come in with r59137, but I don't have time to diagnose right now). This is the case for both trunk and py3k (ignoring genuine test failures). Paul. ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
M.-A. Lemburg wrote: > Why not include the prebuilt libraries of all external libs in SVN > as well ? For one I'm still using Beta 2 of the standard edition and I'm not allowed to distribute binaries build with the Beta. With the new pre-build steps it's also very easy to build the dependencies. I don't like to add more binaries to the svn repos. > > BTW: Are you including the patented algorithms in the standard > OpenSSL build or excluding them ? > > The patented ones are RC5, IDEA and MDC2: [snip] > I'd opt for not including these algorithms, as it's just > too easy for the user to overlook this license requirement. Thanks for thinking about license problems! I didn't even think about checking the licenses since I was under the impression that restricted algorithms are disabled by default. I've disabled IDEA in the makefiles and configure headers of openssl. I've also added another step to the makefile patcher in build_ssl. It makes sure that the three algorithms are disabled. Christian ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
On 23/11/2007, Christian Heimes <[EMAIL PROTECTED]> wrote: > Why are you building the projects step by step? "Build solution" or F6 > builds everything in the right order. Because I'm clueless :-) I knew there must be a way of building the lot, but couldn't find it - I haven't used Visual Studio since the days of VC6, and what little I did know, I've forgotten :-) Thanks for the tip. > You can alter the user macros from the Property Manager. It's a bit > hidden in the GUI under View -> Other Windows -> Property Manager. In > the property manager pick a random project and configuration and edit > the pyproject property file. Almost every project inherits settings > directly or indirectly from pyproject. The macros are under "User Macros". > You have to safe the property file all by yourself. My Beta 2 doesn't > save the property file with "Save All". Thanks again for the tip :-) > You still need Perl if you are using an official download of openssl. > I've added the pre-build assembly and makefiles in the svn external at > svn.python.org I don't think I did... I'm pretty sure I used the ones from openssl.org. But it's no big deal. Whatever I did seemed to work. Paul. ___ 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] 1324 bugs in the tracker
Facundo Batista schrieb: >> won't need developer access to the svn. Instead their task is cleaning >> up the tracker, categorizing bugs and checking patches. The tracker sure >> contains a lot of outdated junk and already fixed bugs. > > One way to do this is to create a monthly (or each two months) a bug > day. This way we can invite people that starts working on this (and > with luck they'll continue with it). Exactly. The bug day brings together volunteers and developers, and it also helps discussion between developers (which often takes long via the tracker) because of IRC. IOW, +1. It would be a good thing to have a regular bug day. Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out. ___ 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] 1324 bugs in the tracker
Dear fellow Python developers! The Python bug tracker contains more than 1,300 bugs and it's growing. And growing ... and growing. I'm picking a bug once in a while or tossing some invalid bugs away but it's a helpless cause. The bugs are augmenting with anybody stopping them. Well, I'm exaggerating a bit but you probably get my point. The core developers can't keep up with new bugs and check old bugs at the same time. The resources are already stretched thin. But Brett gave me an idea how we could solve the problem when he posted the link to http://www.djangoproject.com/documentation/contributing/#ticket-triage. What do you think about inviting some trustworthy and experienced Python users to join the cause? They don't need to solve every problem and they won't need developer access to the svn. Instead their task is cleaning up the tracker, categorizing bugs and checking patches. The tracker sure contains a lot of outdated junk and already fixed bugs. A group of five to ten highly motivated people could squall through the tracker smashing all those ugly bugs like the infantry in Starship Troopers - but hopefully with less loss on our side. :] Christian ___ 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] Backquote deprecation warning
Hello! I'm having a bit of a trouble getting the deprecation warning for backquotes `repr` right. Neither the ast_for_* functions in Python/ast.c nor the node structures have access to the filename. Should the node structure gain an additional field to drag the filename around? Or can we simply life with the fact that the user won't get a filename in the deprecation warning? Christian ___ 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] Should we do away with unbound methods in Py3k?
At 07:57 PM 11/23/2007 +1300, Greg Ewing wrote: >Phillip J. Eby wrote: >>If you are configuring it per-class and accessing it per-instance, >>and reusing an existing function, you have to make it a staticmethod. > >I don't understand that. Can you provide an example? def two_decimal_places(text): # ... class Field: # doesn't need staticmethod because str isn't a function converter = str def __init__(self, title): self.title = title class MoneyField(Field): # does need staticmethod because two_decimal_places # doesn't take a self converter = staticmethod(two_decimal_places) def get_input(field): return field.converter(raw_input(field.title+': ')) >> > some subclasser later finds that he wants access to >> > 'self'? >>Then he overrides it with a normal method. > >If that works, I don't see why making the default >method a normal method wouldn't work also. Because sometimes you want to reuse an existing function, as shown above. ___ 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] 1324 bugs in the tracker
Christian Heimes schrieb: > Dear fellow Python developers! > > The Python bug tracker contains more than 1,300 bugs and it's growing. Not speaking of the 432 bugs that weren't migrated from SourceForge (though I don't know how many of them were open). > And growing ... and growing. I'm picking a bug once in a while or > tossing some invalid bugs away but it's a helpless cause. The bugs are > augmenting with anybody stopping them. This is unfortunately not an easy problem. I've had some thoughts about it myself, and done some forays through the tracker closing "easy" bugs, but it has become more difficult to find such lately. > Well, I'm exaggerating a bit but you probably get my point. The core > developers can't keep up with new bugs and check old bugs at the same > time. The resources are already stretched thin. But Brett gave me an > idea how we could solve the problem when he posted the link to > http://www.djangoproject.com/documentation/contributing/#ticket-triage. > > What do you think about inviting some trustworthy and experienced Python > users to join the cause? They don't need to solve every problem and they > won't need developer access to the svn. Instead their task is cleaning > up the tracker, categorizing bugs and checking patches. The tracker sure > contains a lot of outdated junk and already fixed bugs. > > A group of five to ten highly motivated people could squall through the > tracker smashing all those ugly bugs like the infantry in Starship > Troopers - but hopefully with less loss on our side. :] Many old issues in the bug tracker fall in one of these categories: * Odd problem on a non-mainstream platform * Minor problem that is hard to fix * Minor problem that is in theory easy to fix, but there is no consensus on how to fix it * Minor problem that is easy but very tedious to fix * Major problem that is very hard to fix * Problem that one developer is more qualified to fix than all the others, but he is retired * Behavior about which even developers cannot consent whether it is a problem * Patch for a minor problem that is correct in theory, but will cause backwards compatibility issues * Patch for a minor problem that is not correct, but points in the right direction And of course, many RFEs that don't have a chance of being implemented without someone writing a patch and making a good cause on python-dev, which probably nobody except the OP will have an interest in. None of these categories are issues that you can just close, especially if you are new to Python core development, if we want to have a satisfactory resolution to each closed bug (which was the policy, as far as I was concerned, but it can be changed of course). On the other hand, there are kinds of issues than can be dealt with quickly: * Duplicated issues which were bug/patch pairs at SF * Issues where developers requested OP feedback but got none Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out. ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
Tim Golden wrote: > Ah. Thanks for that last bit. I thought this might not build > without the full VS, so I didn't try poking round for a > nasm-alike. I've changed the build_ssl.py script to build openssl for nasm instead of ml/masm. The MS assembler for x86 is only available in the standard and professional version. While it's possible to extract it from the SDK package I don't see the point in installing several hundreds of MB when less than one MB free a free assembler is more than fine. > I managed to fudge distutils around sufficiently to build > the standard Pyrex primes testcase as an extension. I noticed > that Christian has committed patches to the py3k trunk which > do useful things with the vcvars.bat file to pick up the > compiler environment, so I was going to email him privately to > look at backporting those into 2.6. This, my first experience > of hacking distutils, felt a little like clambering over a > construction site, with lots of ungainly "if it's v6; if it's v7" > stuff obviously reflecting the vagaries of Microsoft's registry > layout changes over the different compiler flavours. > > For practicality's sake I'd very much like to help get this > to the point where you can build Python *and* extensions with > the VS Express compilers (including, critically, the pywin32 > stuff). I've a preliminary patch for distutils.msvccompiler at http://bugs.python.org/issue1455. I haven't applied the patch because it's not backward compatible with VC 7 and VS 6. We haven't yet agreed how to address backward compatibility. I really like to throw out the old junk to have a clean script. Maybe I could leave the old msvccompiler alone and put the new code into distutils.msvc9compiler? Christian ___ 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] .pyc location?
Andreas Raab wrote: > While googling this issue, I noticed that the status of PEP 304 says > "withdrawn" but since most of the discussion around it seems to be a > couple of years old, I thought I'd ask if anyone has done something in > this area recently. If not, a pointer to the place which manages these > mappings (or a starting point for further digging) would be greatly welcome. As I recall, the PEP was withdrawn because Skip didn't have the time and/or level of interest needed to champion it any more, and nobody else was interested in taking on the task. What opposition that existed to the idea was based on the question of whether or not the problem was one that was worth spending significant effort on solving. Issues with collocating the compiled files with the source files do arise occasionally, but they can generally be resolved by having root run compileall [1] over the affected directories. In cases where users are able to modify source files (hence leading to the need to recompile them after installation), those users are also typically able to write the necessary .pyc files to the same directory. For the optimisation cases the PEP mentions (network drives, RAM drives), you can get the same effect (and more) by caching the whole application. Cheers, Nick. [1] http://docs.python.org/lib/module-compileall.html -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
On 23/11/2007, Tim Golden <[EMAIL PROTECTED]> wrote: > For practicality's sake I'd very much like to help get this > to the point where you can build Python *and* extensions with > the VS Express compilers (including, critically, the pywin32 > stuff). Pywin32 needs MFC (and at one stage, ATL, although I think that was a mistake and has been fixed). As far as I know, the Express edition doesn't include MFC or ATL - VS 2005 Express certainly didn't. Paul. ___ 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] .pyc location?
Nick Coghlan wrote: > Issues with collocating the compiled files with the source files do > arise occasionally, but they can generally be resolved by having root > run compileall [1] over the affected directories. In cases where users > are able to modify source files (hence leading to the need to recompile > them after installation), those users are also typically able to write > the necessary .pyc files to the same directory. Thanks, I'll try using compileall before digging deeper. If the file times are preserved correctly by the various installers this should do the trick. Cheers, - Andreas ___ 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] Decimal news: speedup and stabilization
Hi people! Two news. A big speed up, and now we reached some stable state. Mark Dickinson found out that a lot of time was lost internally in decimal.py when dealing with the Decimal mantissas. He changed the way that mantissa was stored, from a tuple of ints, to a plain string (each character a digit). This achieved a speedup of around a 40%!!! Three notes: - The speedup was measured using two tools I created [*], one basically tries a lot of use cases, the other use the specification test cases. Both generate a .py which actually measures the times. - No API was changed, and this a good thing, :) - The change is somewhat big. But as the speedup is important, and the API es untouched, I considered it was something that worths it. After several months with a lot of work here, no more big changes are planned to this module, so I will backport it to 2.5.3 (when the trunk gets unfrozen). Note that the module complies with the latest specification and with the latest test cases (that are from one month ago!). Thanks Mark for all your effort here! [*] http://tools.assembla.com/svn/homedevel/decimal/ Regards, -- .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ ___ 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] .pyc location?
On Nov 23, 2007 10:02 AM, Andreas Raab <[EMAIL PROTECTED]> wrote: > Nick Coghlan wrote: > > Issues with collocating the compiled files with the source files do > > arise occasionally, but they can generally be resolved by having root > > run compileall [1] over the affected directories. In cases where users > > are able to modify source files (hence leading to the need to recompile > > them after installation), those users are also typically able to write > > the necessary .pyc files to the same directory. > > Thanks, I'll try using compileall before digging deeper. If the file > times are preserved correctly by the various installers this should do > the trick. There is also importlib which is import implemented in Python (currently in Python's sandbox in svn). Skipping .pyc compilation is not hard in what instance as you just subclass something and overload a single method. -Brett ___ 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] ssl module integration with asyncore
Hi there, since ssl module is still in development I thought it would have been better asking such question here instead of on comp.lang.python. I'm interested in using the ssl module with asyncore but since there's no real documentation about it yet I've been not able to write something useful with it. Currently I'm trying to add the SSL support to an asyncore-based FTP server I wrote. I tried to write some code by watching the ssl-related test-suite scripts with no luck since there are no available tests for asyncore available. I tried to play with the wrap_socket() function a little bit but different types of error are raised every time. I'm sure this happens because I'm not doing things in the right way. Could someone please show me an example code about how the ssl module could be integrated with asyncore? ___ 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] Build Notes for building trunk with Visual Studio 2008 Express Edition
> VS 2008 Express doesn't have a devenv command Can you please try out whether the buildbot commands have any chance to work with the Express edition? Buildbot operators will have to install VS 2008 one way or the other, and it would be nice if you could provide instructions for them what precisely to install, in what order, to make it work. Currently, the build slaves run, in order Tools\buildbot\build.bat Tools\buildbot\test.bat Tools\buildbot\clean.bat These will of course need to be adjusted after a switchover, but they heavily rely on devenv.com working. Regards, Martin ___ 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] Backquote deprecation warning
> Should the node structure gain an additional field to drag the filename > around? Or can we simply life with the fact that the user won't get a > filename in the deprecation warning? I think struct compiling should carry the file name, starting in PyAST_FromNode. Regards, Martin ___ 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] test_doctest failing
On Fri, Nov 23, 2007 at 10:32:25PM -0600, [EMAIL PROTECTED] wrote: -> -> Brett> Looks like Skip's r59137 fix for working with tracing has led to -> Brett> test_doctest to be broken on 2.5 and the trunk (at least -> Brett> according to the buildbots). Can someone either revert the -> Brett> commit or fix it? I would normally do it myself but US -> Brett> Thanksgiving has me tied up to not do too much beyond bitching -> Brett> about the amount of buildbot emails I have been getting. =) -> -> Sorry. I did verify that it solved the problem I was having with trace & -> doctest, but I completely forgot to make test after applying that patch. -> The checkins have been reverted. Skip, this set_trace rewrite fixes the problem in both 25-maint and trunk: def set_trace(self, frame=None): self.__debugger_used = True if frame is None: frame = sys._getframe().f_back pdb.Pdb.set_trace(self, frame) from the old: def set_trace(self): self.__debugger_used = True pdb.Pdb.set_trace(self) This was an actual bug: the patch didn't correctly allow for the fact that Bdb.set_trace(self, None) went and got the calling frame -- which, when the function was overriden in a subclass, was the subclass function. Let me know if you want a formal patch or somethin'. And thanks for tackling the doctest/trace situation - some users have been complaining about it to me and it was on my list for tomorrow! Happy post-Thanksgiving, all! cheers, --titus ___ 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] Should we do away with unbound methods in Py3k?
Guido van Rossum wrote: > > Index: Objects/funcobject.c > === > --- Objects/funcobject.c(revision 59154) > +++ Objects/funcobject.c(working copy) > @@ -643,8 +643,10 @@ > static PyObject * > func_descr_get(PyObject *func, PyObject *obj, PyObject *type) > { > - if (obj == Py_None) > - obj = NULL; > + if (obj == Py_None || obj == NULL) { > + Py_INCREF(func); > + return func; > + } > return PyMethod_New(func, obj, type); > } > > [well, except those should be tabs not spaces] I've created a preliminary patch. Several unit tests are still failing. The patch is also changing some semantics. For example in Python 2.5: >>> import inspect >>> class Class(object): ... def method(self): pass ... >>> inspect.ismethod(Class().method) True >>> inspect.ismethod(Class.method) True But in py3k: >>> import inspect >>> class Class: ... def method(self): pass ... >>> inspect.ismethod(Class().method) True >>> inspect.ismethod(Class.method) False # !!! Without support from the descriptor it's not possible to distinguish a function from an unbound method any more. I like to add im_class to the function object. I don't see negative side effects, do you? /* Bind a function to an object */ static PyObject * func_descr_get(PyObject *func, PyObject *obj, PyObject *type) { if (obj == Py_None || obj == NULL) { Py_INCREF(func); if (type) { PyObject_SetAttrString(func, "im_class", type); } else { PyObject_SetAttrString(func, "im_class", Py_None); } return func; } return PyMethod_New(func, obj, type); } http://bugs.python.org/issue1493 Christian ___ 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