Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Python2 fork with backwards compatible Python3 features
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
stefantalpalaru
n00b
n00b


Joined: 11 Jan 2009
Posts: 24
Location: Italy

PostPosted: Mon Jan 23, 2017 4:22 pm    Post subject: Python2 fork with backwards compatible Python3 features Reply with quote

Unfortunately, the project's name is still undecided: https://github.com/naftaliharris/placeholder/issues/47

If you don't mind having to go through a rename, eventually, there's an experimental ebuild in my overlay: https://github.com/stefantalpalaru/gentoo-overlay/tree/master/dev-lang/py28

with a modified python-utils-r1.eclass to go with it - https://github.com/stefantalpalaru/gentoo-overlay/tree/master/eclass

So far I've tested pycairo with "py2_8" in PYTHON_TARGETS (by copying the latest "pycairo" and "python-exec" ebuilds in the local overlay so its eclass override takes precedence). Everything works as it should.
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6051
Location: Removed by Neddy

PostPosted: Mon Jan 30, 2017 7:55 pm    Post subject: Reply with quote

but ... why
_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
stefantalpalaru
n00b
n00b


Joined: 11 Jan 2009
Posts: 24
Location: Italy

PostPosted: Mon Jan 30, 2017 9:27 pm    Post subject: Reply with quote

Because Gentoo is about choice ;-)
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6051
Location: Removed by Neddy

PostPosted: Mon Jan 30, 2017 10:06 pm    Post subject: Reply with quote

This was more todo with the entire concept of py28.
Backporting py3* features seems counter intuitive.

There were some low level PY instruction set issues that prompted the break
_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
stefantalpalaru
n00b
n00b


Joined: 11 Jan 2009
Posts: 24
Location: Italy

PostPosted: Mon Jan 30, 2017 10:42 pm    Post subject: Reply with quote

It makes perfect sense to have Python3 features backported in a backwards compatible way when you have a large Python2 code base. See Perl5 vs. Perl6 for the same scenario.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Tue Jan 31, 2017 3:30 am    Post subject: Reply with quote

There are valid Python2 programs that are not valid Python3 programs. Some of the non-Python3 constructs cannot readily be detected through static analysis, and must be found by running the code with appropriate inputs. For large programs without exhaustive test suites, this is impractical. Thus, some projects have opted not to support any Python that rejects any valid Python2 program. Sometimes, this is because they cannot determine if their program is valid Python3. Other times, it is because they know it is not valid Python3 and lack the resources to readily update it to become valid Python3.

Placeholder attempts to provide an interpreter that will accept all valid Python2 programs, while still providing some of the niceties that were added to Python3, but not backported by the core Python developers.
Back to top
View user's profile Send private message
stefantalpalaru
n00b
n00b


Joined: 11 Jan 2009
Posts: 24
Location: Italy

PostPosted: Fri Feb 03, 2017 2:25 pm    Post subject: Reply with quote

Package renamed to dev-lang/tauthon - https://github.com/stefantalpalaru/gentoo-overlay/blob/master/dev-lang/tauthon
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum