Closed sbesson closed 5 years ago
https://ci.openmicroscopy.org/job/SCC-merge/989/ is green with this included. Barring concerns, I would propose to include this as well as #235 in a patch release of scc
to fix compatibility with the latest PyGithub release.
Tested this in a few starfish contexts (with and without submodules). :+1:
PyGithub 1.43 introduces a breaking change in the RateLimit API modifying both the internal representation as well as the methods of the Rate objects - see https://github.com/PyGithub/PyGithub/commit/fd8a036 and https://github.com/PyGithub/PyGithub/pull/902. This causes scc to crash when the latest version of PyGithub (currently 1.43.1) is installed.
Rather than capping PyGithub or forcing an upgrade, this PR adds backwards-compatible support for the new rate limit API with the following changes:
To test this PR: 1- create a new virtualenv, install
requirements.txt
and check that e.g.scc rate
fails with a KeyError 2- with the same virtualenv, run/path/to/venv/python/scc/main.py rate
from this branch and check the command returns thecore
,search
andgraphql
rates 3- check the backwards compatibility by downgrading PyGithub (or creating a new virtualenv) and check that/path/to/venv/python/scc/main.py rate
returns thecore
rate onlyProposed tag: 0.10.1