Re: [Python-Dev] Trickery with moving urllib

2008-05-11 Thread Brett C.
On 10-May-08, at 20:43, [EMAIL PROTECTED] wrote: Brett> There is going to be an issue with the current proposal for Brett> keeping around urllib. Since the package is to be named the same Brett> thing as the module Is this the only module morphing into a package of the same n

Re: [Python-Dev] Copying cgi.parse_qs() to the urllib.parse module

2008-05-11 Thread Brett C.
-Brett [from his iPod touch] On 10-May-08, at 20:49, "Guido van Rossum" <[EMAIL PROTECTED]> wrote: Works for me. The other thing I always use from cgi is escape() -- will that be available somewhere else too? It can be. =) -Brett On Sat, May 10, 2008 at 8:30 PM, Brett Cannon <[EMAIL P

Re: [Python-Dev] Trickery with moving urllib

2008-05-11 Thread Brett C.
-Brett [from his iPod touch] On 10-May-08, at 23:46, "Alexandre Vassalotti" <[EMAIL PROTECTED]> wrote: On Sat, May 10, 2008 at 11:43 PM, <[EMAIL PROTECTED]> wrote: Brett> There is going to be an issue with the current proposal for Brett> keeping around urllib. Since the package is

Re: [Python-Dev] Trickery with moving urllib

2008-05-11 Thread Brett C.
-Brett [from his iPod touch] On 10-May-08, at 23:58, "Alexandre Vassalotti" <[EMAIL PROTECTED]> wrote: On Sat, May 10, 2008 at 11:38 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: I see three solutions for dealing with this. 1. Have stubs for the entire urllib API in urllib.__init__ that

Re: [Python-Dev] Trickery with moving urllib

2008-05-11 Thread Brett C.
-Brett [from his iPod touch] On 11-May-08, at 0:04, Fred Drake <[EMAIL PROTECTED]> wrote: On Sat, May 10, 2008 at 11:38 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: I see three solutions for dealing with this. 1. Have stubs for the entire urllib API in urllib.__init__ that raise a Deprecat

Re: [Python-Dev] String literal concatenation & docstrings

2004-11-28 Thread Brett C.
Guido van Rossum wrote: Right. Over-clarification results in docs that read like the instructions for the holy hand grenade ;-) Well said. Except that now I can't find the adjacent string literals in the grammar any more! I'm looking al http://www.python.org/dev/doc/devel/ref/grammar.txt The path

Re: [Python-Dev] TRUNK UNFROZEN; release24-maint branch has been cut

2004-12-01 Thread Brett C.
Anthony Baxter wrote: I've cut the release24-maint branch, and updated the Include/patchlevel.h on trunk and branch (trunk is now 2.5a0, branch is 2.4+) The trunk and the branch are now both unfrozen and suitable for checkins. The feature freeze on the trunk is lifted. Remember - if you're checking

[Python-Dev] Any reason why CPPFLAGS not used in compiling?

2004-12-04 Thread Brett C.
I noticed that Makefile.pre.in uses the value from the environment variable LDFLAGS but not CPPFLAGS. Any reason for this? ``./configure -h`` lists both (and some other environment variables which are not really used either) so it seems a little misleading to have those listed but to not utili

Re: [Python-Dev] Deprecated xmllib module

2004-12-05 Thread Brett C.
Martin v. Löwis wrote: Anthony Baxter wrote: The library docs for, e.g. xmllib already say deprecated at the top - maybe it should be larger? I think it would be better to *remove* the xmllib documentation. Existing code which needs the module will continue to work even without documentation, and

Re: [Python-Dev] Any reason why CPPFLAGS not used in compiling?

2004-12-05 Thread Brett C.
Martin v. Löwis wrote: Brett C. wrote: I noticed that Makefile.pre.in uses the value from the environment variable LDFLAGS but not CPPFLAGS. Any reason for this? How did you notice that? For LDFLAGS, Makefile.pre.in has LDFLAGS=@LDFLAGS@ This does *not* mean that the value from the

Re: [Python-Dev] Any reason why CPPFLAGS not used in compiling?

2004-12-06 Thread Brett C.
Martin v. Löwis wrote: Brett C. wrote: I noticed that Makefile.pre.in uses the value from the environment variable LDFLAGS but not CPPFLAGS. Any reason for this? How did you notice that? For LDFLAGS, Makefile.pre.in has LDFLAGS=@LDFLAGS@ This does *not* mean that the value from the

[Python-Dev] Ptyon 2.3.5 probably coming in January; get your bugs/patches reported!

2004-12-06 Thread Brett C.
Anthony Baxter, our ever-diligent release manager, mentioned this past week that Python 2.3.5 will most likely come to fruition some time in January (this is not guaranteed date). This means that in order to have enough time to proper evaluate new patches and bugs they must be reported **now**!

