News for hackers. Stuff that matters.
Re:New IPython release drops Python 2.7 support by Chris2048 on Thursday April 20, 2017 @12:59PM (#14158488)
I personally think they should have just declared Python 3 to be a new language, inspired by python 2, like many other competing new-pythons.

Instead, they didn't play fair, and gave themselves an unfair advantage.

Re:New IPython release drops Python 2.7 support by scrollaway on Thursday April 20, 2017 @01:30PM (#14158841)
Damn that Python team, giving themselves an unfair advantage in developing Python.

Seriously, what am I reading here?

Re:New IPython release drops Python 2.7 support by krick on Thursday April 20, 2017 @02:56PM (#14159692)
Maybe this is a joke, and then I'd say it's pretty neat one. I mean, just look at that, what other language got a similar problem of that scale! And let's not pretend it all passed and we are happily moving forward: this year (this month, actually) I've seen very prominent NN-course, suggesting Python 2.7 for all assignments and code samples, and quite useful library (also NN-related), supporting 2.7 only. I guess, some of mitsuhiko's (Ronarcher's) developments didn't move to 3.* as well.

So, yeah, IPython dropping 2.7 is pretty huge. Almost like moving to a different language.

Re:New IPython release drops Python 2.7 support by jerryszczerry on Thursday April 20, 2017 @04:33PM (#14160567)
> I've seen very prominent NN-course, suggesting Python 2.7 for all assignments and code samples, and quite useful library (also NN-related), supporting 2.7 only.

Oh, that's plain silly. Isn't the whole point of Python 2.7 to facilitate the transition to Python 3?

Re:New IPython release drops Python 2.7 support by krick on Thursday April 20, 2017 @06:19PM (#14161423)
Silly or not, but it's still very common mindset with scientific-oriented people (who care about ML, econometrics, statistics and such much more than "programming" per se), who form a quite notable category of Python users. Actually, for me they are the reason why I'm still using Python a lot (although I try to stick to 3.x), because for other use-cases, like scripting or web-dev I mostly (but not completely) moved to other languages.
Re:New IPython release drops Python 2.7 support by Chris2048 on Thursday April 20, 2017 @06:32PM (#14161491)
What defines python? You purposely ignored the distinctions I clarified in my post.

Let's say I developed a python-like language called "schlython", can I call on the python-2 community to convert all "old" python-2 code into my competing language?

Re:New IPython release drops Python 2.7 support by pekk on Thursday April 20, 2017 @06:47PM (#14161580)
Let's say you developed a Python-like language called Python 2.6, can you call on the Python-2.5 community to convert all old code? Come on, nobody was forced at gunpoint to port to Python 3, that's why there are still abandoned Python 2 projects all over the Cheese Shop.
Re:New IPython release drops Python 2.7 support by Chris2048 on Thursday April 20, 2017 @08:26PM (#14162103)
What conversions are needed for the py2.6 code?

> nobody was forced at gunpoint

The caretakers of py2 are the promoters of py3. Support was dropped for py2 without any serious effort to find new caretakers, so that the demise of py2 would promote switching.

Re:New IPython release drops Python 2.7 support by scrollaway on Thursday April 20, 2017 @09:12PM (#14162315)
Enough with the conspiracy theories already. There was no reason to find "new caretakers" for Python 2.7 because it's simply an old version of the language.

Reading through your posts here, I don't know what your problem is with the Python team, but please do get over it. It's incredibly annoying dealing with someone who just seems to think they're entitled for more than a decade of support of a version of their free product.

Re:New IPython release drops Python 2.7 support by Chris2048 on Friday April 21, 2017 @06:01AM (#14164241)
What conspiracy theory - Who decides that py2 needs to be killed off?

> but please do get over it

This is an ad hom - please make your posts more substantial, it feels like you are the one with a chip on your shoulder if you can't respond to these points. Your original comment added nothing to the thread but snark.

Re:New IPython release drops Python 2.7 support by sigjuice on Thursday April 20, 2017 @01:36PM (#14158908)
There will be many Python 2 production codebases that will forever remain at Python 2. Whether Python 3 is a new language or not will not make a difference.
Re:New IPython release drops Python 2.7 support by cookiecaper on Thursday April 20, 2017 @02:09PM (#14159221)
I really don't understand why. Python 3 is not a radical departure and the usual complaint is the dependency graph. Over the last 18 months that has really healed up, to the point where the Wall of Superpowers is almost 100% green.

I understand that some people want to keep old code running as long as humanly possible, which is their prerogative. But there's no reason to imply that conversion to Py3 is unduly difficult or something that shouldn't be undertaken, even for large/complex codebases. If Google can write grumpy to transpile Python code to Go, there's no reason it can't improve 2to3 to handle their incompatibilities.

Re:New IPython release drops Python 2.7 support by scrollaway on Thursday April 20, 2017 @02:25PM (#14159360)
I think the main issue is library compatibility, which gives people the impression that compatibility is an unreachable target.

The truth is, once most libraries are 3.x compatible, porting is very easy (as easy as a 2.x -> 2.y transition). And now, we've reached that point. People are starting to catch up.

There are some exceptions of course, those who heavily rely on 2.x unicode behaviour and such, but all in all they are rare. So now, it's much easier than it used to be.

Re:New IPython release drops Python 2.7 support by eikenberry on Thursday April 20, 2017 @04:44PM (#14160669)
> as easy as a 2.x -> 2.y transition

You mean I can just run all my python2 programs with python3 runtime with no changes at all. Because that was how every upgrade before python3 went.

Re:New IPython release drops Python 2.7 support by pekk on Thursday April 20, 2017 @06:43PM (#14161555)
This is simply not true. For example, Python 2.6 deprecated string exceptions. If you expect in any language to write code and have it run forever, you expect that language never to change.
Re:New IPython release drops Python 2.7 support by cookiecaper on Thursday April 20, 2017 @08:31PM (#14162130)
Yep. It's not Python-exclusive either. I can't upgrade to Ruby 2.4 yet because one of my dependencies hasn't been updated.

Breaking changes are a routine thing in any maintained language; heck, even a conservative project like GCC breaks code between major releases.

Re:New IPython release drops Python 2.7 support by Chris2048 on Thursday April 20, 2017 @08:32PM (#14162137)
Were string exceptions deprecated in 2.6 because they don't exist in py3?
Re:New IPython release drops Python 2.7 support by scrollaway on Thursday April 20, 2017 @09:10PM (#14162300)
String exceptions don't exist in py3 because they were deprecated in 2.6.
Re:New IPython release drops Python 2.7 support by scrollaway on Thursday April 20, 2017 @05:43PM (#14161197)
Nearly all my code co-runs on 2.7 / 3.6 with almost no hacks. So, yes.
Re:New IPython release drops Python 2.7 support by Chris2048 on Thursday April 20, 2017 @08:33PM (#14162138)
And your code is all code?
Re:New IPython release drops Python 2.7 support by scrollaway on Thursday April 20, 2017 @09:09PM (#14162298)
https://github.com/jleclanche

The code that doesn't run on Python 2+3 only runs on Python 3. Have at it.

Re:New IPython release drops Python 2.7 support by Chris2048 on Friday April 21, 2017 @06:06AM (#14164258)
What is your point here?
Re:New IPython release drops Python 2.7 support by scrollaway on Friday April 21, 2017 @08:46AM (#14165029)
What is yours? You're the one asking.
Re:New IPython release drops Python 2.7 support by Chris2048 on Friday April 21, 2017 @12:55PM (#14167229)
Asking what?

eikenberry asked: "can just run all my python2 programs with python3 runtime with no changes at all"

You replied: "Nearly all my code co-runs on 2.7 / 3.6 with almost no hacks. So, yes.", implying that, yes, you can run py2 programs without change, because this is true of your code

To which I replied "And your code is all code?"; Meaning, just because this is true of your code, doesn't mean it is true of eikenberry's code, or any/all code.

You then responded with a project that apparently runs fully on py3, but only partially on py2 - what is the point you are making by posting that project?

Re:New IPython release drops Python 2.7 support by jedberg on Thursday April 20, 2017 @05:35PM (#14161146)
I was going to say "because hosted solutions don't support Python 3" but I see that two days ago Amazon announced Lambda support for Python 3, which was my big holdup.

So I guess it's time for me to get on board with Python3!

Re:New IPython release drops Python 2.7 support by sigjuice on Thursday April 20, 2017 @05:08PM (#14160920)
What is the largest Python 2 codebase you can point at which has gone Python 3?
Re:New IPython release drops Python 2.7 support by collinmanderson on Friday April 21, 2017 @11:07PM (#14170919)
Re:New IPython release drops Python 2.7 support by carreau on Thursday April 20, 2017 @05:20PM (#14161037)
Django.
Re:New IPython release drops Python 2.7 support by rsj_hn on Sunday April 23, 2017 @01:30AM (#14176691)
"I really don't understand why."

Because you are suffering from the exponential growth mindset, in which the next new thing is as important as the sum total of all things that came before it. In that mindset, the future is emphasized and the past is heavily discounted.

http://idlewords.com/talks/web_design_first_100_years.htm

But that mindset is not shared by most firms in most industries, it's a unique pathology to the web.

Businesses don't re-write working code just because a newer language version is available. Landlords don't tear down old apartment buildings just because more efficient building technologies are available. We live in a world in which COBOL runs a lot of mission critical code.

Anything that touches important code that is now working is a risk and an expense, and what is the tangible gain for undertaking this expense? What new features will be added? How much more revenue will you get? What is the opportunity cost of having your engineers do that than something else, like adding a feature or improving test coverage?

Before you say that it's simple, be aware that you are talking about messing with libraries that may not be maintained anymore. You are going to spend a lot of time debugging those old libraries as well as writing unit tests for them. Nothing in the world of software engineering is simple, especially when it comes to maintaining a large body of scripts.

Imagine if in the Java world, it was announced that the Java 8 runtime would not support running Java 6 or older jars. How many jars are businesses running that were written in 2005? No one even know who wrote those libraries.

Suppose in the C world, it was announced that code written in C'99 and before would no longer compile. The Linux kernel has code written in the 90s, and GCC has code written in the 70s and it's still supposed to compile under the most modern compiler.

Moreover automated code re-writing tools don't come with guarantees of soundness or accuracy. There will be breakage, it will occur in random places, and there is zero upside to spending a lot of money to get an existing project to the same level of functionality as it had before you started messing with it.

People who work in other languages get this. It's really not a difficult concept. Everyone other than the Python community agrees that Python did a massive screw up with python 3, just as the Perl community committed suicide by making Perl 6 not be compatible with Perl 5.

I don't pretend to know what will be the future of Python -- maybe there isn't enough enterprise users out there to make a difference for the direction of the language -- but you do need to understand why breaking existing code is a deal breaker for the majority of business customers. You may disagree, but at least don't pretend that there is some irrational mysterious resistance to converting python2 code to python3.

Re:New IPython release drops Python 2.7 support by raiph on Tuesday April 25, 2017 @08:36PM (#14199542)
> making Perl 6 not be compatible with Perl 5.

Imo that's either inaccurate or misleading.

In Perl 6, `use` followed by a module name followed by a `:from` adverb leads Perl 6 to load the module, initialize it, and import its public functions, constants, variables, etc., AUTOMATICALLY BINDING THEM TO PERL 6, for any given supported other language the module is written in, provided someone has installed a suitable loader/binder (and the user has installed that plus the other language's interpreter, and the other language's module(s) that they wish to use).

I'll start with a toy example.

With a suitable "Perl 5" loader/binder in place, one could write the following and it would work as expected provided the user had installed the loader/binder, a compatible Perl 5 interpreter, and the Business::ISBN module (from https://metacpan.org/pod/Business::ISBN):

    use Business::ISBN:from<Perl5>;
    my $isbn = Business::ISBN.new( '9781491954324' );
    say $isbn.as_isbn10.as_string;
Stefan Seifert has written just such a Perl 5 loader/binder and steadily improved it over the last few years to the point it's a serious solution.

With Stefan's loader/binder, not only do toy examples like the above work, so do non-toy examples like writing controllers for the Catalyst MVC web framework even though Catalyst is large and complex, written in Perl 5 with XS (C lib) extensions, written without regard to Perl 6, and even though a controller has to be a subclass of a Perl 5 class provided by Catalyst.

Re:New IPython release drops Python 2.7 support by chromatic on Tuesday April 25, 2017 @09:25PM (#14199772)
This argument is disingenuous.

The same feature is available in any language with a decent FFI (must support loading an arbitrary shared library, marshalling/demarshalling data between languages, and invoking functions in the shared library).

This is possible in Python, Ruby, Java, Racket, Rust, Perl, Go, and plenty of other languages I'm forgetting or haven't used. Yet who would seriously argue that "Python is compatible with Perl" because you can embed libperl in a Python program?

You might as well argue that "Rakudo is compatible with libssl", for all the relationship Rakudo source code has with Perl source code.