Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PERMANENT] Minimal Python version required #39

Open
GoogleCodeExporter opened this issue Apr 18, 2015 · 27 comments
Open

[PERMANENT] Minimal Python version required #39

GoogleCodeExporter opened this issue Apr 18, 2015 · 27 comments

Comments

@GoogleCodeExporter
Copy link

txt2tags 2.5 require Python 2.0

I now use in the trunk :
enumerate() from python 2.3 and conditional expressions from python 2.5

Which Python version do we want or need to support ?

 Python | Year
--------+------
 2.0      2000
 2.1      2001
 2.2      2001
 2.3      2003
 2.4      2004
 2.5      2006
 2.6      2008

Original issue reported on code.google.com by fgalla...@gmail.com on 2 Aug 2010 at 2:00

@GoogleCodeExporter
Copy link
Author

Original comment by fgalla...@gmail.com on 2 Aug 2010 at 2:01

  • Changed state: New

@GoogleCodeExporter
Copy link
Author

That's a good question.

In fact, txt2tags 2.5 is still compatible with Python 1.5.2. We broke that in 
SVN and now this is open to discussion.

I prefer txt2tags to be compatible with oldest Python versions whenever 
possible. There's no reason to break compatibility for guys unfortunately stuck 
with old Python versions.

Now (2010) Python 1.5.2 is really really old. Python 3 is too fresh (and breaks 
compatibility with 2.x).

I still don't have an answer for that, but I do prefer to stick with 2.x, where 
x is the lowest possible number :)



Original comment by aureliojargas@gmail.com on 4 Aug 2010 at 1:47

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

http://txt2tags.sourceforge.net/changelog.html

Version 2.5 (2008-07-26)

# IMPORTANT: Txt2tags is not compatible with old Python 1.5.2 anymore, because 
Unicode strings were added in Python 2.0. If your Python is older than 2.0, 
please use txt2tags version 2.4. 

Original comment by fgalla...@gmail.com on 4 Aug 2010 at 1:55

@GoogleCodeExporter
Copy link
Author

Oops, I don't remember important facts of my own program. Thanks for correcting 
me Florent! :)

Original comment by aureliojargas@gmail.com on 4 Aug 2010 at 2:01

@GoogleCodeExporter
Copy link
Author

Thinking more about it, txt2tags 2.5 requires Python 2.0. The planned 
break-everything txt2tags 3.0 release will be Python 3 compatible.

Now we're in the middle of this change. I don't think it will be nice to our 
users breaking compat now in txt2tags 2.6 and then again in 3.0.

We can hold on and not use newer features, trying to stick with Python 2.0, so 
users of txt2tags 2.5 can safely upgrade to 2.6. When the time to upgrade to 
Python 3 comes, we do use all the new features.

How about it?

Original comment by aureliojargas@gmail.com on 4 Aug 2010 at 6:08

@GoogleCodeExporter
Copy link
Author

The question is "do people still using python 2.0 really need the new features 
of txt2tags on their system?"

I guess the txt2tags 2.5 version is good enough for converting to LaTeX, html 
and such, and in the case someone for example needs to process files 
automatically on a server, the distributions probably won't propose the newest 
version of txt2tags. 

Linux Debian Lenny which is already quite old is using python 2.5 and for older 
versions there are some backports for installing newer version for example. On 
Mac OS X, there is an installer of python-2.5.1-macosx.dmg which is suitable 
for Panther (10.3), and on Windows it's easy to get the latest version of 
python.

And even if people have issues with the 2.0 version of python being too old, it 
won't prevent to open and work on the txt2tags files, and convert their work on 
an other computer ;)

Original comment by eforg...@gmail.com on 4 Aug 2010 at 8:48

@GoogleCodeExporter
Copy link
Author

I don't think it's "breaking compat". For my code, Python 2.3 seems a need.
But the older Python I know on a real computer is 2.4, so I think it's not an 
issue.

Python2.0 2000 txt2tags2.5 2008 : 8 years safe.
Python2.3 2003 txt2tags2.6 2010 : 7 years safe.
It sounds ok for me.

Original comment by fgalla...@gmail.com on 4 Aug 2010 at 8:50

@GoogleCodeExporter
Copy link
Author

With r174 et r175, trunk is now Python2.3 ready.

Original comment by fgalla...@gmail.com on 4 Aug 2010 at 10:04

@GoogleCodeExporter
Copy link
Author

The only 2.3 feature is one "enumerate()" in the aa_table function...but it's 
only used with the %!csv command, and there's no csv support in Python lib 
before Python 2.3 !

