Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@craig-sh
Copy link
Contributor

@craig-sh craig-sh commented Jul 10, 2018

Tested fix on python 2.7 and 3.6

@grisha
Copy link
Owner

grisha commented Jul 10, 2018

Could you, for posterity, explain what is happening here? (I wrote this so long ago I cannot remember how the metaclass stuff worked).

@craig-sh
Copy link
Contributor Author

I haven't completely wrapped my head around metaclasses but from what I understand the fix works because the return statement return type.__new__(...) in metaCookie's __new__(...) function returns an instance of metaCookie.
This is why the __init__ of metaCookie is called. Adding in the expires property at init stage instead doesn't cause any issues.

However, I'm not sure what changed in the newer versions of python that actually trigger ValueError: 'expires' in __slots__ conflicts with class variable...

@grisha grisha merged commit 902bb87 into grisha:master Jul 11, 2018
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 this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.