Re: [Python-Dev] Upcoming 2.5.2 release

2008-01-31 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Martin v. Löwis wrote:
|> As current bsddb module maintainer, I was wondering if 2.5.2 will
|> support BerkeleyDB 4.6 :-?.
|
| Maybe I'm misunderstanding the question - whom are asking?
| If me - Python 2.5.2 will essentially do what the maintenance branch
| does currently.

I beg your pardon. My role is recent (a week) and I'm still learning my
way thru procedures and conventions :-).

Current bsddb module in 2.5.1 supports up to BerkeleyDB 4.5. There is
support for 4.6 in trunk (future 2.6, I guess) and I'm working in a
private branch at the moment, since I have no commit access to python
repository. That private version is intented to be merged into python
2.6 by Greg, when time comes.

My guess is that 2.5 branch is still open to more patches than pure
security/stability patches, so "backporting" BerkeleyDB 4.6 support
seems reasonable (to me). If I'm wrong, please educate me :-).

This backport would include also stability patches. For example, I just
solved a memory leak.

Greg, any opinion?.

Beware, new kid in the block! :).

- --
Jesus Cea Avion _/_/  _/_/_/_/_/_/
[EMAIL PROTECTED] http://www.argo.es/~jcea/ _/_/_/_/  _/_/_/_/  _/_/
jabber / xmpp:[EMAIL PROTECTED] _/_/_/_/  _/_/_/_/_/
~   _/_/  _/_/_/_/  _/_/  _/_/
"Things are not so easy"  _/_/  _/_/_/_/  _/_/_/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/_/_/_/  _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBR6GX/Zlgi5GaxT1NAQLZfQP/Zl95IiH9wyIaVA2K2ulxnQG6Su7OKASM
p4Ej3c2/1JHxprabXixDdn2i8fPZJ+02qMbJIxmWhupvW5TpHsoH4Rrs0QV/+SpD
LFvvIgVruJCaVgZUFEoqOoRA07OwxRwg6tgPLPwsVcKZISTBRGRBiARply83vaDz
hjjFA5abVPU=
=Jti3
-END PGP SIGNATURE-
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Assigning issues

2008-01-31 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Martin v. Löwis wrote:
| I also agree with Nick as to what the purpose of assignments is.
| To indicate that you are working on a specific issue, a message
| saying so is enough (which could also include estimated completion
| dates, which a mere self-assignment can't).

So, in the concrete case of http://bugs.python.org/issue1976 , patch
available, what the next step would be?. Must I contact Greg (previous
bsddb maintainer, with python commit access) to review, apply patch
(more coming, so no hurry) and tracker update?.

Should I maintain bsddb tracking outside python one, to reduce your burden?.

- --
Jesus Cea Avion _/_/  _/_/_/_/_/_/
[EMAIL PROTECTED] http://www.argo.es/~jcea/ _/_/_/_/  _/_/_/_/  _/_/
jabber / xmpp:[EMAIL PROTECTED] _/_/_/_/  _/_/_/_/_/
~   _/_/  _/_/_/_/  _/_/  _/_/
"Things are not so easy"  _/_/  _/_/_/_/  _/_/_/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/_/_/_/  _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBR6GZ/plgi5GaxT1NAQKf6AP/QGhRVE8mfrzFAYz6RRCjF4Z5QXieh2Gu
5aSYsJ/0uksLTitkM/ihK3aiKHsX/PNWJCXskUqNp+RA3JNgTFbCMvL9CcUOH6Vs
zEXeiutoBLo2xacqCk3JscNQZKC086WdHhHJptpR1ItegiHGfuzwTPo23qMyfJDC
TQ1sjdEVMik=
=Ukol
-END PGP SIGNATURE-
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Tracker marks my messages as spam :-)

2008-01-31 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

This will be my last email today, I don't want to waste (more of) your
*valuable* time.

http://bugs.python.org/issue1391
http://bugs.python.org/msg61892

