selenium icon indicating copy to clipboard operation
selenium copied to clipboard

Py3 upgrades

Open paulhfischer opened this issue 3 years ago • 3 comments

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.

paulhfischer avatar Mar 19 '22 06:03 paulhfischer

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 19 '22 06:03 CLAassistant

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?

symonk avatar May 11 '22 18:05 symonk

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

symonk avatar May 14 '22 10:05 symonk

@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?

diemol avatar Jun 05 '23 11:06 diemol

This PR is mostly implemented in the current code base. Would you like to address other areas that need to be modernized?

isaulv avatar Aug 15 '23 05:08 isaulv