Re: [Python-Dev] import screwiness

2006-07-05 Thread Tim Peters
[Neal] >>> Then later on we do PyString_GET_SIZE and PyString_AS_STRING. That doesn't >>> work, does it? What am I missing? [Tim] >> The conceptual type of the object returned by PyUnicode_Encode(). [Neal] > Phew, I sure am glad I was missing that. :-) > > I saw as the first line in PyUnicode_

[Python-Dev] "Missing" 2.5 feature

2006-07-08 Thread Tim Peters
Back in: http://mail.python.org/pipermail/python-dev/2005-March/051856.html I made a pitch for adding: sys._current_frames() to 2.5, which would return a dict mapping each thread's id to that thread's current (Python) frame. As noted there, an extension module exists along these lines

Re: [Python-Dev] is type a usable feature?

2005-06-23 Thread Tim Peters
[Paolino <[EMAIL PROTECTED]>] > Hello developers,I noticed my application was growing strangely while I > was using type, then I tried this: > > while True: > type('A',(),{}) > > and saw memory filling up.Is there a clean solution to that? > I see it as a bug in python engeneering,that is why I

Re: [Python-Dev] refcounting vs PyModule_AddObject

2005-06-23 Thread Tim Peters
[Michael Hudson] >> I've been looking at this area partly to try and understand this bug: >> >> [ 1163563 ] Sub threads execute in restricted mode >> >> but I'm not sure the whole idea of multiple interpreters isn't >> inherently doomed :-/ [Martin v. Löwis] > That's what Tim asserts, saying t

Re: [Python-Dev] [Python-checkins] python/dist/src/Tools/bgen/bgen bgenGenerator.py, 1.17, 1.18 bgenObjectDefinition.py, 1.29, 1.30 bgenType.py, 1.15, 1.16 bgenVariable.py, 1.6, 1.7 scantools.py, 1.37

2005-06-26 Thread Tim Peters
[EMAIL PROTECTED] >> Update of /cvsroot/python/python/dist/src/Tools/bgen/bgen >> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18095/Tools/ >> bgen/bgen >> >> Modified Files: >> bgenGenerator.py bgenObjectDefinition.py bgenType.py >> bgenVariable.py scantools.py >> Log Message: >>

Re: [Python-Dev] [Python-checkins] python/dist/src/Lib Cookie.py, 1.17, 1.18

2005-06-26 Thread Tim Peters
[EMAIL PROTECTED] > Update of /cvsroot/python/python/dist/src/Lib > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4891/Lib > > Modified Files: >Cookie.py > Log Message: > bug [ 1108948 ] Cookie.py produces invalid code > > > > Index: Cookie.py > =

Re: [Python-Dev] List copy and clear (was Re: Inconsistent API for sets.Set and build-in set)

2005-06-30 Thread Tim Peters
[Raymond Hettinger] >> the current idiom: >> >>mylist[:] = [] # clear [Fred L. Drake, Jr.] > Unless you happen to prefer the other current idiom: > >del mylist[:] Or my personal favorite, while mylist: del mylist[::2] Then the original index positions with the most con

Re: [Python-Dev] List copy and clear (was Re: Inconsistent API forsets.Set and build-in set)

2005-07-07 Thread Tim Peters
[Tim Peters] >> Or my personal favorite, >> >>while mylist: >>del mylist[::2] >> >> Then the original index positions with the most consecutive trailing 1 >> bits survive the longest, which is important to avoid ZODB cache bugs >> . [Chr

Re: [Python-Dev] Chaining try statements: eltry?

2005-07-07 Thread Tim Peters
[Guido, on {for,while}/else] ... > The question remains whether Python would be easier to learn without > them. And if so, the question would remain whether that's offset by > their utility for experienced developers. All hard to assess > impartially! That's what I'm here for. I like loop "else"

Re: [Python-Dev] Chaining try statements: eltry?

2005-07-07 Thread Tim Peters
[Guido] > OTOH I don't particularly like code that requires flag variables; Me neither; that's indeed why this one isn't a slam dunk. > they often make me squirm because the same condition (flag) is > tested multiple times where it could be tested just once if more > sophisticated flow control (e

Re: [Python-Dev] Chaining try statements: eltry?

2005-07-07 Thread Tim Peters
[Jeremy Hylton] > ... > PS Every time I switch between Python and C, I get confused about > "elif" and "else if". Mostly goes to show that you don't use Perl much ;-) Of course, in C99, #define elif else if is part of . Or maybe it isn't, and it just should have been? One of those -- or close

Re: [Python-Dev] Linux Python linking with G++?

2005-07-11 Thread Tim Peters
[Michael Hudson] > --with-fpectl, for example. Does anyone lurking here actually use > that, know what it does and require the functionality? Inquiring > minds want to know. I know what it intends to do: fpectlmodule.c intends to enable the HW FPU divide-by-0, overflow, and invalid operation tr

Re: [Python-Dev] Linux Python linking with G++?

2005-07-12 Thread Tim Peters
[Michael Hudson] >>> --with-fpectl, for example. Does anyone lurking here actually use >>> that, know what it does and require the functionality? Inquiring >>> minds want to know. [Tim, explains what it intends to do] >> ... [Michael] > But do you use it? I know what it intends to do too, The

Re: [Python-Dev] should doc string content == documentation content?

2005-07-24 Thread Tim Peters
[Skip] > There's a new bug report on SF (#1243553) complaining (that's probably not > the right word) that the documentation for cgi.escape available from pydoc > isn't as detailed as that in the full documentation. Is there any desire to > make the runtime documentation available via pydoc or hel

