Skip to content

Commit

Permalink
Merge pull request #1243 from locustio/Drop-support-for-pre-3.6-pytho…
Browse files Browse the repository at this point in the history
…n-versions-(give-users-an-error-message-during-installation)

Drop support for pre 3.6 Python versions (give error during installation)
  • Loading branch information
cyberw authored Jan 28, 2020
2 parents 13bf7ef + 873523a commit 798156e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 16 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ matrix:
env: TOXENV=py37
- python: 3.6
env: TOXENV=py36
- python: 3.5
env: TOXENV=py35
- python: 2.7
env: TOXENV=py27
- stage: Verify Docker image builds
script: docker build -t locustio/locust .
addons:
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ For full details of the Locust changelog, please see https://github.com/locustio
In development (master)
=======================

* Drop Python 2 and Python 3.5 support!
* Continuously measure CPU usage and emit a warning if we get a five second average above 90%
* Show CPU usage of slave nodes in the Web UI
* Fixed issue when running Locust distributed and new slave nodes connected during the hatching/ramp-up
Expand Down
11 changes: 2 additions & 9 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@ Installation

Locust is available on `PyPI <https://pypi.org/project/locustio/>`_ and can be installed with `pip <https://pip.pypa.io/>`_.

for Python 2.7:

.. code-block:: console
$ pip install locustio
for Python 3:

.. code-block:: console
$ pip3 install locustio
$ pip3 install locust
If you want the bleeding edge version, you can use pip to install directly from our Git repository. For example, to install the master branch using Python 3:

Expand All @@ -34,7 +27,7 @@ To see available options, run:
Supported Python Versions
-------------------------

Locust is supported on Python 2.7, 3.5, 3.6, 3.7 and 3.8.
Locust is supported on Python 3.6, 3.7 and 3.8.


Installing Locust on Windows
Expand Down
2 changes: 1 addition & 1 deletion locust/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from .exception import InterruptTaskSet, ResponseError, RescheduleTaskImmediately
from .wait_time import between, constant, constant_pacing

__version__ = "0.13.5"
__version__ = "0.14.0"
20 changes: 19 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
import ast
import os
import re
import sys

from setuptools import find_packages, setup

from setuptools.command.develop import develop
from setuptools.command.install import install

# parse version from locust/__init__.py
_version_re = re.compile(r'__version__\s+=\s+(.*)')
Expand All @@ -13,6 +15,18 @@
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))

class PostDevelopCommand(develop):
def run(self):
if sys.version_info[0] < 3 or sys.version_info[1] < 6:
sys.exit("Your Python version is no longer supported by Locust. Please upgrade Python to at least 3.6, or use a pinned old locust version (pip/pip3 install locustio==0.13.5)")
develop.run(self)

class PostInstallCommand(install):
def run(self):
if sys.version_info[0] < 3 or sys.version_info[1] < 6:
sys.exit("Your Python version is no longer supported by Locust. Please upgrade Python to at least 3.6, or use a pinned old locust version (pip/pip3 install locustio==0.13.5)")
install.run(self)

setup(
name='locustio',
version=version,
Expand Down Expand Up @@ -59,5 +73,9 @@
'console_scripts': [
'locust = locust.main:main',
]
},
cmdclass={
'develop': PostDevelopCommand,
'install': PostInstallCommand,
},
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{27,35,36,37,38}
envlist = py{36,37,38}

[testenv]
deps =
Expand Down

0 comments on commit 798156e

Please sign in to comment.