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

chore(deps): update dependency pydantic to v2 #176

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 30, 2023

Mend Renovate logo banner

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
pydantic (changelog) >=1,<2 -> >=2,<3 age adoption passing confidence

Release Notes

pydantic/pydantic (pydantic)

v2.5.2: 2023-11-22

Compare Source

v2.5.2 (2023-11-22)

GitHub release

What's Changed
Packaging
  • uprev pydantic-core to 2.14.5
New Features
Fixes

v2.5.1

Compare Source

GitHub release

What's Changed
Packaging
Fixes

v2.5.0

Compare Source

GitHub release

The code released in v2.5.0 is functionally identical to that of v2.5.0b1.

What's Changed
Packaging
  • Update pydantic-core from 2.10.1 to 2.14.1, significant changes from these updates are described below, full changelog here
  • Update to pyright==1.1.335 by @​Viicos in #​8075
New Features
Changes
  • Significant Change: replace ultra_strict with new smart union implementation, the way unions are validated has changed significantly to improve performance and correctness, we have worked hard to absolutely minimise the number of cases where behaviour has changed, see the PR for details - by @​davidhewitt in pydantic/pydantic-core#867
  • Add support for instance method reassignment when extra='allow' by @​sydney-runkle in #​7683
  • Support JSON schema generation for Enum types with no cases by @​sydney-runkle in #​7927
  • Warn if a class inherits from Generic before BaseModel by @​alexmojaki in #​7891
Performance
Fixes
New Contributors
pydantic
pydantic-core

v2.4.2

Compare Source

GitHub release

What's Changed
Fixes
New Contributors

v2.4.1

Compare Source

GitHub release

What's Changed
Packaging
Fixes

v2.4.0

Compare Source

GitHub release

What's Changed
Packaging
New Features
Changes
Performance
Fixes
New Contributors

v2.3.0

Compare Source

GitHub release

v2.2.1

Compare Source

GitHub release

v2.2.0

Compare Source

GitHub release

v2.1.1

Compare Source

GitHub release

v2.1.0

Compare Source

GitHub release

v2.0.3

Compare Source

GitHub release


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner November 30, 2023 10:23
Copy link
Contributor

Unit tests failed for 3f64273

