mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-03 05:04:33 +03:00
Bump minimum required Python version to 3.7
This commit is contained in:
parent
721c803af9
commit
7ea30961ae
2
.github/workflows/python.yml
vendored
2
.github/workflows/python.yml
vendored
|
@ -8,7 +8,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.5", "3.6", "3.7", "3.8"]
|
python-version: ["3.7", "3.8", "3.9", "3.10"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
|
|
@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
|
||||||
[tool.tox]
|
[tool.tox]
|
||||||
legacy_tox_ini = """
|
legacy_tox_ini = """
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py35,py36,py37,py38
|
envlist = py37,py38
|
||||||
|
|
||||||
# run with tox -e py
|
# run with tox -e py
|
||||||
[testenv]
|
[testenv]
|
||||||
|
|
|
@ -122,11 +122,9 @@ with `@BotFather <https://t.me/BotFather>`_.
|
||||||
Signing In behind a Proxy
|
Signing In behind a Proxy
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
If you need to use a proxy to access Telegram,
|
If you need to use a proxy to access Telegram, you will need to:
|
||||||
you will need to either:
|
|
||||||
|
|
||||||
* For Python >= 3.6 : `install python-socks[asyncio]`__
|
`install python-socks[asyncio]`__
|
||||||
* For Python <= 3.5 : `install PySocks`__
|
|
||||||
|
|
||||||
and then change
|
and then change
|
||||||
|
|
||||||
|
@ -147,13 +145,6 @@ consisting of parameters described `in PySocks usage`__.
|
||||||
|
|
||||||
The allowed values for the argument ``proxy_type`` are:
|
The allowed values for the argument ``proxy_type`` are:
|
||||||
|
|
||||||
* For Python <= 3.5:
|
|
||||||
* ``socks.SOCKS5`` or ``'socks5'``
|
|
||||||
* ``socks.SOCKS4`` or ``'socks4'``
|
|
||||||
* ``socks.HTTP`` or ``'http'``
|
|
||||||
|
|
||||||
* For Python >= 3.6:
|
|
||||||
* All of the above
|
|
||||||
* ``python_socks.ProxyType.SOCKS5``
|
* ``python_socks.ProxyType.SOCKS5``
|
||||||
* ``python_socks.ProxyType.SOCKS4``
|
* ``python_socks.ProxyType.SOCKS4``
|
||||||
* ``python_socks.ProxyType.HTTP``
|
* ``python_socks.ProxyType.HTTP``
|
||||||
|
|
|
@ -71,7 +71,7 @@ version incompatabilities.
|
||||||
|
|
||||||
Tox environments are declared in the ``tox.ini`` file. The default
|
Tox environments are declared in the ``tox.ini`` file. The default
|
||||||
environments, declared at the top, can be simply run with ``tox``. The option
|
environments, declared at the top, can be simply run with ``tox``. The option
|
||||||
``tox -e py36,flake`` can be used to request specific environments to be run.
|
``tox -e py37,flake`` can be used to request specific environments to be run.
|
||||||
|
|
||||||
Brief Introduction to Pytest-cov
|
Brief Introduction to Pytest-cov
|
||||||
================================
|
================================
|
||||||
|
|
|
@ -16,7 +16,9 @@ good chance you were not relying on this to begin with".
|
||||||
Python 3.5 is no longer supported
|
Python 3.5 is no longer supported
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
The library will no longer attempt to support Python 3.5. The minimum version is now Python 3.6.
|
The library will no longer attempt to support Python 3.5. The minimum version is now Python 3.7.
|
||||||
|
|
||||||
|
This also means workarounds for 3.6 and below have been dropped.
|
||||||
|
|
||||||
|
|
||||||
User, chat and channel identifiers are now 64-bit numbers
|
User, chat and channel identifiers are now 64-bit numbers
|
||||||
|
|
6
setup.py
6
setup.py
|
@ -208,7 +208,7 @@ def main(argv):
|
||||||
# See https://stackoverflow.com/a/40300957/4759433
|
# See https://stackoverflow.com/a/40300957/4759433
|
||||||
# -> https://www.python.org/dev/peps/pep-0345/#requires-python
|
# -> https://www.python.org/dev/peps/pep-0345/#requires-python
|
||||||
# -> http://setuptools.readthedocs.io/en/latest/setuptools.html
|
# -> http://setuptools.readthedocs.io/en/latest/setuptools.html
|
||||||
python_requires='>=3.5',
|
python_requires='>=3.7',
|
||||||
|
|
||||||
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
||||||
classifiers=[
|
classifiers=[
|
||||||
|
@ -223,10 +223,10 @@ def main(argv):
|
||||||
'License :: OSI Approved :: MIT License',
|
'License :: OSI Approved :: MIT License',
|
||||||
|
|
||||||
'Programming Language :: Python :: 3',
|
'Programming Language :: Python :: 3',
|
||||||
'Programming Language :: Python :: 3.5',
|
|
||||||
'Programming Language :: Python :: 3.6',
|
|
||||||
'Programming Language :: Python :: 3.7',
|
'Programming Language :: Python :: 3.7',
|
||||||
'Programming Language :: Python :: 3.8',
|
'Programming Language :: Python :: 3.8',
|
||||||
|
'Programming Language :: Python :: 3.9',
|
||||||
|
'Programming Language :: Python :: 3.10',
|
||||||
],
|
],
|
||||||
keywords='telegram api chat client library messaging mtproto',
|
keywords='telegram api chat client library messaging mtproto',
|
||||||
packages=find_packages(exclude=[
|
packages=find_packages(exclude=[
|
||||||
|
|
|
@ -48,19 +48,11 @@ FileLike = typing.Union[
|
||||||
_tl.TypeInputFileLocation
|
_tl.TypeInputFileLocation
|
||||||
]
|
]
|
||||||
|
|
||||||
# Can't use `typing.Type` in Python 3.5.2
|
|
||||||
# See https://github.com/python/typing/issues/266
|
|
||||||
try:
|
|
||||||
OutFileLike = typing.Union[
|
OutFileLike = typing.Union[
|
||||||
str,
|
str,
|
||||||
typing.Type[bytes],
|
typing.Type[bytes],
|
||||||
typing.BinaryIO
|
typing.BinaryIO
|
||||||
]
|
]
|
||||||
except TypeError:
|
|
||||||
OutFileLike = typing.Union[
|
|
||||||
str,
|
|
||||||
typing.BinaryIO
|
|
||||||
]
|
|
||||||
|
|
||||||
MessageLike = typing.Union[str, _tl.Message]
|
MessageLike = typing.Union[str, _tl.Message]
|
||||||
MessageIDLike = typing.Union[int, _tl.Message, _tl.TypeInputMessage]
|
MessageIDLike = typing.Union[int, _tl.Message, _tl.TypeInputMessage]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user