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

Test fail with python-3.10 #194

Closed
mikelolasagasti opened this issue Mar 11, 2021 · 3 comments
Closed

Test fail with python-3.10 #194

mikelolasagasti opened this issue Mar 11, 2021 · 3 comments
Assignees

Comments

@mikelolasagasti
Copy link
Contributor

I packaged pg_activity for Fedora and as future Fedora-35 will have python-3.10 some tests are being done already.

tests fail with python-3.10 as reported downstream and also with travis

@dlax dlax self-assigned this Mar 11, 2021
@tirkarthi
Copy link

It seems repr order of flags changed in python/cpython#24215 to follow definition order.

Python 3.8 : <Flag.APPNAME|DATABASE: 3>
Python 3.10 : <Flag.DATABASE|APPNAME: 3>

@dlax
Copy link
Member

dlax commented Mar 12, 2021

Failure of pgactivity/types.py::pgactivity.types.Deserializable appears to be due to a change in python-attrs about the type attribute of attr-classes' fields:

python3.10:

>>> @attr.s(auto_attribs=True)
... class X:
...   y: int
... 
>>> attr.fields(X)[0].type
'int'

python3.7:

>>> @attr.s(auto_attribs=True)
... class X:
...    y: int
...
>>> attr.fields(X)[0].type
<class 'int'>

EDIT: more details at python-attrs/attrs#716

>>> attr.resolve_types(X)
<class '__main__.X'>
>>> attr.fields(X)[0].type
<class 'int'>

In any case, test failures seems to be due to assumptions made in tests which are now invalid; so I suppose the program would still work as expected. I'll look into fixing tests, though.

Thanks for the report and for your packaging and QA effort!

@dlax
Copy link
Member

dlax commented Mar 12, 2021

All tests are fixed on Python 3.10 now, and a version 2.1.2 just got released.

@dlax dlax closed this as completed Mar 12, 2021
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

No branches or pull requests

3 participants