Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't depend on flake8 at runtime #6830

Merged

Conversation

deivid-rodriguez
Copy link
Contributor

@deivid-rodriguez deivid-rodriguez commented Mar 14, 2023

It should avoid avoidable resolution issues when installing old Python's
dynamically.

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/remove-runtime-dep-on-flake8 branch from a90cfc2 to 07b1da9 Compare March 14, 2023 12:34
Copy link
Member

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't realized we were installing this in our prod requirements.

python/script/ci-test Show resolved Hide resolved
python/helpers/dev-requirements.txt Outdated Show resolved Hide resolved
python/script/ci-test Outdated Show resolved Hide resolved
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/remove-runtime-dep-on-flake8 branch 5 times, most recently from 099f91d to c2aa020 Compare March 14, 2023 17:19
@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review March 14, 2023 17:19
@deivid-rodriguez deivid-rodriguez requested a review from a team as a code owner March 14, 2023 17:19
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/remove-runtime-dep-on-flake8 branch from c2aa020 to 3534e76 Compare March 22, 2023 17:56
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/remove-runtime-dep-on-flake8 branch 2 times, most recently from f8dcdf4 to af7d9fa Compare March 24, 2023 20:00
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/remove-runtime-dep-on-flake8 branch 4 times, most recently from c848d30 to 0368125 Compare March 27, 2023 18:18
Instead move running flake8 to our lint job and keep that dependency on
a `requirements.txt` file in the repository root.
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/remove-runtime-dep-on-flake8 branch from 0368125 to f112417 Compare March 28, 2023 08:53
@deivid-rodriguez deivid-rodriguez merged commit f407685 into main Mar 28, 2023
@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/remove-runtime-dep-on-flake8 branch March 28, 2023 10:27
jeffwidman added a commit that referenced this pull request Aug 17, 2023
I realized I forgot to update the `.python-version` file to `3.8`, so
we're still installing an older `flake8` version. And it's also breaking
when :dependabot: runs on `dependabot-core` because it sees this `3.7`
and says "that's not a supported version!"

Furthermore, we haven't configured :dependabot: to watch the
`./requirements.txt` which is separate from `./python/helpers/requirements.txt`.

I started to update both of those but the complexity here didn't smell
right. This way of installing `flake8` is actually different than
linters for other native helpers, where we just include them in
`composer.json`, `package.json`, etc. So the intuitive thing is to
install `flake8` into `./python/helpers/requirements.txt`.

In fact we used to do this, but in
#6830 / f407685
we switched to this new method because `flake8` dropped `3.6` support
before we were ready to do that here in :dependabot:.

Given that in :dependabot: we're moving toward aligning our support
policies with upstream Python... ie, when they EOL a version, we will
also drop support for it, then the risk of having a `flake8` version
that's dropping support for a Python version that isn't yet EOL is quite
small.

Interestingly, `flake8` was very slow to drop `3.6`, but when they did,
the maintainer also dropped `3.7` to save himself time even though it
was a few months before it was EOL'd. So we could hit this scenario
again... but I think the odds of that are somewhat low given the amount
of blowback the maintainer got about dropping 3.7 before it was EOL'd.
And regardless the consequences are also low... we'd simply revert
that `flake8` version bump and temporarily hold it back for a few months
until the upstream python version was dropped.

Overall this feels like six one way, half a dozen the other as either
way we are protecting against something. But switching back to how we do
it for our other native helpers is both much simpler setup and also more
internally consistent.

So let's solve this by reverting back to the simpler way of installing
the linter alongside the helper.

As an aside, restoring this simplicity is yet another win from us
choosign to align with upstream Python's EOL policy.

This reverts commit f407685.
jeffwidman added a commit that referenced this pull request Aug 17, 2023
I realized I forgot to update the `.python-version` file to `3.8`, so
we're still installing an older `flake8` version. And it's also breaking
when :dependabot: runs on `dependabot-core` because it sees this `3.7`
and says "that's not a supported version!"

Furthermore, we haven't configured :dependabot: to watch the
`./requirements.txt` which is separate from `./python/helpers/requirements.txt`.

I started to update both of those but the complexity here didn't smell
right. This way of installing `flake8` is actually different than
linters for other native helpers, where we just include them in
`composer.json`, `package.json`, etc. So the intuitive thing is to
install `flake8` into `./python/helpers/requirements.txt`.

In fact we used to do this, but in
#6830 / f407685
we switched to this new method because `flake8` dropped `3.6` support
before we were ready to do that here in :dependabot:.

Given that in :dependabot: we're moving toward aligning our support
policies with upstream Python... ie, when they EOL a version, we will
also drop support for it, then the risk of having a `flake8` version
that's dropping support for a Python version that isn't yet EOL is quite
small.

Interestingly, `flake8` was very slow to drop `3.6`, but when they did,
the maintainer also dropped `3.7` to save himself time even though it
was a few months before it was EOL'd. So we could hit this scenario
again... but I think the odds of that are somewhat low given the amount
of blowback the maintainer got about dropping 3.7 before it was EOL'd.
And regardless the consequences are also low... we'd simply revert
that `flake8` version bump and temporarily hold it back for a few months
until the upstream python version was dropped.

Overall this feels like six one way, half a dozen the other as either
way we are protecting against something. But switching back to how we do
it for our other native helpers is both much simpler setup and also more
internally consistent.

So let's solve this by reverting back to the simpler way of installing
the linter alongside the helper.

As an aside, restoring this simplicity is yet another win from us
choosing to align with upstream Python's EOL policy.

This reverts commit f407685.
jeffwidman added a commit that referenced this pull request Aug 17, 2023
I realized I forgot to update the `.python-version` file to `3.8`, so
we're still installing an older `flake8` version. And it's also breaking
when :dependabot: runs on `dependabot-core` because it sees this `3.7`
and says "that's not a supported version!"

Furthermore, we haven't configured :dependabot: to watch the
`./requirements.txt` which is separate from `./python/helpers/requirements.txt`.

I started to update both of those but the complexity here didn't smell
right. This way of installing `flake8` is actually different than
linters for other native helpers, where we just include them in
`composer.json`, `package.json`, etc. So the intuitive thing is to
install `flake8` into `./python/helpers/requirements.txt`.

In fact we used to do this, but in
#6830 / f407685
we switched to this new method because `flake8` dropped `3.6` support
before we were ready to do that here in :dependabot:.

Given that in :dependabot: we're moving toward aligning our support
policies with upstream Python... ie, when they EOL a version, we will
also drop support for it, then the risk of having a `flake8` version
that's dropping support for a Python version that isn't yet EOL is quite
small.

Interestingly, `flake8` was very slow to drop `3.6`, but when they did,
the maintainer also dropped `3.7` to save himself time even though it
was a few months before it was EOL'd. So we could hit this scenario
again... but I think the odds of that are somewhat low given the amount
of blowback the maintainer got about dropping 3.7 before it was EOL'd.
And regardless the consequences are also low... we'd simply revert
that `flake8` version bump and temporarily hold it back for a few months
until the upstream python version was dropped.

Overall this feels like six one way, half a dozen the other as either
way we are protecting against something. But switching back to how we do
it for our other native helpers is both much simpler setup and also more
internally consistent.

So let's solve this by reverting back to the simpler way of installing
the linter alongside the helper.

As an aside, restoring this simplicity is yet another win from us
choosing to align with upstream Python's EOL policy.

This reverts commit f407685.
jeffwidman added a commit that referenced this pull request Aug 18, 2023
I realized I forgot to update the `.python-version` file to `3.8`, so
we're still installing an older `flake8` version. And it's also breaking
when :dependabot: runs on `dependabot-core` because it sees this `3.7`
and says "that's not a supported version!"

Furthermore, we haven't configured :dependabot: to watch the
`./requirements.txt` which is separate from `./python/helpers/requirements.txt`.

I started to update both of those but the complexity here didn't smell
right. This way of installing `flake8` is actually different than
linters for other native helpers, where we just include them in
`composer.json`, `package.json`, etc. So the intuitive thing is to
install `flake8` into `./python/helpers/requirements.txt`.

In fact we used to do this, but in
#6830 / f407685
we switched to this new method because `flake8` dropped `3.6` support
before we were ready to do that here in :dependabot:.

Given that in :dependabot: we're moving toward aligning our support
policies with upstream Python... ie, when they EOL a version, we will
also drop support for it, then the risk of having a `flake8` version
that's dropping support for a Python version that isn't yet EOL is quite
small.

Interestingly, `flake8` was very slow to drop `3.6`, but when they did,
the maintainer also dropped `3.7` to save himself time even though it
was a few months before it was EOL'd. So we could hit this scenario
again... but I think the odds of that are somewhat low given the amount
of blowback the maintainer got about dropping 3.7 before it was EOL'd.
And regardless the consequences are also low... we'd simply revert
that `flake8` version bump and temporarily hold it back for a few months
until the upstream python version was dropped.

Overall this feels like six one way, half a dozen the other as either
way we are protecting against something. But switching back to how we do
it for our other native helpers is both much simpler setup and also more
internally consistent.

So let's solve this by reverting back to the simpler way of installing
the linter alongside the helper.

As an aside, restoring this simplicity is yet another win from us
choosing to align with upstream Python's EOL policy.

This reverts commit f407685.
jeffwidman added a commit that referenced this pull request Aug 18, 2023
I realized I forgot to update the `.python-version` file to `3.8`, so
we're still installing an older `flake8` version. And it's also breaking
when :dependabot: runs on `dependabot-core` because it sees this `3.7`
and says "that's not a supported version!"

Furthermore, we haven't configured :dependabot: to watch the
`./requirements.txt` which is separate from `./python/helpers/requirements.txt`.

I started to update both of those but the complexity here didn't smell
right. This way of installing `flake8` is actually different than
linters for other native helpers, where we just include them in
`composer.json`, `package.json`, etc. So the intuitive thing is to
install `flake8` into `./python/helpers/requirements.txt`.

In fact we used to do this, but in
#6830 / f407685
we switched to this new method because `flake8` dropped `3.6` support
before we were ready to do that here in :dependabot:.

Given that in :dependabot: we're moving toward aligning our support
policies with upstream Python... ie, when they EOL a version, we will
also drop support for it, then the risk of having a `flake8` version
that's dropping support for a Python version that isn't yet EOL is quite
small.

Interestingly, `flake8` was very slow to drop `3.6`, but when they did,
the maintainer also dropped `3.7` to save himself time even though it
was a few months before it was EOL'd. So we could hit this scenario
again... but I think the odds of that are somewhat low given the amount
of blowback the maintainer got about dropping 3.7 before it was EOL'd.
And regardless the consequences are also low... we'd simply revert
that `flake8` version bump and temporarily hold it back for a few months
until the upstream python version was dropped.

Overall this feels like six one way, half a dozen the other as either
way we are protecting against something. But switching back to how we do
it for our other native helpers is both much simpler setup and also more
internally consistent.

So let's solve this by reverting back to the simpler way of installing
the linter alongside the helper.

As an aside, restoring this simplicity is yet another win from us
choosing to align with upstream Python's EOL policy.

This reverts commit f407685.
brettfo pushed a commit to brettfo/dependabot-core that referenced this pull request Oct 11, 2023
…bot#7836)

I realized I forgot to update the `.python-version` file to `3.8`, so
we're still installing an older `flake8` version. And it's also breaking
when :dependabot: runs on `dependabot-core` because it sees this `3.7`
and says "that's not a supported version!"

Furthermore, we haven't configured :dependabot: to watch the
`./requirements.txt` which is separate from `./python/helpers/requirements.txt`.

I started to update both of those but the complexity here didn't smell
right. This way of installing `flake8` is actually different than
linters for other native helpers, where we just include them in
`composer.json`, `package.json`, etc. So the intuitive thing is to
install `flake8` into `./python/helpers/requirements.txt`.

In fact we used to do this, but in
dependabot#6830 / f407685
we switched to this new method because `flake8` dropped `3.6` support
before we were ready to do that here in :dependabot:.

Given that in :dependabot: we're moving toward aligning our support
policies with upstream Python... ie, when they EOL a version, we will
also drop support for it, then the risk of having a `flake8` version
that's dropping support for a Python version that isn't yet EOL is quite
small.

Interestingly, `flake8` was very slow to drop `3.6`, but when they did,
the maintainer also dropped `3.7` to save himself time even though it
was a few months before it was EOL'd. So we could hit this scenario
again... but I think the odds of that are somewhat low given the amount
of blowback the maintainer got about dropping 3.7 before it was EOL'd.
And regardless the consequences are also low... we'd simply revert
that `flake8` version bump and temporarily hold it back for a few months
until the upstream python version was dropped.

Overall this feels like six one way, half a dozen the other as either
way we are protecting against something. But switching back to how we do
it for our other native helpers is both much simpler setup and also more
internally consistent.

So let's solve this by reverting back to the simpler way of installing
the linter alongside the helper.

As an aside, restoring this simplicity is yet another win from us
choosing to align with upstream Python's EOL policy.

This reverts commit f407685.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants