File tree Expand file tree Collapse file tree 3 files changed +25
-12
lines changed Expand file tree Collapse file tree 3 files changed +25
-12
lines changed Original file line number Diff line number Diff line change 1010 JUPYTER_PLATFORM_DIRS : ' 1'
1111
1212jobs :
13- linux :
13+ test :
1414 runs-on : ubuntu-latest
1515 strategy :
1616 matrix :
@@ -20,16 +20,16 @@ jobs:
2020 - python-version : ' 3.13'
2121 extras : min
2222 steps :
23- - uses : actions/checkout@v4
23+ - uses : actions/checkout@v5
2424 with :
2525 fetch-depth : 0
2626 filter : blob:none
2727 - uses : actions/setup-python@v5
2828 with :
2929 python-version : ${{ matrix.python-version }}
30- - uses : hynek /setup-cached- uv@v2
30+ - uses : astral-sh /setup-uv@v6
3131 with :
32- cache-dependency-path : pyproject.toml
32+ enable-cache : true
3333 - run : uv pip install --system -e .[${{ matrix.extras == 'min' && 'test' || 'test,jupyter' }}]
3434 - uses : pavelzw/pytest-action@v2
3535 with :
3838 verbose : true
3939 job-summary : true
4040 emoji : false
41+ check :
42+ if : always()
43+ needs :
44+ - test
45+ runs-on : ubuntu-latest
46+ steps :
47+ - uses : re-actors/alls-green@release/v1
48+ with :
49+ jobs : ${{ toJSON(needs) }}
Original file line number Diff line number Diff line change 1111 permissions :
1212 id-token : write # to authenticate as Trusted Publisher to pypi.org
1313 steps :
14- - uses : actions/checkout@v4
15- - uses : actions/setup-python@v4
14+ - uses : actions/checkout@v5
15+ - uses : actions/setup-python@v5
1616 with :
1717 python-version : " 3.x"
1818 cache : pip
Original file line number Diff line number Diff line change 1212from importlib .metadata import version
1313from types import MappingProxyType , ModuleType
1414from typing import TYPE_CHECKING , Any , Literal , TypeAlias
15+ from warnings import catch_warnings , filterwarnings
1516
1617from . import _pu
1718from ._dists import packages_distributions
@@ -118,12 +119,15 @@ def __hash__(self) -> int:
118119 def _version (self , dist : str ) -> str :
119120 """Get version(s) of imported distribution."""
120121 v_meta = version (dist )
121- vs_attr = {
122- pkg_name : v
123- for pkg_name in self .dist2pkgs [dist ]
124- if (pkg := sys .modules .get (pkg_name ))
125- and (v := getattr (pkg , "__version__" , None ))
126- }
122+ with catch_warnings ():
123+ filterwarnings ("ignore" , category = DeprecationWarning )
124+ filterwarnings ("ignore" , category = FutureWarning )
125+ vs_attr = {
126+ pkg_name : v
127+ for pkg_name in self .dist2pkgs [dist ]
128+ if (pkg := sys .modules .get (pkg_name ))
129+ and (v := getattr (pkg , "__version__" , None ))
130+ }
127131 if all (v_attr == v_meta for v_attr in vs_attr .values ()):
128132 # This branch is also hit if there are no __version__ attributes
129133 return v_meta
You can’t perform that action at this time.
0 commit comments