Re: [Python-Dev] PyObject_GC_UnTrack() no longer reliable in 2.7?

2010-09-24 Thread Jim Fulton
. Yikes :) 2. For speed, if the extension is creating dicts (or tuples) it knows cannot participate in cycles. The optimization is now automated in the simple cases (as you've found out!). This came up when Jim Fulton asked me for advice about assertion failures coming out of cyclic gc

Re: [Python-Dev] Let's update CObject API so it is safe and regular!

2009-04-02 Thread Jim Fulton
. Jim -- Jim Fulton Zope Corporation ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Let's update CObject API so it is safe and regular!

2009-04-02 Thread Jim Fulton
On Apr 2, 2009, at 7:28 AM, Greg Ewing wrote: Jim Fulton wrote: The only type-safety mechanism for a CObject is it's identity. If you want to make sure you're using the foomodule api, make sure the address of the CObject is the same as the address of the api object exported

Re: [Python-Dev] Let's update CObject API so it is safe and regular!

2009-04-01 Thread Jim Fulton
for the API and the (address of the) CObject itself already provides this. 2. Only code provided by the module provider should be accessing the CObject exported by the module. Jim -- Jim Fulton Zope Corporation ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] My summit notes (packaging)

2009-03-28 Thread Jim Fulton
is a lot simpler and more practically useful. Jim -- Jim Fulton Zope Corporation ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive

[Python-Dev] Released fixes for CVE-2008-2315 for Python 2.4?

2008-11-07 Thread Jim Fulton
Are there plans for a 2.4 release that includes: http://bugs.python.org/issue2620, and http://svn.python.org/view?rev=65335view=rev ? These (and other fixes) address: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2315 Jim -- Jim Fulton Zope Corporation

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

2008-01-20 Thread Jim Fulton
. This optimization is fairly useful. I propose to update the logic to call this function for classic instances too. I'm also open to renaming it if that would make people happier. :) Thoughts? Jim -- Jim Fulton Zope Corporation ___ Python-Dev mailing

[Python-Dev] inst_persistent_id

2008-01-12 Thread Jim Fulton
Recently, I reviewed the documentation source for pickle and came across the following comment: BAW: Both pickle and cPickle support something called inst_persistent_id() which appears to give unknown types a second shot at producing a persistent id. Since Jim Fulton can't

[Python-Dev] Names matter.

2006-01-16 Thread Jim Fulton
and justifiable. In general though, for adults, truthfulness and non-anonymity *do* matter. At least they matter to me, a *lot*. I don't think members of the PSF should be allowed to hide their identity and certainly, it should not be acceptable to contribute to Python under a false name. Jim -- Jim Fulton

[Python-Dev] timeout options in high-level networking modules

2005-12-22 Thread Jim Fulton
at it. I'm happy to work on this *if* I can find time. This would make a nice easy sprint project at PyCon too. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com

Re: [Python-Dev] timeout options in high-level networking modules

2005-12-22 Thread Jim Fulton
Steve Holden wrote: Jim Fulton wrote: Yesterday, I needed to make a web request in a program (actually a test) that could block indefinately, so I needed to set a socket timeout. Unfortunately, AFAICT none of urllib, urllib2, httplib provide options to set the timeout on the sockets they use

Re: [Python-Dev] Keep default comparisons - or add a second set?

2005-12-20 Thread Jim Fulton
just an argument to make the canonical ordering work better. The problem Jim Fulton describes is that the (current default) canonical order will change if objects are saved to a database and then imported to a different session. Removing default comparisons wouldn't really help much

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-13 Thread Jim Fulton
Michael Hoffman wrote: [Ian Bickling] stdlib, external modules, internal modules seems like enough ordering to me. [Jim Fulton] Personally, I don't find the stdlib/external distinction to be useful. It's useful because it allows one to quickly see all the prerequisites need

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

2005-12-12 Thread Jim Fulton
to examine the value of one of these variables in the debugger. In my experience, almost every time someone uses the __private trick, they or someone else comes to regret it. OTOH, explicit name mangling provides the benefits of implicit name mangling without it's drawbacks. Jim -- Jim Fulton

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-12 Thread Jim Fulton
the style guide smaller. I do think it offers too much advice in places. Although I'm not sure we could all agree om what those places are. :) Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-12 Thread Jim Fulton
is more likely to store the result in a temp variable for use in the same context, instead of calling it multiple times. Similar reasoning applites for setter vs property =. That's why, in my suggested writeup, I suggested that attributes should be used if the accessors are trivial. Jim -- Jim

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-12 Thread Jim Fulton
or a pair if accessors that just sets and gets an attribute with a slightly different name, that affords no more protection than if people were setting the attribute directly. If you don't want external code to change an attribute, don't expose it through a public API. Jim -- Jim Fulton

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-11 Thread Jim Fulton
names, it's easier to remember them when reading code. (Note that ease of use hinges on editors that automate typeing of repeated names.) Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-11 Thread Jim Fulton
[EMAIL PROTECTED] wrote: Jim == Jim Fulton [EMAIL PROTECTED] writes: Jim The decision about wither to implement foo as a key in the instance Jim dictionary *is* an implementation detail that can be hidden by a Jim property. If it's not in the instance dictionary, where

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

