Re: [Python-Dev] Accepting PEP 3154 for 3.4?

2013-11-20 Thread Alexandre Vassalotti
On Tue, Nov 19, 2013 at 2:09 PM, Antoine Pitrou wrote: > > Well, I don't think it's a big deal to add a FRAME opcode if it doesn't > change the current framing logic. I'd like to defer to Alexandre on this > one, anyway. Looking at the different options available to us: 1A. Mandatory framing

Re: [Python-Dev] Sharing docstrings between the Python and C implementations of a module

2013-04-15 Thread Alexandre Vassalotti
On Mon, Apr 15, 2013 at 12:56 AM, David Lam wrote: > I tried to find an example in the source which addressed this, but > found that the docstrings in similar cases to be largely duplicated. > I find this annoying too. It would be nice to have a common way to share docstrings between C and Pytho

Re: [Python-Dev] Usage of += on strings in loops in stdlib

2013-02-12 Thread Alexandre Vassalotti
On Tue, Feb 12, 2013 at 5:25 PM, Christian Tismer wrote: > Would ropes be an answer (and a simple way to cope with string mutation > patterns) as an alternative implementation, and therefore still justify > the usage of that pattern? > I don't think so. Ropes are really useful when you work with

Re: [Python-Dev] Usage of += on strings in loops in stdlib

2013-02-12 Thread Alexandre Vassalotti
On Tue, Feb 12, 2013 at 1:44 PM, Antoine Pitrou wrote: > It's idiomatic because strings are immutable (by design, not because of > an optimization detail) and therefore concatenation *has* to imply > building a new string from scratch. > Not necessarily. It is totally possible to implement strin

Re: [Python-Dev] cpython: Issue #16218: skip test if filesystem doesn't support required encoding

2012-11-08 Thread Alexandre Vassalotti
On Thu, Nov 8, 2012 at 9:45 AM, Serhiy Storchaka wrote: > My intention was testing with filename which cannot be decoded as UTF-8 in > strict mode. I agree that testing with name which is encodable in locale > encoding can be useful too, but now the test has no effect on UTF-8 locale. So should

Re: [Python-Dev] cpython: Issue #16218: skip test if filesystem doesn't support required encoding

2012-11-07 Thread Alexandre Vassalotti
The Unicode code points in the U+DC00-DFFF range (low surrogate area) can't be encoded in UTF-8. Quoting from RFC 3629 : *The definition of UTF-8 prohibits encoding character numbers between U+D800 and U+DFFF, which

Re: [Python-Dev] Benchmarking Python 3.3 against Python 2.7 (wide build)

2012-09-30 Thread Alexandre Vassalotti
On Sun, Sep 30, 2012 at 4:50 PM, Brett Cannon wrote: > I accidentally left out the telco benchmark, which is bad since cdecimal > makes it just scream on Python 3.3 (and I verified with Python 3.2 that > this is an actual speedup and not some silly screw-up like I initially had > with spectral_no

Re: [Python-Dev] On a new version of pickle [PEP 3154]: self-referential frozensets

2012-06-27 Thread Alexandre Vassalotti
On Sat, Jun 23, 2012 at 3:19 AM, M Stefan wrote: > * UNION_FROZENSET: like UPDATE_SET, but create a new frozenset >stack before: ... pyfrozenset mark stackslice >stack after : ... pyfrozenset.union(stackslice) > Since frozenset are immutable, could you explain how adding the UNION_FROZEN

[Python-Dev] What should we do with cProfile?

2012-05-29 Thread Alexandre Vassalotti
Hello, As per PEP 3108, we were supposed to merge profile/cProfile into one unified module. I initially championed the change, but other things got in the way and I have never got to the point of a useful patch. I posted some code and outlined an approach how the merge could be done. However, ther

Re: [Python-Dev] Cython for cPickle?

2012-04-22 Thread Alexandre Vassalotti
On Sun, Apr 22, 2012 at 6:12 PM, wrote: > So I disagree that we could easily reach the point where it's "close to >> the >> speed of what we have." And if we were to attempt this, it would be a >> multiple months undertaking. I would rather see that time spent on >> improving pickle than on yet

Re: [Python-Dev] Cython for cPickle?

2012-04-22 Thread Alexandre Vassalotti
On Thu, Apr 19, 2012 at 4:55 AM, Stefan Behnel wrote: > > That sounds like less than two weeks of work, maybe even if we add the > marshal module to it. > In less than a month of GSoC time, this could easily reach a point where > it's "close to the speed of what we have" and "fast enough", but a l

Re: [Python-Dev] PEP 3154 - pickle protocol 4

2011-08-15 Thread Alexandre Vassalotti
On Fri, Aug 12, 2011 at 3:58 AM, Antoine Pitrou wrote: > > Hello, > > This PEP is an attempt to foster a number of small incremental > improvements in a future pickle protocol version. The PEP process is > used in order to gather as many improvements as possible, because the > introduction of a n

Re: [Python-Dev] Speeding up 2to3: Results from a GSOC Project

2010-07-30 Thread Alexandre Vassalotti
Love it! BTW, it's not a good idea to have an import statement under 3 level of loops: https://code.google.com/p/2to3-speedup2/source/browse/trunk/lib2to3/refactor.py#427 -- Alexandre ___ Python-Dev mailing list Python-Dev@python.org http://mail.python

Re: [Python-Dev] Readability of hex strings (Was: Use of coding cookie in 3.x stdlib)

2010-07-26 Thread Alexandre Vassalotti
[+Python-ideas -Python-Dev] import binascii def h(s): return binascii.unhexlify("".join(s.split())) h("DE AD BE EF CA FE BA BE") -- Alexandre On Mon, Jul 26, 2010 at 11:29 AM, anatoly techtonik wrote: > I find "\xXX\xXX\xXX\xXX..." notation for binary data totally > unreadable. Everybody who

Re: [Python-Dev] Future of 2.x.

2010-06-09 Thread Alexandre Vassalotti
On Wed, Jun 9, 2010 at 5:55 AM, Facundo Batista wrote: > Yes, closing the tickets as "won't fix" and tagging them as > "will-never-happen-in-2.x" or something, is the best combination of > both worlds: it will clean the tracker and ease further developments, > and will allow anybody to pick up tho

Re: [Python-Dev] Future of 2.x.

2010-06-09 Thread Alexandre Vassalotti
On Wed, Jun 9, 2010 at 1:23 PM, "Martin v. Löwis" wrote: > Closing the backport requests is fine. For the feature requests, I'd only > close them *after* the 2.7 release (after determining that they won't apply > to 3.x, of course). > > There aren't that many backport requests, anyway, are there?

