Python 2.6 support Was: Problem on startup

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Python 2.6 support Was: Problem on startup

Benny Malengier
It looks like we will have to do some changes to support bsddb 4.7.x , and hence probably python 2.6 (as used already in archlinux).
My guess is that for the releases in the spring this will be an important issue!

Point 1:
4.6: db.DB_LOG_AUTOREMOVE
4.7: db.DB_LOG_AUTO_REMOVE

Point 2:
???
Martin, can you tell us what the error is that is raised? Open gen/db/dbdir.py, on line 1537 change

 except DBERRS, msg:
            self.__log_error()
            raise Errors.DbError(msg)

into

 except db.DBRunRecoveryError, msg:
            print 'runrecoverr', msg
            self.__log_error()
            raise Errors.DbError(msg)
 exceptdb.DBAccessError, msg:
            print 'accesserr', msg
            self.__log_error()
            raise Errors.DbError(msg)
 except  db.DBPageNotFoundError, msg:
            print pagenotfounderr', msg
            self.__log_error()
            raise Errors.DbError(msg)
 except db.DBInvalidArgError, msg:
            print 'invalidargerr', msg
            self.__log_error()
            raise Errors.DbError(msg)

and hopefully msg is something that is printable and explains something.
Perhaps you can also point to the google page where  you found the attribute changed name?

Well, if you don't feel like doing this, no probs. Someone of the core team will have to install python 2.6 and new bsddb one of these days and start hacking.

Benny

2008/11/3 Martin Steer <[hidden email]>
"Benny Malengier" <[hidden email]> writes:

> On my box:
>
> python
> Python 2.5.2 (r252:60911, Jul 31 2008, 17:31:22)
> [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from bsddb import db
>>>> db.DB_LOG_AUTOREMOVE
> 524288
>>>> db.version()
> (4, 6, 21)
>
> So here, db.DB_LOG_AUTOREMOVE exists
>
> It would appear it does not exist on your box. Can you check? As you
> see I run version 4.6.21

Thanks Benny. I have 4.7.25, as the result of a recent update (which I'd
overlooked).

Google tells me that Berkeley DB >= 4.7 has DB_LOG_AUTO_REMOVE instead
of DB_LOG_AUTOREMOVE.

>
> Please, provide more feedback. Note that line 483 in dbdir.py can be
> removed, it was added to avoid log files of several Mb clogging down
> the systhem.

Database loads with DB_LOG_AUTO_REMOVE, but then another problem when
trying to run Check and Repair Database:

76122: ERROR: _Tool.py: line 255: Failed to start tool.
Traceback (most recent call last):
 File "/usr/share/gramps/PluginUtils/_Tool.py", line 251, in gui_tool
   tool_class(dbstate, uistate, options_class, name, callback)
 File "/usr/share/gramps/plugins/Check.py", line 166, in __init__
   trans = self.db.transaction_begin("",batch=True)
 File "/usr/share/gramps/gen/db/dbdir.py", line 1540, in transaction_begin
   raise Errors.DbError(msg)
DbError: <unprintable DbError object>

If you want to continue playing I will, but I guess this is basically a
problem with package dependencies in archlinux.

--
Martin

Python 2.6 (r26:66714, Oct 27 2008, 10:50:31)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from bsddb import db
>>> db.DB_LOG_AUTOREMOVE
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'DB_LOG_AUTOREMOVE'
>>> db.version()
(4, 7, 25)
>>>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python 2.6 support Was: Problem on startup

Martin Steer-2
"Benny Malengier" <[hidden email]> writes:

> It looks like we will have to do some changes to support bsddb 4.7.x,
> and hence probably python 2.6 (as used already in archlinux). My guess
> is that for the releases in the spring this will be an important
> issue!

It's already spring here.

>
> Point 1:
> 4.6: db.DB_LOG_AUTOREMOVE
> 4.7: db.DB_LOG_AUTO_REMOVE
>
> Point 2:
> ???
> Martin, can you tell us what the error is that is raised?

invalidargerr (22, "Invalid argument -- DB_ENV->log_set_config: DB_LOG_IN_MEMORY: method not permitted after handle's open method")
29618: ERROR: _Tool.py: line 255: Failed to start tool.
Traceback (most recent call last):
  File "/usr/share/gramps/PluginUtils/_Tool.py", line 251, in gui_tool
    tool_class(dbstate, uistate, options_class, name, callback)
  File "/usr/share/gramps/plugins/RebuildRefMap.py", line 83, in __init__
    self.db.reindex_reference_map(self.update)
  File "/usr/share/gramps/gen/db/dbdir.py", line 1020, in reindex_reference_map
    self.__reindex_reference_map(callback)
  File "/usr/share/gramps/gen/db/dbdir.py", line 1083, in __reindex_reference_map
    transaction = self.transaction_begin(batch=True, no_magic=True)
  File "/usr/share/gramps/gen/db/dbdir.py", line 1555, in transaction_begin
    raise Errors.DbError(msg)
DbError: <unprintable DbError object>

> Perhaps you can also point to the google page where you found the
> attribute changed name?

It was just some talk about an svn patch. The following is better:

<http://www.oracle.com/technology/documentation/berkeley-db/db/ref/upgrade.4.7/log.html>

"In the Berkeley DB 4.7 release, the logging subsystem is configured
using the DB_ENV->log_set_config method instead of the previously used
DB_ENV->set_flags method.

The DB_ENV->set_flags method no longer accepts the flags DB_DIRECT_LOG,
DB_DSYNC_LOG, DB_LOG_INMEMORY or DB_LOG_AUTOREMOVE. Applications should
be modified to use the equivalent flags accepted by the
DB_ENV->log_set_config method.

Previous DB_ENV->set_flags flag Replacement DB_ENV->log_set_config flag
DB_DIRECT_LOG DB_LOG_DIRECT
DB_DSYNC_LOG DB_LOG_DSYNC
DB_LOG_INMEMORY DB_LOG_IN_MEMORY
DB_LOG_AUTOREMOVE DB_LOG_AUTO_REMOVE"

Also:

<http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_log_set_config.html>

>
> Well, if you don't feel like doing this, no probs. Someone of the core
> team will have to install python 2.6 and new bsddb one of these days
> and start hacking.
>

I'm happy to help if I can. In dbdir.py I changed two occurrences of:

self.env.set_flags(db.DB_LOG_AUTOREMOVE, 1)

to:

self.env.log_set_config(db.DB_LOG_AUTO_REMOVE, 1)

which seems to be okay, but can't find instances of DB_LOG_INMEMORY,
suggested by the error message, so don't know what to do next.

By the way, I also noticed a warning on startup that I don't remember
seeing before:

/usr/share/gramps/ThumbNails.py:31: DeprecationWarning: the md5 module is deprecated; use hashlib instead

--
Martin

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python 2.6 support Was: Problem on startup

Benny Malengier
Ok, I will not have python 2.6 on my system in the near future.
Martin, can you open a bug ticket to follow this?
I started a wiki page: http://gramps-project.org/wiki/index.php?title=Python2.6

So we can collect python 2.6 issues (normally spring distro's will still ship python 2.5 in tandem), and the bug item can use the wiki page for discussion.

Benny

2008/11/4 Martin Steer <[hidden email]>
"Benny Malengier" <[hidden email]> writes:

> It looks like we will have to do some changes to support bsddb 4.7.x,
> and hence probably python 2.6 (as used already in archlinux). My guess
> is that for the releases in the spring this will be an important
> issue!

It's already spring here.

>
> Point 1:
> 4.6: db.DB_LOG_AUTOREMOVE
> 4.7: db.DB_LOG_AUTO_REMOVE
>
> Point 2:
> ???
> Martin, can you tell us what the error is that is raised?

invalidargerr (22, "Invalid argument -- DB_ENV->log_set_config: DB_LOG_IN_MEMORY: method not permitted after handle's open method")
29618: ERROR: _Tool.py: line 255: Failed to start tool.
Traceback (most recent call last):
 File "/usr/share/gramps/PluginUtils/_Tool.py", line 251, in gui_tool
   tool_class(dbstate, uistate, options_class, name, callback)
 File "/usr/share/gramps/plugins/RebuildRefMap.py", line 83, in __init__
   self.db.reindex_reference_map(self.update)
 File "/usr/share/gramps/gen/db/dbdir.py", line 1020, in reindex_reference_map
   self.__reindex_reference_map(callback)
 File "/usr/share/gramps/gen/db/dbdir.py", line 1083, in __reindex_reference_map
   transaction = self.transaction_begin(batch=True, no_magic=True)
 File "/usr/share/gramps/gen/db/dbdir.py", line 1555, in transaction_begin
   raise Errors.DbError(msg)
DbError: <unprintable DbError object>

> Perhaps you can also point to the google page where you found the
> attribute changed name?

It was just some talk about an svn patch. The following is better:

<http://www.oracle.com/technology/documentation/berkeley-db/db/ref/upgrade.4.7/log.html>

"In the Berkeley DB 4.7 release, the logging subsystem is configured
using the DB_ENV->log_set_config method instead of the previously used
DB_ENV->set_flags method.

The DB_ENV->set_flags method no longer accepts the flags DB_DIRECT_LOG,
DB_DSYNC_LOG, DB_LOG_INMEMORY or DB_LOG_AUTOREMOVE. Applications should
be modified to use the equivalent flags accepted by the
DB_ENV->log_set_config method.

Previous DB_ENV->set_flags flag Replacement DB_ENV->log_set_config flag
DB_DIRECT_LOG   DB_LOG_DIRECT
DB_DSYNC_LOG    DB_LOG_DSYNC
DB_LOG_INMEMORY DB_LOG_IN_MEMORY
DB_LOG_AUTOREMOVE       DB_LOG_AUTO_REMOVE"

Also:

<http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_log_set_config.html>

>
> Well, if you don't feel like doing this, no probs. Someone of the core
> team will have to install python 2.6 and new bsddb one of these days
> and start hacking.
>

I'm happy to help if I can. In dbdir.py I changed two occurrences of:

self.env.set_flags(db.DB_LOG_AUTOREMOVE, 1)

to:

self.env.log_set_config(db.DB_LOG_AUTO_REMOVE, 1)

which seems to be okay, but can't find instances of DB_LOG_INMEMORY,
suggested by the error message, so don't know what to do next.

By the way, I also noticed a warning on startup that I don't remember
seeing before:

/usr/share/gramps/ThumbNails.py:31: DeprecationWarning: the md5 module is deprecated; use hashlib instead

--
Martin


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python 2.6 support Was: Problem on startup

Benny Malengier
In the meantime Martin, I suppose python 2.5 is still present on your system, yes? It should be as python2.5 program, and starting GRAMPS with that should give you a working system.

Benny

2008/11/4 Benny Malengier <[hidden email]>
Ok, I will not have python 2.6 on my system in the near future.
Martin, can you open a bug ticket to follow this?
I started a wiki page: http://gramps-project.org/wiki/index.php?title=Python2.6

So we can collect python 2.6 issues (normally spring distro's will still ship python 2.5 in tandem), and the bug item can use the wiki page for discussion.

Benny

2008/11/4 Martin Steer <[hidden email]>

"Benny Malengier" <[hidden email]> writes:

> It looks like we will have to do some changes to support bsddb 4.7.x,
> and hence probably python 2.6 (as used already in archlinux). My guess
> is that for the releases in the spring this will be an important
> issue!

It's already spring here.

>
> Point 1:
> 4.6: db.DB_LOG_AUTOREMOVE
> 4.7: db.DB_LOG_AUTO_REMOVE
>
> Point 2:
> ???
> Martin, can you tell us what the error is that is raised?

invalidargerr (22, "Invalid argument -- DB_ENV->log_set_config: DB_LOG_IN_MEMORY: method not permitted after handle's open method")
29618: ERROR: _Tool.py: line 255: Failed to start tool.
Traceback (most recent call last):
 File "/usr/share/gramps/PluginUtils/_Tool.py", line 251, in gui_tool
   tool_class(dbstate, uistate, options_class, name, callback)
 File "/usr/share/gramps/plugins/RebuildRefMap.py", line 83, in __init__
   self.db.reindex_reference_map(self.update)
 File "/usr/share/gramps/gen/db/dbdir.py", line 1020, in reindex_reference_map
   self.__reindex_reference_map(callback)
 File "/usr/share/gramps/gen/db/dbdir.py", line 1083, in __reindex_reference_map
   transaction = self.transaction_begin(batch=True, no_magic=True)
 File "/usr/share/gramps/gen/db/dbdir.py", line 1555, in transaction_begin
   raise Errors.DbError(msg)
DbError: <unprintable DbError object>

> Perhaps you can also point to the google page where you found the
> attribute changed name?

It was just some talk about an svn patch. The following is better:

<http://www.oracle.com/technology/documentation/berkeley-db/db/ref/upgrade.4.7/log.html>

"In the Berkeley DB 4.7 release, the logging subsystem is configured
using the DB_ENV->log_set_config method instead of the previously used
DB_ENV->set_flags method.

The DB_ENV->set_flags method no longer accepts the flags DB_DIRECT_LOG,
DB_DSYNC_LOG, DB_LOG_INMEMORY or DB_LOG_AUTOREMOVE. Applications should
be modified to use the equivalent flags accepted by the
DB_ENV->log_set_config method.

Previous DB_ENV->set_flags flag Replacement DB_ENV->log_set_config flag
DB_DIRECT_LOG   DB_LOG_DIRECT
DB_DSYNC_LOG    DB_LOG_DSYNC
DB_LOG_INMEMORY DB_LOG_IN_MEMORY
DB_LOG_AUTOREMOVE       DB_LOG_AUTO_REMOVE"

Also:

<http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_log_set_config.html>

>
> Well, if you don't feel like doing this, no probs. Someone of the core
> team will have to install python 2.6 and new bsddb one of these days
> and start hacking.
>

I'm happy to help if I can. In dbdir.py I changed two occurrences of:

self.env.set_flags(db.DB_LOG_AUTOREMOVE, 1)

to:

self.env.log_set_config(db.DB_LOG_AUTO_REMOVE, 1)

which seems to be okay, but can't find instances of DB_LOG_INMEMORY,
suggested by the error message, so don't know what to do next.

By the way, I also noticed a warning on startup that I don't remember
seeing before:

/usr/share/gramps/ThumbNails.py:31: DeprecationWarning: the md5 module is deprecated; use hashlib instead

--
Martin



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python 2.6 support Was: Problem on startup

OldAl
In reply to this post by Benny Malengier
Benny,

On Tue, 4 Nov 2008 19:46:50 Benny Malengier wrote:
> Ok, I will not have python 2.6 on my system in the near future.
> Martin, can you open a bug ticket to follow this?
> I started a wiki page:
> http://gramps-project.org/wiki/index.php?title=Python2.6

Just a 2 c contribution: Python 3.0 is in a pre-release stage.  It is
significantly different from 2.x.  See for instance


       http://www.comp.leeds.ac.uk/nde/papers/teachpy3.html

Would it be worth while to jump straight to Python 3.0 if there are already
issues of differences between versions?

Al.

>
> So we can collect python 2.6 issues (normally spring distro's will still
> ship python 2.5 in tandem), and the bug item can use the wiki page for
> discussion.
>
> Benny
>
> 2008/11/4 Martin Steer <[hidden email]>
>
> > "Benny Malengier" <[hidden email]> writes:
> > > It looks like we will have to do some changes to support bsddb 4.7.x,
> > > and hence probably python 2.6 (as used already in archlinux). My guess
> > > is that for the releases in the spring this will be an important
> > > issue!
> >
> > It's already spring here.
> >
> > > Point 1:
> > > 4.6: db.DB_LOG_AUTOREMOVE
> > > 4.7: db.DB_LOG_AUTO_REMOVE
> > >
> > > Point 2:
> > > ???
> > > Martin, can you tell us what the error is that is raised?
> >
> > invalidargerr (22, "Invalid argument -- DB_ENV->log_set_config:
> > DB_LOG_IN_MEMORY: method not permitted after handle's open method")
> > 29618: ERROR: _Tool.py: line 255: Failed to start tool.
> > Traceback (most recent call last):
> >  File "/usr/share/gramps/PluginUtils/_Tool.py", line 251, in gui_tool
> >    tool_class(dbstate, uistate, options_class, name, callback)
> >   File "/usr/share/gramps/plugins/RebuildRefMap.py", line 83, in __init__
> >    self.db.reindex_reference_map(self.update)
> >  File "/usr/share/gramps/gen/db/dbdir.py", line 1020, in
> > reindex_reference_map
> >    self.__reindex_reference_map(callback)
> >  File "/usr/share/gramps/gen/db/dbdir.py", line 1083, in
> > __reindex_reference_map
> >    transaction = self.transaction_begin(batch=True, no_magic=True)
> >  File "/usr/share/gramps/gen/db/dbdir.py", line 1555, in
> > transaction_begin raise Errors.DbError(msg)
> > DbError: <unprintable DbError object>
> >
> > > Perhaps you can also point to the google page where you found the
> > > attribute changed name?
> >
> > It was just some talk about an svn patch. The following is better:
> >
> > <
> > http://www.oracle.com/technology/documentation/berkeley-db/db/ref/upgrade
> >.4.7/log.html
> >
> >
> > "In the Berkeley DB 4.7 release, the logging subsystem is configured
> > using the DB_ENV->log_set_config method instead of the previously used
> > DB_ENV->set_flags method.
> >
> > The DB_ENV->set_flags method no longer accepts the flags DB_DIRECT_LOG,
> > DB_DSYNC_LOG, DB_LOG_INMEMORY or DB_LOG_AUTOREMOVE. Applications should
> > be modified to use the equivalent flags accepted by the
> > DB_ENV->log_set_config method.
> >
> > Previous DB_ENV->set_flags flag Replacement DB_ENV->log_set_config flag
> > DB_DIRECT_LOG   DB_LOG_DIRECT
> > DB_DSYNC_LOG    DB_LOG_DSYNC
> > DB_LOG_INMEMORY DB_LOG_IN_MEMORY
> > DB_LOG_AUTOREMOVE       DB_LOG_AUTO_REMOVE"
> >
> > Also:
> >
> > <
> > http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_l
> >og_set_config.html
> >
> > > Well, if you don't feel like doing this, no probs. Someone of the core
> > > team will have to install python 2.6 and new bsddb one of these days
> > > and start hacking.
> >
> > I'm happy to help if I can. In dbdir.py I changed two occurrences of:
> >
> > self.env.set_flags(db.DB_LOG_AUTOREMOVE, 1)
> >
> > to:
> >
> > self.env.log_set_config(db.DB_LOG_AUTO_REMOVE, 1)
> >
> > which seems to be okay, but can't find instances of DB_LOG_INMEMORY,
> > suggested by the error message, so don't know what to do next.
> >
> > By the way, I also noticed a warning on startup that I don't remember
> > seeing before:
> >
> > /usr/share/gramps/ThumbNails.py:31: DeprecationWarning: the md5 module is
> > deprecated; use hashlib instead
> >
> > --
> > Martin



--
Dr Algis Kabaila (PhD Eng)
http://akabaila.pcug.org.au/StructuralAnalysis/
------------------------------------------------


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python 2.6 support Was: Problem on startup

Eero Tamminen-3
Hi,

On Tuesday 04 November 2008, Algis Kabaila wrote:

> On Tue, 4 Nov 2008 19:46:50 Benny Malengier wrote:
> > Ok, I will not have python 2.6 on my system in the near future.
> > Martin, can you open a bug ticket to follow this?
> > I started a wiki page:
> > http://gramps-project.org/wiki/index.php?title=Python2.6
>
> Just a 2 c contribution: Python 3.0 is in a pre-release stage.  It is
> significantly different from 2.x.  See for instance
>
>        http://www.comp.leeds.ac.uk/nde/papers/teachpy3.html
>
> Would it be worth while to jump straight to Python 3.0 if there are
> already issues of differences between versions?

Most people wouldn't then be able to use Gramps.  I don't think it's worth
considering this trouble until final Python v3 has been released + there
have been some additional bugfix releases.

In the meanwhile 2.6 is meant to be the transition version that
can be used to test Python program compatibility with v3.


        - Eero

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python 2.6 support Was: Problem on startup

Gerald Britton-2
I think we can forget 3.0 for the time being. It will break too many
things. 2.6 is doable though. I thought the problem was bsddb?



On 11/4/08, Eero Tamminen <[hidden email]> wrote:

> Hi,
>
> On Tuesday 04 November 2008, Algis Kabaila wrote:
>> On Tue, 4 Nov 2008 19:46:50 Benny Malengier wrote:
>> > Ok, I will not have python 2.6 on my system in the near future.
>> > Martin, can you open a bug ticket to follow this?
>> > I started a wiki page:
>> > http://gramps-project.org/wiki/index.php?title=Python2.6
>>
>> Just a 2 c contribution: Python 3.0 is in a pre-release stage.  It is
>> significantly different from 2.x.  See for instance
>>
>>        http://www.comp.leeds.ac.uk/nde/papers/teachpy3.html
>>
>> Would it be worth while to jump straight to Python 3.0 if there are
>> already issues of differences between versions?
>
> Most people wouldn't then be able to use Gramps.  I don't think it's worth
> considering this trouble until final Python v3 has been released + there
> have been some additional bugfix releases.
>
> In the meanwhile 2.6 is meant to be the transition version that
> can be used to test Python program compatibility with v3.
>
>
> - Eero
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>

--
Sent from my mobile device

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python 2.6 support Was: Problem on startup

Benny Malengier


2008/11/5 Gerald Britton <[hidden email]>
I think we can forget 3.0 for the time being. It will break too many
things. 2.6 is doable though. I thought the problem was bsddb?

It is a bit more. Python 2.6 spews out a lot of warning of things that will be deprecated after 2.6 (as transition to 3.0).
As all developers, I do not like useless messages on my console output, so I believe we should start coding slowly to get those warnings disappear.
At the moment GRAMPS does not start up, but one warning is visible as Martin indicated: md5 lib is deprecated, use hashlib now. I believe more warnings will pop up once bsddb is made to work.

Benny

 




On 11/4/08, Eero Tamminen <[hidden email]> wrote:
> Hi,
>
> On Tuesday 04 November 2008, Algis Kabaila wrote:
>> On Tue, 4 Nov 2008 19:46:50 Benny Malengier wrote:
>> > Ok, I will not have python 2.6 on my system in the near future.
>> > Martin, can you open a bug ticket to follow this?
>> > I started a wiki page:
>> > http://gramps-project.org/wiki/index.php?title=Python2.6
>>
>> Just a 2 c contribution: Python 3.0 is in a pre-release stage.  It is
>> significantly different from 2.x.  See for instance
>>
>>        http://www.comp.leeds.ac.uk/nde/papers/teachpy3.html
>>
>> Would it be worth while to jump straight to Python 3.0 if there are
>> already issues of differences between versions?
>
> Most people wouldn't then be able to use Gramps.  I don't think it's worth
> considering this trouble until final Python v3 has been released + there
> have been some additional bugfix releases.
>
> In the meanwhile 2.6 is meant to be the transition version that
> can be used to test Python program compatibility with v3.
>
>
>       - Eero
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>

--
Sent from my mobile device

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python 2.6 support Was: Problem on startup

Gerald Britton-2
Ok though still far less work than reaching for 3.0.

On 11/5/08, Benny Malengier <[hidden email]> wrote:

> 2008/11/5 Gerald Britton <[hidden email]>
>
>> I think we can forget 3.0 for the time being. It will break too many
>> things. 2.6 is doable though. I thought the problem was bsddb?
>
>
> It is a bit more. Python 2.6 spews out a lot of warning of things that will
> be deprecated after 2.6 (as transition to 3.0).
> As all developers, I do not like useless messages on my console output, so I
> believe we should start coding slowly to get those warnings disappear.
> At the moment GRAMPS does not start up, but one warning is visible as Martin
> indicated: md5 lib is deprecated, use hashlib now. I believe more warnings
> will pop up once bsddb is made to work.
>
> Benny
>
>
>
>>
>>
>>
>>
>> On 11/4/08, Eero Tamminen <[hidden email]> wrote:
>> > Hi,
>> >
>> > On Tuesday 04 November 2008, Algis Kabaila wrote:
>> >> On Tue, 4 Nov 2008 19:46:50 Benny Malengier wrote:
>> >> > Ok, I will not have python 2.6 on my system in the near future.
>> >> > Martin, can you open a bug ticket to follow this?
>> >> > I started a wiki page:
>> >> > http://gramps-project.org/wiki/index.php?title=Python2.6
>> >>
>> >> Just a 2 c contribution: Python 3.0 is in a pre-release stage.  It is
>> >> significantly different from 2.x.  See for instance
>> >>
>> >>        http://www.comp.leeds.ac.uk/nde/papers/teachpy3.html
>> >>
>> >> Would it be worth while to jump straight to Python 3.0 if there are
>> >> already issues of differences between versions?
>> >
>> > Most people wouldn't then be able to use Gramps.  I don't think it's
>> worth
>> > considering this trouble until final Python v3 has been released + there
>> > have been some additional bugfix releases.
>> >
>> > In the meanwhile 2.6 is meant to be the transition version that
>> > can be used to test Python program compatibility with v3.
>> >
>> >
>> >       - Eero
>> >
>> > -------------------------------------------------------------------------
>> > This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> > Build the coolest Linux based applications with Moblin SDK & win great
>> > prizes
>> > Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> > _______________________________________________
>> > Gramps-devel mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/gramps-devel
>> >
>>
>> --
>> Sent from my mobile device
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Gramps-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>>
>

--
Sent from my mobile device

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python 2.6 support Was: Problem on startup

Gary Burton
In reply to this post by Gerald Britton-2
Here is what's coming in 2.6

http://docs.python.org/whatsnew/2.6.html


Looks like Python 3.0 will bring a lot more changes to the language which I guess will be apparent in 2.8. Old style classes disappear for example. Python 3.0 won't be the default python in many people's distributions for some time yet - 2.6 isn't even in Debian so far - but we can work to make Gramps compatible with it as 2.6 and 2.8 become available which will deprecate more of the old syntax.

Bye

Gary


----- Original Message ----
From: Gerald Britton <[hidden email]>
To: Eero Tamminen <[hidden email]>; [hidden email]
Sent: Tuesday, 4 November, 2008 23:32:48
Subject: Re: [Gramps-devel] Python 2.6 support Was: Problem on startup

I think we can forget 3.0 for the time being. It will break too many
things. 2.6 is doable though. I thought the problem was bsddb?
https://lists.sourceforge.net/lists/listinfo/gramps-devel



     

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python 2.6 support Was: Problem on startup

Martin Steer-2
In reply to this post by Benny Malengier
"Benny Malengier" <[hidden email]> writes:

> Ok, I will not have python 2.6 on my system in the near future.
> Martin, can you open a bug ticket to follow this?
> I started a wiki page: http://gramps-project.org/wiki/index.php?title=Python2.6
>
> So we can collect python 2.6 issues (normally spring distro's will
> still ship python 2.5 in tandem), and the bug item can use the wiki
> page for discussion.
>

I opened the bug ticket as "Python 2.6 support" on trunk. Also added
some detail to the wiki page. You better have a look at these, to see
that I'm not misleading anyone.

--
Martin

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python 2.6 support Was: Problem on startup

jerome
Note, looking at archives :

> I have not had time lately to really pay attention.  In the NetBSD
> pkgsrc package for gramps3, Matthias Drochner just committed a patch to
> handle the latest version of py-bsddb3.  I had previously added patches
> to use bsddb3 instead of the include and non-working bsddb.  As I see it
> there are 4 things wrong in 3.0.1 that perhaps have been fixed for
> 3.0.2:
>
>   explicit dependency on bsddb3, because python seems to not really
>   include bsddb properly any more, so just using that is error prone.
>
>   bsddb3 now uses DB_LOG_AUTO_REMOVE; this API change is unfortunate,
>   but it might be best to require a version after the change and just
>   use the new API.  pkgsrc has py25-bsddb3-4.7.2 (the 25 just shows
>   which python it was built against).
>
>   DB_TXN_NOSYNC seems gone in modern bsddb3
>
>   Don't depend on python 2.5 unless it is really necessary.  The patches
>   below make it work with 2.4.  In my view, python 2.4 is not old enough
>   to meet the "if you're running it, you are lame for not upgrading, and
>   deserve to lose" test (2.2 probably is, 2.3 might be).  I think this
>   is the only problem (search below for context):
>     -class AllRelReport():
>     +class AllRelReport:
>
> Thanks,
> Greg      
>
>
> Here is what pkgsrc applies to 3.0.1:
>
> $NetBSD$
>
> --- src/Editors/_EditFamily.py.orig 2008-05-17 16:14:26.000000000 -0400
> +++ src/Editors/_EditFamily.py
> @@ -25,7 +25,7 @@
>  # python modules
>  #
>  #-------------------------------------------------------------------------
> -from bsddb import db as bsddb_db
> +from bsddb3 import db as bsddb_db
>  from gettext import gettext as _
>  from DdTargets import DdTargets
>  import pickle
> $NetBSD$
>
> --- src/GrampsDbUtils/_GrampsBSDDB.py.orig 2008-05-17 16:15:28.000000000 -0400
> +++ src/GrampsDbUtils/_GrampsBSDDB.py
> @@ -35,7 +35,7 @@ import cPickle as pickle
>  import os
>  import time
>  from gettext import gettext as _
> -from bsddb import dbshelve, db
> +from bsddb3 import dbshelve, db
>  import logging
>  __LOG = logging.getLogger(".GrampsDb")
>  
> $NetBSD$
>
> --- src/GrampsLogger/_ErrorReportAssistant.py.orig 2008-05-17 16:15:03.000000000 -0400
> +++ src/GrampsLogger/_ErrorReportAssistant.py
> @@ -2,7 +2,7 @@ from gettext import gettext as _
>  import Assistant
>  import const
>  import gtk
> -import sys, os,bsddb
> +import sys, os, bsddb3
>  
>  
>  
> @@ -99,7 +99,7 @@ class ErrorReportAssistant:
>                 "OS: %s\n"\
>                 "Distribution: %s\n"\
>                 % (str(sys.version).replace('\n',''),
> -                  str(bsddb.__version__),
> +                  str(bsddb3.__version__),
>                    str(const.VERSION),
>                    os.environ.get('LANG',''),
>                    operatingsystem,
> $NetBSD$
>
> --- src/gen/db/base.py.orig 2008-05-17 16:14:29.000000000 -0400
> +++ src/gen/db/base.py
> @@ -36,7 +36,7 @@ import random
>  import locale
>  import os
>  from sys import maxint
> -from bsddb import db
> +from bsddb3 import db
>  from gettext import gettext as _
>  
>  import logging
> $NetBSD$
>
> --- src/gen/db/dbdir.py.orig 2008-05-17 22:14:29.000000000 +0200
> +++ src/gen/db/dbdir.py
> @@ -36,7 +36,7 @@ import time
>  from types import InstanceType
>  
>  from gettext import gettext as _
> -from bsddb import dbshelve, db
> +from bsddb3 import dbshelve, db
>  import logging
>  
>  _LOG = logging.getLogger(".GrampsDb")
> @@ -480,7 +480,7 @@ class GrampsDBDir(GrampsDbBase, UpdateCa
>          # These env settings are only needed for Txn environment
>          self.env.set_lk_max_locks(25000)
>          self.env.set_lk_max_objects(25000)
> -        self.env.set_flags(db.DB_LOG_AUTOREMOVE, 1)  # clean up unused logs
> +        self.env.set_flags(db.DB_LOG_AUTO_REMOVE, 1)  # clean up unused logs
>  
>          # The DB_PRIVATE flag must go if we ever move to multi-user setup
>          env_flags = db.DB_CREATE | db.DB_PRIVATE |\
> @@ -1556,7 +1556,7 @@ class GrampsDBDir(GrampsDbBase, UpdateCa
>          transaction = BdbTransaction(msg, self.undodb, batch, no_magic)
>          if transaction.batch:
>              self.env.txn_checkpoint()
> -            self.env.set_flags(db.DB_TXN_NOSYNC, 1)      # async txn
> +#            self.env.set_flags(db.DB_TXN_NOSYNC, 1)      # async txn
>  
>              if self.secondary_connected and not transaction.no_magic:
>                  # Disconnect unneeded secondary indices
> @@ -1594,7 +1594,7 @@ class GrampsDBDir(GrampsDbBase, UpdateCa
>          self.txn.commit()
>          if transaction.batch:
>              self.env.txn_checkpoint()
> -            self.env.set_flags(db.DB_TXN_NOSYNC, 0)      # sync txn
> +#            self.env.set_flags(db.DB_TXN_NOSYNC, 0)      # sync txn
>  
>              if not transaction.no_magic:
>                  # create new secondary indices to replace the ones removed
> @@ -1697,7 +1697,7 @@ class GrampsDBDir(GrampsDbBase, UpdateCa
>          # These env settings are only needed for Txn environment
>          self.env.set_lk_max_locks(25000)
>          self.env.set_lk_max_objects(25000)
> -        self.env.set_flags(db.DB_LOG_AUTOREMOVE, 1)  # clean up unused logs
> +        self.env.set_flags(db.DB_LOG_AUTO_REMOVE, 1)  # clean up unused logs
>  
>          # The DB_PRIVATE flag must go if we ever move to multi-user setup
>          env_flags = db.DB_CREATE | db.DB_PRIVATE |\
> $NetBSD$
>
> --- src/plugins/Leak.py.orig 2008-05-17 16:14:56.000000000 -0400
> +++ src/plugins/Leak.py
> @@ -31,7 +31,7 @@ Show uncollected objects in a window.
>  #------------------------------------------------------------------------
>  import os
>  from gettext import gettext as _
> -from bsddb.db import DBError
> +from bsddb3.db import DBError
>  
>  #------------------------------------------------------------------------
>  #
> $NetBSD: patch-ba,v 1.1 2008/06/23 15:44:14 drochner Exp $
>
> --- src/gramps.py.orig 2008-05-17 22:15:36.000000000 +0200
> +++ src/gramps.py
> @@ -94,7 +94,7 @@ gettext.install("gramps",loc,unicode=1)
>  #
>  #-------------------------------------------------------------------------
>  
> -MIN_PYTHON_VERSION = (2, 5, 0, '', 0)
> +MIN_PYTHON_VERSION = (2, 4, 0, '', 0)
>  if not sys.version_info >= MIN_PYTHON_VERSION :
>      print gettext.gettext("Your Python version does not meet the "
>                    "requirements. At least python %d.%d.%d is needed to"
> $NetBSD: patch-bb,v 1.1 2008/06/23 15:44:14 drochner Exp $
>
> --- src/plugins/all_relations.py.orig 2008-05-17 22:14:56.000000000 +0200
> +++ src/plugins/all_relations.py
> @@ -47,7 +47,7 @@ def run(database, document, person):
>      report = AllRelReport(database, document, person)
>      report.run()
>      
> -class AllRelReport():
> +class AllRelReport:
>      """
>      Obtains all relationships, displays the relations, and in details, the
>      relation path
> $NetBSD: patch-bc,v 1.1 2008/06/23 15:44:14 drochner Exp $
>
> --- configure.orig 2008-05-17 22:33:13.000000000 +0200
> +++ configure
> @@ -6289,12 +6289,12 @@ echo "${ECHO_T}$LINGUAS" >&6; }
>  
>          if test -n "$PYTHON"; then
>        # If the user set $PYTHON, use it and don't search something else.
> -      { echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.5" >&5
> -echo $ECHO_N "checking whether $PYTHON version >= 2.5... $ECHO_C" >&6; }
> +      { echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.4" >&5
> +echo $ECHO_N "checking whether $PYTHON version >= 2.4... $ECHO_C" >&6; }
>        prog="import sys, string
>  # split strings by '.' and convert to numeric.  Append some zeros
>  # because we need at least 4 digits for the hex conversion.
> -minver = map(int, string.split('2.5', '.')) + [0, 0, 0]
> +minver = map(int, string.split('2.4', '.')) + [0, 0, 0]
>  minverhex = 0
>  for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
>  sys.exit(sys.hexversion < minverhex)"

source: http://www.nabble.com/Re%3A-Are-we-ready-for-3.0.2-p19590617.html



Martin Steer a écrit :

> "Benny Malengier" <[hidden email]> writes:
>
>> Ok, I will not have python 2.6 on my system in the near future.
>> Martin, can you open a bug ticket to follow this?
>> I started a wiki page: http://gramps-project.org/wiki/index.php?title=Python2.6
>>
>> So we can collect python 2.6 issues (normally spring distro's will
>> still ship python 2.5 in tandem), and the bug item can use the wiki
>> page for discussion.
>>
>
> I opened the bug ticket as "Python 2.6 support" on trunk. Also added
> some detail to the wiki page. You better have a look at these, to see
> that I'm not misleading anyone.
>
> --
> Martin
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python 2.6 support Was: Problem on startup

Benny Malengier
Using bsddb3 in gramps would give us an even more variable target.
In my opinion we only need to move to bsddb3 when python3.0 comes out without bsddb package.

Benny

2008/11/6 Jérôme <[hidden email]>
Note, looking at archives :

I have not had time lately to really pay attention.  In the NetBSD
pkgsrc package for gramps3, Matthias Drochner just committed a patch to
handle the latest version of py-bsddb3.  I had previously added patches
to use bsddb3 instead of the include and non-working bsddb.  As I see it
there are 4 things wrong in 3.0.1 that perhaps have been fixed for
3.0.2:

 explicit dependency on bsddb3, because python seems to not really
 include bsddb properly any more, so just using that is error prone.

 bsddb3 now uses DB_LOG_AUTO_REMOVE; this API change is unfortunate,
 but it might be best to require a version after the change and just
 use the new API.  pkgsrc has py25-bsddb3-4.7.2 (the 25 just shows
 which python it was built against).

 DB_TXN_NOSYNC seems gone in modern bsddb3

 Don't depend on python 2.5 unless it is really necessary.  The patches
 below make it work with 2.4.  In my view, python 2.4 is not old enough
 to meet the "if you're running it, you are lame for not upgrading, and
 deserve to lose" test (2.2 probably is, 2.3 might be).  I think this
 is the only problem (search below for context):
   -class AllRelReport():
   +class AllRelReport:

Thanks,
Greg      

Here is what pkgsrc applies to 3.0.1:

$NetBSD$

--- src/Editors/_EditFamily.py.orig 2008-05-17 16:14:26.000000000 -0400
+++ src/Editors/_EditFamily.py
@@ -25,7 +25,7 @@
 # python modules
 #
 #-------------------------------------------------------------------------
-from bsddb import db as bsddb_db
+from bsddb3 import db as bsddb_db
 from gettext import gettext as _
 from DdTargets import DdTargets
 import pickle
$NetBSD$

--- src/GrampsDbUtils/_GrampsBSDDB.py.orig 2008-05-17 16:15:28.000000000 -0400
+++ src/GrampsDbUtils/_GrampsBSDDB.py
@@ -35,7 +35,7 @@ import cPickle as pickle
 import os
 import time
 from gettext import gettext as _
-from bsddb import dbshelve, db
+from bsddb3 import dbshelve, db
 import logging
 __LOG = logging.getLogger(".GrampsDb")
 $NetBSD$

--- src/GrampsLogger/_ErrorReportAssistant.py.orig 2008-05-17 16:15:03.000000000 -0400
+++ src/GrampsLogger/_ErrorReportAssistant.py
@@ -2,7 +2,7 @@ from gettext import gettext as _
 import Assistant
 import const
 import gtk
-import sys, os,bsddb
+import sys, os, bsddb3
   @@ -99,7 +99,7 @@ class ErrorReportAssistant:
               "OS: %s\n"\
               "Distribution: %s\n"\
               % (str(sys.version).replace('\n',''),
-                  str(bsddb.__version__),
+                  str(bsddb3.__version__),
                  str(const.VERSION),
                  os.environ.get('LANG',''),
                  operatingsystem,
$NetBSD$

--- src/gen/db/base.py.orig 2008-05-17 16:14:29.000000000 -0400
+++ src/gen/db/base.py
@@ -36,7 +36,7 @@ import random
 import locale
 import os
 from sys import maxint
-from bsddb import db
+from bsddb3 import db
 from gettext import gettext as _
  import logging
$NetBSD$

--- src/gen/db/dbdir.py.orig 2008-05-17 22:14:29.000000000 +0200
+++ src/gen/db/dbdir.py
@@ -36,7 +36,7 @@ import time
 from types import InstanceType
  from gettext import gettext as _
-from bsddb import dbshelve, db
+from bsddb3 import dbshelve, db
 import logging
  _LOG = logging.getLogger(".GrampsDb")
@@ -480,7 +480,7 @@ class GrampsDBDir(GrampsDbBase, UpdateCa
        # These env settings are only needed for Txn environment
        self.env.set_lk_max_locks(25000)
        self.env.set_lk_max_objects(25000)
-        self.env.set_flags(db.DB_LOG_AUTOREMOVE, 1)  # clean up unused logs
+        self.env.set_flags(db.DB_LOG_AUTO_REMOVE, 1)  # clean up unused logs
          # The DB_PRIVATE flag must go if we ever move to multi-user setup
        env_flags = db.DB_CREATE | db.DB_PRIVATE |\
@@ -1556,7 +1556,7 @@ class GrampsDBDir(GrampsDbBase, UpdateCa
        transaction = BdbTransaction(msg, self.undodb, batch, no_magic)
        if transaction.batch:
            self.env.txn_checkpoint()
-            self.env.set_flags(db.DB_TXN_NOSYNC, 1)      # async txn
+#            self.env.set_flags(db.DB_TXN_NOSYNC, 1)      # async txn
              if self.secondary_connected and not transaction.no_magic:
                # Disconnect unneeded secondary indices
@@ -1594,7 +1594,7 @@ class GrampsDBDir(GrampsDbBase, UpdateCa
        self.txn.commit()
        if transaction.batch:
            self.env.txn_checkpoint()
-            self.env.set_flags(db.DB_TXN_NOSYNC, 0)      # sync txn
+#            self.env.set_flags(db.DB_TXN_NOSYNC, 0)      # sync txn
              if not transaction.no_magic:
                # create new secondary indices to replace the ones removed
@@ -1697,7 +1697,7 @@ class GrampsDBDir(GrampsDbBase, UpdateCa
        # These env settings are only needed for Txn environment
        self.env.set_lk_max_locks(25000)
        self.env.set_lk_max_objects(25000)
-        self.env.set_flags(db.DB_LOG_AUTOREMOVE, 1)  # clean up unused logs
+        self.env.set_flags(db.DB_LOG_AUTO_REMOVE, 1)  # clean up unused logs
          # The DB_PRIVATE flag must go if we ever move to multi-user setup
        env_flags = db.DB_CREATE | db.DB_PRIVATE |\
$NetBSD$

--- src/plugins/Leak.py.orig 2008-05-17 16:14:56.000000000 -0400
+++ src/plugins/Leak.py
@@ -31,7 +31,7 @@ Show uncollected objects in a window.
 #------------------------------------------------------------------------
 import os
 from gettext import gettext as _
-from bsddb.db import DBError
+from bsddb3.db import DBError
  #------------------------------------------------------------------------
 #
$NetBSD: patch-ba,v 1.1 2008/06/23 15:44:14 drochner Exp $

--- src/gramps.py.orig 2008-05-17 22:15:36.000000000 +0200
+++ src/gramps.py
@@ -94,7 +94,7 @@ gettext.install("gramps",loc,unicode=1)
 #
 #-------------------------------------------------------------------------
 -MIN_PYTHON_VERSION = (2, 5, 0, '', 0)
+MIN_PYTHON_VERSION = (2, 4, 0, '', 0)
 if not sys.version_info >= MIN_PYTHON_VERSION :
    print gettext.gettext("Your Python version does not meet the "
                  "requirements. At least python %d.%d.%d is needed to"
$NetBSD: patch-bb,v 1.1 2008/06/23 15:44:14 drochner Exp $

--- src/plugins/all_relations.py.orig 2008-05-17 22:14:56.000000000 +0200
+++ src/plugins/all_relations.py
@@ -47,7 +47,7 @@ def run(database, document, person):
    report = AllRelReport(database, document, person)
    report.run()
    -class AllRelReport():
+class AllRelReport:
    """
    Obtains all relationships, displays the relations, and in details, the
    relation path
$NetBSD: patch-bc,v 1.1 2008/06/23 15:44:14 drochner Exp $

--- configure.orig 2008-05-17 22:33:13.000000000 +0200
+++ configure
@@ -6289,12 +6289,12 @@ echo "${ECHO_T}$LINGUAS" >&6; }
          if test -n "$PYTHON"; then
      # If the user set $PYTHON, use it and don't search something else.
-      { echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.5" >&5
-echo $ECHO_N "checking whether $PYTHON version >= 2.5... $ECHO_C" >&6; }
+      { echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.4" >&5
+echo $ECHO_N "checking whether $PYTHON version >= 2.4... $ECHO_C" >&6; }
      prog="import sys, string
 # split strings by '.' and convert to numeric.  Append some zeros
 # because we need at least 4 digits for the hex conversion.
-minver = map(int, string.split('2.5', '.')) + [0, 0, 0]
+minver = map(int, string.split('2.4', '.')) + [0, 0, 0]
 minverhex = 0
 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
 sys.exit(sys.hexversion < minverhex)"

source: http://www.nabble.com/Re%3A-Are-we-ready-for-3.0.2-p19590617.html



Martin Steer a écrit :
"Benny Malengier" <[hidden email]> writes:

Ok, I will not have python 2.6 on my system in the near future.
Martin, can you open a bug ticket to follow this?
I started a wiki page: http://gramps-project.org/wiki/index.php?title=Python2.6

So we can collect python 2.6 issues (normally spring distro's will
still ship python 2.5 in tandem), and the bug item can use the wiki
page for discussion.


I opened the bug ticket as "Python 2.6 support" on trunk. Also added
some detail to the wiki page. You better have a look at these, to see
that I'm not misleading anyone.

--
Martin

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python 2.6 support Was: Problem on startup

Josip
In reply to this post by jerome
Jérôme wrote:
> Note, looking at archives :
> source: http://www.nabble.com/Re%3A-Are-we-ready-for-3.0.2-p19590617.html
>

Thanks Jérôme,
as NetBSD patch suggest: DB_TXN_NOSYNC seems gone
so if the line: self.env.set_flags(db.DB_TXN_NOSYNC, 0)
is replaced with:
if db.version() < (4, 7):
        self.env.set_flags(db.DB_TXN_NOSYNC, 0)
no more errors with Python2.6

--
Josip


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel