mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-02 20:54:43 +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
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.5", "3.6", "3.7", "3.8"]
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10"]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
|
|
|
@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
|
|||
[tool.tox]
|
||||
legacy_tox_ini = """
|
||||
[tox]
|
||||
envlist = py35,py36,py37,py38
|
||||
envlist = py37,py38
|
||||
|
||||
# run with tox -e py
|
||||
[testenv]
|
||||
|
|
|
@ -122,11 +122,9 @@ with `@BotFather <https://t.me/BotFather>`_.
|
|||
Signing In behind a Proxy
|
||||
=========================
|
||||
|
||||
If you need to use a proxy to access Telegram,
|
||||
you will need to either:
|
||||
If you need to use a proxy to access Telegram, you will need to:
|
||||
|
||||
* For Python >= 3.6 : `install python-socks[asyncio]`__
|
||||
* For Python <= 3.5 : `install PySocks`__
|
||||
`install python-socks[asyncio]`__
|
||||
|
||||
and then change
|
||||
|
||||
|
@ -147,16 +145,9 @@ consisting of parameters described `in PySocks usage`__.
|
|||
|
||||
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.SOCKS4``
|
||||
* ``python_socks.ProxyType.HTTP``
|
||||
* ``python_socks.ProxyType.SOCKS5``
|
||||
* ``python_socks.ProxyType.SOCKS4``
|
||||
* ``python_socks.ProxyType.HTTP``
|
||||
|
||||
|
||||
Example:
|
||||
|
|
|
@ -71,7 +71,7 @@ version incompatabilities.
|
|||
|
||||
Tox environments are declared in the ``tox.ini`` file. The default
|
||||
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
|
||||
================================
|
||||
|
|
|
@ -16,7 +16,9 @@ good chance you were not relying on this to begin with".
|
|||
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
|
||||
|
|
6
setup.py
6
setup.py
|
@ -208,7 +208,7 @@ def main(argv):
|
|||
# See https://stackoverflow.com/a/40300957/4759433
|
||||
# -> https://www.python.org/dev/peps/pep-0345/#requires-python
|
||||
# -> 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
|
||||
classifiers=[
|
||||
|
@ -223,10 +223,10 @@ def main(argv):
|
|||
'License :: OSI Approved :: MIT License',
|
||||
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
],
|
||||
keywords='telegram api chat client library messaging mtproto',
|
||||
packages=find_packages(exclude=[
|
||||
|
|
|
@ -48,19 +48,11 @@ FileLike = typing.Union[
|
|||
_tl.TypeInputFileLocation
|
||||
]
|
||||
|
||||
# Can't use `typing.Type` in Python 3.5.2
|
||||
# See https://github.com/python/typing/issues/266
|
||||
try:
|
||||
OutFileLike = typing.Union[
|
||||
str,
|
||||
typing.Type[bytes],
|
||||
typing.BinaryIO
|
||||
]
|
||||
except TypeError:
|
||||
OutFileLike = typing.Union[
|
||||
str,
|
||||
typing.BinaryIO
|
||||
]
|
||||
OutFileLike = typing.Union[
|
||||
str,
|
||||
typing.Type[bytes],
|
||||
typing.BinaryIO
|
||||
]
|
||||
|
||||
MessageLike = typing.Union[str, _tl.Message]
|
||||
MessageIDLike = typing.Union[int, _tl.Message, _tl.TypeInputMessage]
|
||||
|
|
Loading…
Reference in New Issue
Block a user