- [x] I have read and understood the [FAQ](https://gitea.ksol.io/karolyi/py3-validate-email/src/branch/master/FAQ.md)
**Describe the bug**
The latest version (1.0.7) can't be used on an environment with python < 3.8 due to an import error.
**To Reproduce**
1. Set-up an environment with python 3.7.
2. Run `python -m pip install py3-validate-email`
3. Create a python file with code
```
from validate_email import validate_email
is_valid = validate_email(
email_address='example@example.com',
check_format=True,
check_blacklist=True,
check_dns=True,
dns_timeout=10,
check_smtp=True,
smtp_timeout=10,
smtp_helo_host='my.host.name',
smtp_from_address='my@from.addr.ess',
smtp_skip_tls=False,
smtp_tls_context=None,
smtp_debug=False,
address_types=frozenset([IPv4Address, IPv6Address]))
```
4. Execute the script
**My debug output**
```
from typing import List, Literal, FrozenSet, Union, Type
ImportError: cannot import name 'Literal' from 'typing' (/usr/local/lib/python3.7/typing.py)
```
**Expected behavior**
The script runs on python 3.6 & python 3.7
**Please complete the following information:**
- OS: Linux
- Your exact `py3-validate-email` module version: 1.0.7
**Additional context**
- https://docs.python.org/3/library/typing.html#typing.Literal is only available in python 3.8
Is there a way for you to use a newer python version? I'd like to keep the Literal import and bump the minimum required version for python.
If not, I need to remove the import (or make it optional).
Damn, thanks for the report.
Is there a way for you to use a newer python version? I'd like to keep the `Literal` import and bump the minimum required version for python.
If not, I need to remove the import (or make it optional).
For now we are using version 1.0.5, which does not have this import yet, thus works, but we won't be able to upgrade then...
We will upgrade to python >= 3.8 eventually, but not posible short term.
For now we are using version 1.0.5, which does not have this import yet, thus works, but we won't be able to upgrade then...
We will upgrade to python >= 3.8 eventually, but not posible short term.
py3-validate-email 1.0.8 is now available at your convenience.
Please consider upgrading your python version ASAP, since I plan to deprecate older python versions over time, as I can't guarantee keeping them supported in the future.
py3-validate-email 1.0.8 is now available at your convenience.
Please consider upgrading your python version ASAP, since I plan to deprecate older python versions over time, as I can't guarantee keeping them supported in the future.
Describe the bug
The latest version (1.0.7) can't be used on an environment with python < 3.8 due to an import error.
To Reproduce
python -m pip install py3-validate-email
My debug output
Expected behavior
The script runs on python 3.6 & python 3.7
Please complete the following information:
py3-validate-email
module version: 1.0.7Additional context
Damn, thanks for the report.
Is there a way for you to use a newer python version? I'd like to keep the
Literal
import and bump the minimum required version for python.If not, I need to remove the import (or make it optional).
Another option would be to require typing_extensions for this project, which is kinda an overreach: https://pypi.org/project/typing-extensions/
For now we are using version 1.0.5, which does not have this import yet, thus works, but we won't be able to upgrade then...
We will upgrade to python >= 3.8 eventually, but not posible short term.
py3-validate-email 1.0.8 is now available at your convenience.
Please consider upgrading your python version ASAP, since I plan to deprecate older python versions over time, as I can't guarantee keeping them supported in the future.