2005-12-11 Thread Jim Fulton
Ian Bicking wrote: Jim Fulton wrote: ... Also decide whether your attributes should be private or not. The difference between private and non-public is that the former will never be useful for a derived class, while the latter might be. Yes, you should design

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-11 Thread Jim Fulton
Ian Bicking wrote: Jim Fulton wrote: Designing for inheritance Always decide whether a class's methods and instance variables should be public or non-public. In general, never make data variables public unless you're implementing essentially a record

[Python-Dev] For Python 3k, drop default/implicit hash, and comparison

2005-11-06 Thread Jim Fulton
. Explicit is better than implicit. :) Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org

Re: [Python-Dev] For Python 3k, drop default/implicit hash, and comparison

2005-11-06 Thread Jim Fulton
Guido van Rossum wrote: On 11/6/05, Jim Fulton [EMAIL PROTECTED] wrote: ... Except that I really don't think that there's anything wrong with a default __eq__ that uses object identity. As Martin pointed out, it's just too weird that an object wouldn't be considered equal to itself. It's

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

2005-10-27 Thread Jim Fulton
Jeremy Hylton wrote: Can anyone point an old CVS/Perforce-Luddite at instructions for how to use the new SVN repository? And can you remind us where to send our public keys? :) Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714

Re: [Python-Dev] Comparing date+time w/ just time

2005-10-22 Thread Jim Fulton
and datetime, why should you try to compare date and DateTime? Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org

[Python-Dev] defaultproperty (was: Re: RFC: readproperty)

2005-10-09 Thread Jim Fulton
Based on the discussion, I think I'd go with defaultproperty. Questions: - Should this be in builtins, alongside property, or in a library module? (Oleg suggested propertytools.) - Do we need a short PEP? Jim Jim Fulton wrote: Guido van Rossum wrote: On 9/28/05, Jim Fulton [EMAIL

Re: [Python-Dev] Pythonic concurrency

2005-10-07 Thread Jim Fulton
. Someone else pointed out essentially the same thing at the beginning of this thread. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org

Re: [Python-Dev] Divorcing str and unicode (no more implicit conversions).

2005-10-03 Thread Jim Fulton
model which is favoured for a hypothetical future version of Python. This approach has worked pretty well for us. Still, when there is a problem, it's a real pain to debug because the error occurs too late, as you point out. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python

Re: [Python-Dev] Divorcing str and unicode (no more implicit conversions).

2005-10-03 Thread Jim Fulton
in the first place, except in this case to disable implicit encoding or decoding. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org

Re: [Python-Dev] RFC: readproperty

2005-09-29 Thread Jim Fulton
Guido van Rossum wrote: On 9/28/05, Jim Fulton [EMAIL PROTECTED] wrote: ... I think we need to be real careful with chosing a name -- in Jim's example, *anyone* could assign to Spam().eggs to override the value. The name readproperty is too close to readonlyproperty, In fact, property

[Python-Dev] RFC: readproperty

2005-09-28 Thread Jim Fulton
descriptor.) I'd be happy to add this for 2.5. Thoughts? Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org

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

2005-07-29 Thread Jim Fulton
Tim Peters wrote: ... I'm sending this to Jim Fulton because he did the conversion of Zope Corp's code base to SVN. Unfortunately, Jim will soon be out of touch for several weeks. Jim, do you have time to summarize the high bits of the problems you hit? IIRC, you didn't find any conversion

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

2005-07-29 Thread Jim Fulton
believe all serious problems were identified by eyeball at once. I'm not aware of any errors in the conversion. ... Ah, before I forget, single repository has worked very well for Zope Yup. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361

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

2005-07-29 Thread Jim Fulton
what the projects are, I suggest converting each project separately. I'd be happy to share my scrips and experenice, although, as Tim noted I'll be off-line for two or three weeks starting in the next few days. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO

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

2005-07-29 Thread Jim Fulton
Martin v. Löwis wrote: Jim Fulton wrote: I don't expect that this would be an issue for Python. Right. 2. I initially tried to conver our entire repository, including all branches. This would have taken days. I finally decided to just convert our trunk, which took several

Re: [Python-Dev] Re: anonymous blocks

2005-04-27 Thread Jim Fulton
that either implementing interfaces (or implementing a class statement in which the class was created before execution of a suite) is not a use case for this PEP. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http

Re: [Python-Dev] PEP 246, redux

2005-01-12 Thread Jim Fulton
hooks. There are exceptions of course. Our ZODB storage tests use a generic storage-interface test, but this is possible because the ZODB storage interfaces are extremely concrete. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714