So as it is, txt2tags is Python2.2 ready.

Original comment by fgalla...@gmail.com on 4 Aug 2010 at 10:20

@GoogleCodeExporter
Copy link
Author

Great job Florent, now we don't have Python version issues anymore, yay!

I don't have Python 2.0 or 2.1 here to test, so maybe we're 2.0 ready too.

I'll let this issue open, so we can continue the discussion about Python 
version for future releases.

Original comment by aureliojargas@gmail.com on 10 Aug 2010 at 9:52

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

AA = dict(zip(AA_KEYS, AA_VALUES)) seems to be the only one problem.

Python 2.0 :
Traceback (most recent call last):
  File "txt2tags", line 206, in ?
    AA = dict(zip(AA_KEYS, AA_VALUES))
NameError: There is no variable named 'dict'

Python 2.1 same error (more a warning):
txt2tags:5654: SyntaxWarning: local name 'name' in 'target_name2key' shadows 
use of 'name' as global in nested scope 'lambda'
  def target_name2key(self):
Traceback (most recent call last):
  File "txt2tags", line 206, in ?
    AA = dict(zip(AA_KEYS, AA_VALUES))
NameError: name 'dict' is not defined


Original comment by galle...@gmail.com on 20 Aug 2010 at 1:59

@GoogleCodeExporter
Copy link
Author

In r340 os.path.relpath() was used, but it is a Python 2.6 feature.

It fixes the relative image path problem, when using include files on different 
folders, or when output file is in a different folder.

But it bumps our minimum requirements, which today is Python 2.3.

Close to txt2tags-2.7 release, check if it's the only new command used. If so, 
search for substitutes.

Original comment by aureliojargas@gmail.com on 11 Nov 2010 at 1:03

  • Changed title: [PERMANENT] Minimal Python version required
  • Added labels: Type-Other
  • Removed labels: Type-Enhancement

@GoogleCodeExporter
Copy link
Author

New module used since r491 : textwrap, new in Python 2.3.

Original comment by fgalla...@gmail.com on 18 Nov 2010 at 8:46

@GoogleCodeExporter
Copy link
Author

New module 'email' since r530, new in Python 2.2.

Original comment by aureliojargas@gmail.com on 23 Nov 2010 at 4:40

@GoogleCodeExporter
Copy link
Author

Since r550 using key in dic instead dic.has_key(key).

dic.has_key() is deprecated since Python 2.6.
key in dic was introduced in Python 2.3.


Original comment by aureliojargas@gmail.com on 23 Nov 2010 at 9:52

@GoogleCodeExporter
Copy link
Author

r556 to simplify csv import.

Original comment by fgalla...@gmail.com on 24 Nov 2010 at 12:10

@GoogleCodeExporter
Copy link
Author

Ok, let's raise the bar and set Python 2.3 as the minimum required version for 
the next txt2tags 2.7.

Original comment by aureliojargas@gmail.com on 24 Nov 2010 at 10:28

@GoogleCodeExporter
Copy link
Author

r676 makes Python 2.3 OK again, but what about Issue 61 ?

Original comment by fgalla...@gmail.com on 19 Jun 2011 at 2:53

@GoogleCodeExporter
Copy link
Author

The CJK support with the unicodedata.east_asian_width() function requires 
Python 2.4.

Original comment by fgalla...@gmail.com on 30 Dec 2011 at 12:38

@GoogleCodeExporter
Copy link
Author

r803 needs Python 2.4 too.

Original comment by fgalla...@gmail.com on 5 Jan 2012 at 4:32

@GoogleCodeExporter
Copy link
Author

r827 needs Python 2.5.

Original comment by fgalla...@gmail.com on 20 Feb 2012 at 1:27

@GoogleCodeExporter
Copy link
Author

r1124 needs Python 2.5 too (sqlite3 module, as r827).

Original comment by fgalla...@gmail.com on 24 Mar 2013 at 3:59

@fgallaire
Copy link
Member

#188 needs Python 2.7 for tests stuff, should be fixed.

@jendrikseipp
Copy link

Thanks for the heads up, it's fixed now.

@fgallaire fgallaire added this to the v2.7 milestone Aug 12, 2015
@fgallaire
Copy link
Member

My CJK fix b9d02eb needs Python 2.6.

@fgallaire
Copy link
Member

CJK fix now 2.5 compatible 59707e1

@fgallaire
Copy link
Member

Tests are 2.5 compatible again 613e334

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants