python-driver icon indicating copy to clipboard operation
python-driver copied to clipboard

Remove some remnants of Python2

Open Lorak-mmk opened this issue 2 years ago • 7 comments
trafficstars

We recently dropped support for Python < 3.6, but there were still a lot of places in the codebase with workarounds required for those versions - most notably usage of six package. This PR removes all usages of six, removes six from dependencies, removes all workarounds for older versions that I found and fixes comments / docs references. There are 2 commits. First one drops six - it is pretty big, but the changes are mostly very simple and mechanical. Second one removes other mentions / workaround, unrelated to six.

Lorak-mmk avatar Jul 19 '23 16:07 Lorak-mmk

The only concern I see here, is that the next pull from upstream is gonna be painful...

Beside that if all tests pass

Also why do this cleanup now ? and not wait for upstream to do it ?

fruch avatar Jul 19 '23 20:07 fruch

The only concern I see here, is that the next pull from upstream is gonna be painful...

Beside that if all tests pass

Also why do this cleanup now ? and not wait for upstream to do it ?

I did open this PR in upstream too: https://github.com/datastax/python-driver/pull/1172 If they accept it, then all is well. If they don't - yes, next pull may be more difficult, but I wouldn't worry about that too much: there isn't that much activity in the upstream, and the resulting conflicts should be easy to resolve.

There isn't any burning reason to do the cleanup now - it just irks me to see all this unnecessary baggage so I want to get rid of it.

Lorak-mmk avatar Jul 19 '23 20:07 Lorak-mmk

looks like upstream are gonna take it slowly...

maybe we should just merge it, if we confident enough with the changes, maybe it move upstream a bit faster knowing most of it was tested and released by us, merging from upstream next time would be painful

fruch avatar Sep 05 '23 17:09 fruch

Actually I started to split upstream PR into multiple simple commits, so it's easier to review - maybe that'll speed things up?

Lorak-mmk avatar Sep 06 '23 14:09 Lorak-mmk

Actually I started to split upstream PR into multiple simple commits, so it's easier to review - maybe that'll speed things up?

I'm o.k. with both options.

fruch avatar Sep 06 '23 15:09 fruch

just a remark, once six is dropped in the driver, we don't need to have it in https://github.com/scylladb/scylla-cqlsh/blob/3332078f4a66ded92dd7144940aef93ca6edbb7a/bin/cqlsh.py#L119

tchaikov avatar Sep 14 '23 03:09 tchaikov

@Lorak-mmk

upstream merged: https://github.com/datastax/python-driver/pull/1172

so we should be start a sync with upstream, and close this one

fruch avatar May 30 '24 05:05 fruch