- --
Jesus Cea Avion _/_/  _/_/_/_/_/_/
[EMAIL PROTECTED] http://www.argo.es/~jcea/ _/_/_/_/  _/_/_/_/  _/_/
jabber / xmpp:[EMAIL PROTECTED] _/_/_/_/  _/_/_/_/_/
~   _/_/  _/_/_/_/  _/_/  _/_/
"Things are not so easy"  _/_/  _/_/_/_/  _/_/_/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/_/_/_/  _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBR6Gd25lgi5GaxT1NAQLDiwP/aMUOxhoRH8/ZnCtHCUzr95tIJUe1ySh6
SuDjR3OS19S8lcRVgEL0droIP44lmozpdyOW1eaPDPBMA02XCqiPWmCxBCeXsbJ/
xf/XVzl53vAQmtfqxHrNyrS+mXv5YW2CjOKWk52IKuf/Rckf9FYSP13OKW7WTjNy
orjAdOYRd/8=
=gSNB
-END PGP SIGNATURE-
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Tracker marks my messages as spam :-)

2008-01-31 Thread Nick Coghlan
Jesus Cea wrote:
> http://bugs.python.org/msg61892

I don't know what's going on there, but it appears to require higher 
permissions than mine to flag the message as miscategorised (I can read 
it when I'm logged in, but I don't see anything that would let me mark 
it as a legitimate message).

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---
 http://www.boredomandlaziness.org
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Upcoming 2.5.2 release

2008-01-31 Thread Christian Heimes
Jesus Cea wrote:
> My guess is that 2.5 branch is still open to more patches than pure
> security/stability patches, so "backporting" BerkeleyDB 4.6 support
> seems reasonable (to me). If I'm wrong, please educate me :-).

I think you are wrong, sorry pal! DB 4.6 support is a new feature. New
features must land in the development version(s) of Python, that is
Python 2.6 and 3.0. You must change as less code as possible in Python
2.5 to fix a severe problem.

Christian

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] DEADLINE Feb 4: OSCON 2008 Call for Proposals

2008-01-31 Thread Aahz
The O'Reilly Open Source Convention (OSCON) is accepting proposals for
tutorials and presentations.  The submission period ends Feb 4.

OSCON 2008 will be in Portland, Oregon July 21-25.  For more information
and to submit a proposal, see

http://conferences.oreilly.com/oscon/
-- 
Aahz ([EMAIL PROTECTED])   <*> http://www.pythoncraft.com/

"All problems in computer science can be solved by another level of 
indirection."  --Butler Lampson
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Upcoming 2.5.2 release

2008-01-31 Thread Aahz
On Thu, Jan 31, 2008, Jesus Cea wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Martin v. L?wis wrote:
> |> As current bsddb module maintainer, I was wondering if 2.5.2 will
> |> support BerkeleyDB 4.6 :-?.
> |
> | Maybe I'm misunderstanding the question - whom are asking?
> | If me - Python 2.5.2 will essentially do what the maintenance branch
> | does currently.
> 
> I beg your pardon. My role is recent (a week) and I'm still learning my
> way thru procedures and conventions :-).

Please read PEP6:

http://www.python.org/dev/peps/pep-0006/

The gist is that point releases are purely bugfix releases, because
adding features lessens code quality and makes it more difficult to
track changes.  The big push to stick with PEP6 came from the mistake of
adding True/False to Python 2.2.1.
-- 
Aahz ([EMAIL PROTECTED])   <*> http://www.pythoncraft.com/

"All problems in computer science can be solved by another level of 
indirection."  --Butler Lampson
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Monkeypatching idioms -- elegant or ugly?

2008-01-31 Thread Guido van Rossum
On Jan 30, 2008 9:00 PM, Kevin Teague <[EMAIL PROTECTED]> wrote:
> +1 on having established Python idioms for these techniques.
>
> While I don't know if there has ever been a formal definition of
> monkey patch, the term monkey patch came from guerilla patch, which
> came from two or more dynamic modifications to a class interfering
> with each other. These modifications were usually made by extension
> code (Zope add-on Products) to upstream code (the Zope framework), so
> I would define a monkey patch only as dynamic modifications made to a
> class with the *intent to change or correct behaviour in upstream code*.
>
> The term has also caught on with the a second definition of referring
> to any dynamic modification of class, regardless of intent though.

Check out the wikipedia entry too.

> I would perhaps call these methods something like:
>
>   * add_method_to_class
>
>   * extend_class

