Skip to content

Commit

Permalink
drop old python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Aug 9, 2023
1 parent d69cc90 commit f12b8bc
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 30 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,13 @@ jobs:
echo "$HOME/bin" >> $GITHUB_PATH
- name: tox
run: |
TIMEOUT=10m
if [[ "${{ matrix.python }}" = "2.7" ]]; then
TIMEOUT=15m
elif [[ "py${{ matrix.python }}-${{ matrix.os }}" = "py3.8-ubuntu" ]]; then
export TOXENV="py38-tf,py38-tf-keras" # full
if [[ "py${{ matrix.python }}-${{ matrix.os }}" = "py3.11-ubuntu" ]]; then
export TOXENV="py311-tf,py311-tf-keras" # full
fi
if [[ "${{ matrix.os }}" != "ubuntu" ]]; then
tox -e py${PYVER/./} # basic
tox -e py${PYVER/./} # basic
else
timeout $TIMEOUT tox || timeout $TIMEOUT tox || timeout $TIMEOUT tox
timeout 5m tox || timeout 5m tox || timeout 5m tox
fi
env:
PYVER: ${{ matrix.python }}
Expand Down
3 changes: 0 additions & 3 deletions .meta/.readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,6 @@ of a neat one-line progress bar.
* The same applies to ``itertools``.
* 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>`__:
use ``docker-compose run`` instead of ``docker-compose up`` and ``tty: true``.
- Overriding defaults via environment variables:
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ versions of Python.)

Note: to install all versions of the Python interpreter that are specified
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
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.
you can use `MiniConda` to install a minimal setup. You must also ensure
that each distribution has an alias to call the Python interpreter
(e.g. `python311` for Python 3.11's interpreter).

### Alternative unit tests with pytest

Expand Down
3 changes: 0 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,6 @@ of a neat one-line progress bar.
* The same applies to ``itertools``.
* 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>`__:
use ``docker-compose run`` instead of ``docker-compose up`` and ``tty: true``.
- Overriding defaults via environment variables:
Expand Down
2 changes: 1 addition & 1 deletion asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"environment_type": "virtualenv",
"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/",
// "pythons": ["2.7", "3.6"],
// "pythons": ["3.7", "3.11"],
// "conda_channels": ["conda-forge", "defaults"],
"matrix": {
"alive-progress": [""],
Expand Down
4 changes: 1 addition & 3 deletions examples/async_coroutines.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
Asynchronous examples using `asyncio`, `async` and `await` on `python>=3.7`.
"""
"""Asynchronous examples using `asyncio`, `async` and `await`."""
import asyncio

from tqdm.asyncio import tqdm, trange
Expand Down
3 changes: 1 addition & 2 deletions examples/parallel_bars.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def progresser(n, auto_position=True, write_safe=False, blocking=True, progress=
sleep(interval)
# NB: may not clear instances with higher `position` upon completion
# since this worker may not know about other bars #796
if write_safe:
# we think we know about other bars (currently only py3 threading)
if write_safe: # we think we know about other bars
if n == 6:
tqdm.write("n == 6 completed")
return n + 1
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_asyncio.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Tests `tqdm.asyncio` on `python>=3.7`."""
"""Tests `tqdm.asyncio`."""
import asyncio
from functools import partial
from sys import platform
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ deps=
numpy
pandas
rich
!py311-tf: tensorflow!=2.5.0
tf: tensorflow!=2.5.0
keras: keras
commands=
pytest --cov=tqdm --cov-report= -W=ignore tests_notebook.ipynb --nbval --current-env --sanitize-with=.meta/nbval.ini
Expand Down
7 changes: 1 addition & 6 deletions tqdm/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# import compatibility functions and utilities
import re
import sys
from html import escape
from weakref import proxy

# to inherit from the tqdm class
Expand Down Expand Up @@ -58,12 +59,6 @@
except ImportError:
pass

# HTML encoding
try: # Py3
from html import escape
except ImportError: # Py2
from cgi import escape

__author__ = {"github.com/": ["lrq3000", "casperdcl", "alexanderkuk"]}
__all__ = ['tqdm_notebook', 'tnrange', 'tqdm', 'trange']
WARN_NOIPYW = ("IProgress not found. Please update jupyter and ipywidgets."
Expand Down

0 comments on commit f12b8bc

Please sign in to comment.