Re: [Python-Dev] should doc string content == documentation content?

2005-07-24 Thread Tim Peters
[Tim Lesher] > While I agree that docstrings shouldn't be a deep copy of _Python in a > Nutshell_, there are definitely some areas of the standard library > that could use some help. threading comes to mind immediately. Sure! The way to cure that one is to write better docstrings for threading -

Re: [Python-Dev] zlib 1.2.3 is just out

2005-07-25 Thread Tim Peters
[Scott David Daniels] I'd guess this belongs in 2.5, with a possible retrofit for 2.4. [Raymond Hettinger] >>> +1 on backporting, but that is up to Anthony. [Martin v. L?wis wrote] >> Correct me if I'm wrong - but there isn't much "porting" to this. >> AFAICT, this is only relevant for the W

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-07-28 Thread Tim Peters
[Martin v. Löwis] > I'd like to see the Python source be stored in Subversion instead > of CVS, and on python.org instead of sf.net. To facilitate discussion, > I have drafted a PEP describing the rationale for doing so, and > the technical procedure to be performed. > > This is for discussion on p

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-07-28 Thread Tim Peters
[Jeff Rush] > The conversion script isn't perfect and does fail on complex CVS > arrangements or where there is extensive history to migate. However it > appears above that Martin has already tried the script out, with success. I'd still like to hear from Jim, as I don't believe all serious probl

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-07-28 Thread Tim Peters
[Tim] >> Ah, before I forget, "single repository" has worked very well for Zope >> (which includes top-level Zope2, Zope3, ZODB, ZConfig, zdaemon, ... >> projects): >> >> http://svn.zope.org/ >> >> Long URLs don't really get in the way in practice (rarely a need to >> type one after initial che

Re: [Python-Dev] math.fabs redundant?

2005-07-29 Thread Tim Peters
[Skip] > Why does math have an fabs function? Both it and the abs builtin function > wind up calling fabs() for floats. abs() is faster to boot. Nothing deep -- the math module supplies everything in C89's standard libm (+ a few extensions), fabs() is a std C89 libm function. There isn't a clea

Re: [Python-Dev] FW: PEP 8: exception style

2005-08-06 Thread Tim Peters
[AMK] >> PEP 8 doesn't express any preference between the >> two forms of raise statements: >> raise ValueError, 'blah' >> raise ValueError("blah") >> >> I like the second form better, because if the exception arguments are >> long or include string formatting, you don't need to use line >> continu

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-08-08 Thread Tim Peters
[Trent Mick] > ... > There are other little things, like not being able to trim the check-in > filelist when editing the check-in message. For example, say you have > 10 files checked out scattered around the Python source tree and you > want to check 9 of those in. This seems dubious, since you'

Re: [Python-Dev] __traceback__ and reference cycles

2005-08-08 Thread Tim Peters
[Armin Rigo] > There are various proposals to add an attribute on exception instances > to store the traceback (see PEP 344). A detail not discussed, which I > thought of historical interest only, is that today's exceptions try very > hard to avoid reference cycles, in particular the cycle > > '

Re: [Python-Dev] __traceback__ and reference cycles

2005-08-08 Thread Tim Peters
[Tim Peters] >> If P3K retains them [__del__]-- or maybe even before --we should >> consider taking "the Java dodge" on this one. That is, decree that >> henceforth a __del__ method will get invoked by magic at most >> once on any given object O, no matter how o

Re: [Python-Dev] __traceback__ and reference cycles

2005-08-08 Thread Tim Peters
[Brett Cannon] > Wasn't there talk of getting rid of __del__ a little while ago and > instead use weakrefs to functions to handle cleaning up? There was from me, yes, with an eye toward P3K. > Is that still feasible? It never was, really. The combination of finalizers, cycles and resurrection i

Re: [Python-Dev] Sourceforge CVS down?

2005-08-09 Thread Tim Peters
[Neil Schemenauer[ > I've been getting: > > ssh: connect to host cvs.sourceforge.net port 22: Connection refused > > for the past few hours. Their "Site News" doesn't say anything > about downtime. A cvs update doesn't work for me either now. I did finish one sometime before noon (EDT) today,

Re: [Python-Dev] PEP 347: Migration to Subversion

2005-08-15 Thread Tim Peters
[Martin v. Löwis] > I have placed a new version of the PEP on > > http://www.python.org/peps/pep-0347.html ... +1 from me. But, I don't think my vote should count much, and (sorry) Guido's even less: what do the people who frequently check in want? That means people like you (Martin), Michael

Re: [Python-Dev] PEP 347: Migration to Subversion

2005-08-16 Thread Tim Peters
[Michael Hudson] >> I suppose another question is: when? Between 2.4.2 and 2.5a1 seems >> like a good opportunity. I guess the biggest job is collection of >> keys and associated admin? [Martin v. Löwis] > I would agree. However, there still is the debate of hosting the > repository elsehwere. S

Re: [Python-Dev] PEP 347: Migration to Subversion

2005-08-16 Thread Tim Peters
[Martin v. Löwis] > Ah, ok. Of course, Barry can only speak about the current availability > of volunteers, which is quite good (especially since amk took over > coordinating them), nobody can predict the future (the time machine > apparently only works one-way). So I guess the concern stays, and,

Re: [Python-Dev] PEP 347: Migration to Subversion

2005-08-16 Thread Tim Peters
[Raymond Hettinger] > +1 from me. CVS is meeting my needs but I would definitely benefit from > fast diffs and atomic commits. My experiences with SVN to-date have all > been positive and it was easy to learn. Good! That was my experience too, BTW -- SVN was a genuine improvement over CVS, and

Re: [Python-Dev] [Python-checkins] python/dist/src/Lib/test test_bz2.py, 1.18, 1.19

2005-08-26 Thread Tim Peters
[EMAIL PROTECTED] > Update of /cvsroot/python/python/dist/src/Lib/test > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4822/Lib/test > > Modified Files: >test_bz2.py > Log Message: > Add list() around xreadlines() > > > > Index: test_bz2.py >

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-27 Thread Tim Peters
[Raymond Hettinger, rewrites some code] > ... > --- StringIO.py --- > > i = self.buf.find('\n', self.pos) > if i < 0: >newpos = self.len > else: >newpos = i+1 > . . . > > > try: >i = self.buf.find('\n', self.pos) > except ValueError(): >newpos = self.len > else: >

Re: [Python-Dev] test_bz2 on Python 2.4.1

2005-08-27 Thread Tim Peters
[Reinhold Birkenfeld] > Could anyone else on Windows please try the test_bz2, too? test_bz2 works fine here, on WinXP Pro SP2, under release and debug builds, on current CVS HEAD and on current CVS release24-maint branch. I built those 4 Pythons with the MS compiler, not MinGW. __

[Python-Dev] setdefault's second argument

2005-08-30 Thread Tim Peters
Anyone remember why setdefault's second argument is optional? >>> d = {} >>> d.setdefault(666) >>> d {666: None} just doesn't seem useful. In fact, it's so silly that someone calling setdefault with just one arg seems far more likely to have a bug in their code than to get an outcome they actual

Re: [Python-Dev] setdefault's second argument

2005-08-30 Thread Tim Peters
[Tim Peters] >> Anyone remember why setdefault's second argument is optional? >> >> >>> d = {} >> >>> d.setdefault(666) >> >>> d >> {666: None} >> ... [Josiah Carlson] > For quick reference for other people, d.s

Re: [Python-Dev] setdefault's second argument

2005-08-30 Thread Tim Peters
[Raymond] > setdefault() described it as behaving like dict.get() but inserting the > key if not found. ... > Likewise, I found zero occurrences in the library, in my cumulative code > base, and in the third-party packages on my system. [Tim] >> If there isn't a sane use case for leaving the sec

Re: [Python-Dev] setdefault's second argument

2005-08-30 Thread Tim Peters
[Wolfgang Lipp] > reminds me of dict.get()... i think in both cases being explicit:: > > beast = d.setdefault( 666, None ) > beast = d.get( 666, None ) > > just reads better, allthemore since at least in my code what comes > next is invariably a test 'if beast is None:...'. so > > beast

Re: [Python-Dev] setdefault's second argument

2005-08-30 Thread Tim Peters
[Fredrik Lundh] > ... > Anyone remember why nobody managed to come up with a better name > for setdefault (which is probably the worst name ever given to a method > in the standard Python distribution) ? I suggested a perfect name at the time: http://mail.python.org/pipermail/python-dev/2000-

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-02 Thread Tim Peters
[Paul F. Dubois] > Remove the print statementI laughed until my sides hurt. Hello? Try > dating girls and talking to normal people, geek boys. I tried talking to both, and in this case all said "What's a 'print statement'? You mean like a bank statement -- or what?" ;-) > We scientists still

Re: [Python-Dev] setdefault's second argument

2005-09-02 Thread Tim Peters
[Tim Peters] >> Dang! I may have just found a use, in Zope's >> lib/python/docutils/parsers/rst/directives/images.py (which is part >> of docutils, not really part of Zope): >> >> figwidth = options.setdefault('figwidth') >> figclass

Re: [Python-Dev] Revising RE docs

2005-09-05 Thread Tim Peters
[Fredrik Lundh] > Am I the only who are getting mails from "iextream at naver.com" > whenever I post to python-dev, btw? > > My Korean (?) isn't that good, so I'm not sure what they want... Only thing I've seen from them is one post in the archives, on June 13: http://mail.python.org/pipermai

Re: [Python-Dev] Tools directory (Was RE: Replacement for print in Python 3.0)

2005-09-09 Thread Tim Peters
[Brett Cannon] > I assume that the Windows installer includes the Tools/ directory. It installs part of it, not all: C:\Python24\Tools>dir/b i18n pynche Scripts versioncheck webchecker So it's missing these Tools directories: audiopy bgen compiler faqwiz framer freeze modulator msi unicode worl

Re: [Python-Dev] Conditional Expression Resolution

2005-09-30 Thread Tim Peters
[Guido] > After a long discussion I've decided to add a shortcut conditional > expression to Python 2.5. > > The syntax will be > >A if C else B ... > The priorities will be such that you can write > > ... > x = A if C else B if D else E I assume this groups as A if C else (B if D el

Re: [Python-Dev] PythonCore\CurrentVersion

2005-10-10 Thread Tim Peters
[Martin v. Löwis] >> What happened to the CurrentVersion registry entry documented at >> >> http://www.python.org/windows/python/registry.html >> >> AFAICT, even the python15.wse file did not fill a value in this >> entry (perhaps I'm misinterpreting the wse file, though). >> >> So was this ever us

Re: [Python-Dev] PythonCore\CurrentVersion

2005-10-11 Thread Tim Peters
[Tim Peters] >>> never before this year -- maybe sys.path _used_ to contain the current >>> directory on Linux?). [Fred L. Drake, Jr.] >> It's been a long time since this was the case on Unix of any variety; I >> *think* this changed to the current state

