From 654e239b25e5ed49dd0340132a74e4617aa185c8 Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Thu, 15 Oct 2020 15:45:13 +0100 Subject: Add option to scripts-dev/lint.sh to only lint files changed since the last git commit (#8472) This PR makes several changes to the `./scripts-dev/lint.sh` script, which lints the codebase with a number of tools: * Adds usage information, with `-h` flag to show it. Otherwise it will show when providing an unknown flag. * Adds option `-d` which will check both staged and unstaged files that have changed since the last commit and add them to the list of files to lint. - Note that only files without an extension, or with a `.py` extension will be allowed. This prevents editing bash scripts causing the linters to break on non-python files. * Improves the print-out of which files/directories are being linted. --- setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 926b1bc86f..08843fe2a3 100755 --- a/setup.py +++ b/setup.py @@ -15,12 +15,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - import glob import os -from setuptools import setup, find_packages, Command -import sys +from setuptools import Command, find_packages, setup here = os.path.abspath(os.path.dirname(__file__)) -- cgit 1.5.1 From 84c0e46cced7b1fe0e3fd27eed5111884959cb36 Mon Sep 17 00:00:00 2001 From: Jonathan de Jong Date: Tue, 20 Oct 2020 13:55:21 +0200 Subject: Update mypy to 0.790, and move dependencies to extras (#8583) --- changelog.d/8583.misc | 1 + setup.py | 2 ++ tox.ini | 4 +--- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 changelog.d/8583.misc (limited to 'setup.py') diff --git a/changelog.d/8583.misc b/changelog.d/8583.misc new file mode 100644 index 0000000000..d24973f09a --- /dev/null +++ b/changelog.d/8583.misc @@ -0,0 +1 @@ +Update `mypy` static type checker to 0.790. \ No newline at end of file diff --git a/setup.py b/setup.py index 08843fe2a3..494f50239f 100755 --- a/setup.py +++ b/setup.py @@ -102,6 +102,8 @@ CONDITIONAL_REQUIREMENTS["lint"] = [ "flake8", ] +CONDITIONAL_REQUIREMENTS["mypy"] = ["mypy==0.790", "mypy-zope"] + # Dependencies which are exclusively required by unit test code. This is # NOT a list of all modules that are necessary to run the unit tests. # Tests assume that all optional dependencies are installed. diff --git a/tox.ini b/tox.ini index 6d08153782..6dcc439a40 100644 --- a/tox.ini +++ b/tox.ini @@ -160,9 +160,7 @@ commands= [testenv:mypy] deps = {[base]deps} - mypy==0.782 - mypy-zope -extras = all +extras = all,mypy commands = mypy # To find all folders that pass mypy you run: -- cgit 1.5.1 From 654cc9470eef8a6371f8ab6c8b4eae467068e329 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 21 Oct 2020 06:45:01 -0400 Subject: Pin mypy-zope for compatibility with mypy. (#8600) --- changelog.d/8600.misc | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/8600.misc (limited to 'setup.py') diff --git a/changelog.d/8600.misc b/changelog.d/8600.misc new file mode 100644 index 0000000000..a5a922e641 --- /dev/null +++ b/changelog.d/8600.misc @@ -0,0 +1 @@ +Update `mypy` static type checker to 0.790. diff --git a/setup.py b/setup.py index 494f50239f..2f4a3170d2 100755 --- a/setup.py +++ b/setup.py @@ -102,7 +102,7 @@ CONDITIONAL_REQUIREMENTS["lint"] = [ "flake8", ] -CONDITIONAL_REQUIREMENTS["mypy"] = ["mypy==0.790", "mypy-zope"] +CONDITIONAL_REQUIREMENTS["mypy"] = ["mypy==0.790", "mypy-zope==0.2.8"] # Dependencies which are exclusively required by unit test code. This is # NOT a list of all modules that are necessary to run the unit tests. -- cgit 1.5.1 From 88e1d0c52b6f59ee8eb13a8a0c6657eb54557fe6 Mon Sep 17 00:00:00 2001 From: Dan Callahan Date: Tue, 27 Oct 2020 23:24:33 +0000 Subject: Note support for Python 3.9 (#8665) As expected, all tests pass locally without modification. Signed-off-by: Dan Callahan --- INSTALL.md | 2 +- changelog.d/8665.doc | 1 + setup.py | 1 + tox.ini | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelog.d/8665.doc (limited to 'setup.py') diff --git a/INSTALL.md b/INSTALL.md index 22f7b7c029..c6fcb3bd7f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -57,7 +57,7 @@ light workloads. System requirements: - POSIX-compliant system (tested on Linux & OS X) -- Python 3.5.2 or later, up to Python 3.8. +- Python 3.5.2 or later, up to Python 3.9. - At least 1GB of free RAM if you want to join large public rooms like #matrix:matrix.org Synapse is written in Python but some of the libraries it uses are written in diff --git a/changelog.d/8665.doc b/changelog.d/8665.doc new file mode 100644 index 0000000000..3b75307dc5 --- /dev/null +++ b/changelog.d/8665.doc @@ -0,0 +1 @@ +Note support for Python 3.9. diff --git a/setup.py b/setup.py index 2f4a3170d2..9730afb41b 100755 --- a/setup.py +++ b/setup.py @@ -131,6 +131,7 @@ setup( "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", ], scripts=["synctl"] + glob.glob("scripts/*"), cmdclass={"test": TestCommand}, diff --git a/tox.ini b/tox.ini index 6dcc439a40..6a507d3012 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = packaging, py35, py36, py37, py38, check_codestyle, check_isort +envlist = packaging, py35, py36, py37, py38, py39, check_codestyle, check_isort [base] extras = test -- cgit 1.5.1