collective / Products.NoDuplicateLogin

0 stars 0 forks source link

Python 3 compatibility #6

Open tobiasherp opened 7 months ago

tobiasherp commented 7 months ago

We should have Python 3 compatible releases. Python 3 is supported as of Plone 5.2+ and required as of Plone 6+.

I suppose to have 2.7 / 3 compatiblity in releases 3.x, as both the long type and the ...L numeral syntax are unsupported in Python 3 (won't compile); in releases 4.x we could drop Python 2 compability altogether.

davisagli commented 7 months ago

I think you could go ahead and only support Python 3 in 3.x. If someone still needs Python 2, there are existing releases.

tobiasherp commented 7 months ago

Well, yes, but I'm not yet ready to switch; and I like to have a compatible version. All my other packages are using six, currently. An many (if not all) of the Plone core packages I use.

It should be pretty easy to turn a compatible version in <python-3-only code, right? E.g. by changing the from six.moves.* imports, and emoving the "early" from __future imports.