selenium
selenium copied to clipboard
Py3 upgrades
Description
- removed old-style class declaration
- replaced format and %-calls with f-strings
- updated super() calls
- replaced OSError aliases
- removed unnecessary future-imports
- removed redundant open modes
- replaced set-calls by set literals
- removed unicode literals
- replaced format and %-calls with f-strings
- replaced list with generator expressions (pep289)
- replaced tuple with generator expressions (pep289)
- removed unnecessary python2 imports
- simplified encode-calls
- replaced encode calls with byte literals
Motivation and Context
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [x] I have read the contributing document.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.
Hi @paulhfischer this is a great PR, would love to have selenium 4.3 erradicate all old py2.x syntax; could we rebase this one? I was going to look at using pyupgrade --py37-plus do you think there is any value in me doing that?
related to #10646, If we could rebase this it would be good to review; a lot has changed (e.g I think we have already removed explicit object subclassing (and some others). targeting 4.3
@paulhfischer apologies for the lack of feedback. Is this PR something you are still interested in? If so, I can help to review it. Also, is there a way to break it into smaller chunks?
This PR is mostly implemented in the current code base. Would you like to address other areas that need to be modernized?