Re: [Python-Dev] PythonCore\CurrentVersion

2005-10-11 Thread Tim Peters
[Tim] >> Well, that's in interactive mode, and I see sys.path[0] == "" on both >> Windows and Linux then. I don't see "" in sys.path on either box in >> batch mode, although I do see the absolutized path to the current >> directory in sys.path in batch mode on Windows but not on Linux -- but >> Ma

Re: [Python-Dev] Making Queue.Queue easier to use

2005-10-11 Thread Tim Peters
[Guido] >> Apart from trying to guess the API without reading the docs (:-), what >> are the use cases for using put/get with a timeout? I have a feeling >> it's not that common. [Josiah Carlson] > With timeout=0, a shared connection/resource pool (perhaps DB, etc., I > use one in the tuple space

Re: [Python-Dev] PythonCore\CurrentVersion

2005-10-11 Thread Tim Peters
[Guido] > I tried your experiment but added 'print sys.argv[0]' and didn't see > that. sys.argv[0] is the path to the script. My mistake! You're right, sys.argv[0] is the path to the script for me too. [Tim] >> The directory of the script being run was >> nevertheless in sys.path[0] on both Wind

Re: [Python-Dev] Guido v. Python, Round 1

2005-10-17 Thread Tim Peters
[Skip] > Like Steve (and unlike Oleg), I get 404s for this page. I also tried > "www.python.org" and "~neal". The original http://python.org/neal/ worked fine for me, and still does. OTOH, http://www.python.org/neal/ gets a 404, and (the original without the trailing backslash)

[Python-Dev] int(string) (was: DRAFT: python-dev Summary for 2005-09-01 through 2005-09-16)

2005-10-21 Thread Tim Peters
... > - > Speeding up list append calls > - > > A `comp.lang.python message from Tim Peters`_ prompted Neal Norwitz > to investigate how the code that Tim posted could be sped up. He > hacked the code to replace

Re: [Python-Dev] int(string)

2005-10-22 Thread Tim Peters
[Tim] ... >> int('10200202220122211', 3) = 0 I should have added that all those examples simply used 2**32 as input, expressed as a string in the input base. They're not the only failing cases; e.g., this is also obviously wrong: >>> int('10200202220122212', 3) 1 ... >> The challenge (

