-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 Python 2 support from CLI #5512
Conversation
Codecov Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, one small change. There is a unicode_literals
import to remove too. Do we need the ensure_unicode
calls, or can we replace by by a direct encode?
datadog_checks_dev/datadog_checks/dev/tooling/commands/create.py
Outdated
Show resolved
Hide resolved
datadog_checks_dev/datadog_checks/dev/tooling/commands/create.py
Outdated
Show resolved
Hide resolved
datadog_checks_dev/datadog_checks/dev/tooling/commands/agent/changelog.py
Show resolved
Hide resolved
repo = 'datadog-agent' if repo_choice == 'agent' else 'integrations-{}'.format(repo_choice) | ||
echo_warning('`{}` directory `{}` does not exist, defaulting to the current location.'.format(repo, root)) | ||
repo = 'datadog-agent' if repo_choice == 'agent' else f'integrations-{repo_choice}' | ||
echo_warning(f'`{repo}` directory `{root}` does not exist, defaulting to the current location.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: another way to show "this is the output of a string" than using backticks is the !r
specifier, e.g. f"some {string!r}"
is formatted as some 'string'
... We could consider migrating to that as a follow-up PR? 😄
* Remove Python 2 support from CLI * oops * Update tox.ini * test all * . * ok * address * nice
Hey, can be same issue in agent version 7.19? |
@fmpro12 Hello! Yes Agent 7.x is Python 3-only. You may use Agent 6 if you cannot immediately update custom checks to support Python 3. Was that your question? |
Okay, let me explain issue on high level. root@ip-172-31-42-147:~/dd# ddev config set repo extras How I can fix that? |
You'll need to use Python 3. |
And hot exactly to do that? I'm following this instruction - https://docs.datadoghq.com/integrations/ping/. See commands I'm running on my ubuntu 18.04: sudo apt update Then #ddev config set extras ./integrations-extras and i got: Traceback (most recent call last): Original exception was: Original exception was: |
It looks like you're using an outdated version of It may be worth pursuing this discussion in an issue too. Thanks! |
Thanks for your response, indeed updating of click fixed the issue. However now I stuck on: ddev -e release build ping I installed setuptools but still, get this error. |
Okay, I was able to fix that wasn't so simple, but the working procedure is below: apt update There is a mistake in your procedure:
|
* no more validation for py3 nor logos * update Click range #5512 (comment) * ensure non-ancient appdirs https://pypi.org/project/appdirs/#history
This should be fixed in 3.8.0 https://pypi.org/project/datadog-checks-dev/3.8.0/ |
Motivation
https://pythonclock.org