Skip to content

CIP-0010: stop re-silencing DeprecationWarning on import GPy - #1298

Merged
lawrennd merged 2 commits into
mainfrom
cip0010-visible-deprecation-warnings
Nov 13, 2026
Merged

lawrennd merged 2 commits into
mainfrom
cip0010-visible-deprecation-warnings

Conversation

@lawrennd

Copy link
Copy Markdown
Member

Summary

  • Remove the process-wide warnings.filterwarnings("ignore", category=DeprecationWarning) from GPy/__init__.py (CIP-0010 / REQ-0003, Discussion CIP-0010: GPy2 readiness — what should be deprecated, and what should keep working? #1297).
  • That filter did not only hide GPy's own deprecations: it re-silenced DeprecationWarning for the whole process after users had enabled them (python -Wd, PYTHONWARNINGS=default).
  • Add a regression test that imports GPy after enabling warnings and asserts the blanket ignore is not reinstalled.
  • CHANGELOG note under Unreleased.

Test plan

  • pytest GPy/testing/test_deprecation_filters.py GPy/testing/test_stick_explorer_spike.py
  • CI green on this branch
  • Spot-check: PYTHONWARNINGS=default python -c "import GPy" still succeeds; with matplotlib, the visualize deprecation may appear once under -Wd/pytest (expected)

Remove the process-wide filterwarnings ignore from GPy/__init__.py so importing GPy no longer undoes python -Wd / PYTHONWARNINGS=default for the whole process (CIP-0010 / REQ-0003).
lawrennd added a commit that referenced this pull request Nov 13, 2026
Record PR #1298 against the DeprecationWarning re-silence bug (CPython already ignores by default), and say main not devel for the paramz surface snapshot in CIP-000F.
Run the filter regression check in a subprocess so purging sys.modules mid-suite no longer dual-loads GPy classes and breaks serialization and isinstance checks.
@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.92%. Comparing base (c5e6459) to head (3f89e31).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1298      +/-   ##
==========================================
- Coverage   61.92%   61.92%   -0.01%     
==========================================
  Files         206      206              
  Lines       21843    21841       -2     
  Branches     2550     2550              
==========================================
- Hits        13526    13524       -2     
  Misses       7688     7688              
  Partials      629      629              
Flag Coverage Δ
unittests 61.92% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lawrennd
lawrennd merged commit ce3502f into main Nov 13, 2026
19 checks passed
@lawrennd
lawrennd deleted the cip0010-visible-deprecation-warnings branch November 13, 2026 19:09
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.

1 participant