[Python-Dev] Future of 2.x.

2010-06-08 Thread Alexandre Vassalotti
Is there is any plan for a 2.8 release? If not, I will go through the tracker and close outstanding backport requests of 3.x features to 2.x. -- Alexandre ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-de

Re: [Python-Dev] Did I miss the decision to untabify all of the C code?

2010-05-05 Thread Alexandre Vassalotti
On Wed, May 5, 2010 at 8:52 PM, Joao S. O. Bueno wrote: > Python 2.7 is in beta, but not applying such a fix now would probably > mean that python 2.x would forever remain with the mixed tabs, since > it would make much less sense for such a change in a minor revision > (although I'd favor it even

Re: [Python-Dev] Running Clang 2.7's static analyzer over the code base

2010-05-03 Thread Alexandre Vassalotti
On Mon, May 3, 2010 at 7:34 PM, Barry Warsaw wrote: > Now would be a good time to convert the C files to 4 space indents.  We've > only been talking about it for a decade at least. Will changing the indentation of source files to 4 space indents break patches on the bug tracker? -- Alexandre ___

Re: [Python-Dev] Unpickling memory usage problem, and a proposed solution

2010-04-23 Thread Alexandre Vassalotti
On Fri, Apr 23, 2010 at 3:57 PM, Dan Gindikin wrote: > This wouldn't help our use case, your code needs the entire pickle > stream to be in memory, which in our case would be about 475mb, this > is on top of the 300mb+ data structures that generated the pickle > stream. > In that case, the best w

Re: [Python-Dev] Unpickling memory usage problem, and a proposed solution

2010-04-23 Thread Alexandre Vassalotti
On Fri, Apr 23, 2010 at 3:07 PM, Collin Winter wrote: > I should add that, adding the necessary bookkeeping to remove only > unused PUTs (instead of the current all-or-nothing scheme) should not > be hard. I'd watch out for a further performance/memory hit; the > pickling benchmarks in the benchma

Re: [Python-Dev] Unpickling memory usage problem, and a proposed solution

2010-04-23 Thread Alexandre Vassalotti
On Fri, Apr 23, 2010 at 2:38 PM, Alexandre Vassalotti wrote: > Collin Winter wrote a simple optimization pass for cPickle in Unladen > Swallow [1]. The code reads through the stream and remove all the > unnecessary PUTs in-place. > I just noticed the code removes *all* PUT opcodes, r

Re: [Python-Dev] Unpickling memory usage problem, and a proposed solution

2010-04-23 Thread Alexandre Vassalotti
On Fri, Apr 23, 2010 at 2:11 PM, Dan Gindikin wrote: > We were having performance problems unpickling a large pickle file, we were > getting 170s running time (which was fine), but 1100mb memory usage. Memory > usage ought to have been about 300mb, this was happening because of memory > fragmentat

Re: [Python-Dev] contributor to committer

2010-02-24 Thread Alexandre Vassalotti
On Wed, Feb 24, 2010 at 7:13 AM, Florent Xicluna wrote: > Hello, > > I am a semi-regular contributor for Python: I have contributed many patches > since end of last year, some of them were reviewed by Antoine. > Lately, he suggested that I should apply for commit rights. > +1 -- Alexandre __

Re: [Python-Dev] Help wanted on a code generator project

2010-01-26 Thread Alexandre Vassalotti
On Tue, Jan 26, 2010 at 7:04 AM, Yingjie Lan wrote: >> note that this is quite off-topic for this list, which is >> about the >> development of the CPython interpreter and runtime >> environment. > > Sorry if this is bothering you. I thought here are a lot of people who knows > how to write exten

Re: [Python-Dev] PEP 3003 - Python Language Moratorium

2009-11-04 Thread Alexandre Vassalotti
On Tue, Nov 3, 2009 at 12:35 PM, Guido van Rossum wrote: > I've checked draft (!) PEP 3003, "Python Language Moratorium", into > SVN. As authors I've listed Jesse, Brett and myself. > +1 from me. -- Alexandre ___ Python-Dev mailing list Python-Dev@pyth

Re: [Python-Dev] [Fwd: [issue6397] Implementing Solaris "poll" in the "select" module]

2009-07-01 Thread Alexandre Vassalotti
On Wed, Jul 1, 2009 at 10:05 PM, Guido van Rossum wrote: > The select module already supports the poll() system call. Or is there > a special variant that only Solaris has? > I think Jesus refers to /dev/poll—i.e., the interface for edge-triggered polling on Solaris. This is the Solaris equivalent

Re: [Python-Dev] Draft PEP 385: Migrating from svn to Mercurial

2009-06-08 Thread Alexandre Vassalotti
On Mon, Jun 8, 2009 at 3:57 PM, "Martin v. Löwis" wrote: > FWIW, I really think that PEP 385 should really grow a timeline > pretty soon. Are we going to switch this year, next year, or 2011? > +1 -- Alexandre ___ Python-Dev mailing list Python-Dev@pyth

Re: [Python-Dev] Dropping bytes "support" in json

2009-04-13 Thread Alexandre Vassalotti
On Mon, Apr 13, 2009 at 5:25 PM, Daniel Stutzbach wrote: > On Mon, Apr 13, 2009 at 3:02 PM, "Martin v. Löwis" > wrote: >> >> > True, I can always convert from bytes to str or vise versa. >> >> I think you are missing the point. It will not be necessary to convert. > > Sometimes I want bytes and s

Re: [Python-Dev] Dropping bytes "support" in json

2009-04-09 Thread Alexandre Vassalotti
On Thu, Apr 9, 2009 at 1:15 AM, Antoine Pitrou wrote: > As for reading/writing bytes over the wire, JSON is often used in the same > context as HTML: you are supposed to know the charset and decode/encode the > payload using that charset. However, the RFC specifies a default encoding of > utf-8. (

Re: [Python-Dev] Mercurial?

2009-04-06 Thread Alexandre Vassalotti
On Tue, Apr 7, 2009 at 2:03 AM, Stephen J. Turnbull wrote: > Alexandre Vassalotti writes: > >  > This makes me remember that we will have to decide how we will >  > reorganize our workflow. For this, we can either be conservative and >  > keep the current CVS-style devel

Re: [Python-Dev] Mercurial?

2009-04-05 Thread Alexandre Vassalotti
On Mon, Apr 6, 2009 at 12:20 AM, Aahz wrote: > How difficult would it be to change the decision later?  That is, how > about starting with a CVS-style system and maybe switch to kernel-style > once people get comfortable with Hg? I believe it would be fairly easy. It would be a matter of declarin

Re: [Python-Dev] Mercurial?

2009-04-05 Thread Alexandre Vassalotti
On Sun, Apr 5, 2009 at 2:40 PM, "Martin v. Löwis" wrote: >> Okay, sounds like that will be easy. Would be good to enable compression >> on the SSH, though, if that's not already done. > > Where is that configured? > If I recall correctly, only ssh clients can request compression to the server—in

Re: [Python-Dev] Mercurial?

2009-04-05 Thread Alexandre Vassalotti
On Sun, Apr 5, 2009 at 2:45 PM, Dirkjan Ochtman wrote: > On 05/04/2009 20:36, "Martin v. Löwis" wrote: >> >> We do require full real names (i.e. no nicknames). Can Mercurial >> guarantee such a thing? > > We could pre-record the list of allowed names in a hook, then have the hook > check that user

Re: [Python-Dev] Mercurial?

2009-04-05 Thread Alexandre Vassalotti
On Sun, Apr 5, 2009 at 1:37 PM, "Martin v. Löwis" wrote: > I think it should be stated in the PEP what branches get converted, > in what form, and what the further usage of the svn repository should > be. > Noted. > I think there is a long tradition of such annotations; we should > try to repeat

Re: [Python-Dev] Mercurial?

2009-04-05 Thread Alexandre Vassalotti
On Sun, Apr 5, 2009 at 6:27 AM, Antoine Pitrou wrote: > Alexandre Vassalotti peadrop.com> writes: >> >> Off the top of my head, the following is needed for a successful migration: > > There's also the issue of how we adapt the current workflow of "svnmerging&q

Re: [Python-Dev] Mercurial?

2009-04-05 Thread Alexandre Vassalotti
On Sun, Apr 5, 2009 at 5:06 AM, "Martin v. Löwis" wrote: >> Off the top of my head, the following is needed for a successful migration: >> >>    - Verify that the repository at http://code.python.org/hg/ is >> properly converted. > > I see that this has four branches. What about all the other bran

[Python-Dev] Should I/O object wrappers close their underlying buffer when deleted?

2009-04-04 Thread Alexandre Vassalotti
Hello, I would like to call to your attention the following behavior of TextIOWrapper: import io def test(buf): textio = io.TextIOWrapper(buf) buf = io.BytesIO() test(buf) print(buf.closed) # This prints True currently The problem here is TextIOWrapper closes its buffer whe

Re: [Python-Dev] BufferedReader.peek() ignores its argument

2009-04-04 Thread Alexandre Vassalotti
On Sat, Apr 4, 2009 at 9:03 PM, Antoine Pitrou wrote: > Hello, > > Currently, BufferedReader.peek() ignores its argument and can return more or > less than the number of bytes requested by the user. This is how it was > implemented in the Python version, and we've reflected this in the C version.

Re: [Python-Dev] Mercurial?

2009-04-04 Thread Alexandre Vassalotti
On Sat, Apr 4, 2009 at 11:40 AM, Aahz wrote: > With Brett's (hopefully temporary!) absence, who is spearheading the > Mercurial conversion?  Whoever it is should probably take over PEP 374 > and start updating it with the conversion plan, particularly WRT > expectations for dates relative to 3.1 f

Re: [Python-Dev] Should the io-c modules be put in their own directory?

2009-04-03 Thread Alexandre Vassalotti
On Fri, Apr 3, 2009 at 5:12 PM, Benjamin Peterson wrote: > I'm +.2. This is the layout I would suggest: > > Modules/ >  _io/ >     _io.c >     stringio.c >     textio.c >     etc > That seems good to me. I opened an issue on the tracker and included a patch. http://bugs.python.org/issue5682

Re: [Python-Dev] issue5578 - explanation

2009-04-03 Thread Alexandre Vassalotti
On Tue, Mar 31, 2009 at 11:25 PM, Guido van Rossum wrote: > Well hold on for a minute, I remember we used to have an exec > statement in a class body in the standard library, to define some file > methods in socket.py IIRC. FYI, collections.namedtuple is also implemented using exec. - Alexandre

[Python-Dev] Should the io-c modules be put in their own directory?

2009-04-02 Thread Alexandre Vassalotti
Hello, I just noticed that the new io-c modules were merged in the py3k branch (I know, I am kind late on the news—blame school work). Anyway, I am just wondering if it would be a good idea to put the io-c modules in a sub-directory (like sqlite), instead of scattering them around in the Modules/

Re: [Python-Dev] And the winner is...

2009-03-31 Thread Alexandre Vassalotti
2009/3/31 Alex Martelli : > On Tue, Mar 31, 2009 at 5:42 PM, Tres Seaver wrote: >> Stephen J. Turnbull wrote: >> >> > I also just wrote a long post about the comparison of bzr to hg >> > responding to a comment on baz...@canonical.com.  I won't recap it >> > here but it might be of interest. >> >>

Re: [Python-Dev] GPython?

2009-03-26 Thread Alexandre Vassalotti
On Thu, Mar 26, 2009 at 11:40 PM, Collin Winter wrote: > In fact, right now I'm adding a last few tests before putting our cPickle > patches up on the tracker for further review. > Put me in the nosy list when you do; and when I get some free time, I will give your patches a complete review. I've

Re: [Python-Dev] IO implementation: in C and Python?

2009-02-19 Thread Alexandre Vassalotti
On Fri, Feb 20, 2009 at 12:35 AM, Steven D'Aprano wrote: > > Currently, if I want to verify that (say) cFoo and Foo do the same thing, or > compare their speed, it's easy because I can import the modules separately. > Given the 3.0 approach, how would one access the Python versions without > black

Re: [Python-Dev] undesireable unpickle behavior, proposed fix

2009-01-27 Thread Alexandre Vassalotti
On Tue, Jan 27, 2009 at 5:16 PM, Jake McGuire wrote: > Another vaguely related change would be to store string and unicode objects > in the pickler memo keyed as themselves rather than their object ids. That wouldn't be difficult to do--i.e., simply add a type check in Pickler.memoize and another

Re: [Python-Dev] test_subprocess and sparc buildbots

2008-12-30 Thread Alexandre Vassalotti
On Tue, Dec 30, 2008 at 10:41 PM, Daniel (ajax) Diniz wrote: > A reliable way to get that in a --with-pydebug build seems to be: > > ~/py3k$ ./python -c "import locale; locale.format_string(1,1)" > * ob > object : > type: tuple > refcount: 0 > address : 0x825c76c > * op->_ob_prev->_ob_next >

Re: [Python-Dev] test_subprocess and sparc buildbots

2008-12-30 Thread Alexandre Vassalotti
Here is what I found just by analyzing the logs. It seems the first failures appeared after this change: http://svn.python.org/view/python/branches/release30-maint/Objects/object.c?rev=67888&view=diff&r1=67888&r2=67887&p1=python/branches/release30-maint/Objects/object.c&p2=/python/branches/release

Re: [Python-Dev] extremely slow exit for program having huge (45G) dict (python 2.5.2)

2008-12-22 Thread Alexandre Vassalotti
On Mon, Dec 22, 2008 at 7:34 PM, Antoine Pitrou wrote: > >> Now, we should find a way to benchmark this without having to steal Mike's >> machine and wait 30 minutes every time. > > So, I seem to reproduce it. The following script takes about 15 seconds to > run and allocates a 2 GB dict which it

Re: [Python-Dev] extremely slow exit for program having huge (45G) dict (python 2.5.2)

2008-12-20 Thread Alexandre Vassalotti
[Sorry, for the previous garbage post.] > On Fri, Dec 19, 2008 at 6:29 PM, Mike Coleman wrote: > I have a program that creates a huge (45GB) defaultdict. (The keys > are short strings, the values are short lists of pairs (string, int).) > Nothing but possibly the strings and ints is shared. Cou

Re: [Python-Dev] extremely slow exit for program having huge (45G) dict (python 2.5.2)

2008-12-20 Thread Alexandre Vassalotti
On Fri, Dec 19, 2008 at 6:29 PM, Mike Coleman wrote: > I have a program that creates a huge (45GB) defaultdict. (The keys > are short strings, the values are short lists of pairs (string, int).) > Nothing but possibly the strings and ints is shared. > > That is, after executing the final stat

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Alexandre Vassalotti
On Mon, Dec 15, 2008 at 3:59 PM, Guido van Rossum wrote: > Aha! A specific file. I'm supportive of fixing that specific file. Now > if you can figure out how to do it and still allow merging between 2.6 > and 3.0 that would be cool. > Here's the simplest solution I thought so far to allow smooth

Re: [Python-Dev] 2to3 question about fix_imports.

2008-12-14 Thread Alexandre Vassalotti
On Sun, Dec 14, 2008 at 1:34 PM, Lennart Regebro wrote: > On Sun, Dec 14, 2008 at 19:19, Alexandre Vassalotti > wrote: >> Which revision of python are you using? I tried the test-case you gave >> and 2to3 translated it perfectly. > > 3.0, I haven't tried with trunk

Re: [Python-Dev] 2to3 question about fix_imports.

2008-12-14 Thread Alexandre Vassalotti
On Fri, Dec 12, 2008 at 11:39 AM, Lennart Regebro wrote: > The fix_imports fix seems to fix only the first import per line that you have. > So if you do for example > import urllib2, cStringIO > it will not fix cStringIO. > > Is this a bug or a feature? :-) If it's a feature it should warn at >

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Alexandre Vassalotti
On Sun, Dec 14, 2008 at 12:57 PM, Alexandre Vassalotti wrote: > On Sun, Dec 14, 2008 at 12:43 PM, Jeffrey Yasskin wrote: >> I've never figured out how to configure emacs to deduce whether the >> current file uses spaces or tabs and has a 4 or 8 space indent. I >>

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Alexandre Vassalotti
On Sun, Dec 14, 2008 at 12:43 PM, Jeffrey Yasskin wrote: > I've never figured out how to configure emacs to deduce whether the > current file uses spaces or tabs and has a 4 or 8 space indent. I > always try to get it right anyway, but it'd be a lot more convenient > if my editor did it for me. If

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Alexandre Vassalotti
On Sat, Dec 13, 2008 at 5:11 PM, Antoine Pitrou wrote: > Guido van Rossum python.org> writes: >> >> I think we should not do this. We should use 4 space indents for new >> files, but existing files should not be reindented. > > Well, right now many files are indented with a mix of spaces and tabs

Re: [Python-Dev] Proper initialization of structs

2008-10-30 Thread Alexandre Vassalotti
[oops, I forgot to cc the list] On Thu, Oct 30, 2008 at 7:43 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Alexandre Vassalotti wrote: >> >> And that is exactly the reason why, the _pickle module doesn't use >> __new__ for initialization. Doing any kind o

Re: [Python-Dev] Proper initialization of structs

2008-10-30 Thread Alexandre Vassalotti
On Thu, Oct 30, 2008 at 6:36 PM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Alexandre Vassalotti wrote: >> And that is exactly the reason why, the _pickle module doesn't use >> __new__ for initialization. Doing any kind of argument parsing in >> __new__ prevents

Re: [Python-Dev] Proper initialization of structs

2008-10-30 Thread Alexandre Vassalotti
On Thu, Oct 30, 2008 at 1:00 PM, Fred Drake <[EMAIL PROTECTED]> wrote: > It's good to move work into __init__ where reasonable, so that it can be > avoided if a subclass wants it done in a completely different way, but new > can't work that way. > And that is exactly the reason why, the _pickle mo

Re: [Python-Dev] C API for gc.enable() and gc.disable()

2008-06-25 Thread Alexandre Vassalotti
On Thu, Jun 26, 2008 at 12:01 AM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> I would it be possible, if not a good idea, to only track object >> deallocations as the GC traversal trigger? As far as I know, dangling >> cyclic references cannot be formed when allocating objects. > > Not sure wha

Re: [Python-Dev] C API for gc.enable() and gc.disable()

2008-06-25 Thread Alexandre Vassalotti
On Wed, Jun 25, 2008 at 4:55 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > I think exactly the other way 'round. The timing of thing should not > matter at all, only the exact sequence of allocations and deallocations. I would it be possible, if not a good idea, to only track object deallocat

Re: [Python-Dev] C API for gc.enable() and gc.disable()

2008-06-19 Thread Alexandre Vassalotti
On Sun, Jun 1, 2008 at 12:28 AM, Adam Olsen <[EMAIL PROTECTED]> wrote: > On Sat, May 31, 2008 at 10:11 PM, Alexandre Vassalotti > <[EMAIL PROTECTED]> wrote: >> Would anyone mind if I did add a public C API for gc.disable() and >> gc.enable()? I would like to use

Re: [Python-Dev] [Python-3000] Betas today - I hope

2008-06-11 Thread Alexandre Vassalotti
On Wed, Jun 11, 2008 at 7:35 AM, Barry Warsaw <[EMAIL PROTECTED]> wrote: > My plan is to begin building the betas tonight, at around 9 or 10pm EDT > (0100 to 0200 UTC Thursday). If a showstopper comes up before then, I'll > email the list. If you think we really aren't ready for beta, then I woul

Re: [Python-Dev] [Python-3000] How to specify keyword-only arguments from C?

2008-06-05 Thread Alexandre Vassalotti
On Thu, Jun 5, 2008 at 11:18 PM, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > On Thu, Jun 5, 2008 at 10:14 PM, Mark Hammond <[EMAIL PROTECTED]> wrote: >> Set an error if the 'arg' tuple doesn't have a length of zero? >> > > Oh, that isn't

[Python-Dev] C API for gc.enable() and gc.disable()

2008-05-31 Thread Alexandre Vassalotti
Would anyone mind if I did add a public C API for gc.disable() and gc.enable()? I would like to use it as an optimization for the pickle module (I found out that I get a good 2x speedup just by disabling the GC while loading large pickles). Of course, I could simply import the gc module and call th

Re: [Python-Dev] Module renaming and pickle mechanisms

2008-05-17 Thread Alexandre Vassalotti
Errata: On Sat, May 17, 2008 at 10:59 AM, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > And, one solution to this is to use Python 2.6 to regenerate pickle > stream. ... to regenerate *the* pickle *streams*. > It is surely not the most elegant or robust solution, but I could

Re: [Python-Dev] Module renaming and pickle mechanisms

2008-05-17 Thread Alexandre Vassalotti
On Sat, May 17, 2008 at 5:05 AM, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > I'd like to bring a potential problem to attention that is caused > by the recent module renaming approach: > > Object serialization protocols like e.g. pickle usually store the > complete module path to the object class to

Re: [Python-Dev] Symbolic errno values in error messages

2008-05-16 Thread Alexandre Vassalotti
On Fri, May 16, 2008 at 10:52 AM, Yannick Gingras <[EMAIL PROTECTED]> wrote: > "Alexander Belopolsky" <[EMAIL PROTECTED]> writes: > > try: >> ...open('/') >> ... except Exception,e: >> ...pass >> ... > print e >> [Errno 21] Is a directory >> >> So now I am not sure what OP is propos

Re: [Python-Dev] Distutils & configparser rename

2008-05-15 Thread Alexandre Vassalotti
On Thu, May 15, 2008 at 6:49 PM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Since it would be nice for the standard library to not emit any warnings > with the -3 flag, perhaps distutils should at least be trying the new name > first, and only falling back to the old name on an ImportError (assuming

Re: [Python-Dev] heads up on svn.python.org ssh keys - debian/ubuntu users may need new ones

2008-05-13 Thread Alexandre Vassalotti
On Tue, May 13, 2008 at 7:12 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > If you generated your python subversion ssh key during this time on a > > machine fitting the description above, please consider replacing your > > keys. > > > > apt-get update ; apt-get upgrade on debian will pro

Re: [Python-Dev] How best to handle the docs for a renamed module?

2008-05-12 Thread Alexandre Vassalotti
On Mon, May 12, 2008 at 6:10 AM, Georg Brandl <[EMAIL PROTECTED]> wrote: > I've now updated docs for the Queue, SocketServer and copy_reg modules in > the trunk. > Thank you, Georg, for updating docs! -- Alexandre ___ Python-Dev mailing list Python-De

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-12 Thread Alexandre Vassalotti
On Mon, May 12, 2008 at 9:24 AM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > The idea was to replace the orignial module file with its stub. > > However, the "svn copy" and edit process isn't the cause of the > > problems. It is the fact that 2 files existed in the same directory > > differ

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-12 Thread Alexandre Vassalotti
On Mon, May 12, 2008 at 7:18 AM, Paul Moore <[EMAIL PROTECTED]> wrote: > Revision 63129 is not valid on case folding filesystems. In > particular, this horribly breaks using hg-svn to make a local mirror > of the Python repository: > > >\Apps\HGsvn\hgimportsvn.exe -r 63120 > http://svn.python.

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-12 Thread Alexandre Vassalotti
On Mon, May 12, 2008 at 3:49 AM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Well, I guess I really messed up on that one. So, do you have any idea > > on how to revert the changes? > > If the changes where in a single revision N, do > > svn merge -rN:N-1 . > svn commit -m "revert rN" > >

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-12 Thread Alexandre Vassalotti
On Mon, May 12, 2008 at 3:40 AM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > When I rename a module I use "svn copy", since "svn remove" doesn't > > pick up changes made to the "deleted" file. For example, here is what > > I did for PixMapWrapper: > > You want to make changes to the deleted

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-11 Thread Alexandre Vassalotti
On Sun, May 11, 2008 at 5:29 PM, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > Hello, > > I have been working the module renaming for PEP-3108, and I just > noticed that some buildbots are throwing errors while updating their > checkout. It seems the method I use for re

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-11 Thread Alexandre Vassalotti
On Sun, May 11, 2008 at 6:31 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: > The PEP specifies the lib-old directory to hold the old case name so > that the svn rename won't lead to two files in the same directory. I > was hoping that creating the stub in lib-old would allow a simple > ``svn rename``

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-11 Thread Alexandre Vassalotti
On Sun, May 11, 2008 at 5:44 PM, Paul Moore <[EMAIL PROTECTED]> wrote: > 2008/5/11 Alexandre Vassalotti <[EMAIL PROTECTED]>: >> When I rename a module I use "svn copy", since "svn remove" doesn't >> pick up changes made to the "deleted&qu

[Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-11 Thread Alexandre Vassalotti
Hello, I have been working the module renaming for PEP-3108, and I just noticed that some buildbots are throwing errors while updating their checkout. It seems the method I use for renaming modules hits a subversion bug on certain platforms. The error thrown looks like this: ... svn: In directory

Re: [Python-Dev] Trickery with moving urllib

2008-05-10 Thread Alexandre Vassalotti
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 DeprecationWarning either specifying the new name or saying the > function/class is deprecated. > >

Re: [Python-Dev] Trickery with moving urllib

2008-05-10 Thread Alexandre Vassalotti
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 to be named the same >Brett> thing as the module > > Is this the only module morphing into a packag

Re: [Python-Dev] r62778 - in python/branches/py3k: Lib/io.py Lib/test/test_StringIO.py Lib/test/test_io.py Lib/test/test_largefile.py Lib/test/test_memoryio.py Lib/test/test_mimetools.py Modules/_byte

2008-05-07 Thread Alexandre Vassalotti
On Tue, May 6, 2008 at 6:52 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > alexandre.vassalotti schrieb: > > > Author: alexandre.vassalotti > > Date: Tue May 6 21:48:38 2008 > > New Revision: 62778 > > > > Log: > > Added fast alternate io.BytesIO implementation and its test suite. > > Rem

Re: [Python-Dev] PEP Proposal: Revised slice objects & lists use slice objects as indexes

2008-03-09 Thread Alexandre Vassalotti
On Sun, Mar 9, 2008 at 7:21 PM, Forrest Voight <[EMAIL PROTECTED]> wrote: > This would simplify the handling of list slices. > > Slice objects that are produced in a list index area would be different, > and optionally the syntax for slices in list indexes would be expanded > to work everywhere.

Re: [Python-Dev] Any Emacs tips for core developers?

2008-02-04 Thread Alexandre Vassalotti
On Feb 4, 2008 7:47 PM, <[EMAIL PROTECTED]> wrote: > >>> I should have asked this before, but what's so special about core >>> (Python?) development that the tools should be different than for >>> non-core development? > >Brett> Usually the core has keywords, built-ins, etc. that

Re: [Python-Dev] [Python-3000] inst_persistent_id

2008-01-14 Thread Alexandre Vassalotti
inst supporting this feature officially. Thanks for correcting me! -- Alexandre On Jan 14, 2008 12:59 PM, Armin Rigo <[EMAIL PROTECTED]> wrote: > Hi, > > On Sat, Jan 12, 2008 at 07:33:38PM -0500, Alexandre Vassalotti wrote: > > Well, in Python 3K, inst_persistent_id() won

Re: [Python-Dev] [Python-3000] inst_persistent_id

2008-01-12 Thread Alexandre Vassalotti
On Jan 12, 2008 12:25 PM, Jim Fulton <[EMAIL PROTECTED]> wrote: > If there are no objections, I'll update the Python 2 documentation to > describe this and add a test. The comment above suggests that this > hook is in pickle and cPickle. It is in cPickle, but was removed from > pickle. I propose

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-11 Thread Alexandre Vassalotti
I can't comment on the implementation details, but +1 for the idea. I think this feature will be very useful in a shared hosting environment. -- Alexandre On Jan 11, 2008 6:27 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > PEP: XXX > Title: Per user site-packages directory > Version: $Revision

Re: [Python-Dev] Subversion forbidden error while committing to trunk

2007-12-07 Thread Alexandre Vassalotti
Thanks Guido. I just found what was the problem. My checkout of the trunk was the read-only one (i.e., over http). -- Alexandre On Dec 7, 2007 11:40 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > On Dec 7, 2007 8:35 PM, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote:

[Python-Dev] Subversion forbidden error while committing to trunk

2007-12-07 Thread Alexandre Vassalotti
Hi, I tried a few times to commit a patch (for issue #1530) to the trunk, but I always get this error: alex:python% svn commit Lib/doctest.py --file svn-commit.tmp svn: Commit failed (details follow): svn: MKACTIVITY of '/projects/!svn/act/53683b5b-99d8-497e-bc98-6d07f9401f50': 403 Forbidde

Re: [Python-Dev] [poll] New name for __builtins__

2007-12-04 Thread Alexandre Vassalotti
Oh, sorry for the noise. I thought people were still arguing about the name issue, but it was in fact 5-day late emails that I am still receiving. (Gmail seems to have delivery issues lately...) -- Alexandre On Dec 4, 2007 12:49 PM, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > I

Re: [Python-Dev] [poll] New name for __builtins__

2007-12-04 Thread Alexandre Vassalotti
I just want to let you all know that the name issue was settled and committed to py3k branch a few days ago. It was chosen to simply rename the module __builtin__ to builtins. -- Alexandre On Nov 29, 2007 6:15 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Given that the *effect* of __builtins__ i

Re: [Python-Dev] [poll] New name for __builtins__

2007-11-28 Thread Alexandre Vassalotti
On 11/28/07, Christian Heimes <[EMAIL PROTECTED]> wrote: > What name do you prefer? I'm +1 with Raymond on __root__ but I'm still > open for better suggestions. > I think __root__ is a fine name. Anyway, here some suggestions (in no particular order): __top__ __syswide__ __outer__ __t

Re: [Python-Dev] Extending Python 3000

2007-09-18 Thread Alexandre Vassalotti
PyObject_HEAD was changed in Py3k to make it conform to C's strict aliasing rules (See PEP 3123 [1]). In your code, you need to change: static PyTypeObject MPFType = { PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ ... } to this: static PyTyp

Re: [Python-Dev] Avoiding cascading test failures

2007-09-02 Thread Alexandre Vassalotti
On 8/28/07, Collin Winter <[EMAIL PROTECTED]> wrote: > On 8/22/07, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > > When I was fixing tests failing in the py3k branch, I found the number > > duplicate failures annoying. Often, a single bug, in an important > > m

Re: [Python-Dev] Order of operations

2007-08-29 Thread Alexandre Vassalotti
On 8/29/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Scott Dial schrieb: > > Martin v. Löwis wrote: > >>> Do you know why? Thanks! > >> I'm not sure why precedence was defined that > >> way, though. > >> > > > > Because it is consistent with C's precedence rules. > > Maybe I'm missing somethi

Re: [Python-Dev] Avoiding cascading test failures

2007-08-25 Thread Alexandre Vassalotti
On 8/25/07, Gregory P. Smith <[EMAIL PROTECTED]> wrote: > I like this idea. Yay! Now, I ain't the only one. ;) > Be sure to have an option to ignore dependancies and run all tests. Yes, I planned to add a such option. > Also when skipping tests because a depedancy failed have unittest > print o

[Python-Dev] Avoiding cascading test failures

2007-08-22 Thread Alexandre Vassalotti
When I was fixing tests failing in the py3k branch, I found the number duplicate failures annoying. Often, a single bug, in an important method or function, caused a large number of testcase to fail. So, I thought of a simple mechanism for avoiding such cascading failures. My solution is to add a

Re: [Python-Dev] [Python-3000] Documentation switch imminent

2007-08-17 Thread Alexandre Vassalotti
On 8/17/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > Alexandre Vassalotti schrieb: > > On 8/16/07, Neal Norwitz <[EMAIL PROTECTED]> wrote: > >> On 8/15/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > >> > Okay, I made the switch. I tagged the state

  1   2   >