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

Remove requirement for status attr/name/label to be valid identifier #21

Open
samuelallan72 opened this issue Aug 15, 2022 · 0 comments

Comments

@samuelallan72
Copy link

samuelallan72 commented Aug 15, 2022

this:

        if not attribute.isidentifier():
            raise ValueError(
                f"cannot set {attribute!r}={status} on {self}: "
                f"attribute needs to be a valid Python identifier."
            )

There are many cases where a user won't care about using the pool.status_label ... syntax sugar, and instead only want to use pool.set_status(...), pool.get_status(...), etc. In these cases, the validation is confusing and unnecessary. It also becomes annoying and error prone to a user, since now they need to write some function to map names to valid names, and remember to use it everywhere they want to access the status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant