Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ function pytestCheckPhase() {

# Compose arguments
args=" -m pytest"
if [ -n "$dontIgnoreWarnings-}" ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This reads as "if not empty don't ignore warnings", which is a lot of negatives. Would if [ -z "$showWarnings-}" ] (which can be read as "if empty show warnings") be possible instead?

args+=" -W ignore::DeprecationWarning -W ignore::FutureWarning -W ignore::UserWarning"
fi

if [ -n "$disabledTests" ]; then
disabledTestsString=$(_pytestComputeDisabledTestsString "${disabledTests[@]}")
args+=" -k \""$disabledTestsString"\""
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/acoustics/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ buildPythonPackage rec {
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
'';

pytestFlagsArray = [
"-Wignore::DeprecationWarning"
];

pythonImportsCheck = [ "acoustics" ];

meta = with lib; {
Expand Down
5 changes: 0 additions & 5 deletions pkgs/development/python-modules/aiohttp-jinja2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ buildPythonPackage rec {
--replace " --cov=aiohttp_jinja2 --cov-report xml --cov-report html --cov-report term" ""
'';

pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];

pythonImportsCheck = [
"aiohttp_jinja2"
];
Expand Down
2 changes: 0 additions & 2 deletions pkgs/development/python-modules/aiohttp-remotes/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ buildPythonPackage rec {
];

pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
"--asyncio-mode=auto"
];

Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/aspectlib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ buildPythonPackage rec {
tornado
];

pytestFlagsArray = [
"-W ignore::DeprecationWarning"
];

__darwinAllowLocalNetworking = true;

meta = {
Expand Down
5 changes: 0 additions & 5 deletions pkgs/development/python-modules/astroquery/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ buildPythonPackage rec {
pytestCheckHook
];

pytestFlagsArray = [
# DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
"-W" "ignore::DeprecationWarning"
];

# Tests must be run in the build directory. The tests create files
# in $HOME/.astropy so we need to set HOME to $TMPDIR.
preCheck = ''
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/black/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ buildPythonPackage rec {
parameterized
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);

pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];

preCheck = ''
export PATH="$PATH:$out/bin"

Expand Down
5 changes: 0 additions & 5 deletions pkgs/development/python-modules/build/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ buildPythonPackage rec {
wheel
];

pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];

__darwinAllowLocalNetworking = true;

disabledTests = [
Expand Down
5 changes: 0 additions & 5 deletions pkgs/development/python-modules/cherrypy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ buildPythonPackage rec {
export CI=true
'';

pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];

disabledTests = [
# Keyboard interrupt ends test suite run
"KeyboardInterrupt"
Expand Down
5 changes: 0 additions & 5 deletions pkgs/development/python-modules/cypherpunkpay/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ buildPythonPackage rec {
webtest
];

pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];

disabledTestPaths = [
# performance test
"tests/unit/tools/pbkdf2_test.py"
Expand Down
1 change: 0 additions & 1 deletion pkgs/development/python-modules/django-hijack/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ buildPythonPackage rec {

pytestFlagsArray = [
"--pyargs" "hijack"
"-W" "ignore::DeprecationWarning"
];

# needed for npmDeps update
Expand Down
5 changes: 0 additions & 5 deletions pkgs/development/python-modules/django-redis/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ buildPythonPackage rec {
pytestCheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);

pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];

disabledTests = [
# ModuleNotFoundError: No module named 'test_cache_options'
"test_custom_key_function"
Expand Down
6 changes: 0 additions & 6 deletions pkgs/development/python-modules/fastapi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ buildPythonPackage rec {
] ++ passthru.optional-dependencies.all
++ python-jose.optional-dependencies.cryptography;

pytestFlagsArray = [
# ignoring deprecation warnings to avoid test failure from
# tests/test_tutorial/test_testing/test_tutorial001.py
"-W ignore::DeprecationWarning"
];

disabledTestPaths = [
# Don't test docs and examples
"docs_src"
Expand Down
5 changes: 0 additions & 5 deletions pkgs/development/python-modules/flask-sqlalchemy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ buildPythonPackage rec {
"test_persist_selectable"
];

pytestFlagsArray = lib.optionals (pythonAtLeast "3.12") [
# datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version.
"-W" "ignore::DeprecationWarning"
];

pythonImportsCheck = [
"flask_sqlalchemy"
];
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/flask-wtf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ buildPythonPackage rec {
pytestCheckHook
];

pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];

meta = with lib; {
description = "Simple integration of Flask and WTForms.";
license = licenses.bsd3;
Expand Down
5 changes: 0 additions & 5 deletions pkgs/development/python-modules/flax/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ buildPythonPackage rec {
tensorflow
];

pytestFlagsArray = [
"-W ignore::FutureWarning"
"-W ignore::DeprecationWarning"
];

disabledTestPaths = [
# Docs test, needs extra deps + we're not interested in it.
"docs/_ext/codediff_test.py"
Expand Down
5 changes: 0 additions & 5 deletions pkgs/development/python-modules/globus-sdk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ buildPythonPackage rec {
--replace "pyjwt[crypto]>=2.0.0,<3.0.0" "pyjwt[crypto]>=2.0.0,<3.0.0"
'';

pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];

pythonImportsCheck = [
"globus_sdk"
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ buildPythonPackage rec {
"google.iam.v1"
];

pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];

meta = with lib; {
description = "GRPC library for the google-iam-v1 service";
homepage = "https://github.com/googleapis/python-grpc-google-iam-v1";
Expand Down
1 change: 0 additions & 1 deletion pkgs/development/python-modules/httpx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ buildPythonPackage rec {
'';

pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
"-W" "ignore::trio.TrioDeprecationWarning"
];

Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/itsdangerous/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ buildPythonPackage rec {
pytestCheckHook
];

pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];

meta = with lib; {
description = "Safely pass data to untrusted environments and back";
homepage = "https://itsdangerous.palletsprojects.com";
Expand Down
1 change: 0 additions & 1 deletion pkgs/development/python-modules/jax/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ buildPythonPackage rec {
# anyhow.
pytestFlagsArray = [
"--numprocesses=4"
"-W ignore::DeprecationWarning"
"tests/"
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ buildPythonPackage rec {
"jupyter_collaboration"
];

pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];

preCheck = ''
export HOME=$TEMP
'';
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/jupyter-server/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ buildPythonPackage rec {
flaky
];

pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];

preCheck = ''
export HOME=$(mktemp -d)
export PATH=$out/bin:$PATH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ buildPythonPackage rec {
"src/lightning_utilities/install/requirements.py"
];

pytestFlagsArray = [
# warns about distutils removal in python 3.12
"-W" "ignore::DeprecationWarning"
];

meta = with lib; {
changelog = "https://github.com/Lightning-AI/utilities/releases/tag/v${version}";
description = "Common Python utilities and GitHub Actions in Lightning Ecosystem";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ buildPythonPackage rec {
typeguard
];

pytestFlagsArray = [
# DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12.
"-W"
"ignore::DeprecationWarning"
];

disabledTests = lib.optionals (pythonAtLeast "3.10") [
# TypeError: UserId is not a dataclass and cannot be turned into one.
"test_newtype"
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/notebook/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ buildPythonPackage rec {
pytestCheckHook
];

pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];

env = {
JUPYTER_PLATFORM_DIRS = 1;
};
Expand Down
5 changes: 0 additions & 5 deletions pkgs/development/python-modules/omegaconf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ buildPythonPackage rec {
"omegaconf"
];

pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];

meta = with lib; {
description = "Framework for configuring complex applications";
homepage = "https://github.com/omry/omegaconf";
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/openai/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ buildPythonPackage rec {
dirty-equals
];

pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];

disabledTests = [
# Tests make network requests
"test_streaming_response"
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/openpyxl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ buildPythonPackage rec {
pytestCheckHook
];

pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];
disabledTests = [
# Tests broken since lxml 2.12; https://foss.heptapod.net/openpyxl/openpyxl/-/issues/2116
"test_read"
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/param/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ buildPythonPackage rec {
pytestCheckHook
];

pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];

pythonImportsCheck = [
"param"
];
Expand Down
5 changes: 0 additions & 5 deletions pkgs/development/python-modules/pelican/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@ buildPythonPackage rec {
pandoc
];

pytestFlagsArray = [
# DeprecationWarning: 'jinja2.Markup' is deprecated and...
"-W ignore::DeprecationWarning"
];

disabledTests = [
# AssertionError
"test_basic_generation_works"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ buildPythonPackage rec {
pytestCheckHook
] ++ passthru.optional-dependencies.all;

pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];

meta = with lib; {
description = "Extra Pydantic types";
homepage = "https://github.com/pydantic/pydantic-extra-types";
Expand Down
5 changes: 0 additions & 5 deletions pkgs/development/python-modules/pylint/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ buildPythonPackage rec {
];

pytestFlagsArray = [
# DeprecationWarning: pyreverse will drop support for resolving and
# displaying implemented interfaces in pylint 3.0. The
# implementation relies on the '__implements__' attribute proposed
# in PEP 245, which was rejected in 2006.
"-W" "ignore::DeprecationWarning"
"-v"
];

Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/pytest-benchmark/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ buildPythonPackage rec {
pytest-xdist
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);

pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];

preCheck = ''
export PATH="$out/bin:$PATH"
'';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ buildPythonPackage rec {
pytestCheckHook
];

pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];

disabledTestPathss = lib.optionals (pythonAtLeast "3.12") [
# AttributeError: partially initialized module 'pandas' has no attribute '_pandas_datetime_CAPI' (most likely due to a circular import)
"tests/test_num_regression.py"
Expand Down
Loading