> What makes you say that?
 To be clear, it works in both Python2 and Python3 as-is, and that exception I 
mentioned with a PR to fix it is an ImportError being generated in restapi.py - 
but even without that it works (I think) up to version 3.5.
What I mean by "primarily built for Python2" is that it doesn't implement 
features of Python3 that are backward-compatible for Python2, and that it 
avoids making changes that would break Python2 changes.

For an example of the first part of that, look no further than the __enter__ 
and __exit__ methods I added a week or two ago in tosession.py - Python2 
doesn't do anything special with these functions, but there's no restriction 
placed on those names either. In Python3 that will allow them to be used in a 
context-managed setting via the `with` statement.

For an example of the second part, I'd like to add type-hinting annotations to 
the functions and methods of the client, which would not only allow our 
documentation system to pick up the type signature of such things 
automatically, but also would make that information available to anyone running 
the code - whether or not they're using optimizations that strip out 
docstrings. However, this would break Python2, as it doesn't implement 
type-hinting at all.
________________________________________
From: Rawlin Peters <[email protected]>
Sent: Thursday, November 1, 2018 9:55 AM
To: [email protected]
Subject: [EXTERNAL] Re: Python2 EoL

On Tue, Oct 30, 2018 at 8:31 AM Fieck, Brennan
<[email protected]> wrote:
>
> Currently our Python client is primarily built for Python2 (though with a PR 
> I have pending to fix one little thing it works with up to v3.6)

What makes you say that? I thought it was built with Python2/Python3
compatibility in mind, and I see "Requires Python Version >= 2.7 or >=
3.6" in a few files in the python client.

> I propose pushing a release of the client to PyPi (the name 'trafficcontrol' 
> is free) so that it can be hosted in a Python2-compatible state while 
> continuing to develop only for Python3.

We can probably do without PyPi as the code will still be available in
github for people to package/install the 2.x client themselves if
truly necessary.

> I'd also like to know if there's any interest in dropping Python2 support for 
> the Traffic Control 4.0 release

+1

- Rawlin

Reply via email to