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

warning deprecate Python 36 #16003

Merged
merged 6 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions conan/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,14 @@ def exception_exit_error(exception):
return ERROR_UNEXPECTED


def _warn_python_version():
version = sys.version_info
if version.minor == 6:
ConanOutput().warning("Python 3.6 is end-of-life since 2021. "
"Conan future versions will drop support for it, "
"please upgrade Python", warn_tag="deprecated")


def main(args):
""" main entry point of the conan application, using a Command to
parse parameters
Expand Down Expand Up @@ -281,6 +289,7 @@ def ctrl_break_handler(_, __):
error = SUCCESS
try:
cli.run(args)
_warn_python_version()
except BaseException as e:
error = cli.exception_exit_error(e)
sys.exit(error)
2 changes: 1 addition & 1 deletion conans/test/integration/command/remote_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def test_remote_disable(self):
for remote in data["remotes"]:
self.assertEqual(remote["disabled"], True)

data = json.loads(client.out)
data = json.loads(client.stdout)
for remote in data:
assert remote["enabled"] is False

Expand Down
2 changes: 1 addition & 1 deletion conans/test/integration/command/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_shorthand_syntax():
""")})

tc.run("profile show -pr:a=pre -pr:a=mid -pr:a=post -f=json")
out = json.loads(tc.out)
out = json.loads(tc.stdout)
assert out == {'build': {'build_env': '',
'conf': {},
'options': {},
Expand Down