Re: [Python-Dev] int(string)

2005-10-22 Thread Tim Peters
[Tim] >> I assume it's the overflow-checking that's the major time sink, [Adam Olsen] > Are you sure? No -- that's what "assume" means <0.7 wink>. For example, there's a long chain of function calls involved in int(string) too. >

Re: [Python-Dev] Conversion to Subversion is complete

2005-10-27 Thread Tim Peters
[Brett Cannon] > I have started a svn section in the dev FAQ > (http://www.python.org/dev/devfaq.html) pertaining to checking out a > project from the repository and other stuff discussed so far. If > something is not clear or people feel a step is missing, let me know. Thanks, Brett! I'm just s

Re: [Python-Dev] Freezing the CVS on Oct 26 for SVN switchover

2005-10-28 Thread Tim Peters
[EMAIL PROTECTED] >> Though there's no svn/cvs cheatsheet there, you may also find isolated >> tidbits in the Subversion FAQ: >> >> http://subversion.tigris.org/faq.html >> >> Just grep around for "cvs". [Martin v. Löwis] > In addition, you might want to read > > http://www.python.org/dev/svn.

Re: [Python-Dev] Freezing the CVS on Oct 26 for SVN switchover

2005-10-31 Thread Tim Peters
[Guido] > Help! > > What's the magic to get $Revision$ and $Date$ to be expanded upon > checkin? Comparing pep-0352.txt and pep-0343.txt, I noticed that the > latter has the svn revision and date in the headers, while the former > still has Brett's original revision 1.5 and a date somewhere in June

Re: [Python-Dev] Plea to distribute debugging lib

2005-11-04 Thread Tim Peters
[David Abrahams] > For years, Boost.Python has been doing some hacks to work around the > fact that a Windows Python distro doesn't include the debug build of > the library. > ... > MS is recommending that we (Boost) start distributing a debug build of the > Python DLL with Boost, but Boost really

Re: [Python-Dev] s/hotshot/lsprof

2005-11-20 Thread Tim Peters
[Armin Rigo] ... > ... > 'hotshot', new from 2.2, is quite faster (reportedly, only 30% added > overhead). The log file is then loaded and turned into an instance of > the same 'pstats.Stats'. This loading takes ages. The reason is that > the log file only records events, and loading is done by

Re: [Python-Dev] s/hotshot/lsprof

2005-11-20 Thread Tim Peters
[Martin v. Löwis] >> I'm really concerned that the same fate will happen to any new >> profiling library: anybody but the original author will hate it, >> write his own, and then suggest to replace the existing one. [Fredrik Lundh] > is this some intrinsic property of profilers? if the existing t

Re: [Python-Dev] Problems with the Python Memory Manager

2005-11-24 Thread Tim Peters
[Martin v. Löwis] > One way (I think the only way) this could happen if: > - the objects being allocated are all smaller than 256 bytes > - when allocating new objects, the requested size was different > from any other size previously deallocated. > > So if you first allocate 1,000,000 objects of

Re: [Python-Dev] svn problem - can't get log info for a specific revision

2005-12-05 Thread Tim Peters
[EMAIL PROTECTED] ... > Wanting to investigate that further, I checked the developer's FAQ and found > this command to view the checkin history for that rev: > >svn log --verbose -r 36760 > > When I run it I get this error: > >svn: REPORT request failed on > '/projects/!svn/bc/36760/python

Re: [Python-Dev] Documentation about Python's GC, python-dev list messages referenced in Modules/gcmodule.c not reachable anymore

2005-12-06 Thread Tim Peters
[Weber, Gregoire] >> We're seriously evaluating Python for use in embedded realtime systems >> and need some informations about Pythons garbage collector. ... [Neil Schemenauer] > It does not run in the background. One option would be to disable > the cyclic garbage collector and rely on the refe

Re: [Python-Dev] Documentation about Python's GC, python-dev list messages referenced in Modules/gcmodule.c not reachable anymore

2005-12-06 Thread Tim Peters
[Tim Peters] > ... > For example, after > >def f(): >dummy = xrange(1000) > >f() > > it's not just the `dummy` list object that's reclaimed when f exits, > it's also about 10 million integer objects. Sorry, that example should

Re: [Python-Dev] Documentation about Python's GC, python-dev list messages referenced in Modules/gcmodule.c not reachable anymore

2005-12-08 Thread Tim Peters
[Tim Peters] >> Python-style refcounting isn't generally a good approach either when >> real-time constraints must be met: when a refcount on an object P >> falls to 0, not only does the interpreter "pause" to reclaim P, but >> also to reclaim all the

Re: [Python-Dev] Documentation about Python's GC, python-dev list messages referenced in Modules/gcmodule.c not reachable anymore

2005-12-08 Thread Tim Peters
[Josiah Carlson] > I believe this particular argument is specious. Not at all, but it's not compelling on its own. > Using Python won't change requirements for knowing what is or is > not referenced during program execution for "real time" development. > Further, "real time" developers won't be

Re: [Python-Dev] Deprecate __ private (was Re: PEP 8 updates/clarifications)

2005-12-11 Thread Tim Peters
[Neal Norwitz] > I recently asked Guido about name mangling wrt Py3k. He definitely > wanted to keep it in. Unless he changed his mind, I doubt he would > deprecate it. His rationale was that there needs to be a way to > handle name collision with multiple inheritance. That wasn't quite it. Th

Re: [Python-Dev] hashlib - faster md5/sha, adds sha256/512 support

2005-12-16 Thread Tim Peters
[Ronald L. Rivest] > I'm curious as to the status of upgrading cryptographic > hash function support in Python, now that md5 and sha1 are > both clearly broken (in terms of collision-resistance). > > The consensus of researchers in this area (at least as > expressed at the NIST Hash Function Works

Re: [Python-Dev] status of development documentation

2005-12-23 Thread Tim Peters
[Neal Norwitz] > ... > I couldn't let Trent have all the fun. > > http://docs.python.org/dev/ > > And hopefully of interest to many here: > > http://docs.python.org/dev/results/ Wow! You get no test failures! I guess nobody tests on Windows anymore. I've been getting test failures for m

Re: [Python-Dev] status of development documentation

2005-12-24 Thread Tim Peters
[Neal] > Hmmm, I thought others were running the tests on Windows too. There > was one report on Nov 22 about running Purify on Windows 2k (subject: > ast status, memory leaks, etc). He had problems with a stack overflow > in test_compile. He was going to disable the test and re-run. I > never

Re: [Python-Dev] status of development documentation

2005-12-24 Thread Tim Peters
[Samuele Pedroni] > PEP263: > > """ > To aid with platforms such as Windows, which add Unicode BOM marks > to the beginning of Unicode files, the UTF-8 signature > '\xef\xbb\xbf' will be interpreted as 'utf-8' encoding as well > (even if no magic encoding comment is given). > ""

Re: [Python-Dev] status of development documentation

2005-12-24 Thread Tim Peters
[Neal Norwitz] > This gives me an idea (ie, wild ass guess). r39680 checked in on > 2005-10-06 to speed up unicode charmap decoding. Dunno if it's likely > or not. Gotta run, I'm headed east. Good luck. Nope, it's not calling any decoding functions at all on Windows, let alone optimized ones ;

Re: [Python-Dev] status of development documentation

2005-12-24 Thread Tim Peters
FWIW, test_builtin and test_pep263 both passed on WinXP in rev 39757. That's the last revision before the AST branch was merged. I can't build rev 39758 on WinXP (VC complains that pythoncore.vcproj can't be loaded -- looks like it got checked in with unresolved SVN conflict markers -- which isn'

Re: [Python-Dev] status of development documentation

2005-12-24 Thread Tim Peters
[Tim] >> FWIW, test_builtin and test_pep263 both passed on WinXP in rev 39757. >> That's the last revision before the AST branch was merged. >> >> I can't build rev 39758 on WinXP (VC complains that pythoncore.vcproj >> can't be loaded -- looks like it got checked in with unresolved SVN >> conflict

Re: [Python-Dev] status of development documentation

2005-12-25 Thread Tim Peters
Santa sent me a bad-mood elf overnight, apparently just to motivate me ;-) Since it's 2+ months after the fact, I doubt we'll ever know exactly what went wrong here. In outline: Rev 39758 (the AST merge) left pythoncore.vcproj in an unusable state. That's the VC 7.1 project file that defines wh

[Python-Dev] Automated Python testing (was Re: status of development documentation)

2005-12-25 Thread Tim Peters
Take a look at: http://buildbot.zope.org/ That runs code from: http://buildbot.sourceforge.net/ Someone sets up a "buildbot master" (that's what the Zope URL points at), and then any number of people can volunteer to set up their boxes as "buildbot slaves". From time to time the buildb

Re: [Python-Dev] Automated Python testing (was Re: status of development documentation)

2005-12-25 Thread Tim Peters
[Tim] >> Take a look at: >> >> http://buildbot.zope.org/ >> >> That runs code from: >> >> http://buildbot.sourceforge.net/ >> >> Someone sets up a "buildbot master" (that's what the Zope URL points >> at), and then any number of people can volunteer to set up their boxes >> as "buildbot sla

Re: [Python-Dev] deque alternative (was: Linked lists)

2005-12-25 Thread Tim Peters
[Martin Blais] > ... > Also, there is something incredibly elegant and simple and compact > about the cons cell, maybe all we need is a good simple cons cell type > and a nice interface on it, so you get both single-linked lists and > trees at the same time... The first "cons cell" C extension for

Re: [Python-Dev] Build failure and problem on Windows

2005-12-25 Thread Tim Peters
[Thomas Heller] >>> Building the svn trunk on Windows fails because Python\pyarena.c is >>> missing in the pythoncore.vcproj file (I'm not yet up to speed with svn, >>> otherwise I would have checked in a fix for this myself). >>> >>> Worse, when running the built exe it segfaults in Py_GetBuildInf

Re: [Python-Dev] deque alternative (was: Linked lists)

2005-12-26 Thread Tim Peters
[restoring context and attributions lost in the original] [Tim Peters] >>>> Like Phillip Eby, I use 2-tuples for this when I feel the need >>>> (usually during a backtracking graph search, to keep track of paths >>>> back to the root in a space-efficient wa

Re: [Python-Dev] deque alternative (was: Linked lists)

2005-12-26 Thread Tim Peters
... [Tim Peters] >> I'm sure he did ;-) Consider a very simple graph, a skinny tree >> rooted at `A` that branches once "at the end", represented by a dict >> of adjacency lists: [Josiah Carlson] > Are you sure? Of what? > ... > But one doesn't

Re: [Python-Dev] a quit that actually quits

2005-12-27 Thread Tim Peters
[Martin v. Löwis] >> If you want to type something consistently across platforms, you can >> currently do >> >> >>>raise SystemExit [Hans Nowak] > I'm not sure what to say to that. Do you really want to type "raise > SystemExit" every time you want to exit the interpreter? (Your answer > would p

Re: [Python-Dev] Automated Python testing (was Re: status of development documentation)

2005-12-28 Thread Tim Peters
[Martin v. Löwis] > ... > Unfortunately, it doesn't work at all, because svn_buildbot.py does > not report branches on which a change happened, so if you have multiple > schedulers for a subversion source, they either all build when a change > occurs, or none of them. > > If svn_version knew about

Re: [Python-Dev] suggestion for smarter garbage collection in function of size (gc.set_collect_mem_growth(2))

2005-12-28 Thread Tim Peters
[Martin v. Löwis] > ... > One challenge is that PyObject_GC_Del doesn't know how large the > memory block is that is being released. So it is difficult to find out how > much memory is being released in the collection. "Impossible in some cases" is accurate. When pymalloc isn't enabled, all these

Re: [Python-Dev] New PEP: Using ssize_t as the index type

2005-12-29 Thread Tim Peters
[Martin v. Löwis] ... > PEP: XXX > Title: Using ssize_t as the index type +1, and for Python 2.5, and the sooner done the less painful for all. Same concerns as Armin, where this is especially unattractive: > The conversion codes 's#' and 't#' will output Py_ssize_t > if the macro PY_SIZE_T_CLEA

Re: [Python-Dev] When do sets shrink?

2005-12-31 Thread Tim Peters
[Noam Raphael] >>> For example, iteration over a set which once had >>> 1,000,000 members and now has 2 can take 1,000,000 operations every >>> time you traverse all the (2) elements. [Raymond Hettinger] >> Do you find that to be a common or plausible use case? [Naom] > I don't have a concrete ex

Re: [Python-Dev] [Python-checkins] commit of r41906 - python/branches/ssize_t/Objects/obmalloc.c

2006-01-03 Thread Tim Peters
> Author: martin.v.loewis > Date: Tue Jan 3 14:16:53 2006 > New Revision: 41906 > > Modified: >python/branches/ssize_t/Objects/obmalloc.c > Log: > Disable 32-bit size limitation for 64-bit mode. > > > Modified: python/branches/ssize_t/Objects/obmalloc.c > ==

Re: [Python-Dev] [Python-checkins] commit of r41880 - python/trunk/Python/Python-ast.c

2006-01-03 Thread Tim Peters
[Jeremy Hylton] >> I think this solution is better. It's relatively rare for people to >> change the ast definition, so for most purposes these should be static >> files. [Martin v. Löwis] > Interestingly enough, I found yesterday that Python-ast.c did change for > me, even though I had not touch

Re: [Python-Dev] Including zlib...

2006-01-03 Thread Tim Peters
[Guido] > Hear, hear. [Skip] >> Martin checked in zlib to the Python svn repository. Are we really sure >> that including zlib is the only path to whatever it is that it achieves? If >> security holes in zlib turn up (they have in the past), new Python releases >> will have to be released quickl

Re: [Python-Dev] Including zlib...

2006-01-03 Thread Tim Peters
[Guido] > OK. As long a typical Unix build still links with whatever shared zlib > is present on the box I'm fine with this. [Guido] >>> Hear, hear. [Skip] Martin checked in zlib to the Python svn repository. Are we really sure that including zlib is the only path to whatever it is th

Re: [Python-Dev] [Python-checkins] commit of r41906 - python/branches/ssize_t/Objects/obmalloc.c

2006-01-03 Thread Tim Peters
[Tim] > >>Modified: python/branches/ssize_t/Objects/obmalloc.c > [...] >> This checkin should be reverted for now. [Martin] > Not sure whether you've noticed this is "just" on the ssize_t branch. Right, I noticed. > Without this patch, it is not possible to allocate 4GiB or more for > a string o

Re: [Python-Dev] TAR problems under Solaris

2006-01-04 Thread Tim Peters
[Reinhold Birkenfeld] > Recently, someone on dclpy posted about an error he got > when he tried to unpack the Python distribution tarball > with Sparc Solaris 9's tar: > > tar: directory checksum error > > With GNU tar, it worked correctly. > > Is this a known issue, or is it irrelevant? It's a kn

Re: [Python-Dev] Buildbot questions

2006-01-05 Thread Tim Peters
[Morel Xavier] > I currently have a (quite weak) computer that mostly sits idle (shares > the web connection), Tbird 750; 640Mb RAM; Windows Server 2003 Standard > Edition. > > Since the computer sits there doing nothing, I could probably put a > buildbot on it if needed (since the

Re: [Python-Dev] Buildbot questions

2006-01-05 Thread Tim Peters
[John J Lee] > Might a buildbot running this setup of David Munman's (free MS compiler + > NAnt interpreting the MS project file) be useful? > > http://groups.google.co.uk/group/comp.lang.python/browse_frm/thread/226584dd47047bb6/1e33ad19197bee20 No comment from me about that (don't know anything

Re: [Python-Dev] Checking in a broken test was: Re: [Python-checkins] r41940 - python/trunk/Lib/test/test_compiler.py

2006-01-07 Thread Tim Peters
[Neal Norwitz] > ... > In the past, we haven't checked in tests which are known to be broken. It's an absolute rule that you never check in a change (whether a test or anything else) that causes ``regretst.py -uall`` to fail. Even if it passes on your development box, but fails on someone else's

Re: [Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c

2006-01-08 Thread Tim Peters
[neal.norwitz] >> PyErr_Format(PyExc_ValueError, >> - "%s() requires a code object with %d free vars," >> - " not %d", >> + "%s() requires a code object with %ld free vars," >> + " not

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Tim Peters
[Thomas Wouters] > My point isn't that it isn't archived somewhere (mailinglists, wiki, FAQ, > the minds of many, many people, not just Python developers) but that it > isn't easily findable and it isn't easily accessible in a single location. I > thought PEP's where supposed to be that, and if I h

Re: [Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c

2006-01-08 Thread Tim Peters
[Tim] > ... > I suspect we're going to have other problems when someone gets around > to passing a size_t-ish value to PyString_Format() or PyErr_Format(). > Maybe we could teach those about the "z" qualifier on all platforms. Yup. Because the supporting PyString_FromFormatV() doesn't know anythi

Re: [Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c

2006-01-08 Thread Tim Peters
[Tim] >> That handles C99-ish platforms by defalt. Other platforms (like >> Windows) would need to supply their own expansion in their pyconfig.h. >> Neal's format would become the god-awful >> but platform-neutral: >> >> "%s() requires a code object with %" Py_SIZE_T_WIDTH "d free vars

Re: [Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c

2006-01-08 Thread Tim Peters
[Martin v. Löwis] > On VC7.1, we could use 'L', right? We could use the "I" (capital letter eye) length modifier under VC7.1. That's good for both size_t and ptrdiff_t formats under VC7.1, where ptrdiff_t under VC7.1 is really the same concept as Py_ssize_t. On 32-bit boxes, "I" means 4 bytes, a

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Tim Peters
[Martin] >> But now: who is going to write it? "Guido should write it" clearly won't >> work. And no, I'm explicitly not volunteering either. [Thomas] > Well, the PEP will be mostly boilerplate anyway (unless there's a sudden > influx of old ideas) so I'm sure I can whip something up before next >

Re: [Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c

2006-01-09 Thread Tim Peters
... [Tim] >> That's no more or less painful than using C99's huge pile of PRId8, >> PRId16, PRId32 (etc, etc) macros, defined there for similar purposes. [Martin] > Right - and I consider them just as painful. > > If you believe that this is really what we should be doing, then, well, > let's do

<    5   6   7   8   9   10   11   >