Re: [Python-Dev] PEP 3147 working implementation
2010/4/6 Barry Warsaw : > On Apr 01, 2010, at 04:12 PM, Barry Warsaw wrote: > >>I now have a working implementation of PEP 3147 which passes all the existing, >>and new, tests. I'm sure there's still work to do, but I think the branch >>is in good enough shape to start getting some feedback from python-dev. > > Thanks to Antoine for doing a review of the diff on Rietveld. I've uploaded a > second patch set that addresses these and other issues. > > I think there are still a few corners of PEP 3147 not yet implemented, and I > need to update some documentation, but I think it's getting close enough for > consideration soon. The Rietveld issue is here: > > http://codereview.appspot.com/842043/show I've now added a review, too. -- Regards, Benjamin ___ 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] iso-2022 and issue 7472: question for the experts
On Wed, 07 Apr 2010 02:18:13 +0200, =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= wrote: > > Can someone (Steve Turnbull?) confirm or refute my analysis? > > Refute, see http://bugs.python.org/issue804885 > > > ISO-2022 input will > > be 7-bit, and the except will not trigger > > This conclusion is false: > > 1. it is 7-bit > > py> unichr(913).encode("iso-2022-jp") > '\x1b$B&!\x1b(B' > > 2. the except *will* trigger, anyway. > > py> unichr(913).encode("ascii") > Traceback (most recent call last): > File "", line 1, in > UnicodeEncodeError: 'ascii' codec can't encode character u'\u0391' in > position 0: ordinal not in range(128) My understanding, however, is that what comes out of get_payload is always a string, not unicode. That is, it would have to be already encoded, and the encode('ascii') trick is just to see if there are any 8 bit bytes. Tracing the code a little farther, though, I now understand that the *input* encoding that the payload is in (which will on output be encoded as iso-2022-xx) can be an eight bit encoding. So, now I understand the patch, and will fix the spelling mistake. Thanks. -- R. David Murray www.bitdance.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] PEP 3147 working implementation
On Apr 01, 2010, at 04:12 PM, Barry Warsaw wrote: >I now have a working implementation of PEP 3147 which passes all the existing, >and new, tests. I'm sure there's still work to do, but I think the branch >is in good enough shape to start getting some feedback from python-dev. Thanks to Antoine for doing a review of the diff on Rietveld. I've uploaded a second patch set that addresses these and other issues. I think there are still a few corners of PEP 3147 not yet implemented, and I need to update some documentation, but I think it's getting close enough for consideration soon. The Rietveld issue is here: http://codereview.appspot.com/842043/show Cheers, -Barry signature.asc Description: PGP signature ___ 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] Python and compilers
Greg Ewing wrote: > Michael Foord wrote: > >> *However*, a project that would be interesting - and that I have >> wanted to do in order to program microcontrollers with *very* small >> memory address spaces [1] - would be to compile a static subset of >> Python down to C. > > That would be an excellent project -- if the result were > successful, I'd be interested in using it! I thought RPython already supported this? (admittedly, my knowledge of of the inner workings of PyPy is fairly sketchy, but I thought static compilation of RPython to a variety of backend targets was one of the key building blocks) Cheers, 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] stabilizing for a release
Let's do it. Please no commits to the trunk which are not aimed at fixing the current buildbot failures. Thank you! 2010/4/6 "Martin v. Löwis" : > Benjamin Peterson wrote: >> I propose that we freeze the trunk except for fixes for the buildbots. >> Thoughts? > > Freezing sounds fine with me. > > Martin > -- Regards, Benjamin ___ 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] iso-2022 and issue 7472: question for the experts
> Can someone (Steve Turnbull?) confirm or refute my analysis? Refute, see http://bugs.python.org/issue804885 > ISO-2022 input will > be 7-bit, and the except will not trigger This conclusion is false: 1. it is 7-bit py> unichr(913).encode("iso-2022-jp") '\x1b$B&!\x1b(B' 2. the except *will* trigger, anyway. py> unichr(913).encode("ascii") Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\u0391' in position 0: ordinal not in range(128) This issue doesn't get noticed, because it doesn't hurt today's email readers and MTAs to process 8-bit MIME, even if 7-bit had been sufficient. HTH, Martin P.S. Notice that Tokio's original patch had the spelling right. ___ 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] Scope object (Re: nonlocals() function?)
On Tue, 6 Apr 2010 04:25:08 pm Cesare Di Mauro wrote: > It will certainly. There's MUCH that can be optimized to let CPython > squeeze more performance from static analysis (even a gross one) on > locals. [...] > They are just "dummy" examples, but can make it clear how far > optimizations can go with static analysis on locals. Python is a > language that make it possible to use such analysis at compile time, > and I think it is a very good thing. I'm not opposed to the idea of optimisations in general (far from it!) but in case anyone is thinking about doing any work in this area, please be careful about floating point optimisations. E.g. given a float x, you can't assume that x*0 == 0. Nor can you assume that 0-x is the same as -x. (The second is *almost* always correct, except for one float value.) See, for example, the various writings by Professor Kahan: http://www.drdobbs.com/184410314 http://www.cs.berkeley.edu/~wkahan/ Most of the issues discussed apply to languages that deal with floats at a lower level than Python does, but still, simple minded optimizations will break corner cases no matter what language you use. -- Steven D'Aprano ___ 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] stabilizing for a release
Benjamin Peterson wrote: > I propose that we freeze the trunk except for fixes for the buildbots. > Thoughts? Freezing sounds fine with me. 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
[Python-Dev] iso-2022 and issue 7472: question for the experts
A long time ago (in a galaxy far far...no, wrong show) Er, as I was saying, a long time ago Barry applied a patch to email that went more or less like this: ndex: email/Encoders.py === --- email/Encoders.py (revision 35918) +++ email/Encoders.py (revision 35919) @@ -84,7 +83,13 @@ try: orig.encode('ascii') except UnicodeError: -msg['Content-Transfer-Encoding'] = '8bit' +# iso-2022-* is non-ASCII but still 7-bit +charset = msg.get_charset() +output_cset = charset and charset.output_charset +if output_cset and output_cset.lower().startswith('iso-2202-'): +msg['Content-Transfer-Encoding'] = '7bit' +else: +msg['Content-Transfer-Encoding'] = '8bit' else: msg['Content-Transfer-Encoding'] = '7bit' Nobody noticed the typo (2202 instead of 2022) until Yukihiro reported it in the issue. No one has complained about the code not working. There are no unit tests that cover the code (all tests pass with or without the patch, and alternatively with or without correcting the typo). Reading the standards, it looks to me like either the ISO-2022 input will be 7-bit, and the except will not trigger, or it will be invalid, because 8bit, and so should be set to 8bit just like all the other cases where there's invalid 8bit data. So I think this patch should just be reverted. Can someone (Steve Turnbull?) confirm or refute my analysis? -- R. David Murray www.bitdance.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
[Python-Dev] stabilizing for a release
I propose that we freeze the trunk except for fixes for the buildbots. Thoughts? -- Regards, Benjamin ___ 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] Python and compilers
On 06/04/2010 23:34, Michael Foord wrote: On 06/04/2010 23:31, "Martin v. Löwis" wrote: will...@ufpa.br wrote: First, thank you for all opnion. Each one was considered. I think the better question would be: I have to develop a project that involves compilers, and being a fan of Python, I thought about making a compiler for it (most basic idea involving Pythin and compilers). But I saw that I can use what I learned from compilers not only to create a compiler. What is the area of developing the Python interpreter that I could build my project, and please give me interesting ideas for the project. I don't think the question is necessarily off-topic. I can propose two projects, related to Python core: - 2to3 pattern compiler: 2to3 currently uses an interpreter for pattern matching. It does "compile" the patterns into some intermediate form, however, that is actually interpreted with an interpreter written in Python (actually, it is self-interpreted). It might be interesting to compile the pattern into actual Python code, with the hope of it executing faster than it does now (and yes, I proposed a similar, but different GSoC topic also; the two approaches are orthogonal, though). - IDLE code completion. Currently, IDLE has some form of code completion, which is fairly limited. It might be useful to produce a better code completion library, one that works more statically and less based on introspection. In particular, optimistic type inference might help (optimistic in the sense "if foo has a method .isalpha, it probably is a string). In code completion, exact type inference isn't necessary; giving a superset (i.e. a union type) might still be helpful. This would be very useful to many Python IDE projects. Getting it right is one thing, getting it fast enough to be useful is another (i.e. it is a difficult problem) - but yes, could be both interesting and useful. A good basis for a project like would be PySmell (by Orestis Markou), which intended to provide this but was never completed: http://code.google.com/p/pysmell/ It would make a great gsoc project as well. Michael Michael In addition, to-python compilers may also be interesting in various HTML templating languages, e.g. Django templating, Zope page templates, and the like (although some of them already have compilers of some form on their own). HTH, 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/fuzzyman%40voidspace.org.uk -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. ___ 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] Python and compilers
On 06/04/2010 23:31, "Martin v. Löwis" wrote: will...@ufpa.br wrote: First, thank you for all opnion. Each one was considered. I think the better question would be: I have to develop a project that involves compilers, and being a fan of Python, I thought about making a compiler for it (most basic idea involving Pythin and compilers). But I saw that I can use what I learned from compilers not only to create a compiler. What is the area of developing the Python interpreter that I could build my project, and please give me interesting ideas for the project. I don't think the question is necessarily off-topic. I can propose two projects, related to Python core: - 2to3 pattern compiler: 2to3 currently uses an interpreter for pattern matching. It does "compile" the patterns into some intermediate form, however, that is actually interpreted with an interpreter written in Python (actually, it is self-interpreted). It might be interesting to compile the pattern into actual Python code, with the hope of it executing faster than it does now (and yes, I proposed a similar, but different GSoC topic also; the two approaches are orthogonal, though). - IDLE code completion. Currently, IDLE has some form of code completion, which is fairly limited. It might be useful to produce a better code completion library, one that works more statically and less based on introspection. In particular, optimistic type inference might help (optimistic in the sense "if foo has a method .isalpha, it probably is a string). In code completion, exact type inference isn't necessary; giving a superset (i.e. a union type) might still be helpful. This would be very useful to many Python IDE projects. Getting it right is one thing, getting it fast enough to be useful is another (i.e. it is a difficult problem) - but yes, could be both interesting and useful. Michael In addition, to-python compilers may also be interesting in various HTML templating languages, e.g. Django templating, Zope page templates, and the like (although some of them already have compilers of some form on their own). HTH, 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/fuzzyman%40voidspace.org.uk -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. ___ 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] Python and compilers
will...@ufpa.br wrote: > First, thank you for all opnion. Each one was considered. > I think the better question would be: > I have to develop a project that involves compilers, and being a fan of > Python, I thought about making a compiler for it (most basic idea involving > Pythin and compilers). But I saw that I can use what I learned from > compilers not only to create a compiler. What is the area of developing the > Python interpreter that I could build my project, and please give me > interesting ideas for the project. I don't think the question is necessarily off-topic. I can propose two projects, related to Python core: - 2to3 pattern compiler: 2to3 currently uses an interpreter for pattern matching. It does "compile" the patterns into some intermediate form, however, that is actually interpreted with an interpreter written in Python (actually, it is self-interpreted). It might be interesting to compile the pattern into actual Python code, with the hope of it executing faster than it does now (and yes, I proposed a similar, but different GSoC topic also; the two approaches are orthogonal, though). - IDLE code completion. Currently, IDLE has some form of code completion, which is fairly limited. It might be useful to produce a better code completion library, one that works more statically and less based on introspection. In particular, optimistic type inference might help (optimistic in the sense "if foo has a method .isalpha, it probably is a string). In code completion, exact type inference isn't necessary; giving a superset (i.e. a union type) might still be helpful. In addition, to-python compilers may also be interesting in various HTML templating languages, e.g. Django templating, Zope page templates, and the like (although some of them already have compilers of some form on their own). HTH, 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] Code coverage metrics
On 06.04.2010 11:50, Senthil Kumaran wrote: On Tue, Apr 06, 2010 at 12:40:35PM +0300, anatoly techtonik wrote: Where can I find public reports with Python tests code coverage? Here: http://coverage.livinglogic.de/ And the script that generates that output is available from the cheeseshop: http://pypi.python.org/pypi/pycoco Servus, Walter ___ 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] Python and compilers
Michael Foord wrote: *However*, a project that would be interesting - and that I have wanted to do in order to program microcontrollers with *very* small memory address spaces [1] - would be to compile a static subset of Python down to C. That would be an excellent project -- if the result were successful, I'd be interested in using it! -- 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] "-Wd" switch
On Tue, Apr 6, 2010 at 11:41, Antoine Pitrou wrote: > Brett Cannon python.org> writes: > > > > > > Nope, you got it right. A little bit of documentation is in > > 2.7: http://docs.python.org/dev/library/warnings.html#updating-code-for- > > It is a bit disturbing, though, that "-Wdefault" isn't the default setting. > How could that oddity be solved? > Well, it needs to be understood that `-Wdefault` is shorthand for `-W default:.*:Warning:.*` plus whatever the wildcard is for line number. So the "default" doesn't mean "default for when the interpreter starts up" but "the default action for any warning". It's a shorthand that unfortunately reads on an odd fashion when you do not realize what the expanded value means. Best you can do is in the docs explain what it's shorthand for. ___ 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] Code coverage metrics
On Tue, Apr 6, 2010 at 12:42, C. Titus Brown wrote: > On Tue, Apr 06, 2010 at 10:36:14PM +0300, anatoly techtonik wrote: > > On Tue, Apr 6, 2010 at 7:31 PM, Georg Brandl wrote: > > > > > Where can I find public reports with Python tests code coverage? > > >>> > > >>> Here: > > >>> > > >>> http://coverage.livinglogic.de/ > > >> > > >> Thank you. What is the status of getting these stats on python.org? > > > > > > Wouldn't "status" imply that there is a plan to do so? > > > > It is not that hard to create that plan given that there is a fair > > amount of developers who care about code coverage. > > Anatoly, > > nonetheless, I don't know of any plan :). > > I keep on shaving yaks when trying to get test coverage posted somewhere; > it's actually not a trivial problem to set it up automatically and > reliably, in my experience. If you are interested in volunteering to > help, I'm sure it would be appreciated -- I suspect the right place to > start would be get test coverage running reproducibly and reliably on > your own machines and posted somewhere; then you could ask for permissions > to post it somewhere on *.python.org. (I don't see why we care where it's > posted, but that's what you asked about.) > > I keep on running into technical barriers in getting cross-platform code > coverage analysis working, which would be quite valuable; it's easy to > get it working once, but to keep it working is a maintenance task that > involves regular effort, again, in my experience. > And just in general, it requires someone stepping forward to do it. While there might be several developers who find test coverage important (me included), it's a matter of taking the time to set up something that will work. For me personally that is more time than I have for my volunteer work for Python as I have other things that I put at a higher priority. It's an overused, worn out statement, but it's open source so stuff only gets done when someone REALLY has the desire and time to do something. I'm grateful that Walter has done what he has. If someone steps forward to write up instructions on how to run figleaf or coverage.py over the test suite then that would be appreciated. But just because something isn't technically hard, doesn't mean it isn't hard from the perspective of time and motivation. -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] Code coverage metrics
On Tue, Apr 06, 2010 at 10:36:14PM +0300, anatoly techtonik wrote: > On Tue, Apr 6, 2010 at 7:31 PM, Georg Brandl wrote: > > > Where can I find public reports with Python tests code coverage? > >>> > >>> Here: > >>> > >>> http://coverage.livinglogic.de/ > >> > >> Thank you. What is the status of getting these stats on python.org? > > > > Wouldn't "status" imply that there is a plan to do so? > > It is not that hard to create that plan given that there is a fair > amount of developers who care about code coverage. Anatoly, nonetheless, I don't know of any plan :). I keep on shaving yaks when trying to get test coverage posted somewhere; it's actually not a trivial problem to set it up automatically and reliably, in my experience. If you are interested in volunteering to help, I'm sure it would be appreciated -- I suspect the right place to start would be get test coverage running reproducibly and reliably on your own machines and posted somewhere; then you could ask for permissions to post it somewhere on *.python.org. (I don't see why we care where it's posted, but that's what you asked about.) I keep on running into technical barriers in getting cross-platform code coverage analysis working, which would be quite valuable; it's easy to get it working once, but to keep it working is a maintenance task that involves regular effort, again, in my experience. best, --titus -- C. Titus Brown, c...@msu.edu ___ 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] Code coverage metrics
On Tue, Apr 6, 2010 at 7:31 PM, Georg Brandl wrote: > Where can I find public reports with Python tests code coverage? >>> >>> Here: >>> >>> http://coverage.livinglogic.de/ >> >> Thank you. What is the status of getting these stats on python.org? > > Wouldn't "status" imply that there is a plan to do so? It is not that hard to create that plan given that there is a fair amount of developers who care about code coverage. -- anatoly t. ___ 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] "-Wd" switch
Brett Cannon python.org> writes: > > > Nope, you got it right. A little bit of documentation is in > 2.7: http://docs.python.org/dev/library/warnings.html#updating-code-for- It is a bit disturbing, though, that "-Wdefault" isn't the default setting. How could that oddity be solved? Regards Antoine. ___ 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] "-Wd" switch
On Tue, Apr 6, 2010 at 04:19, Larry Hastings wrote: > Jesus Cea wrote: > >> Recently we added "-Wd" flags to buildbots. I was wondering about the >> effect of it. documentation doesn't help. >> >> I could study the code, but I guess other people can have the very same >> question and I think the answer should be in the archives, somewhere. >> > > I studied the code ;) > > -Wd enables all warnings. It adds 'd' to sys.warnoptions, which in turn > adds a new first entry to _warnings.filters which matches all warnings and > enables the "default" behavior, which is to show it once per execution of > the Python interpreter. > > For example, if you run "python -Wd" on the current trunk (2.7) and execute > the statement "import bsddb" you get a PendingDeprecationWarning exception. > Without -Wd that warning would be suppressed. > > Hope I didn't miss any important subtleties, > > Nope, you got it right. A little bit of documentation is in 2.7: http://docs.python.org/dev/library/warnings.html#updating-code-for-new-versions-of-python . > > //larry// > > ___ > 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/brett%40python.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] Code coverage metrics
Am 06.04.2010 13:50, schrieb anatoly techtonik: > On Tue, Apr 6, 2010 at 12:50 PM, Senthil Kumaran wrote: >>> Where can I find public reports with Python tests code coverage? >> >> Here: >> >> http://coverage.livinglogic.de/ > > Thank you. What is the status of getting these stats on python.org? Wouldn't "status" imply that there is a plan to do so? 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] Code coverage metrics
Senthil Kumaran gmail.com> writes: > > On Tue, Apr 06, 2010 at 12:40:35PM +0300, anatoly techtonik wrote: > > Where can I find public reports with Python tests code coverage? > > Here: > > http://coverage.livinglogic.de/ The fact that the log shows some test failures isn't very comforting. Regards Antoine. ___ 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] Python and compilers
On 06/04/2010 12:44, will...@ufpa.br wrote: First, thank you for all opnion. Each one was considered. I think the better question would be: I have to develop a project that involves compilers, and being a fan of Python, I thought about making a compiler for it (most basic idea involving Pythin and compilers). But I saw that I can use what I learned from compilers not only to create a compiler. What is the area of developing the Python interpreter that I could build my project, and please give me interesting ideas for the project. Well, you are now thoroughly off topic for the python-dev mailing list - so I suggest you ask your question on comp.lang.python or some other Python list. *However*, a project that would be interesting - and that I have wanted to do in order to program microcontrollers with *very* small memory address spaces [1] - would be to compile a static subset of Python down to C. You would need to do type inferencing and support only a basic minimum of the built-in types (and in fact I would start with perhaps functions only), but it could be fun. It would not be Python however, merely Python inspired. Alternatively a general type-inferencing algorithm for Python, such as the one used by ShedSkin, could be interesting. All the best, Michael [1] Smaller devices than those targetted by http://code.google.com/p/python-on-a-chip/ ___ 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/fuzzyman%40voidspace.org.uk -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. ___ 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] Scope object (Re: nonlocals() function?)
On Tue, Apr 6, 2010 at 11:13 AM, Greg Ewing wrote: > Reid Kleckner wrote: > > If I remember correctly, the exec statement is going away in py3k, and >> calling exec() with one argument can modify the local scope. >> > > I've been kind of wondering what the deal is with exec in py3. > I always thought the reason for making exec a statement was so > that locals optimisation could be turned off in its presence, > so I'm not sure how py3 is getting away with making it a > function. > It looks like py3 does not allow exec to modify the locals: $ python3 Python 3.1.1 (r311:74543, Aug 24 2009, 18:44:04) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> def x(a): ... exec(a) ... return a ... >>> x("a = 5") 'a = 5' >>> # the above statement would have returned 5 if the locals had been modified > > Anyhow, it seems to me that as long as locals() or whatever > might replace it is able to find the existing value of a local, > it should also be able to change that value, wherever it > happens to be stored. > > I suppose that might fail if an optimiser decides to keep > multiple copies of a local for some reason, though. > > But even if it has to be read-only, I still think a view object > would be a more py3ish way of handling locals() and the like. > You might only want access to a few locals, in which case > building a dict containing all of them would be wasteful. > > -- > Greg > > > -- > 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/thobes%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] Code coverage metrics
On Tue, Apr 6, 2010 at 12:50 PM, Senthil Kumaran wrote: >> Where can I find public reports with Python tests code coverage? > > Here: > > http://coverage.livinglogic.de/ Thank you. What is the status of getting these stats on python.org? -- anatoly t. ___ 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] Python and compilers
First, thank you for all opnion. Each one was considered. I think the better question would be: I have to develop a project that involves compilers, and being a fan of Python, I thought about making a compiler for it (most basic idea involving Pythin and compilers). But I saw that I can use what I learned from compilers not only to create a compiler. What is the area of developing the Python interpreter that I could build my project, and please give me interesting ideas for the project. ___ 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] "-Wd" switch
Jesus Cea wrote: Recently we added "-Wd" flags to buildbots. I was wondering about the effect of it. documentation doesn't help. I could study the code, but I guess other people can have the very same question and I think the answer should be in the archives, somewhere. I studied the code ;) -Wd enables all warnings. It adds 'd' to sys.warnoptions, which in turn adds a new first entry to _warnings.filters which matches all warnings and enables the "default" behavior, which is to show it once per execution of the Python interpreter. For example, if you run "python -Wd" on the current trunk (2.7) and execute the statement "import bsddb" you get a PendingDeprecationWarning exception. Without -Wd that warning would be suppressed. Hope I didn't miss any important subtleties, //larry// ___ 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] "-Wd" switch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Recently we added "-Wd" flags to buildbots. I was wondering about the effect of it. documentation doesn't help. I could study the code, but I guess other people can have the very same question and I think the answer should be in the archives, somewhere. Thanks. - -- Jesus Cea Avion _/_/ _/_/_/_/_/_/ j...@jcea.es - http://www.jcea.es/ _/_/_/_/ _/_/_/_/ _/_/ jabber / xmpp:j...@jabber.org _/_/_/_/ _/_/_/_/_/ . _/_/ _/_/_/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/_/_/ _/_/_/_/ _/_/ "My name is Dump, Core Dump" _/_/_/_/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibniz -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQCVAwUBS7sLL5lgi5GaxT1NAQL7pQP/ZbrBSm6Ojso3edRWZ+gz1IU+M+aN2dfU NCVAO4ZaXCVkZiS3YcUCy0sg8HahmsC50XpDAZC0r59+phOJazYaol6wz7ECxPe/ Rymu09nCi2Yu7GlWqB5SuLKWhxUVVqJvqfy2oJru8HfhTXj0dYa/hsUxdLUcZIB3 vNEr2VtBNhw= =VG9K -END PGP SIGNATURE- ___ 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] Scope object (Re: nonlocals() function?)
2010/4/6 Greg Ewing > Cesare Di Mauro wrote: > > It will certainly. There's MUCH that can be optimized to let CPython >> squeeze more performance from static analysis (even a gross one) on locals. >> > > But can the existing locals() function be implemented in > the face of such optimisations? > > If it can, then a "locals view" object shouldn't be too much > harder. > > If it can't, then you have already given up full CPython > compatibility. > > -- > Greg A read-only locals view can be a good comprise, because at least the first example I showed can be approached well. For the second example, there's no full compatibility with the current CPython implementation. But implementations can change over the time: we can clearly define that on future CPython versions no assumptions must be made about locals "usage", and in general about instructions generation. The most important thing is that the function f() does what is called to do: return the numeric constant 3. This gives us the opportunity to schedule more efficient optimizations, without losing generality about the language (only some weird tricks will not be supported). Cesare ___ 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] Code coverage metrics
On Tue, Apr 06, 2010 at 12:40:35PM +0300, anatoly techtonik wrote: > Where can I find public reports with Python tests code coverage? Here: http://coverage.livinglogic.de/ -- Senthil ___ 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] python compiler
On Mon, Apr 5, 2010 at 11:54 PM, wrote: > for a college project, I proposed to create a compiler for python. I've > read something about it and maybe I saw that made a bad choice. I hear > everyone's opinion respond. Depending on your taste, you may want to tackle something like a static analyser for python. This is not a compiler proper, but it could potentially be more useful than yet another compiler compiling 50 % of python, and you would get some results more quickly (no need to generate code, etc...). See e.g. http://bugs.jython.org/issue1541 for an actual implementation on a similar idea (but for jython), cheers, 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
[Python-Dev] Code coverage metrics
Where can I find public reports with Python tests code coverage? -- anatoly t. ___ 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] Scope object (Re: nonlocals() function?)
Cesare Di Mauro wrote: It will certainly. There's MUCH that can be optimized to let CPython squeeze more performance from static analysis (even a gross one) on locals. But can the existing locals() function be implemented in the face of such optimisations? If it can, then a "locals view" object shouldn't be too much harder. If it can't, then you have already given up full CPython compatibility. -- 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] python compiler
Maciej Fijalkowski wrote: Except none of the things mentioned above is actually a "Python compiler". No, but they grapple with many of the same issues that a Python compiler would face, and it would be informative to see how they tackle those issues. If you want to advance the state of the art, you first need to find out what the state of the art is. -- 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] Scope object (Re: nonlocals() function?)
Reid Kleckner wrote: If I remember correctly, the exec statement is going away in py3k, and calling exec() with one argument can modify the local scope. I've been kind of wondering what the deal is with exec in py3. I always thought the reason for making exec a statement was so that locals optimisation could be turned off in its presence, so I'm not sure how py3 is getting away with making it a function. Anyhow, it seems to me that as long as locals() or whatever might replace it is able to find the existing value of a local, it should also be able to change that value, wherever it happens to be stored. I suppose that might fail if an optimiser decides to keep multiple copies of a local for some reason, though. But even if it has to be read-only, I still think a view object would be a more py3ish way of handling locals() and the like. You might only want access to a few locals, in which case building a dict containing all of them would be wasteful. -- Greg -- 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