explosion / catalogue

Super lightweight function registries for your library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1.0.1 appears to break py2.7 compatibility

abgoldberg opened this issue · comments

Is v1.x supposed to maintain python 2.7 compatibility? It looks like the recent commit from 10 days ago (ef4fd81) creates 1.0.1 but introduces changes that require python 3.

This was discovered when trying to install an older compatible spacy package, but pip grabbed 1.0.1 which ends up producing this error:

.../site-packages/catalogue/_importlib_metadata/__init__.py", line 170 def __len__(self) -> int: ^ SyntaxError: invalid syntax

It wasn't intentional, it was more that we don't have any practical way to test it anymore. I can fix the package setup to be officially python >= 3.6 so similar installs will continue using v1.0.0.

Sounds great. Thanks for the quick response!

This is slightly more annoying than I thought because the newest pip for python 2.7 apparently doesn't support yanked packages.

I just noticed that the 1.0.1 release vanished from PyPI. We upgraded our packages recently and happened to pin to just that exact version. Will it be back soon or gone forever? (in the latter case, we probably should just pin to the next version)

Sorry about that! There was no great solution here that fixed python 2.7 support, since yanking isn't supported. I was hoping that relatively few people would have pinned it in the brief period before it was yanked.

v1.0.1 is permanently deleted.

For python 3.6+ you can pin to catalogue==1.0.2. If you need python 2 and python 3 support, you'd need to pin a range instead e.g. as catalogue>=1.0.0,<1.1.0.

No worries, I was glad there already was a reported issue and it was easy to see what's going on. Will pin to 1.0.2 then 👍