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

Not compatible with flake8-5.0.0 #30

Closed
sahilshah6196 opened this issue Aug 1, 2022 · 14 comments
Closed

Not compatible with flake8-5.0.0 #30

sahilshah6196 opened this issue Aug 1, 2022 · 14 comments

Comments

@sahilshah6196
Copy link

sahilshah6196 commented Aug 1, 2022

  • flake8-html version: 0.4.2
  • Python version: 3.10
  • Operating System:

Description

New version of flake8 was released (5.0.0): https://flake8.pycqa.org/en/latest/release-notes/5.0.0.html
flake8-html is not compatible with it and errors out with the following error:

Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/flake8/main/cli.py", line 22, in main
    app.run(argv)
  File "/usr/local/lib/python3.10/site-packages/flake8/main/application.py", line 336, in run
    self._run(argv)
  File "/usr/local/lib/python3.10/site-packages/flake8/main/application.py", line 326, in _run
    self.report()
  File "/usr/local/lib/python3.10/site-packages/flake8/main/application.py", line 321, in report
    self.formatter.stop()
  File "/usr/local/lib/python3.10/site-packages/flake8_html/plugin.py", line 245, in stop
    self.write_index()
  File "/usr/local/lib/python3.10/site-packages/flake8_html/plugin.py", line 281, in write_index
    versions=self.option_manager.generate_versions(),
AttributeError: 'OptionManager' object has no attribute 'generate_versions'

What I Did

Simply installed flake8 using a dockerfile with command:

RUN --mount=type=ssh pip install 'git+ssh://git@github.com/lordmauve/flake8-html.git' flake8 flake8-quotes flake8-unused-arguments
@izabela1337
Copy link

reproduced with python3.8, flake version 5.0.1 on ubuntu20

@iuiu34
Copy link

iuiu34 commented Aug 18, 2022

if the issue is not going to be solved soon, at least update the requirements in setup.py to

requirements = [
    'jinja2>=3.1.0',
    'pygments>=2.2.0',
    'flake8>=3.3.0,<5.0.0',
    'importlib-metadata;python_version<"3.8"',
]

jktjkt added a commit to Telecominfraproject/oopt-gnpy that referenced this issue Oct 20, 2022
Test runs (`linters-diff-ci`) end up with an error:

 Traceback (most recent call last):
   File "/home/zuul/src/gerrithub.io/Telecominfraproject/oopt-gnpy/.tox/linters-diff-ci/bin/flake8", line 8, in <module>
     sys.exit(main())
   File "/home/zuul/src/gerrithub.io/Telecominfraproject/oopt-gnpy/.tox/linters-diff-ci/lib/python3.10/site-packages/flake8/main/cli.py", line 22, in main
     app.run(argv)
   File "/home/zuul/src/gerrithub.io/Telecominfraproject/oopt-gnpy/.tox/linters-diff-ci/lib/python3.10/site-packages/flake8/main/application.py", line 336, in run
     self._run(argv)
   File "/home/zuul/src/gerrithub.io/Telecominfraproject/oopt-gnpy/.tox/linters-diff-ci/lib/python3.10/site-packages/flake8/main/application.py", line 326, in _run
     self.report()
   File "/home/zuul/src/gerrithub.io/Telecominfraproject/oopt-gnpy/.tox/linters-diff-ci/lib/python3.10/site-packages/flake8/main/application.py", line 321, in report
     self.formatter.stop()
   File "/home/zuul/src/gerrithub.io/Telecominfraproject/oopt-gnpy/.tox/linters-diff-ci/lib/python3.10/site-packages/flake8_html/plugin.py", line 245, in stop
     self.write_index()
   File "/home/zuul/src/gerrithub.io/Telecominfraproject/oopt-gnpy/.tox/linters-diff-ci/lib/python3.10/site-packages/flake8_html/plugin.py", line 281, in write_index
     versions=self.option_manager.generate_versions(),
 AttributeError: 'OptionManager' object has no attribute 'generate_versions'
 ERROR: InvocationError for command /home/zuul/src/gerrithub.io/Telecominfraproject/oopt-gnpy/.tox/linters-diff-ci/bin/flake8 --format html --htmldir linters --exit-zero (exited with code 1)

Bug: lordmauve/flake8-html#30
Change-Id: I755877341dec2d9cd9bdcdab098e2067f783cc27
@thbeu
Copy link

thbeu commented Nov 24, 2022

Still not compatible with flake8 v6.0.0.

@nkuttler
Copy link

Is there some actively maintained fork?

@thbeu
Copy link

thbeu commented Nov 30, 2022

You might try with v0.4.3.

@nkuttler
Copy link

Thanks a lot, works for me!

@iuiu34
Copy link

iuiu34 commented Nov 30, 2022

Can v0.4.3 be installed from pypi?

@nkuttler
Copy link

@iuiu34 worked for me

@iuiu34
Copy link

iuiu34 commented Nov 30, 2022

last version is v0.4.2, is it not?
https://pypi.org/project/flake8-html/

@nkuttler
Copy link

Oh, you're right, I downloaded and installed manually, sorry

@JCHacking
Copy link

When will it be possible to get version 0.4.3 from pypi?

@lordmauve
Copy link
Owner

Hi, sorry, I tagged 0.4.3 but release automation failed. If anyone can help with fixing that I can do a release. I can't fix it myself at the moment because I don't have access to my laptop.

@jktjkt
Copy link
Contributor

jktjkt commented Dec 3, 2022

Hi, sorry, I tagged 0.4.3 but release automation failed. If anyone can help with fixing that I can do a release. I can't fix it myself at the moment because I don't have access to my laptop.

That should be fixed via #38, see the CI run here.

@skinitimski
Copy link

skinitimski commented Jan 30, 2023

I pulled 0.4.3 today from pypi and it works great with flake8 6.x! 🥳

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

No branches or pull requests

9 participants