Re: [Python-Dev] Any reason why CPPFLAGS not used in compiling?

2004-12-06 Thread Brett C.
Martin v. Löwis wrote: Brett C. wrote: How did you notice that? For LDFLAGS, Makefile.pre.in has LDFLAGS=@LDFLAGS@ This does *not* mean that the value from the environment is used. Instead, it means that configure computes the value of LDFLAGS when it generates Makefile.in. For CPPFLAGS

Re: [Python-Dev] PEP 338: Executing modules inside packages with '-m'

2004-12-11 Thread Brett C.
Nick Coghlan wrote: Python 2.4's -m command line switch only works for modules directly on sys.path. Trying to use it with modules inside packages will fail with a "Module not found" error. This PEP aims to fix that for Python 2.5. Previously, posting of a draft version of the PEP to python-dev a

[Python-Dev] python-dev Summary for 2004-10-16 through 2004-10-31 [draft]

2004-12-11 Thread Brett C.
Winter Break is upon me which means I have time to catch up on the Summaries. I will definitely be caught up by the end of the month. As for this summary, I will send this out around Wednesday. As always corrections are appreciated. If you feel one of the skipped threads deserves coverage ple

Re: [Python-Dev] httplib timeout patch

2004-12-14 Thread Brett C.
ZhangYueåå wrote: Hi, Here is a patch for httplib. I added a timeout value for httplib.HTTPConnection, please check. Thanks for the patch, but this is the wrong place for it. Please create a new patch item on SourceForge at http://sourceforge.net/patch/?group_id=5470 . -Brett _

Re: [Python-Dev] Re: Python in education

2004-12-15 Thread Brett C.
Terry Reedy wrote: "Randy Chung" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [SNIP] I'm interested in using actual bugs in Python as exercises Please consider including review of existing patches. Besides being useful, it will also teach students how to submit good patches of t

[Python-Dev] python-dev Summary for 2004-11-01 through 2004-11-15 [draft]

2004-12-17 Thread Brett C.
Now I am only a month behind. Won't send this out any earlier than Monday night, but probably won't be until Tuesday. = Summary Announcements = I am hoping to be caught up with my summary backlog by the end of the month.

Re: [Python-Dev] RE: [Python-checkins] python/dist/src/Modules posixmodule.c, 2.300.8.10, 2.300.8.11

2004-12-17 Thread Brett C.
Andrew MacIntyre wrote: I don't see any possible way for those checkins to affect any platform other than OS/2. 2 of the files are platform specific files (PC/os2emx/getpath.c, PC/os2vacpp/getpath.c), and the checkin to Modules/posixmodule.c is contained within a platform specific #if/#endif: Perha

Re: [Python-Dev] Patches: 1 for the price of 10.

2004-12-22 Thread Brett C.
Martin v. Löwis wrote: Jeremy Hylton wrote: I got started on these this morning, will likely finish them tomorrow. It would be perverse to apply your patch last, wouldn't it? It turns out that Titus' patch might be more involved than he thought it would be. In any case, the review itself is a hig

[Python-Dev] proto-pep: How to change Python's bytecode

2004-12-24 Thread Brett C.
After implementing over 10 new opcodes for my thesis I figured I should write down the basic steps in an info PEP so that there is enough guidelines with this PEP and PEP 306 to cover the bases on changes to the language itself. To go along with this I also plan to write some benchmarks for indi

Re: [Python-Dev] Re: proto-pep: How to change Python's bytecode

2004-12-25 Thread Brett C.
Scott David Daniels wrote: Brett C. wrote: A few things can be done to make sure that development goes smoothly when experimenting with Python's bytecode. One is to delete all .py(c|o|w) Don't you mean ".pyc or .pyo (remember such files in zips as well)" .pyw is normal pyt

Re: [Python-Dev] Re: proto-pep: How to change Python's bytecode

2004-12-25 Thread Brett C.
Terry Reedy wrote: "Brett C." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] At to the title, bytecodes are a property of the CPython implementation, not of Python itself. Since I think the distinction is quite important to maintain, I would insert the missing &#

Re: [Python-Dev] Re: [Python-checkins] python/dist/src setup.py, 1.208, 1.209

2004-12-27 Thread Brett C.
Jack Jansen wrote: On 18-dec-04, at 21:48, [EMAIL PROTECTED] wrote: Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21493 Modified Files: setup.py Log Message: Switch from getting LDFLAGS and CPPFLAGS from the environment to the Makefile. This is

Re: [Python-Dev] Zipfile needs?

2004-12-28 Thread Brett C.
Scott David Daniels wrote: I'm hoping to add BZIP2 compression to zipfile for 2.5. My primary motivation is that Project Gutenberg seems to be starting to use BZIP2 compression for some of its zips. What other wish list things do people around here have for zipfile? I thought I'd collect input h

