drop old python versions

This commit is contained in:
Casper da Costa-Luis 2023-08-09 18:37:21 +01:00
parent d69cc908d8
commit f12b8bc907
No known key found for this signature in database
GPG Key ID: F5126E5FBD2512AD
10 changed files with 13 additions and 30 deletions

View File

@ -69,16 +69,13 @@ jobs:
echo "$HOME/bin" >> $GITHUB_PATH echo "$HOME/bin" >> $GITHUB_PATH
- name: tox - name: tox
run: | run: |
TIMEOUT=10m if [[ "py${{ matrix.python }}-${{ matrix.os }}" = "py3.11-ubuntu" ]]; then
if [[ "${{ matrix.python }}" = "2.7" ]]; then export TOXENV="py311-tf,py311-tf-keras" # full
TIMEOUT=15m
elif [[ "py${{ matrix.python }}-${{ matrix.os }}" = "py3.8-ubuntu" ]]; then
export TOXENV="py38-tf,py38-tf-keras" # full
fi fi
if [[ "${{ matrix.os }}" != "ubuntu" ]]; then if [[ "${{ matrix.os }}" != "ubuntu" ]]; then
tox -e py${PYVER/./} # basic tox -e py${PYVER/./} # basic
else else
timeout $TIMEOUT tox || timeout $TIMEOUT tox || timeout $TIMEOUT tox timeout 5m tox || timeout 5m tox || timeout 5m tox
fi fi
env: env:
PYVER: ${{ matrix.python }} PYVER: ${{ matrix.python }}

View File

@ -327,9 +327,6 @@ of a neat one-line progress bar.
* The same applies to ``itertools``. * The same applies to ``itertools``.
* Some useful convenience functions can be found under ``tqdm.contrib``. * Some useful convenience functions can be found under ``tqdm.contrib``.
- `Hanging pipes in python2 <https://github.com/tqdm/tqdm/issues/359>`__:
when using ``tqdm`` on the CLI, you may need to use Python 3.5+ for correct
buffering.
- `No intermediate output in docker-compose <https://github.com/tqdm/tqdm/issues/771>`__: - `No intermediate output in docker-compose <https://github.com/tqdm/tqdm/issues/771>`__:
use ``docker-compose run`` instead of ``docker-compose up`` and ``tty: true``. use ``docker-compose run`` instead of ``docker-compose up`` and ``tty: true``.
- Overriding defaults via environment variables: - Overriding defaults via environment variables:

View File

@ -97,9 +97,9 @@ versions of Python.)
Note: to install all versions of the Python interpreter that are specified Note: to install all versions of the Python interpreter that are specified
in [tox.ini](https://github.com/tqdm/tqdm/blob/master/tox.ini), in [tox.ini](https://github.com/tqdm/tqdm/blob/master/tox.ini),
you can use `MiniConda` to install a minimal setup. You must also make sure you can use `MiniConda` to install a minimal setup. You must also ensure
that each distribution has an alias to call the Python interpreter: that each distribution has an alias to call the Python interpreter
`python27` for Python 2.7's interpreter, `python32` for Python 3.2's, etc. (e.g. `python311` for Python 3.11's interpreter).
### Alternative unit tests with pytest ### Alternative unit tests with pytest

View File

@ -327,9 +327,6 @@ of a neat one-line progress bar.
* The same applies to ``itertools``. * The same applies to ``itertools``.
* Some useful convenience functions can be found under ``tqdm.contrib``. * Some useful convenience functions can be found under ``tqdm.contrib``.
- `Hanging pipes in python2 <https://github.com/tqdm/tqdm/issues/359>`__:
when using ``tqdm`` on the CLI, you may need to use Python 3.5+ for correct
buffering.
- `No intermediate output in docker-compose <https://github.com/tqdm/tqdm/issues/771>`__: - `No intermediate output in docker-compose <https://github.com/tqdm/tqdm/issues/771>`__:
use ``docker-compose run`` instead of ``docker-compose up`` and ``tty: true``. use ``docker-compose run`` instead of ``docker-compose up`` and ``tty: true``.
- Overriding defaults via environment variables: - Overriding defaults via environment variables:

View File

@ -6,7 +6,7 @@
"environment_type": "virtualenv", "environment_type": "virtualenv",
"build_command": ["PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} ."], "build_command": ["PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} ."],
"show_commit_url": "https://github.com/tqdm/tqdm/commit/", "show_commit_url": "https://github.com/tqdm/tqdm/commit/",
// "pythons": ["2.7", "3.6"], // "pythons": ["3.7", "3.11"],
// "conda_channels": ["conda-forge", "defaults"], // "conda_channels": ["conda-forge", "defaults"],
"matrix": { "matrix": {
"alive-progress": [""], "alive-progress": [""],

View File

@ -1,6 +1,4 @@
""" """Asynchronous examples using `asyncio`, `async` and `await`."""
Asynchronous examples using `asyncio`, `async` and `await` on `python>=3.7`.
"""
import asyncio import asyncio
from tqdm.asyncio import tqdm, trange from tqdm.asyncio import tqdm, trange

View File

@ -21,8 +21,7 @@ def progresser(n, auto_position=True, write_safe=False, blocking=True, progress=
sleep(interval) sleep(interval)
# NB: may not clear instances with higher `position` upon completion # NB: may not clear instances with higher `position` upon completion
# since this worker may not know about other bars #796 # since this worker may not know about other bars #796
if write_safe: if write_safe: # we think we know about other bars
# we think we know about other bars (currently only py3 threading)
if n == 6: if n == 6:
tqdm.write("n == 6 completed") tqdm.write("n == 6 completed")
return n + 1 return n + 1

View File

@ -1,4 +1,4 @@
"""Tests `tqdm.asyncio` on `python>=3.7`.""" """Tests `tqdm.asyncio`."""
import asyncio import asyncio
from functools import partial from functools import partial
from sys import platform from sys import platform

View File

@ -45,7 +45,7 @@ deps=
numpy numpy
pandas pandas
rich rich
!py311-tf: tensorflow!=2.5.0 tf: tensorflow!=2.5.0
keras: keras keras: keras
commands= commands=
pytest --cov=tqdm --cov-report= -W=ignore tests_notebook.ipynb --nbval --current-env --sanitize-with=.meta/nbval.ini pytest --cov=tqdm --cov-report= -W=ignore tests_notebook.ipynb --nbval --current-env --sanitize-with=.meta/nbval.ini

View File

@ -10,6 +10,7 @@ Usage:
# import compatibility functions and utilities # import compatibility functions and utilities
import re import re
import sys import sys
from html import escape
from weakref import proxy from weakref import proxy
# to inherit from the tqdm class # to inherit from the tqdm class
@ -58,12 +59,6 @@ if True: # pragma: no cover
except ImportError: except ImportError:
pass pass
# HTML encoding
try: # Py3
from html import escape
except ImportError: # Py2
from cgi import escape
__author__ = {"github.com/": ["lrq3000", "casperdcl", "alexanderkuk"]} __author__ = {"github.com/": ["lrq3000", "casperdcl", "alexanderkuk"]}
__all__ = ['tqdm_notebook', 'tnrange', 'tqdm', 'trange'] __all__ = ['tqdm_notebook', 'tnrange', 'tqdm', 'trange']
WARN_NOIPYW = ("IProgress not found. Please update jupyter and ipywidgets." WARN_NOIPYW = ("IProgress not found. Please update jupyter and ipywidgets."