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

Remove syntax incompatible with python 2 #1374

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HoussemNasri
Copy link

@HoussemNasri HoussemNasri commented Apr 17, 2024

Closes #1373

Result of python -m compileall . ran with python 2.7.13 inside the atlassian directory

Listing . ...
Compiling .\__init__.py ...
Compiling .\bamboo.py ...
Listing .\bitbucket ...
Compiling .\bitbucket\__init__.py ...
Compiling .\bitbucket\base.py ...
Listing .\bitbucket\cloud ...
Compiling .\bitbucket\cloud\__init__.py ...
Compiling .\bitbucket\cloud\base.py ...
Listing .\bitbucket\cloud\common ...
Compiling .\bitbucket\cloud\common\__init__.py ...
Compiling .\bitbucket\cloud\common\builds.py ...
Compiling .\bitbucket\cloud\common\comments.py ...
Compiling .\bitbucket\cloud\common\users.py ...
Listing .\bitbucket\cloud\repositories ...
Compiling .\bitbucket\cloud\repositories\__init__.py ...
Compiling .\bitbucket\cloud\repositories\branchRestrictions.py ...
Compiling .\bitbucket\cloud\repositories\commits.py ...
Compiling .\bitbucket\cloud\repositories\defaultReviewers.py ...
Compiling .\bitbucket\cloud\repositories\deploymentEnvironments.py ...
Compiling .\bitbucket\cloud\repositories\diffstat.py ...
Compiling .\bitbucket\cloud\repositories\groupPermissions.py ...
Compiling .\bitbucket\cloud\repositories\hooks.py ...
Compiling .\bitbucket\cloud\repositories\issues.py ...
Compiling .\bitbucket\cloud\repositories\pipelines.py ...
Compiling .\bitbucket\cloud\repositories\pullRequests.py ...
Compiling .\bitbucket\cloud\repositories\refs.py ...
Compiling .\bitbucket\cloud\repositories\repositoryVariables.py ...
Listing .\bitbucket\cloud\workspaces ...
Compiling .\bitbucket\cloud\workspaces\__init__.py ...
Compiling .\bitbucket\cloud\workspaces\members.py ...
Compiling .\bitbucket\cloud\workspaces\permissions.py ...
Compiling .\bitbucket\cloud\workspaces\projects.py ...
Listing .\bitbucket\server ...
Compiling .\bitbucket\server\__init__.py ...
Compiling .\bitbucket\server\base.py ...
Listing .\bitbucket\server\common ...
Compiling .\bitbucket\server\common\__init__.py ...
Compiling .\bitbucket\server\common\permissions.py ...
Compiling .\bitbucket\server\globalPermissions.py ...
Listing .\bitbucket\server\projects ...
Compiling .\bitbucket\server\projects\__init__.py ...
Listing .\bitbucket\server\projects\repos ...
Compiling .\bitbucket\server\projects\repos\__init__.py ...
Compiling .\cloud_admin.py ...
Compiling .\confluence.py ...
Compiling .\crowd.py ...
Compiling .\errors.py ...
Compiling .\insight.py ...
Compiling .\jira.py ...
Compiling .\marketplace.py ...
Compiling .\portfolio.py ...
Compiling .\request_utils.py ...
Compiling .\rest_client.py ...
Compiling .\service_desk.py ...
Compiling .\statuspage.py ...
Compiling .\utils.py ...
Compiling .\xray.py ...

@gonchik
Copy link
Member

gonchik commented Apr 19, 2024

Hi!
@HoussemNasri thank you for your PR. could. you adjust a bit black linter please ?

@HoussemNasri
Copy link
Author

HoussemNasri commented Apr 22, 2024

It seems we are blocked by this psf/black#1356 where even adding py27 to the target version would result in the insertion of a trailing comma. The issue was reported a while ago, but the maintainers didn't provide a fix unfortunately, and closed it saying that Python <3.5 reached EOL and thus wouldn't be supported in the newer versions of black. I didn't find a workaround either.

@Spacetown
Copy link
Contributor

Instead of making it compatible 2.7 should be removed.

@HoussemNasri
Copy link
Author

Instead of making it compatible 2.7 should be removed.

That's fine with me. We've already migrated our Python code to version 3.7. If the PR requires too much effort or doesn't align with the project's goals, feel free to close it.

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.

Question: is python 2.7 still supported?
3 participants