Re: [Python-Dev] Re: [Python-checkins] python/dist/src setup.py, 1.208, 1.209

2004-12-31 Thread Brett C.
Brett C. wrote: Jack Jansen wrote: On 18-dec-04, at 21:48, [EMAIL PROTECTED] wrote: Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21493 Modified Files: setup.py Log Message: Switch from getting LDFLAGS and CPPFLAGS from the environment to the

[Python-Dev] python-dev Summary for 2004-11-16 through 2004-11-30 [draft]

2004-12-31 Thread Brett C.
With school starting up again Monday and New Years being tomorrow I don't plan to send this out until Tuesday. Hope everyone has a good New Years. -Brett --- = Summary Announcements = PyCon_ is coming up! Being held March 23

Re: [Python-Dev] Re: Zipfile needs?

2005-01-03 Thread Brett C.
Scott David Daniels wrote: Brett C. wrote: Scott David Daniels wrote: I'm hoping to add BZIP2 compression to zipfile for 2.5. My primary motivation is that Project Gutenberg seems to be starting to use BZIP2 compression for some of its zips. What other wish list things do people around here

Re: [Python-Dev] Please help complete the AST branch

2005-01-03 Thread Brett C.
Guido van Rossum wrote: The AST branch has been "nearly complete" for several Python versions now. The last time a serious effort was made was in May I believe, but it wasn't enough to merge the code back into 2.4, alas. It would be a real shame if this code was abandoned. [SNIP] So, I'm pleading.

Re: [Python-Dev] Please help complete the AST branch

