View Issue Details

IDProjectCategoryView StatusLast Update
0001521ScribusDocumentationpublic2005-04-07 20:45
Reportertom_verbeure Assigned Tosubik  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformPCOSLinuxOS Version2.4.20 Suse 8.2
Product Version1.2.1 
Fixed in Version1.2.2cvs 
Summary0001521: Compilation aborts when using Python 2.2
Descriptionfile "cmddialog.h", line 10: PyDoc_STRVAR(....)

The define "PyDoc_STRVAR" was introduced only for Python 2.3. The installation requirements document states that Pyton 2.1 is sufficient.

Solution is simple: update the documentation. :-)

Tom
TagsNo tags attached.
Patch

Relationships

child of 0003813 acknowledged Metabug: Scripter 

Activities

rdieter

2005-01-10 12:13

reporter   ~0003428

If at all possible, make buildable with python2.2 as well.

rdieter

2005-01-10 12:13

reporter   ~0003429

If at all possible, make buildable with python2.2 as well.

rdieter

2005-01-10 12:21

reporter   ~0003430

alternatively, build with configure switch
--without-python

subik

2005-01-16 19:44

manager   ~0003488

you can fix this issue adding this code (the includes are just marks, they are in the file already) into cmdvar.h:
#include <Python.h>
#include "scribus.h"

//for Python older than 2.3
#ifndef PyDoc_STR
#define PyDoc_VAR(name) static char name[]
#define PyDoc_STR(str) (str)
#define PyDoc_STRVAR(name, str) PyDoc_VAR(name) = PyDoc_STR(str)
#endif

BUT I'm afraid scripter uses a lot of 2.3 stuff e.g. PyObject *PyBool_FromLong which was introduced in 2.3...
Any suggestions what to do? I would like to update docs because I don't want to lose these features.

cbradney

2005-01-16 19:50

administrator   ~0003489

2.4 is out.. let people upgrade, at least to 2.3.

cbradney

2005-01-16 19:51

administrator   ~0003490

Unless theres a way of just removing some functions if only 2.2 is found... depending on what functions they are. FWIW, with more and more Scripter functions arriving, the list of not included functions will grow and grow until 2.2 is really not good enough at all.

subik

2005-01-16 20:06

manager   ~0003491

hm. I remove my dirty hands off the scripter if it will be filled with damned #ifdef HAVE_PYTHON_23 or #ifndef HAVE_PYTHON_15 or whatever... I'll took some days to think about it. But it looks for the docs update, not to change code and functionality.

cbradney

2005-01-16 20:32

administrator   ~0003492

For 1.2.x series we only need to stabilise it.. not develop it further. A few function removals wouldnt hurt.

ringerc

2005-01-17 00:29

reporter   ~0003493

First, I think it's worth noting that it's quite practical to have multiple Python versions installed in paralell, and there will be 2.3 packages for most distros that lack 2.3. It's not too hard for users to upgrade.

PyDoc_STRVAR is easily fixed, as subik notes. I've done exactly this for a constant not exported by Python < 2.4 in the macro mgr work.

The use of other functions shouldn't be too bad. PyBool_FromLong, for example, can be changed to PyInt_FromLong with no impact on existing code, compatibility, etc. It'd be /nice/ to be able to keep it, but not important. It'd be fine to replace it in the 1.2.x branch (hooray, more skew when merging patches).

I don't think we should be ifdefing anything in the body of the function definitions, though. It shouldn't be necessary since in many cases a less convenient replacement function can be used instead of the new-in-2.3 one, and is a right PITA.

Separately, I do think a --without-python is a good idea.

ringerc

2005-01-17 00:35

reporter   ~0003494

I should also note that while it's probably possible to make it work with 2.2, I think just requiring 2.3 is reasonable - 2.2 is getting pretty elderly, and I'd be very surprised to find it on any system with Qt 3.3 . If the user upgrades Qt, I think it's reasonable to expect them to upgrade Python especially if Scribus can offer the option of not building the scripter.

As for Python 2.1 - I wouldn't bother even thinking about it. Python 2.1 lacks new-style classes and several other rather fundamental features of modern Python. Even if we could build with it, which could probably be done with a few fixes, it'd be minefield of compatibility problems for scripts. Scripts written for Python 2.1 run fine in newer versions, obviously, but scripts written for 2.2 or 2.3 may not run in 2.1.

subik

2005-01-20 15:35

manager   ~0003513

fixed in docs

Issue History

Date Modified Username Field Change
2005-01-10 01:01 tom_verbeure New Issue
2005-01-10 12:13 rdieter Note Added: 0003428
2005-01-10 12:13 rdieter Note Added: 0003429
2005-01-10 12:21 rdieter Note Added: 0003430
2005-01-10 22:51 fschmid Status new => assigned
2005-01-10 22:51 fschmid Assigned To => subik
2005-01-16 19:44 subik Note Added: 0003488
2005-01-16 19:50 cbradney Note Added: 0003489
2005-01-16 19:51 cbradney Note Added: 0003490
2005-01-16 20:06 subik Note Added: 0003491
2005-01-16 20:32 cbradney Note Added: 0003492
2005-01-17 00:29 ringerc Note Added: 0003493
2005-01-17 00:35 ringerc Note Added: 0003494
2005-01-20 15:35 subik Status assigned => resolved
2005-01-20 15:35 subik Fixed in Version => 1.2.2cvs
2005-01-20 15:35 subik Resolution open => fixed
2005-01-20 15:35 subik Note Added: 0003513
2005-04-07 20:45 plinnell Status resolved => closed
2005-04-07 20:45 plinnell Description Updated
2006-05-13 21:44 christoph_s Relationship added child of 0003813