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

[slots] it may be a bug in file constructor.py #232

Closed
Freakwill opened this issue Nov 17, 2018 · 1 comment
Closed

[slots] it may be a bug in file constructor.py #232

Freakwill opened this issue Nov 17, 2018 · 1 comment
Labels

Comments

@Freakwill
Copy link

If the following code is triggered, then you will be told that there is a TypeError: can't set attributes of built-in/extension type 'object'. I guess it should be setattr(instance, key, value).

    def set_python_instance_state(self, instance, state):
        ......
            for key, value in slotstate.items():
                setattr(object, key, value)
@perlpunk perlpunk changed the title it may be a bug in file constructor.py [slots] it may be a bug in file constructor.py Dec 6, 2019
@perlpunk
Copy link
Member

perlpunk commented Jan 6, 2020

Fixed in 5.3: https://pypi.org/project/PyYAML/5.3/

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

No branches or pull requests

2 participants