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 failures: TypeError: Expected int, got Flag #132

Closed
ncopa opened this issue Mar 21, 2024 · 2 comments
Closed

test failures: TypeError: Expected int, got Flag #132

ncopa opened this issue Mar 21, 2024 · 2 comments

Comments

@ncopa
Copy link

ncopa commented Mar 21, 2024

I bumped into this while upgrading python to 3.12 on Alpine Linux.

======================================= test session starts ========================================
platform linux -- Python 3.12.2, pytest-8.0.2, pluggy-1.4.0
rootdir: /home/ncopa/aports/community/py3-email-validator/src/python-email-validator-2.1.1
configfile: setup.cfg
testpaths: tests
collected 257 items / 2 errors                                                                     

============================================== ERRORS ==============================================
__________________________ ERROR collecting tests/test_deliverability.py ___________________________
tests/test_deliverability.py:6: in <module>
    from email_validator.deliverability import validate_email_deliverability
email_validator/deliverability.py:5: in <module>
    import dns.resolver
dns/resolver.py:30: in init dns.resolver
    ???
dns/_ddr.py:12: in init dns._ddr
    ???
dns/nameserver.py:5: in init dns.nameserver
    ???
dns/asyncquery.py:30: in init dns.asyncquery
    ???
dns/message.py:1679: in init dns.message
    ???
E   TypeError: Expected int, got Flag
_______________________________ ERROR collecting tests/test_main.py ________________________________
tests/test_main.py:5: in <module>
    from email_validator.__main__ import main as validator_command_line_tool
email_validator/__main__.py:22: in <module>
    from .deliverability import caching_resolver
email_validator/deliverability.py:5: in <module>
    import dns.resolver
dns/resolver.py:30: in init dns.resolver
    ???
dns/_ddr.py:12: in init dns._ddr
    ???
dns/nameserver.py:5: in init dns.nameserver
    ???
dns/asyncquery.py:30: in init dns.asyncquery
    ???
dns/message.py:1679: in init dns.message
    ???
E   TypeError: Expected int, got Flag
===================================== short test summary info ======================================
ERROR tests/test_deliverability.py - TypeError: Expected int, got Flag
ERROR tests/test_main.py - TypeError: Expected int, got Flag
!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================== 2 errors in 0.08s =========================================
@ncopa ncopa changed the title TypeErrors in tests test failures: TypeError: Expected int, got Flag Mar 21, 2024
@ncopa
Copy link
Author

ncopa commented Mar 21, 2024

This does not appear to happen with python 3.11

@JoshData
Copy link
Owner

The automated builds are passing on Python 3.12.0:

https://github.com/JoshData/python-email-validator/actions/runs/8058883604/job/22012375165

It could be that 3.12.2 broke something, or something else must be different about your environment.

The error is happening in the dnspython library. So it may be an issue for them, not for me. Either way, I would first check that you have the latest version of dnspython installed, or version 2.6.1 which is the version used in this project's automated builds.

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

2 participants