I don't like extend because in Java that's how you define a subclass.

> This gives you a better idea of what they do, rather than use a term
> with a somewhat ambigous definition. With monkeypatch_method under the
> definition of "altering existing upstream behviour", I might expect it
> to raise an error if the method I was replacing on a class did not
> exist (e.g. upstream code was refactored so my patch no longer applied).

Funny, several examples mentioned earlier in this thread actually
check that the method *doesn't* already exist...

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Assigning issues

2008-01-31 Thread Guido van Rossum
On Jan 31, 2008 1:50 AM, Jesus Cea <[EMAIL PROTECTED]> wrote:
> Martin v. Löwis wrote:
> | I also agree with Nick as to what the purpose of assignments is.
> | To indicate that you are working on a specific issue, a message
> | saying so is enough (which could also include estimated completion
> | dates, which a mere self-assignment can't).
>
> So, in the concrete case of http://bugs.python.org/issue1976 , patch
> available, what the next step would be?. Must I contact Greg (previous
> bsddb maintainer, with python commit access) to review, apply patch
> (more coming, so no hurry) and tracker update?.

Yes, that's the typical approach. After a while, if your patches are
generally good, Greg will trust you and stop reviewing your code in
detail; eventually he will recommend you be granted commit privileges.

> Should I maintain bsddb tracking outside python one, to reduce your burden?.

No.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Monkeypatching idioms -- elegant or ugly?

2008-01-31 Thread nathan binkert
Another thing about monkeypatching is that it seems like the best way
to write an extension class where you want half to be in C/C++ and
half in Python.  I'm in the middle of working on such a class and
there are plenty of members that just don't need to be in C++.

Is there a better/preferred idiom for such a thing?  I don't want to
subclass my new class because I want any objects created on the C++
side to also get the python methods.

  Nate

On Jan 31, 2008 9:23 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On Jan 30, 2008 9:00 PM, Kevin Teague <[EMAIL PROTECTED]> wrote:
> > +1 on having established Python idioms for these techniques.
> >
> > While I don't know if there has ever been a formal definition of
> > monkey patch, the term monkey patch came from guerilla patch, which
> > came from two or more dynamic modifications to a class interfering
> > with each other. These modifications were usually made by extension
> > code (Zope add-on Products) to upstream code (the Zope framework), so
> > I would define a monkey patch only as dynamic modifications made to a
> > class with the *intent to change or correct behaviour in upstream code*.
> >
> > The term has also caught on with the a second definition of referring
> > to any dynamic modification of class, regardless of intent though.
>
> Check out the wikipedia entry too.
>
> > I would perhaps call these methods something like:
> >
> >   * add_method_to_class
> >
> >   * extend_class
>
> I don't like extend because in Java that's how you define a subclass.
>
> > This gives you a better idea of what they do, rather than use a term
> > with a somewhat ambigous definition. With monkeypatch_method under the
> > definition of "altering existing upstream behviour", I might expect it
> > to raise an error if the method I was replacing on a class did not
> > exist (e.g. upstream code was refactored so my patch no longer applied).
>
> Funny, several examples mentioned earlier in this thread actually
> check that the method *doesn't* already exist...
>
> --
> --Guido van Rossum (home page: http://www.python.org/~guido/)
>
> ___
> Python-Dev mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-dev/nate%40binkert.org
>
>
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Upcoming 2.5.2 release

2008-01-31 Thread Martin v. Löwis
> Current bsddb module in 2.5.1 supports up to BerkeleyDB 4.5. There is
> support for 4.6 in trunk (future 2.6, I guess) and I'm working in a
> private branch at the moment, since I have no commit access to python
> repository. That private version is intented to be merged into python
> 2.6 by Greg, when time comes.
> 
> My guess is that 2.5 branch is still open to more patches than pure
> security/stability patches, so "backporting" BerkeleyDB 4.6 support
> seems reasonable (to me). If I'm wrong, please educate me :-).

I think it depends on the nature of the patch. The 2.5 branch already
supports BerkeleyDB 4.6 (since r58345), so I'm not sure what else needs
to be done.

> This backport would include also stability patches. For example, I just
> solved a memory leak.
> 
> Greg, any opinion?.
> 
> Beware, new kid in the block! :).

Being new is not a problem in itself. But do please take the extra
work of double- and triple-checking any claims you make. If you want
to become the new maintainer of the bsddb module, you need to learn
how to check out a branch of Python and how to determine what patches
have been applied to it.

Regards,
Martin
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Tracker marks my messages as spam :-)

