Zac-HD / shed

`shed` canonicalises Python code. Shed your legacy, stop bikeshedding, and move on. Black++
https://pypi.org/project/shed/
GNU Affero General Public License v3.0
342 stars 23 forks source link

pyupgrade 2.32.0 removed _fix_py36_plus #33

Closed spl closed 2 years ago

spl commented 2 years ago

In https://github.com/asottile/pyupgrade/pull/627, _fix_py36_plus was removed from pyupgrade/_main.py, and pyupgrade was released as 2.32.0 (https://github.com/asottile/pyupgrade/compare/v2.31.1...v2.32.0). This causes shed to fail for us with module 'pyupgrade._main' has no attribute '_fix_py36_plus' (https://github.com/terminusdb/terminusdb-client-python/issues/298).

Cheukting commented 2 years ago

Hi @Zac-HD pyupgrade has removed _fix_py36_plus in version 2.32.0 as it removes support to Python 3.6 or below. This line https://github.com/Zac-HD/shed/blob/66f9e594327db4bcd1df4beb562b2349eefd2abc/src/shed/__init__.py#L167

will cause the error above. PR coming in soon.

Zac-HD commented 2 years ago

OK, the solution was to

  1. update pinned deps in e93b8d95b1767869c398d7c8fec423fcc4517349 so that CI would detect the problem,
  2. delete the call to _fix_py36_plus in bb1629376eb17310fae56f4b718fb5178edf674e because all that logic is now part of the _fix_plugins call above
  3. release shed 0.9.5 from dfe49f2f8f4583489d5b9490f16996817d35b460

Thanks very much for reporting this so promptly!