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

migrate away from deprecation warnings #5856

Merged
merged 7 commits into from
Nov 13, 2024

Conversation

aciba90
Copy link
Contributor

@aciba90 aciba90 commented Nov 7, 2024

Rebase & merge

See individual commits

Fixes GH-5175

Additional Context

#5855 was discovered while working on this issue. I decided to split it as a separate work item, because it requires a broader discussion.

Test Steps

make deb

export CLOUD_INIT_KEEP_INSTANCE=true
export CLOUD_INIT_CLOUD_INIT_SOURCE=./cloud-init_all.deb

export CLOUD_INIT_PLATFORM=lxd_vm
export CLOUD_INIT_OS_IMAGE=oracular
tox -v -e integration-tests-jenkins -- -vvv --pdb tests/integration_tests/test_paths.py

export CLOUD_INIT_PLATFORM=lxd_vm
export CLOUD_INIT_OS_IMAGE=focal
tox -v -e integration-tests-jenkins -- -vvv --pdb tests/integration_tests/test_paths.py

export CLOUD_INIT_PLATFORM=gce
export CLOUD_INIT_OS_IMAGE=focal
tox -v -e integration-tests-jenkins -- -vvv --pdb tests/integration_tests/modules/test_combined.py

export CLOUD_INIT_PLATFORM=gce
export CLOUD_INIT_OS_IMAGE=oracular
tox -v -e integration-tests-jenkins -- -vvv --pdb tests/integration_tests/modules/test_combined.py

export CLOUD_INIT_PLATFORM=azure
export CLOUD_INIT_OS_IMAGE=focal
tox -v -e integration-tests-jenkins -- -vvv --pdb tests/integration_tests/modules/test_combined.py

export CLOUD_INIT_PLATFORM=azure
export CLOUD_INIT_OS_IMAGE=oracular
tox -v -e integration-tests-jenkins -- -vvv --pdb tests/integration_tests/modules/test_combined.py

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

DeprecationWarning: Testing an element's truth value will
always return True in future versions

canonicalGH-5175
Warning:
PytestCollectionWarning: cannot collect test class
'TestUpdatePackageSources' because it has a __init__ constructor

canonicalGH-5175
Deprecation warning:
DeprecationWarning: Python 3.14 will, by default, filter extracted tar
archives and reject files or modify their metadata. Use the filter
argument to control this behavior.

Refs:

https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter
https://peps.python.org/pep-0706/

canonicalGH-5175
…ical#5856)

DeprecationWarning: Accessing jsonschema.__version__ is deprecated and will
be removed in a future release. Use importlib.metadata directly to query
for jsonschema's version.

canonicalGH-5174
…onical#5856)

Deprecated message:
DeprecationWarning: Passing a schema to Validator.iter_errors is deprecated
and will be removed in a future release.
Call validator.evolve(schema=new_schema).iter_errors(...) instead.

Refs:
https://github.com/python-jsonschema/jsonschema/releases/tag/v4.0.0

canonicalGH-5175
@aciba90 aciba90 force-pushed the 5175-deprecation-warnings branch from eac1437 to 9bdbca9 Compare November 7, 2024 13:00
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, LGTM!

@TheRealFalcon TheRealFalcon self-assigned this Nov 8, 2024
@TheRealFalcon
Copy link
Member

@aciba90 , anything else needed here?

@aciba90
Copy link
Contributor Author

aciba90 commented Nov 13, 2024

Nope, let me merge.

@aciba90 aciba90 merged commit 3682325 into canonical:main Nov 13, 2024
22 checks passed
aciba90 added a commit that referenced this pull request Nov 13, 2024
DeprecationWarning: Testing an element's truth value will
always return True in future versions

GH-5175
aciba90 added a commit that referenced this pull request Nov 13, 2024
Warning:
PytestCollectionWarning: cannot collect test class
'TestUpdatePackageSources' because it has a __init__ constructor

GH-5175
aciba90 added a commit that referenced this pull request Nov 13, 2024
Deprecation warning:
DeprecationWarning: Python 3.14 will, by default, filter extracted tar
archives and reject files or modify their metadata. Use the filter
argument to control this behavior.

Refs:

https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter
https://peps.python.org/pep-0706/

GH-5175
aciba90 added a commit that referenced this pull request Nov 13, 2024
DeprecationWarning: Accessing jsonschema.__version__ is deprecated and will
be removed in a future release. Use importlib.metadata directly to query
for jsonschema's version.

GH-5174
@aciba90 aciba90 deleted the 5175-deprecation-warnings branch November 13, 2024 15:37
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
DeprecationWarning: Testing an element's truth value will
always return True in future versions

canonicalGH-5175
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
Warning:
PytestCollectionWarning: cannot collect test class
'TestUpdatePackageSources' because it has a __init__ constructor

canonicalGH-5175
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
Deprecation warning:
DeprecationWarning: Python 3.14 will, by default, filter extracted tar
archives and reject files or modify their metadata. Use the filter
argument to control this behavior.

Refs:

https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter
https://peps.python.org/pep-0706/

canonicalGH-5175
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
…ical#5856)

DeprecationWarning: Accessing jsonschema.__version__ is deprecated and will
be removed in a future release. Use importlib.metadata directly to query
for jsonschema's version.

canonicalGH-5174
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
…onical#5856)

Deprecated message:
DeprecationWarning: Passing a schema to Validator.iter_errors is deprecated
and will be removed in a future release.
Call validator.evolve(schema=new_schema).iter_errors(...) instead.

Refs:
https://github.com/python-jsonschema/jsonschema/releases/tag/v4.0.0

canonicalGH-5175
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
…5856)

canonicalGH-5175

Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
DeprecationWarning: Testing an element's truth value will
always return True in future versions

canonicalGH-5175

Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
Warning:
PytestCollectionWarning: cannot collect test class
'TestUpdatePackageSources' because it has a __init__ constructor

canonicalGH-5175

Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
Deprecation warning:
DeprecationWarning: Python 3.14 will, by default, filter extracted tar
archives and reject files or modify their metadata. Use the filter
argument to control this behavior.

Refs:

https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter
https://peps.python.org/pep-0706/

canonicalGH-5175

Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
…ical#5856)

DeprecationWarning: Accessing jsonschema.__version__ is deprecated and will
be removed in a future release. Use importlib.metadata directly to query
for jsonschema's version.

canonicalGH-5174

Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 21, 2024
…onical#5856)

Deprecated message:
DeprecationWarning: Passing a schema to Validator.iter_errors is deprecated
and will be removed in a future release.
Call validator.evolve(schema=new_schema).iter_errors(...) instead.

Refs:
https://github.com/python-jsonschema/jsonschema/releases/tag/v4.0.0

canonicalGH-5175

Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
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.

New DeprecationWarnings and PytestMockWarnings whilst building with Python 3.12
2 participants