2008-01-31 Thread Martin v. Löwis
> This will be my last email today, I don't want to waste (more of) your
> *valuable* time.
> 
> http://bugs.python.org/issue1391
> http://bugs.python.org/msg61892

It does that sometimes when the text is very short. The Bayesian filter
needs more training, so just keep reporting messages as misclassified
here. Georg has reclassified the message as ham now.

Regards,
Martin
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Monkeypatching idioms -- elegant or ugly?

2008-01-31 Thread Guido van Rossum
On Jan 31, 2008 9:49 AM, nathan binkert <[EMAIL PROTECTED]> wrote:
> Another thing about monkeypatching is that it seems like the best way
> to write an extension class where you want half to be in C/C++ and
> half in Python.  I'm in the middle of working on such a class and
> there are plenty of members that just don't need to be in C++.
>
> Is there a better/preferred idiom for such a thing?  I don't want to
> subclass my new class because I want any objects created on the C++
> side to also get the python methods.

Have you tried this? I believe it doesn't even work; types defined in
C++ are supposed to be immutable. Try adding a new method to list or
dict.

However the C++ side should be able to create instances of the
Python-defined subclass  as long as it runs in a method, since it has
a reference to the actual class.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Monkeypatching idioms -- elegant or ugly?

2008-01-31 Thread nathan binkert
> Have you tried this? I believe it doesn't even work; types defined in
> C++ are supposed to be immutable. Try adding a new method to list or
> dict.
I noticed that and I was trying to figure out if I could create a new
metatype which would add a __dict__ and a method (called add_method or
something like that) that could be used as a decorator for
monkeypatching.  I was partly using this as an exercise to learn more
about the Python internals and I'm probably going down a rathole.

> However the C++ side should be able to create instances of the
> Python-defined subclass  as long as it runs in a method, since it has
> a reference to the actual class.
This is what I'm currently doing and it does work, but I'm trying to
build my extension type in such a way that it lazily gets initialized
as a python object only if it is passed to the python side of things.
For this object, 75% of the time, it is created and used in C++ only
and I'd like to not pay for the python object creation overhead if I
don't have to.

I am putting PyObject_Head at the front of my class, but only
initializing it if it is passed to python.  I had intended to
initialize the python bits with a C++ type, but I guess I could do it
with a cached module lookup of the python derived type.Allocation
is really tricky too, so this all may just not be worth the hassle. :)

Anyway, if these types of issues are inappropriate for this forum,
I'll keep quiet.
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Upcoming 2.5.2 release

2008-01-31 Thread Neal Norwitz
On Jan 31, 2008 1:42 AM, Jesus Cea <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Martin v. Löwis wrote:
> |> As current bsddb module maintainer, I was wondering if 2.5.2 will
> |> support BerkeleyDB 4.6 :-?.
> |
> | Maybe I'm misunderstanding the question - whom are asking?
> | If me - Python 2.5.2 will essentially do what the maintenance branch
> | does currently.
>
> I beg your pardon. My role is recent (a week) and I'm still learning my
> way thru procedures and conventions :-).
>
> Current bsddb module in 2.5.1 supports up to BerkeleyDB 4.5. There is
> support for 4.6 in trunk (future 2.6, I guess) and I'm working in a
> private branch at the moment, since I have no commit access to python
> repository. That private version is intented to be merged into python
> 2.6 by Greg, when time comes.

Note that db 4.6 might be the cause of some crashes on the buildbots:
  http://www.python.org/dev/buildbot/all/

I asked to have it disabled on one platform (sparc).  I haven't
checked the results and I'm not sure if Greg has either.  Greg checked
in a change to setup.py on trunk to disable 4.6 to see if the crashes
go away.

~5 buildbots had crashes in bsddb or related code with 4.6 before the
change to setup.py.

n
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com