Drop Python 2 remaining logic
I think this is self-contained already.
I'm happy to continue the work to add type hints here, in case this is reviewed/accepted.
Recommend running pyupgrade --py38-plus to remove other python2-isms from the code
see https://github.com/asottile/pyupgrade
Thanks, this is looking great. Only saw the one minor thing above where may be better to just always include the mro hook code rather than have that strange minor version check without a check for Python 3 specifically as well.
Also appreciate that except for trailing white space no reformatting was done to satisfy any standards as that makes it hard to review then. Once we have cleaned up stuff and merged we can look at running all the code through black formatter to standardize format. Same with running that pyupgrade thing, run it as part of separate PR after so is easier to review separately what it does.
Now prior to merging this, presuming is done, since I can’t make code changes myself right now since traveling, can someone make a separate PR which updates the wrapt version to 2.0.0.dev1 (can’t remember what latest convention is for version strings for dev, so check first) and add a 2.0.0 section in changes file with comment about removal of old code which supported 2.7 and Python < 3.8. Just because dropping so much code, adding type hints, and potentially another change I have in mind which may cause subtle difference, would prefer to increase major version so people are more careful in upgrading. I’ll merge the version upgrade before this, but now remembered I might have had some other unreleased changes in develop which maybe I should have released first as a minor update. From memory the change was only to add macOS Intel wheels which got lost from the last release, so only change is in GitHub actions. Either way I can’t do that release while traveling, so will be a delay either way.
No hurry here. I'll create the PR tomorrow (CET).
Enjoy the trip. 🙏
I'm not if it makes sense to add this before the 1.7.1 is released, but... https://github.com/GrahamDumpleton/wrapt/pull/280/
I believe everything covered by this has been integrated now. I did it manually but cross referenced everything here to make sure got everything. Sorry for the delay, life has been interesting since last year. 😅