diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f71b698f1..a3ab120c82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,11 +9,11 @@ jobs: name: test (Python ${{ matrix.python-version }}) strategy: matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: "${{ matrix.python-version }}" - name: Install tox diff --git a/github/Branch.py b/github/Branch.py index aa94460386..f97ce1ea1f 100644 --- a/github/Branch.py +++ b/github/Branch.py @@ -473,6 +473,8 @@ def replace_team_push_restrictions(self, *teams): """ :calls: `PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams `_ :teams: list of strings (team slugs) + + we want this version """ assert all(isinstance(element, str) for element in teams), teams @@ -484,6 +486,7 @@ def remove_team_push_restrictions(self, *teams): """ :calls: `DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams `_ :teams: list of strings (team slugs) + we want this one :lolsob: """ assert all(isinstance(element, str) for element in teams), teams @@ -491,32 +494,6 @@ def remove_team_push_restrictions(self, *teams): "DELETE", f"{self.protection_url}/restrictions/teams", input=teams ) - def replace_team_push_restrictions(self, *teams): - """ - :calls: `PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/teams `_ - :teams: list of strings (team slugs) - """ - assert all(isinstance(element, (str, unicode)) or isinstance(element, (str, unicode)) for element in teams), teams - - headers, data = self._requester.requestJsonAndCheck( - "PUT", - self.protection_url + "/restrictions/teams", - input=teams - ) - - def remove_team_push_restrictions(self, *teams): - """ - :calls: `DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/teams `_ - :teams: list of strings (team slugs) - """ - assert all(isinstance(element, (str, unicode)) or isinstance(element, (str, unicode)) for element in teams), teams - - headers, data = self._requester.requestJsonAndCheck( - "DELETE", - self.protection_url + "/restrictions/teams", - input=teams - ) - def remove_push_restrictions(self): """ :calls: `DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions `_ diff --git a/tox.ini b/tox.ini index ab2c294832..b661d28e04 100644 --- a/tox.ini +++ b/tox.ini @@ -1,15 +1,13 @@ [tox] envlist = lint, - py{36,37,38,39,310}, + py{38,39,310}, docs [gh-actions] python = - 3.6: py36 - 3.7: py37 - 3.8: py38, docs, lint - 3.9: py39 + 3.8: py38 + 3.9: py39, docs, lint 3.10: py310 [testenv] @@ -17,7 +15,7 @@ deps = -rtest-requirements.txt commands = pytest --cov=github --cov-report=xml {posargs} [testenv:lint] -basepython = python3.8 +basepython = python3.9 skip_install = true deps = types-jwt @@ -31,7 +29,7 @@ commands = mypy github tests [testenv:docs] -basepython = python3.8 +basepython = python3.9 skip_install = true deps = -rrequirements.txt commands = sphinx-build doc build @@ -42,6 +40,6 @@ select = C,E,F,W ignore = E266, E501, W503 [mypy] -python_version = 3.8 +python_version = 3.9 ignore_missing_imports = True namespace_packages = True