Skip to content

Conversation

@mattpap
Copy link
Contributor

@mattpap mattpap commented Jan 4, 2024

The existing test was unreliable because it depends on sys.modules, but we don't know who injected typing_extensions there. Recently a dependency of either PIL or sphinx or both started importing this module, thus resulting in test failures. This PR removes that test and replaces it with ruff. I suppose this could be extended to all other test_no_*_common tests.

fixes #13632

@mattpap mattpap force-pushed the mattpap/13632_ban_top_level_typing_extensions branch from dfa659b to 5abd93a Compare January 4, 2024 09:23
@codecov
Copy link

codecov bot commented Jan 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d322647) 92.54% compared to head (74b99d5) 92.54%.

Additional details and impacted files
@@             Coverage Diff             @@
##           branch-3.4   #13633   +/-   ##
===========================================
  Coverage       92.54%   92.54%           
===========================================
  Files             323      323           
  Lines           20493    20493           
===========================================
  Hits            18965    18965           
  Misses           1528     1528           

@mattpap mattpap force-pushed the mattpap/13632_ban_top_level_typing_extensions branch from 5abd93a to a3a8cff Compare January 4, 2024 10:14
@mattpap mattpap force-pushed the mattpap/13632_ban_top_level_typing_extensions branch from a3a8cff to 74b99d5 Compare January 4, 2024 10:18
@mattpap mattpap mentioned this pull request Jan 4, 2024
22 tasks
Copy link
Member

@bryevdv bryevdv left a comment

Choose a reason for hiding this comment

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

fantastic

@mattpap mattpap merged commit a2a15c8 into branch-3.4 Jan 4, 2024
@mattpap mattpap deleted the mattpap/13632_ban_top_level_typing_extensions branch January 4, 2024 19:10
@bryevdv
Copy link
Member

bryevdv commented Jan 4, 2024

I suppose this could be extended to all other test_no_*_common tests.

+1 for this as well

mattpap added a commit that referenced this pull request Jan 4, 2024
* Upgrade to ruff 0.1.11

* Enable TID rules and disable TID252 for now

* Ban `typing_extensions` module at the top-level

* Remove test_no_typing_extensions_common

* Import `typing_extensions` under `TYPE_CHECKING` in `*.pyi`
mattpap added a commit that referenced this pull request Jan 7, 2024
* Upgrade to ruff 0.1.11

* Enable TID rules and disable TID252 for now

* Ban `typing_extensions` module at the top-level

* Remove test_no_typing_extensions_common

* Import `typing_extensions` under `TYPE_CHECKING` in `*.pyi`
mattpap added a commit that referenced this pull request Jan 8, 2024
* Add a regression test for issue #8890 (#13572)

* Don't register keyup twice in `AutocompleteInput` (#13577)

* Don't register keyup twice in AutocompleteInput

* Pin pytest-asyncio to version 0.21.1

* Link sub-coordinate and context dependent ranges in RangesUpdate (#13603)

* Fix support for global/local imported stylesheets (#13559)

* Compatibility with Chromium 110

* Robustify unit tests involving browser output (#13602)

* Multiple density estimate plot (#13527)

* added sample data

* created density plot

* added gallery images and json

* sorted import order

* clarified plot description

* refactored plotting file

* changed tick formatting style

* deleted unused import

* deleted whitespace

* additional file refactoring

* pyramid example plot (#13596)

* added sample data

* created plot and added plot  description

* added gallery image

* minor edits

* modified plot title

* added bar labels to plot

* removed whitespace

* post-review

* changed color palette

* added plot image

* added extra tick markers

* Remove unnecessary arcTo calls in round_rect (#13627)

* Update license and copyright statements to 2024 (#13630)

* Use `ruff` to ban `typing_extensions` at the top-level (#13633)

* Upgrade to ruff 0.1.11

* Enable TID rules and disable TID252 for now

* Ban `typing_extensions` module at the top-level

* Remove test_no_typing_extensions_common

* Import `typing_extensions` under `TYPE_CHECKING` in `*.pyi`

* Correctly handle transforms in SVG arcTo (#13640)

* ban PIL and other imports with ruff (#13639)

* fix indentation in sphinx extentions (#13549)

* fix indentation in property mixins (#13514)

* fix indentation of default strings with dedent from textwrap

* add missing words in property_mixins.py

* fix indentation in tools.py

* remove dedent block and introduce ALPHA_DEFAULT_HELP and COLOR_DEFAULT_HELP

* change order of imports

* Restored broken API links (#13528)

* restored broken API links

* modified broken API path

* Allow newer tornado and pandas in test-minimal-deps (#13635)

* Add release notes

* Update switcher.json

* avoid_Sphinx ThemeError and set Sphinx to a minimum of 7.1.0 (#13560)

* fix some sphinx warnings (#13609)

* fix some sphinx warnings

* don't make the first line bold

* fix warnings caused by sampledata (#13613)

* add forensic glass and emissions to sampledata.rst (#13615)

---------

Co-authored-by: Azaya <99359668+Azaya89@users.noreply.github.com>
Co-authored-by: Ian Thomas <ianthomas23@gmail.com>
Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>
Co-authored-by: Moritz Schreiber <68053396+mosc9575@users.noreply.github.com>
@mattpap mattpap modified the milestones: 3.4, 3.3.3 Jan 8, 2024
Chiemezuo pushed a commit to Chiemezuo/bokeh that referenced this pull request Aug 27, 2024
* Upgrade to ruff 0.1.11

* Enable TID rules and disable TID252 for now

* Ban `typing_extensions` module at the top-level

* Remove test_no_typing_extensions_common

* Import `typing_extensions` under `TYPE_CHECKING` in `*.pyi`
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_no_typing_extensions_common_combined fails due to thrid-party modules

2 participants