2005-01-04 Thread Brett C.
Alex Martelli wrote: On 2005 Jan 04, at 17:17, Jeremy Hylton wrote: That's fine with me. We had taken it to the compiler-sig when it wasn't clear there was interest in the ast branch :-). Speaking for myself, I have a burning interest in the AST branch (though I can't seem to get it correctly do

Re: [Python-Dev] Please help complete the AST branch

2005-01-04 Thread Brett C.
Jeff Epler wrote: On Mon, Jan 03, 2005 at 06:02:52PM -0800, Brett C. wrote: Although if someone can start sooner than by all means, go for it! And obviously help would be great since it isn't a puny codebase (4,000 lines so far for the CST->AST and AST->bytecode code). And obviousl

Re: [Python-Dev] Subscribing to PEP updates

2005-01-06 Thread Brett C.
Nick Coghlan wrote: Someone asked on python-list about getting notifications of changes to PEP's. As a low-effort solution, would it be possible to add a Sourceforge mailing list hook just for checkins to the nondist/peps directory? Call it python-pep-updates or some such beast. If I remember h

Re: [Python-Dev] proto-pep: How to change CPython's bytecode

2005-01-06 Thread Brett C.
OK, latest update with all suggest revisions (mention this is for CPython, section for known previous bytecode work). If no one has any revisions I will submit to David for official PEP acceptance this weekend. -- PEP: XXX Title: How to change CPython's bytecode

Re: [Python-Dev] frame.f_locals is writable

2005-01-13 Thread Brett C.
Shane Holloway (IEEE) wrote: For a little background, I'm working on making an edit and continue support in python a little more robust. So, in replacing references to unmodifiable types like tuples and bound-methods (instance or class), I iterate over gc.get_referrers. So, I'm working on fram

Re: [Python-Dev] redux: fractional seconds in strptime

2005-01-13 Thread Brett C.
Skip Montanaro wrote: A couple months ago I proposed (maybe in a SF bug report) http://www.python.org/sf/1006786 that time.strptime() grow some way to parse time strings containing fractional seconds based on my experience with the logging module. I've hit that stumbling block again, this time in

Re: [Python-Dev] redux: fractional seconds in strptime

2005-01-14 Thread Brett C.
Skip Montanaro wrote: Brett> The problem I have always had with this proposal is that the Brett> value is worthless, time tuples do not have a slot for fractional Brett> seconds. Yes, it could possibly be changed to return a float for Brett> seconds, but that could possibly break t

Re: [Python-Dev] redux: fractional seconds in strptime

2005-01-14 Thread Brett C.
Skip Montanaro wrote: >> I realize the %4N notation is distasteful, but without it I think you >> will have trouble parsing something like >> >> 13:02:00.704 >> >> What would be the format string? %H:%M:%S.%N would be incorrect. Brett> Why is that incorrect? Because

Re: [Python-Dev] a bunch of Patch reviews

2005-01-19 Thread Brett C.
Martin v. Löwis wrote: I think Brett Cannon now also follows this rule; it really falls short enough in practice because (almost) nobody really wants to push his patch bad enough to put some work into it to review other patches. Yes, I am trying to support the rule, but my schedule is nutty right n

[Python-Dev] python-dev Summary for 2004-12-01 through 2004-12-15 [draft]

2005-01-19 Thread Brett C.
Uh, life has been busy. Will probably send this one out this weekend some time so please get corrections in before then. = Summary Announcements = PyCon_ 2005 is well underway. The schedule is in the process of being f

Re: [Python-Dev] I think setup.py needs major rework

2005-01-26 Thread Brett C.
Fred L. Drake, Jr. wrote: On Tuesday 25 January 2005 23:30, Skip Montanaro wrote: > Python's setup.py has grown way out of control. I'm trying to build > and install Python 2.4.0 on a Solaris system with Tcl/Tk installed in a > non-standard place and I can't figure out the incantation to te

Re: Moving towards Python 3.0 (was Re: [Python-Dev] Speed up function calls)

2005-01-30 Thread Brett C.
Neal Norwitz wrote: On Wed, 26 Jan 2005 09:47:41 -0500, Raymond Hettinger <[EMAIL PROTECTED]> wrote: [SNIP] Any ideas how we could start to realize some benefits of Py3.0 before it arrives? I'm not sure if this is worth it, if it's premature, or if there are other ways to acheive the goal of easin

[Python-Dev] python-dev Summary for 2004-12-16 through 2004-12-31 [draft]

2005-01-31 Thread Brett C.
Nice and short summary this time. Plan to send this off Wednesday or Thursday so get corrections in before then. -- = Summary Announcements = You can still `register `__ for `PyCo

Re: [Python-Dev] python-dev Summary for 2004-12-16 through 2004-12-31 [draft]

2005-02-01 Thread Brett C.
Paul Moore wrote: On Mon, 31 Jan 2005 14:02:20 -0800, Brett C. <[EMAIL PROTECTED]> wrote: 2.5 was released just before the time this summary covers so most stuff was on bug fixes discovered after the release. Give Guido the time machine keys back! Fine, but I was going to go back in tim

Re: [Python-Dev] redux: fractional seconds in strptime

2005-02-02 Thread Brett C.
Everyone went silent on this topic. Does this mean people just stopped caring (which I doubt since I know Skip wants this bad enough to bring it up every so often)? Was it the issue of symmetry with strftime? I am willing to add this (albeit the simple way I proposed in my last email on this

[Python-Dev] python-dev Summary for 2005-01-01 through 2005-01-15 [draft]

2005-02-03 Thread Brett C.
Wow, another summary out the same week as the previous one! Perk of keeping things short and to the point. Then again keeping them this simple and short begs the question of whether the summaries are worth it still at that point. Regardless, probably will send this one out Saturday or Sunday s

[Python-Dev] discourage patch reviews to the list? (was: Patch review: [ 1098732 ])

2005-02-09 Thread Brett C.
BJörn Lindqvist wrote: I'd like to help develop Python for fun and profit and I've heard that posting patch reviews to python-dev is a good way to contribute. So here goes: Are we actually promoting this? I am fine with people doing this when they have done five reviews and want their specific pa

Re: [Python-Dev] discourage patch reviews to the list?

2005-02-09 Thread Brett C.
Martin v. Löwis wrote: Brett C. wrote: > But if people don't have that in mind, should we not be encouraging this? I mean it seems to be defeating the purpose of SF and having the various mailing lists that send out updates on SF posts. [SNIP] Björn did post his comment to SF, and a su

Re: [Python-Dev] Five review rule on the /dev/ page?

2005-02-17 Thread Brett C.
[removed pydotorg from people receiving this email] Aahz wrote: On Thu, Feb 17, 2005, Skip Montanaro wrote: I am frantically trying to get ready to be out of town for a week of vacation. Someone sent me some patches for datetime and asked me to look at them. I begged off but referred him to http:

Re: [Python-Dev] Fixing _PyEval_SliceIndex so that integer-like objects can be used

2005-02-18 Thread Brett C.
Travis Oliphant wrote: Hello again, There is a great discussion going on the numpy list regarding a proposed PEP for multidimensional arrays that is in the works. During this discussion as resurfaced regarding slicing with objects that are not IntegerType objects but that have a tp_as_number->nb

Re: [Python-Dev] Store x Load x --> DupStore

2005-02-20 Thread Brett C.
Michael Hudson wrote: "Phillip J. Eby" <[EMAIL PROTECTED]> writes: [SNIP] And whatever happened to CALL_METHOD? It didn't work as an optimization, as far as I remember. I think the patch is on SF somewhere. Or is a branch in CVS? Oh, it's patch #709744. Do we need a tp_callmethod that takes an

Re: [Python-Dev] What about CALL_ATTR?

2005-02-23 Thread Brett C.
Reinhold Birkenfeld wrote: While rummaging in the old patches, I found this: """ The result of the PyCore sprint of me and Brett: the CALL_ATTR opcode (LOAD_ATTR and CALL_FUNCTION combined) that skips the PyMethod creation and destruction for classic classes (but not newstyle classes, yet.) The cod

Re: [Python-Dev] __str__ vs. __unicode__

2005-02-23 Thread Brett C.
Walter Dörwald wrote: M.-A. Lemburg wrote: Walter Dörwald wrote: M.-A. Lemburg wrote: > [...] __str__ and __unicode__ as well as the other hooks were specifically added for the type constructors to use. However, these were added at a time where sub-classing of types was not possible, so it's time

Re: [Python-Dev] __str__ vs. __unicode__

2005-02-24 Thread Brett C.
Walter Dörwald wrote: Brett C. wrote: Walter Dörwald wrote: M.-A. Lemburg wrote: [...] I don't have a clear picture of what the consensus currently looks like :-) If we're going for for a solution that implements the hook awareness for all hooks, I'd be +1 on that. If we

Re: [Python-Dev] __str__ vs. __unicode__

2005-02-24 Thread Brett C.
Brett C. wrote: Walter Dörwald wrote: Brett C. wrote: Walter Dörwald wrote: M.-A. Lemburg wrote: [...] I don't have a clear picture of what the consensus currently looks like :-) If we're going for for a solution that implements the hook awareness for all hooks, I'd be +1 on t

[Python-Dev] python-dev Summary for 2005-01-16 through 2005-01-31 [draft]

2005-02-24 Thread Brett C.
A month late. Glad I don't get paid for this or I probably would have been fired by now. =) For this summary draft I am bringing back the header this one time in hopes of getting some proof-reading of it. I did a major restructuring with some accompanying rewrites to make it easier to naviga

[Python-Dev] OK, time to retire (was: Re: python-dev Summary for 2005-01-16 through 2005-01-31)

2005-03-01 Thread Brett C.
Steve Holden wrote: Michele Simionato wrote [on c.l.py]: Brett Cannon: [... python-dev summary ... boilerplate change ...] +1 for this idea. The summary looks much better now :) Keep the good work going, Sorry, but i have to disagree. I hope you won't take this reply personally, Michele, since it'

[Python-Dev] python-dev Summary for 2005-02-01 through 2005-02-14 [draft]

2005-03-03 Thread Brett C.
OK, so this one is really short. Beyond the fact that I am probably doing this too late at night I also want to give the three people who have stepped forward to take over for me when I stopped writing the Summaries multiple chances to pick up on any of the Skipped Threads or even flesh out any

Re: [Python-Dev] python-dev Summary for 2005-02-01 through 2005-02-14 [draft]

2005-03-04 Thread Brett C.
Aahz wrote: Both entries so far look very good. Perhaps writing python-dev summaries could be a rotating position? Good idea that several people have now suggested to me. I have emailed Tim, Steve, and Tony to see what they think. It wouldn't surprise me if this happens if for any other reason

Re: [Python-Dev] Memory Allocator Part 2: Did I get it right?

2005-03-04 Thread Brett C.
Evan Jones wrote: Sorry for taking so long to get back to this thread, it has been one of those weeks for me. On Feb 16, 2005, at 2:50, Martin v. Löwis wrote: Evan then understood the feature, and made it possible. This is very true: it was a very useful exercise. I can personally accept breakin

Re: [Python-Dev] Requesting that a class be a new-style class

2005-03-04 Thread Brett C.
Guido van Rossum wrote: This is something I've typed way too many times: Py> class C(): File "", line 1 class C(): ^ SyntaxError: invalid syntax It's the asymmetry with functions that gets to me - defining a function with no arguments still requires parentheses in the definition s

[Python-Dev] python-dev Summary for 2005-02-15 through 2005-02-28 [draft]

2005-03-04 Thread Brett C.
Decided to just plow through the next Summary so that I was finally caught up. I am not expecting the candidates for taking of the Summaries to write stuff for this one (although I wouldn't mind it =). The idea of having them work together to write the Summaries has been proposed, but this is g

Re: [Python-Dev] Failing tests: marshal, warnings

2005-03-06 Thread Brett C.
Greg Ward wrote: Anyone else seeing test failures on the 2.4 branch right now? I started seeing this failure: Both are passing for me on OS X 10.3.8 w/ a fresh cvs up as of 15:41 PT. But I am getting failures for test_socket (ignoring the usual test__locale failure on OS X): ==

Re: [Python-Dev] Failing tests: marshal, warnings

2005-03-06 Thread Brett C.
Greg Ward wrote: [SNIP] A-ha! I get it. There are two mistakes in test_descr.py:test_init(): lack of "finally" clause, and failure to make a copy of warnings.filters. This patch fixes both: """ --- Lib/test/test_descr.py 4 Mar 2005 04:47:04 - 1.202.2.2 +++ Lib/test/test_descr.py

Re: [Python-Dev] Failing tests: marshal, warnings

2005-03-06 Thread Brett C.
Brett C. wrote: Greg Ward wrote: [SNIP] A-ha! I get it. There are two mistakes in test_descr.py:test_init(): lack of "finally" clause, and failure to make a copy of warnings.filters. This patch fixes both: """ --- Lib/test/test_descr.py 4 Mar 2005 04:47:04 -000

Re: [Python-Dev] os.access and Unicode

2005-03-08 Thread Brett C.
Martin v. Löwis wrote: Apparently, os.access was forgotten when the file system encoding was introduced in Python 2.2, and then it was again forgotten in PEP 277. I've now fixed it in the trunk (posixmodule.c:2.334), and I wonder whether this is a backport candidate. People who try to invoke os.acc

Re: [Python-Dev] LinkedHashSet/LinkedHashMap equivalents

2005-03-08 Thread Brett C.
Steven Bethard wrote: Delaney, Timothy C (Timothy) <[EMAIL PROTECTED]> wrote: The perennial "how do I remove duplicates from a list" topic came up on c.l.py and in the discussion I mentioned the java 1.5 LinkedHashSet and LinkedHashMap. I'd thought about proposing these before, but couldn't think o

Re: [Python-Dev] @deprecated (was: Useful thread project for 2.5?)

2005-03-09 Thread Brett C.
Stephan Richter wrote: [SNIP - Michael's deprecated decorator] This is a recipe for disaster. Creating a new function from the old can have unwanted side effects, since you effectively change the object. For example, if someone is monkey patching this function, then the deprecation warning gets

Re: [Python-Dev] Adding any() and all()

2005-03-11 Thread Brett C.
Jim Jewett wrote: Guido van Rossum: Whether to segregate these into a separate module: they are really a very small amount of syntactic sugat, and I expect that in most cases, instead of importing that module (which totally makes me lose my context while editing) I would probably just write the ex

Re: [Python-Dev] (no subject)

2005-03-14 Thread Brett C.
Phillip J. Eby wrote: [SNIP] One solution is to have a __signature__ attribute that's purely documentary. That is, modifying it wouldn't change the function's actual behavior, so it could be copied with update_meta() but then modified by the decorator if need be. __signature__ would basically

Re: [Python-Dev] Rationale for sum()'s design?

2005-03-15 Thread Brett C.
Nick Coghlan wrote: Guido van Rossum wrote: On Tue, 15 Mar 2005 00:05:32 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: ... try: ... value += first ... except TypeError: ... raise TypeError("Cannot add first element %r to initial value %r" % (first, value)) No, no, no! NO! Never cat

Re: [Python-Dev] comprehension abbreviation (was: Adding any() and all())

2005-03-15 Thread Brett C.
Eric Nieuwland wrote: Martin v. Löwis wrote: That's not the full syntax. The full syntax is [ for in ] where can be an arbitrary expression: and, or, lambda, +, -, ... can be a list of expression, except for boolean and relational expressions (but I think this is further constrained seman

[Python-Dev] python-dev Summary for 2005-03-01 through 2005-03-15 [draft]

2005-03-17 Thread Brett C.
Amazingly on time thanks to the quarter being over. You can't see me jumping up and down in joy over that fact, but I am while trying not to hit the ceiling as I do it (for those of you who have never met me, I'm 6'6" tall, so jumping in a room is not always the smartest thing for me, especiall

Re: [Python-Dev] [AST] Procedure for AST Branch patches

2005-03-20 Thread Brett C.
Nick Coghlan wrote: What's the current situation with providing fixes for AST branch problems? Make sure "AST" is used in the subject line; e.g., "[AST]" at the beginning. Unfortunately the AST group is only available for patches; not listed for bug reports (don't know why; can this be fixed?).

Re: [Python-Dev] [AST] Procedure for AST Branch patches

2005-03-20 Thread Brett C.
Grant Olson wrote: Make sure "AST" is used in the subject line; e.g., "[AST]" at the beginning. Unfortunately the AST group is only available for patches; not listed for bug reports (don't know why; can this be fixed?). Other than that, just assign it to me since I will most likely be doin

Re: [Python-Dev] docstring before function declaration

2005-03-21 Thread Brett C.
Nicholas Jacobson wrote: IIRC, Guido once mentioned that he regretted not setting function docstrings to come before the function declaration line, instead of after. He did, but I don't know how strong that regret is. i.e. """This describes class Bar.""" class Bar: ... Or with a decorator: """This

[Python-Dev] [AST] question about marshal_write_*() fxns

2005-03-21 Thread Brett C.
For those of you who don't know, I am sprinting on the AST branch here on PyCon. Specifically, I am fleshing out Python/compile.txt so that it can act as a good intro to new users and as a design doc. But one of things I am not sure of is what the marshal_write_*() functions in Python/Python-a

Re: [Python-Dev] [AST] question about marshal_write_*() fxns

2005-03-21 Thread Brett C.
Neil Schemenauer wrote: On Mon, Mar 21, 2005 at 11:53:04AM -0500, Brett C. wrote: But one of things I am not sure of is what the marshal_write_*() functions in Python/Python-ast.c are used for. I assume they output to the marshal format, but there is mention of a byte stream format and so I

Re: [Python-Dev] [AST] Procedure for AST Branch patches

2005-03-21 Thread Brett C.
Grant Olson wrote: Make sure "AST" is used in the subject line; e.g., "[AST]" at the beginning. Unfortunately the AST group is only available for patches; not listed for bug reports (don't know why; can this be fixed?). Other than that, just assign it to me since I will most likely be doin

Re: [Python-Dev] [AST] Procedure for AST Branch patches

2005-03-22 Thread Brett C.
Nick Coghlan wrote: > Brett C. wrote: > >> OK, thanks to John Ehresman here at PyCon sprint I got logistix's >> patch applied. Beyond a warning that a warning that decode_unicode() >> is never called and the parser module failing to compile under Windows >

Re: [Python-Dev] Deprecating 2.2 old bugs

2005-03-27 Thread Brett C.
Facundo Batista wrote: > Going on with the old bugs checking, here are the results for 2.2. > When I'll finish this will be put in an informational PEP. > I just want to publicly thank Facundo for doing this. I remember when I went through one weekend and did a ton of old bug reports; it ain't e

[Python-Dev] python-dev Summary for 2005-03-16 through 2005-03-31 [draft]

2005-04-01 Thread Brett C.
OK, so here is my final Summary. Like to send it out some time this weekend so please get corrections in ASAP. = Summary Announcements = --- My last summary --- So, after nearly 2.5 years, this is m

Re: [Python-Dev] Re: python-dev Summary for 2005-03-16 through 2005-03-31[draft]

2005-04-01 Thread Brett C.
Terry Reedy wrote: >>This led to a much more fleshed out design document >>(found in Python/compile.txt in the AST branch), > > > The directory URL > > http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Python/?only_with_tag=ast-branch > > or even the file URL > > http://cvs.sourcefo

Re: [Python-Dev] inconsistency when swapping obj.__dict__ with a dict-like object...

2005-04-05 Thread Brett C.
Alex A. Naanou wrote: > Hi! > > here is a simple piece of code > > ---cut--- > class Dict(dict): > def __init__(self, dct={}): > self._dict = dct > def __getitem__(self, name): > return self._dct[name] > def __setitem__(self, name, value): > self._dct[name] = v

Re: [Python-Dev] Unified or context diffs?

2005-04-13 Thread Brett C.
Nick Coghlan wrote: > Are context diffs still favoured for patches? > > The patch submission guidelines [1] still say that, but is it actually > true these days? I personally prefer unified diffs, but have been > generating context diffs because of what the guidelines say. > I personally like un

Re: [Python-Dev] Unified or context diffs?

2005-04-13 Thread Brett C.
Barry Warsaw wrote: > On Wed, 2005-04-13 at 15:54, Brett C. wrote: > > >>I thought at one point this question came up and the general consensus was >>that >>unified diffs were preferred? > > > Back in the day, we preferred context diffs, and I think of the

Re: [Python-Dev] shadow password module (spwd) is never built due to error in setup.py

2005-04-15 Thread Brett C.
Irmen de Jong wrote: > Martin v. Löwis wrote: > >> Irmen de Jong wrote: >> >>> Please advise? >> >> >> >> setup.py should refer to config_h_vars, which in turn should be set >> earlier. >> >> Regards, >> Martin > > > Ah so the setup.py script is flawed. > However, the sysconfig object doesn't co

Re: [Python-Dev] python-dev Summary for 2005-04-01 through 2005-04-15 [draft]

2005-04-18 Thread Brett C.
Tim Lesher wrote: > Here's the first draft of the python-dev summary for the first half of > April. Please send any corrections or suggestions to the summarizers. > > == > Summary Announcements > == > > --- > New python-dev summary

[Python-Dev] Proper place to put extra args for building

2005-04-19 Thread Brett C.
I am currently adding some code for a Py_COMPILER_DEBUG build for use on the AST branch. I thought that OPT was the proper variable to put stuff like this into for building (``-DPy_COMPILER_DEBUG``), but that erases ``-g -Wall -Wstrict-prototypes``. Obviously I could just tack all of that into my

Re: [Python-Dev] Proper place to put extra args for building

2005-04-20 Thread Brett C.
Martin v. LÃwis wrote: > Brett C. wrote: > >>I am currently adding some code for a Py_COMPILER_DEBUG build for use on the >>AST branch. I thought that OPT was the proper variable to put stuff like this >>into for building (``-DPy_COMPILER_DEBUG``), but that eras

Re: [Python-Dev] Proper place to put extra args for building

2005-04-20 Thread Brett C.
Martin v. LÃwis wrote: > Brett C. wrote: > >>The other option is to not make configure.in skip injecting arguments when a >>pydebug build is done based on whether OPT is defined in the environment. So >>configure.in:670 could change to ``OPT="$OPT -g -Wall -Wstrict-

Re: [Python-Dev] Reference counting when entering and exiting scopes

2005-04-20 Thread Brett C.
Matthew F. Barnes wrote: > Someone on python-help suggested that I forward this question to > python-dev. > > I've been studying Python's core compiler and bytecode interpreter as a > model for my own interpreted language, Might want to take a peek at the AST branch in CVS; that is what the compi

Re: [Python-Dev] Proper place to put extra args for building

2005-04-20 Thread Brett C.
Martin v. LÃwis wrote: > Brett C. wrote: > >>Hmm. OK, that is an interesting idea. Would make rebuilding a lot easier if >>it was just an environment variable that was part of the default OPT value; >>``OPT="$BUILDFLAGS -g -Wall -Wstrict-prototyping". >>

Re: [Python-Dev] Reference counting when entering and exiting scopes

2005-04-21 Thread Brett C.
Guido van Rossum wrote: >>So the two things I thought were glitches are actually cancelling each >>other out. Very good. Thanks for your help. > > > Though I wonder why it was written so delicately. Don't know; Jeremy wrote those functions back in 2001 to add nested scopes. If he remembers he

Re: [Python-Dev] anonymous blocks

2005-04-21 Thread Brett C.
Guido van Rossum wrote: > I've been thinking about this a lot, but haven't made much > progess. Here's a brain dump. > > I've been thinking about integrating PEP 325 (Resource-Release Support > for Generators) into the for-loop code, so that you could replace > [SNIP - using 'for' syntax to deli

Re: [Python-Dev] anonymous blocks

2005-04-21 Thread Brett C.
Guido van Rossum wrote: > [Brett] > >>I think I agree with Samuele that it would be more pertinent to put all of >>this >>effort into trying to come up with some way to handle cleanup in a generator. > > > I.e. PEP 325. > > But (as I explained, and you agree) that still doesn't render PEP 310

Re: [Python-Dev] anonymous blocks (don't combine them with generator finalization)

2005-04-21 Thread Brett C.
Bob Ippolito wrote: > > On Apr 21, 2005, at 8:59 PM, Josiah Carlson wrote: > >> Guido van Rossum <[EMAIL PROTECTED]> wrote: >> >>> >>> [Brett] >>> I think I agree with Samuele that it would be more pertinent to put all of this effort into trying to come up with some way to handle c

Re: [Python-Dev] Proper place to put extra args for building

2005-04-21 Thread Brett C.
Martin v. LÃwis wrote: > Brett C. wrote: > >>Works for me. If no one objects I will check in the change for CFLAGS to make >>it ``$(BASECFLAGS) $(OPT) "$EXTRA_CFLAGS"`` soon (is quoting it enough to make >>sure that it isn't evaluated by configure but le

Re: [Python-Dev] Proper place to put extra args for building

2005-04-22 Thread Brett C.
Martin v. LÃwis wrote: > Brett C. wrote: > >>Yep, you're right. I initially thought that the parentheses meant it was a >>Makefile-only variable, but it actually goes to the environment for those >>unknown values. >> >>Before I check it in, though, sho

Re: [Python-Dev] Proper place to put extra args for building

2005-04-24 Thread Brett C.
OK, EXTRA_CFLAGS support has been checked into Makefile.pre.in and distutils.sysconfig . Martin, please double-check I tweaked sysconfig the way you wanted. I also wasn't sure of compatibility for Distutils (first time touching it); checked PEP 291 but Distutils wasn't listed. I went ahead and u

Re: [Python-Dev] Re: anonymous blocks

2005-04-24 Thread Brett C.
Guido van Rossum wrote: [SNIP] > Now let me propose a strawman for the translation of the latter into > existing semantics. Let's take the generic case: > > with VAR = EXPR: > BODY > > This would translate to the following code: [SNIP] > > it = EXPR > err = None > while T

  1   2   >