GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test_array modifies `warnings.filter` · Issue #106162 · python/cpython

test_array modifies warnings.filter #106162

New issue
Copy link
New issue
Copy link
Closed
Closed
test_array modifies warnings.filter#106162
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@vstinner
vstinner
opened on Jun 27, 2023
Issue body actions
$ ./python -m test test_array --fail-env-changed -m test.test_array.ArrayReconstructorTest.test_error
0:00:00 load avg: 17.75 Run tests sequentially
0:00:00 load avg: 17.75 [1/1] test_array
Warning -- warnings.filters was modified by test_array
Warning --   Before: (140159909806320, [], [])
Warning --   After:  (140159909806320, [], [('ignore', re.compile("The 'u' type code is deprecated and will be removed in Python 3.16", re.IGNORECASE), <class 'DeprecationWarning'>, None, 0)]) 
test_array failed (env changed)

== Tests result: ENV CHANGED ==

1 test altered the execution environment:
    test_array

Total duration: 321 ms
Tests result: ENV CHANGED

cc @methane @hugovk

Linked PRs

  • gh-106162: fix test_array modifies warning filter #106181
  • gh-106162: array: suppress warning in test_array #106404

Activity

  1. vstinner
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jun 27, 2023
  2. hugovk commented on Jun 28, 2023

    @hugovk
    hugovk
    on Jun 28, 2023
    Member
    More actions

    I can't reproduce on macOS.

    Does the filterwarnings in setUp not work?

    cpython/Lib/test/test_array.py

    Lines 102 to 107 in 1f74b9e

    def setUp(self):
    warnings.filterwarnings(
    "ignore",
    message="The 'u' type code is deprecated and "
    "will be removed in Python 3.16",
    category=DeprecationWarning)

  3. methane
    added a commit that references this issue on Jun 28, 2023

    pythongh-106162: fix test_array modifies farning filter

    6640bce
  4. methane
    changed the title [-]test_array emits DeprecationWarning: The 'u' type code is deprecated and will be removed in Python 3.16[/-] [+]test_array modifies `warnigns.filter`[/+] on Jun 28, 2023
  5. methane
    added a commit that references this issue on Jun 28, 2023

    gh-106162: fix test_array modifies warning filter (#106181)

    a3dd8cc
  6. sunmy2019
    closed this as completedon Jun 28, 2023
  7. AlexWaygood
    changed the title [-]test_array modifies `warnigns.filter`[/-] [+]test_array modifies `warnings.filter`[/+] on Jun 28, 2023
  8. methane
    added a commit that references this issue on Jul 4, 2023

    gh-106162: array: suppress warning in test_array (#106404)

    8a4bba8
  9. carljm
    added a commit that references this issue on Jul 5, 2023

    Merge branch 'main' into modulelocals

    4c59e51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.