Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow dataslots.dataclass with slots=False #51

Open
starhel opened this issue Mar 28, 2023 · 0 comments
Open

Allow dataslots.dataclass with slots=False #51

starhel opened this issue Mar 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@starhel
Copy link
Owner

starhel commented Mar 28, 2023

To simplify migration to py310 it's recommended to do:

if sys.version_info >= (3, 10):  # or (3, 11) if weakref_slot=True needed
    from dataclasses import dataclass
else:
    from dataslots import dataclass

Unfortunately, dataslots.dataclass does not support slots=False, so it's not possible to use this import in files, where both options are defined.

@starhel starhel added the enhancement New feature or request label Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant