supabase / postgrest-py

PostgREST client for Python. This library provides an ORM interface to PostgREST
https://postgrest-py.readthedocs.io
MIT License
236 stars 52 forks source link

Install strenum package only with Python 3.10 and older #518

Closed danfimov closed 1 month ago

danfimov commented 1 month ago

Chore

Describe the chore

There is no need to install the strenum package if the user of the library uses Python 3.11 or later. Therefore, I would like to add an additional restriction on this dependency and not install it on fresh versions of Python.

Additional context

The only place where strenum package is used is here

import sys

if sys.version_info >= (3, 11):
    from enum import StrEnum
else:
    from strenum import StrEnum

StrEnum added in standard enum library since Python 3.11.

silentworks commented 1 month ago

Thanks for the PR. This was merged in and will be available in the next release.