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

Upgrade out of date Black to a version supporting Python 3.9 to avoid it erroring out #681

Closed
CAM-Gerlach opened this issue Aug 23, 2021 · 7 comments · Fixed by #682
Closed
Labels

Comments

@CAM-Gerlach
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Currently, our code supports Python 3.7-3.9, the last of which has been out for almost a year now. Accordingly, I specify target versions from 3.7 through 3.9 in my Black config, i.e. target-version = ["py37", "py38", "py39"]. However, given the Black release, 20.8, is over a year old and is the last to not support Python 3.9 released a couple months later, Black errors out on every file due to not recognizing the target-version key, and thus rendering it unusable for me through Mega-Linter.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Upgrade Black to a version >=21.4 that supports Python 3.9; preferably the latest version that fixes issues with the soon to be default experimental-string-processing that many projects are using in production now, as well as other issues.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Don't upgrade Black; which will block support for language versions newer than Python 3.8, as well as not take advantage of the latest features and bug fixes.

Additional context
Add any other context or screenshots about the feature request here.

Thanks!

@CAM-Gerlach CAM-Gerlach added the enhancement New feature or request label Aug 23, 2021
nvuillam added a commit that referenced this issue Aug 23, 2021
* Fix python bandit config file use

* Add regex to count python bandit errors

Fixes #680

* Add --upgrade to pip install command to get latest versions of packages

Fixes #681
@nvuillam
Copy link
Member

Released in latest/insiders, please can you confirm that it's ok now ?

Note: this CI job must be completed before testing is available with latest/insiders tag

@CAM-Gerlach
Copy link
Author

Hey @nvuillam , thanks for your quick work on this! Unfortunately it doesn't seem to have worked, though its quite possible I did something wrong. I set the action to uses: nvuillam/mega-linter@insiders as the Readme instructs, and I could see in the build output that the latest builds were getting pulled and I verified #680 is now fixed. However, the version of Black is still shown as - Using [black v20.8] https://black.readthedocs.io/en/stable/ and I consequently get the same error on every file.

You can check out what I have so far on r-spacex/submanager#11 ... Let me know if there's something else I should try. Thanks!

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@github-actions github-actions bot added the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Sep 28, 2021
@CAM-Gerlach
Copy link
Author

Hey @nvuillam thanks for working on this. Any updates, or anything else you need from me? Thanks!

@github-actions github-actions bot removed the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Sep 28, 2021
@nvuillam
Copy link
Member

nvuillam commented Oct 3, 2021

@CAM-Gerlach now black version is 21.9 in Mega-Linter, is it ok ?

@CAM-Gerlach
Copy link
Author

Sorry for the delay; put this in my to-do list and it dropped off the radar somehow. Per testing in r-spacex/submanager#11 , this does upgrade black and fix the issue, thanks. Seems like #679 is still pending, at least in the released build I tested. Thanks @nvuillam !

@CAM-Gerlach
Copy link
Author

Of course, now Python 3.10 was just released, we'll have to do this again soon, heh.

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

Successfully merging a pull request may close this issue.

2 participants