```

============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-7.4.3, pluggy-1.3.0 -- /home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/bin/python
cachedir: .tox/unit/.pytest_cache
rootdir: /home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator
configfile: pyproject.toml
collecting ... collected 39 items

tests/unit/test_charm.py::test_generate_wp_secret_keys PASSED
tests/unit/test_charm.py::test_replica_consensus PASSED
tests/unit/test_charm.py::test_replica_consensus_stable_after_leader_reelection PASSED
tests/unit/test_charm.py::test_database_relation PASSED
tests/unit/test_charm.py::test_wp_config_before_consensus PASSED
tests/unit/test_charm.py::test_wp_config PASSED
tests/unit/test_charm.py::test_wp_install_cmd PASSED
tests/unit/test_charm.py::test_core_reconciliation_before_storage_ready PASSED
tests/unit/test_charm.py::test_core_reconciliation_before_peer_relation_ready PASSED
tests/unit/test_charm.py::test_core_reconciliation_before_database_ready PASSED
tests/unit/test_charm.py::test_addon_reconciliation_fail PASSED
tests/unit/test_charm.py::test_prom_exporter_pebble_ready PASSED
tests/unit/test_charm.py::test_core_reconciliation PASSED
tests/unit/test_charm.py::test_get_initial_password_action_before_replica_consensus PASSED
tests/unit/test_charm.py::test_get_initial_password_action PASSED
tests/unit/test_charm.py::test_rotate_wordpress_secrets_before_pebble_connect PASSED
tests/unit/test_charm.py::test_rotate_wordpress_secrets_before_replica_consensus PASSED
tests/unit/test_charm.py::test_rotate_wordpress_secrets_as_follower PASSED
tests/unit/test_charm.py::test_rotate_wordpress_secrets PASSED
tests/unit/test_charm.py::test_theme_reconciliation PASSED
tests/unit/test_charm.py::test_plugin_reconciliation PASSED
tests/unit/test_charm.py::test_team_map PASSED
tests/unit/test_charm.py::test_swift_config PASSED
tests/unit/test_charm.py::test_akismet_plugin PASSED
tests/unit/test_charm.py::test_openid_plugin PASSED
tests/unit/test_charm.py::test_swift_plugin PASSED
tests/unit/test_charm.py::test_ingress PASSED
tests/unit/test_charm.py::test_defensive_programing[_check_addon_type-test_args0] PASSED
tests/unit/test_charm.py::test_defensive_programing[_wp_addon_install-test_args1] PASSED
tests/unit/test_charm.py::test_defensive_programing[_wp_addon_list-test_args2] PASSED
tests/unit/test_charm.py::test_defensive_programing[_wp_addon_uninstall-test_args3] PASSED
tests/unit/test_charm.py::test_defensive_programing[_perform_plugin_activate_or_deactivate-test_args4] PASSED
tests/unit/test_charm.py::test_missing_peer_relation PASSED
tests/unit/test_charm.py::test_mysql_connection_error PASSED
tests/unit/test_charm.py::test_wordpress_version_set PASSED
tests/unit/test_charm.py::test_valid_proxy_config FAILED
tests/unit/test_charm.py::test_invalid_proxy_config PASSED
tests/unit/test_charm.py::test_only_valid_http_proxy_config FAILED
tests/unit/test_charm.py::test_only_valid_https_proxy_config FAILED

=================================== FAILURES ===================================
___________________________ test_valid_proxy_config ____________________________
Traceback (most recent call last):
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 341, in from_call
result: Optional[TResult] = func()
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 262, in
lambda: ihook(item=item, **kwds), when=when, reraise=reraise
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_hooks.py", line 493, in call
return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_manager.py", line 115, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_callers.py", line 152, in _multicall
return outcome.get_result()
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_result.py", line 114, in get_result
raise exc.with_traceback(exc.traceback)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_callers.py", line 77, in _multicall
res = hook_impl.function(*args)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 177, in pytest_runtest_call
raise e
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call
item.runtest()
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 1792, in runtest
self.ihook.pytest_pyfunc_call(pyfuncitem=self)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_hooks.py", line 493, in call
return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_manager.py", line 115, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_callers.py", line 113, in _multicall
raise exception.with_traceback(exception.traceback)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_callers.py", line 77, in _multicall
res = hook_impl.function(*args)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 194, in pytest_pyfunc_call
result = testfunction(**testargs)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/tests/unit/test_charm.py", line 904, in test_valid_proxy_config
assert charm.state.proxy_config.http_proxy == proxy_url
AssertionError: assert Url('http://proxy.internal:3128/') == 'http://proxy.internal:3128'

------------------------------ Captured log call -------------------------------
WARNING charms.prometheus_k8s.v0.prometheus_scrape:prometheus_scrape.py:1475 2 containers are present in metadata.yaml and refresh_event was not specified. Defaulting to update_status. Metrics IP may not be set in a timely fashion.
______________________ test_only_valid_http_proxy_config _______________________
Traceback (most recent call last):
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 341, in from_call
result: Optional[TResult] = func()
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 262, in
lambda: ihook(item=item, **kwds), when=when, reraise=reraise
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_hooks.py", line 493, in call
return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_manager.py", line 115, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_callers.py", line 152, in _multicall
return outcome.get_result()
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_result.py", line 114, in get_result
raise exc.with_traceback(exc.traceback)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_callers.py", line 77, in _multicall
res = hook_impl.function(*args)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 177, in pytest_runtest_call
raise e
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call
item.runtest()
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 1792, in runtest
self.ihook.pytest_pyfunc_call(pyfuncitem=self)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_hooks.py", line 493, in call
return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_manager.py", line 115, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_callers.py", line 113, in _multicall
raise exception.with_traceback(exception.traceback)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_callers.py", line 77, in _multicall
res = hook_impl.function(*args)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 194, in pytest_pyfunc_call
result = testfunction(**testargs)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/tests/unit/test_charm.py", line 939, in test_only_valid_http_proxy_config
assert charm.state.proxy_config.http_proxy == proxy_url
AssertionError: assert Url('http://proxy.internal:3128/') == 'http://proxy.internal:3128'

  • where Url('http://proxy.internal:3128/') = ProxyConfig(http_proxy=Url('http://proxy.internal:3128/'), https_proxy=None, no_proxy=None).http_proxy
  • where ProxyConfig(http_proxy=Url('http://proxy.internal:3128/'), https_proxy=None, no_proxy=None) = State(proxy_config=ProxyConfig(http_proxy=Url('http://proxy.internal:3128/'), https_proxy=None, no_proxy=None)).proxy_config
  •  where State(proxy_config=ProxyConfig(http_proxy=Url('http://proxy.internal:3128/'), https_proxy=None, no_proxy=None)) = <ops.testing.Harness.begin.<locals>.TestCharm object at 0x7f1db8cb1120>.state
    

------------------------------ Captured log call -------------------------------
WARNING charms.prometheus_k8s.v0.prometheus_scrape:prometheus_scrape.py:1475 2 containers are present in metadata.yaml and refresh_event was not specified. Defaulting to update_status. Metrics IP may not be set in a timely fashion.
______________________ test_only_valid_https_proxy_config ______________________
Traceback (most recent call last):
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 341, in from_call
result: Optional[TResult] = func()
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 262, in
lambda: ihook(item=item, **kwds), when=when, reraise=reraise
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_hooks.py", line 493, in call
return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_manager.py", line 115, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_callers.py", line 152, in _multicall
return outcome.get_result()
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_result.py", line 114, in get_result
raise exc.with_traceback(exc.traceback)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_callers.py", line 77, in _multicall
res = hook_impl.function(*args)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 177, in pytest_runtest_call
raise e
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call
item.runtest()
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 1792, in runtest
self.ihook.pytest_pyfunc_call(pyfuncitem=self)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_hooks.py", line 493, in call
return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_manager.py", line 115, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_callers.py", line 113, in _multicall
raise exception.with_traceback(exception.traceback)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/pluggy/_callers.py", line 77, in _multicall
res = hook_impl.function(*args)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/.tox/unit/lib/python3.10/site-packages/_pytest/python.py", line 194, in pytest_pyfunc_call
result = testfunction(**testargs)
File "/home/ubuntu/github-runner/_work/wordpress-k8s-operator/wordpress-k8s-operator/tests/unit/test_charm.py", line 960, in test_only_valid_https_proxy_config
assert charm.state.proxy_config.https_proxy == proxy_url
AssertionError: assert Url('http://proxy.internal:3128/') == 'http://proxy.internal:3128'

  • where Url('http://proxy.internal:3128/') = ProxyConfig(http_proxy=None, https_proxy=Url('http://proxy.internal:3128/'), no_proxy=None).https_proxy
  • where ProxyConfig(http_proxy=None, https_proxy=Url('http://proxy.internal:3128/'), no_proxy=None) = State(proxy_config=ProxyConfig(http_proxy=None, https_proxy=Url('http://proxy.internal:3128/'), no_proxy=None)).proxy_config
  •  where State(proxy_config=ProxyConfig(http_proxy=None, https_proxy=Url('http://proxy.internal:3128/'), no_proxy=None)) = <ops.testing.Harness.begin.<locals>.TestCharm object at 0x7f1db8cb3c70>.state
    

------------------------------ Captured log call -------------------------------
WARNING charms.prometheus_k8s.v0.prometheus_scrape:prometheus_scrape.py:1475 2 containers are present in metadata.yaml and refresh_event was not specified. Defaulting to update_status. Metrics IP may not be set in a timely fashion.
=========================== short test summary info ============================
FAILED tests/unit/test_charm.py::test_valid_proxy_config - AssertionError: assert Url('http://proxy.internal:3128/') == 'http://proxy....
FAILED tests/unit/test_charm.py::test_only_valid_http_proxy_config - AssertionError: assert Url('http://proxy.internal:3128/') == 'http://proxy....
FAILED tests/unit/test_charm.py::test_only_valid_https_proxy_config - AssertionError: assert Url('http://proxy.internal:3128/') == 'http://proxy....
========================= 3 failed, 36 passed in 2.72s =========================

Copy link
Contributor

Test coverage for 3f64273

Name                Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------------------
src/charm.py          546     51    180     32    87%   191-194, 358-359, 414-423, 571, 602, 608, 653, 688-689, 740-747, 752, 854->859, 858, 860, 865-866, 926, 944, 951, 1041, 1050, 1062, 1083, 1092, 1111, 1115, 1144, 1197, 1329, 1351, 1358->1360, 1403->exit, 1415, 1431, 1468, 1477-1478
src/cos.py             15      0      0      0   100%
src/exceptions.py      17      1      2      1    89%   41
src/state.py           34      0      4      0   100%
src/types_.py          16      0      0      0   100%
---------------------------------------------------------------
TOTAL                 628     52    186     33    88%
Coverage failure: total of 88 is less than fail-under=90

Static code analysis report

Run started:2023-11-30 10:25:51.414816

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 4428
  Total lines skipped (#nosec): 1
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

Copy link
Contributor Author

renovate bot commented Nov 30, 2023

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 2.x releases. But if you manually upgrade to 2.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/pydantic-2.x branch November 30, 2023 12:11
@yanksyoon
Copy link
Collaborator

@arturo-seijas May I know if there was a reason for closing this please? (Im asking so that I can close issue: #110)

@arturo-seijas
Copy link
Collaborator

@arturo-seijas May I know if there was a reason for closing this please? (Im asking so that I can close issue: #110)

TBH, I can't remember. Maybe it was accidental or maybe it was incompatible with ops at the time. I think we can reopen

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

Successfully merging this pull request may close these issues.

2 participants