You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the discussion, I should have mentioned the motivation for adding asterisk was because it didn't work without the asterisk. This is the real issue.
With Python3.12 when I tried to supress DeprecationWarning, I first used correct syntax:
[pytest]
minversion = 8.0
asyncio_mode = auto
asyncio_default_fixture_loop_scope = function
filterwarnings = ignore::DeprecationWarning
Which still shows deprecation warnings with Python3.13 too:
pytest tests/test_config_flow.py -k test_options_flow_works
/home/homeassistant/sonnenbackup/.venv/lib/python3.13/site-packages/josepy/util.py:26: DeprecationWarning: CSR support in pyOpenSSL is deprecated. You should use the APIs in cryptography.
def __init__(self, wrapped: Union[crypto.X509, crypto.X509Req]) -> None:
/home/homeassistant/sonnenbackup/.venv/lib/python3.13/site-packages/acme/crypto_util.py:280: DeprecationWarning: CSR support in pyOpenSSL is deprecated. You should use the APIs in cryptography.
def _pyopenssl_cert_or_req_all_names(loaded_cert_or_req: Union[crypto.X509, crypto.X509Req]
/home/homeassistant/sonnenbackup/.venv/lib/python3.13/site-packages/acme/crypto_util.py:291: DeprecationWarning: CSR support in pyOpenSSL is deprecated. You should use the APIs in cryptography.
def _pyopenssl_cert_or_req_san(cert_or_req: Union[crypto.X509, crypto.X509Req]) -> List[str]:
/home/homeassistant/sonnenbackup/.venv/lib/python3.13/site-packages/acme/crypto_util.py:318: DeprecationWarning: CSR support in pyOpenSSL is deprecated. You should use the APIs in cryptography.
def _pyopenssl_cert_or_req_san_ip(cert_or_req: Union[crypto.X509, crypto.X509Req]) -> List[str]:
/home/homeassistant/sonnenbackup/.venv/lib/python3.13/site-packages/acme/crypto_util.py:338: DeprecationWarning: CSR support in pyOpenSSL is deprecated. You should use the APIs in cryptography.
def _pyopenssl_extract_san_list_raw(cert_or_req: Union[crypto.X509, crypto.X509Req]) -> List[str]:
/home/homeassistant/sonnenbackup/.venv/lib/python3.13/site-packages/acme/crypto_util.py:372: DeprecationWarning: X509Extension support in pyOpenSSL is deprecated. You should use the APIs in cryptography.
extensions: Optional[List[crypto.X509Extension]] = None,
/home/homeassistant/sonnenbackup/.venv/lib/python3.13/site-packages/homeassistant/components/http/__init__.py:310: DeprecationWarning: Inheritance class HomeAssistantApplication from web.Application is discouraged
class HomeAssistantApplication(web.Application):
Test session starts (platform: linux, Python 3.13.0, pytest 8.3.4, pytest-sugar 1.0.0)
rootdir: /home/homeassistant/sonnenbackup
configfile: pytest.ini
plugins: unordered-0.6.1, aiohttp-1.0.5, syrupy-4.8.0, xdist-3.6.1, asyncio-0.25.2, socket-0.7.0, mock-3.14.0, picked-0.5.0, cov-6.0.0, pytest_freezer-0.4.8, anyio-4.8.0, homeassistant-custom-component-0.13.201, timeout-2.3.1, respx-0.21.1, requests-mock-1.12.1, sugar-1.0.0, github-actions-annotate-failures-0.2.0
asyncio: mode=Mode.AUTO, asyncio_default_fixture_loop_scope=function
collected 9 items / 8 deselected / 1 selected
I'd forgotten about it until Python3.13 crashed pytest.
Thanks for the advice, but I'm bit too novice to follow it.
Found this in help:
python3 -W action:message:category:module:lineno
Tried this command which has not suppressed messages. Really not sure I got the command right.
python3 -W ignore:"CSR support in pyOpenSSL is deprecated. You should use the APIs in cryptography.":DeprecationWarning:"josepy/util":26
Python 3.13.0 (main, Jan 8 2025, 09:05:47) [GCC 13.3.0] on linux
pytest tests/test_config_flow.py -k test_options_flow_works
/home/homeassistant/sonnenbackup/.venv/lib/python3.13/site-packages/josepy/util.py:26: DeprecationWarning: CSR support in pyOpenSSL is deprecated. You should use the APIs in cryptography.
def __init__(self, wrapped: Union[crypto.X509, crypto.X509Req]) -> None:
Tried a few variations on the module name with varying 'invalid module name' errors.
Seems to be quite different command format to the Stack Overflow articles I found on supressing warnings.
Any idea what it expects as the 'module' parameter?
Follow on from issue: config option filterwarnings ignore::DeprecationWarning:* crashes
Given the discussion, I should have mentioned the motivation for adding asterisk was because it didn't work without the asterisk. This is the real issue.
With Python3.12 when I tried to supress DeprecationWarning, I first used correct syntax:
Which still shows deprecation warnings with Python3.13 too:
I'd forgotten about it until Python3.13 crashed pytest.
pip list
O/S: Ubuntu 24.04.1 LTS (GNU/Linux 5.15.167.4-microsoft-standard-WSL2 x86_64)
pytest: Platform: linux, Python 3.13.0, pytest 8.3.4, pytest-sugar 1.0.0
The text was updated successfully, but these errors were encountered: