Fetch code from files before changing the file path #246
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
Currently we trim the project root from file names before fetching the code for the file. This breaks if the file we want is in the project root, but not in the PWD (see #245)
To fix this, we will now fetch the code using the absolute path of the file
Changeset
.github/workflows/python-package.yml
disable fail-fast as it can hide failures (e.g. if Python 3.5 fails, 3.6 will be cancelled and so you can't tell if it passes)
bugsnag/event.py
Fetch the code before (potentially) removing the project root from the file path
tox.ini
Install compatible version of
pytest-django
on Django < 2.2 (see v4.0.0 changelog). I'm not sure why this now requiressix
to be installed explicitly when it didn't before though :/Testing
One of the existing tests actually covered this case, it just didn't assert on the code
I also manually tested this before & after with the repro case in #245: