napari-plugin-manager 0.1.9__tar.gz → 0.1.10rc0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/.github/workflows/deploy_docs.yml +3 -3
  2. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/.github/workflows/test_and_deploy.yml +23 -14
  3. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/.pre-commit-config.yaml +3 -3
  4. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/PKG-INFO +1 -1
  5. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/pyproject.toml +1 -1
  6. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/_tests/test_installer_process.py +5 -5
  7. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/_version.py +3 -3
  8. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/base_qt_package_installer.py +9 -2
  9. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/base_qt_plugin_dialog.py +0 -5
  10. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/npe2api.py +11 -5
  11. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/qt_plugin_dialog.py +10 -2
  12. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager.egg-info/PKG-INFO +1 -1
  13. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/tox.ini +7 -5
  14. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/.github/dependabot.yml +0 -0
  15. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/.gitignore +0 -0
  16. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/LICENSE +0 -0
  17. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/Makefile +0 -0
  18. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/README.md +0 -0
  19. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/RELEASE.md +0 -0
  20. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/codecov.yml +0 -0
  21. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/docs/__init__.py +0 -0
  22. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/docs/_static/custom.css +0 -0
  23. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/docs/_static/favicon/logo-noborder-180.png +0 -0
  24. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/docs/_static/favicon/logo-silhouette-192.png +0 -0
  25. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/docs/_static/favicon/logo-silhouette-dark-light.svg +0 -0
  26. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/docs/_templates/navbar-project.html +0 -0
  27. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/docs/_toc.yml +0 -0
  28. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/docs/conf.py +0 -0
  29. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/docs/developers/contributing.md +0 -0
  30. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/docs/index.md +0 -0
  31. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/images/description.png +0 -0
  32. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/images/direct-entry.png +0 -0
  33. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/images/filter.png +0 -0
  34. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/images/import-export.png +0 -0
  35. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/images/install.png +0 -0
  36. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/images/logo.png +0 -0
  37. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/images/status.png +0 -0
  38. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/images/uninstall.png +0 -0
  39. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/images/update.png +0 -0
  40. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/setup.cfg +0 -0
  41. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/__init__.py +0 -0
  42. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/_tests/__init__.py +0 -0
  43. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/_tests/conftest.py +0 -0
  44. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/_tests/test_base_installer_process.py +0 -0
  45. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/_tests/test_npe2api.py +0 -0
  46. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/_tests/test_qt_plugin_dialog.py +0 -0
  47. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/_tests/test_utils.py +0 -0
  48. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/qt_package_installer.py +0 -0
  49. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/qt_warning_dialog.py +0 -0
  50. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/qt_widgets.py +0 -0
  51. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/styles.qss +0 -0
  52. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager/utils.py +0 -0
  53. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager.egg-info/SOURCES.txt +0 -0
  54. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager.egg-info/dependency_links.txt +0 -0
  55. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager.egg-info/requires.txt +0 -0
  56. {napari_plugin_manager-0.1.9 → napari_plugin_manager-0.1.10rc0}/src/napari_plugin_manager.egg-info/top_level.txt +0 -0
@@ -26,9 +26,9 @@ jobs:
26
26
 
27
27
  steps:
28
28
  - name: Clone repo
29
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30
30
 
31
- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
31
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
32
32
  with:
33
33
  python-version: "3.10"
34
34
 
@@ -52,7 +52,7 @@ jobs:
52
52
 
53
53
  # At a minimum this job should upload artifacts using actions/upload-pages-artifact
54
54
  - name: Upload GitHub Pages artifact
55
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
55
+ uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
56
56
  with:
57
57
  name: github-pages
58
58
  path: docs/_build
@@ -30,9 +30,9 @@ jobs:
30
30
  strategy:
31
31
  fail-fast: false
32
32
  matrix:
33
- platform: [ubuntu-latest, windows-latest, macos-15-intel, macos-latest]
34
- python-version: ["3.10", "3.11", "3.12"]
35
- napari: ["latest", "repo"]
33
+ platform: [ubuntu-latest, windows-latest, macos-latest]
34
+ python-version: ["3.10", "3.12"]
35
+ napari: ["latest", "repo", '0.6.6']
36
36
  tool: ["pip", "conda"]
37
37
  include:
38
38
  # add 3.13 on ubuntu
@@ -40,6 +40,15 @@ jobs:
40
40
  napari: repo
41
41
  tool: pip
42
42
  python-version: "3.13"
43
+ # only run macos intel on py3.12
44
+ - platform: macos-15-intel
45
+ napari: repo
46
+ tool: pip
47
+ python-version: "3.12"
48
+ - platform: macos-15-intel
49
+ napari: repo
50
+ tool: conda
51
+ python-version: "3.12"
43
52
  exclude:
44
53
  # skip repo install on conda
45
54
  - platform: ubuntu-latest
@@ -53,17 +62,17 @@ jobs:
53
62
  napari: repo
54
63
 
55
64
  steps:
56
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
65
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
57
66
 
58
67
  - name: Set up Python ${{ matrix.python-version }} - pip
59
68
  if: matrix.tool == 'pip'
60
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
69
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
61
70
  with:
62
71
  python-version: ${{ matrix.python-version }}
63
72
 
64
73
  - name: Set up Python ${{ matrix.python-version }} - conda
65
74
  if: matrix.tool == 'conda'
66
- uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
75
+ uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
67
76
  with:
68
77
  miniforge-version: latest
69
78
  channels: conda-forge
@@ -109,7 +118,7 @@ jobs:
109
118
 
110
119
 
111
120
  - name: Upload coverage data
112
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
121
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
113
122
  with:
114
123
  name: coverage reports ${{ matrix.platform }} py ${{ matrix.python-version }} ${{ matrix.tool }} ${{ matrix.napari }}
115
124
  include-hidden-files: true
@@ -126,9 +135,9 @@ jobs:
126
135
  if: always()
127
136
  runs-on: ubuntu-latest
128
137
  steps:
129
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
138
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
130
139
 
131
- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
140
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
132
141
  with:
133
142
  python-version: "3.x"
134
143
  cache-dependency-path: pyproject.toml
@@ -140,7 +149,7 @@ jobs:
140
149
  pip install codecov
141
150
 
142
151
  - name: Download coverage data
143
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
152
+ uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
144
153
  with:
145
154
  pattern: coverage reports*
146
155
  path: coverage
@@ -156,7 +165,7 @@ jobs:
156
165
  python -Im coverage report --format=markdown --skip-empty --skip-covered >> "$GITHUB_STEP_SUMMARY"
157
166
 
158
167
  - name: Upload coverage data
159
- uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
168
+ uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
160
169
  with:
161
170
  fail_ci_if_error: true
162
171
  use_oidc: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
@@ -170,9 +179,9 @@ jobs:
170
179
  permissions:
171
180
  id-token: write
172
181
  steps:
173
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
182
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
174
183
  - name: Set up Python
175
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
184
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
176
185
  with:
177
186
  python-version: "3.x"
178
187
  - name: Install dependencies
@@ -184,4 +193,4 @@ jobs:
184
193
  git tag
185
194
  python -m build
186
195
  - name: Publish package distributions to PyPI
187
- uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
196
+ uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
@@ -1,6 +1,6 @@
1
1
  repos:
2
2
  - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v5.0.0
3
+ rev: v6.0.0
4
4
  hooks:
5
5
  - id: check-docstring-first
6
6
  exclude: ^constructor-manager-ui/src/constructor_manager_ui/style/images.py
@@ -9,13 +9,13 @@ repos:
9
9
  - id: trailing-whitespace
10
10
  exclude: ^constructor-manager-ui/src/constructor_manager_ui/style/images.py
11
11
  - repo: https://github.com/astral-sh/ruff-pre-commit
12
- rev: v0.12.7
12
+ rev: v0.14.14
13
13
  hooks:
14
14
  - id: ruff-check
15
15
  args: [--fix]
16
16
  - id: ruff-format
17
17
  - repo: https://github.com/python-jsonschema/check-jsonschema
18
- rev: 0.33.2
18
+ rev: 0.36.1
19
19
  hooks:
20
20
  - id: check-github-workflows
21
21
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: napari-plugin-manager
3
- Version: 0.1.9
3
+ Version: 0.1.10rc0
4
4
  Summary: Install plugins for napari, in napari.
5
5
  Author-email: napari team <napari-steering-council@googlegroups.com>
6
6
  License-Expression: BSD-3-Clause
@@ -93,7 +93,7 @@ docs = [
93
93
  homepage = "https://github.com/napari/napari-plugin-manager"
94
94
 
95
95
  [tool.black]
96
- target-version = ['py310', 'py311', 'py312', 'py313']
96
+ target-version = ['py310', 'py312', 'py313']
97
97
  skip-string-normalization = true
98
98
  line-length = 79
99
99
 
@@ -261,7 +261,7 @@ def test_conda_installer(qtbot, caplog, monkeypatch, tmp_conda_env: Path):
261
261
  caplog.set_level(logging.DEBUG, logger=bqpi.__name__)
262
262
  conda_meta = tmp_conda_env / 'conda-meta'
263
263
  glob_pat = 'typing-extensions-*.json'
264
- glob_pat_2 = 'packaging-*.json'
264
+ glob_pat_2 = 'cowpy-*.json'
265
265
  installer = NapariInstallerQueue()
266
266
 
267
267
  with qtbot.waitSignal(installer.allFinished, timeout=600_000):
@@ -293,7 +293,7 @@ def test_conda_installer(qtbot, caplog, monkeypatch, tmp_conda_env: Path):
293
293
  )
294
294
  installer.install(
295
295
  tool=InstallerTools.CONDA,
296
- pkgs=['packaging'],
296
+ pkgs=['cowpy'],
297
297
  prefix=tmp_conda_env,
298
298
  )
299
299
  assert installer.currentJobs() == 2
@@ -312,7 +312,7 @@ def test_conda_installer(qtbot, caplog, monkeypatch, tmp_conda_env: Path):
312
312
  )
313
313
  job_id_2 = installer.install(
314
314
  tool=InstallerTools.CONDA,
315
- pkgs=['packaging'],
315
+ pkgs=['cowpy'],
316
316
  prefix=tmp_conda_env,
317
317
  )
318
318
  assert installer.currentJobs() == 2
@@ -330,7 +330,7 @@ def test_conda_installer(qtbot, caplog, monkeypatch, tmp_conda_env: Path):
330
330
  )
331
331
  job_id_2 = installer.install(
332
332
  tool=InstallerTools.CONDA,
333
- pkgs=['packaging'],
333
+ pkgs=['cowpy'],
334
334
  prefix=tmp_conda_env,
335
335
  )
336
336
  assert installer.currentJobs() == 2
@@ -370,7 +370,7 @@ def test_conda_installer_wait_for_finished(qtbot, tmp_conda_env: Path):
370
370
  )
371
371
  installer.install(
372
372
  tool=InstallerTools.CONDA,
373
- pkgs=['packaging'],
373
+ pkgs=['cowpy'],
374
374
  prefix=tmp_conda_env,
375
375
  )
376
376
  installer.waitForFinished(30_000)
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.1.9'
32
- __version_tuple__ = version_tuple = (0, 1, 9)
31
+ __version__ = version = '0.1.10rc0'
32
+ __version_tuple__ = version_tuple = (0, 1, 10, 'rc0')
33
33
 
34
- __commit_id__ = commit_id = 'g3e3e1a4bc'
34
+ __commit_id__ = commit_id = 'gcad2c38d0'
@@ -26,7 +26,6 @@ from subprocess import run
26
26
  from tempfile import gettempdir
27
27
  from typing import TypedDict
28
28
 
29
- from napari.plugins import plugin_manager
30
29
  from napari.plugins.npe2api import _user_agent
31
30
  from napari.utils.misc import StringEnum
32
31
  from napari.utils.translations import trans
@@ -694,7 +693,15 @@ class InstallerQueue(QObject):
694
693
  and exit_code == 0
695
694
  ):
696
695
  pm2 = PluginManager.instance()
697
- npe1_plugins = set(plugin_manager.iter_available())
696
+ # new versions of napari after 0.7.0 won't have the plugin_manager
697
+ # this try/except block is to maintain compatibility
698
+ # between new napari-plugin-manager versions and old napari versions
699
+ try:
700
+ from napari.plugins import plugin_manager
701
+
702
+ npe1_plugins = set(plugin_manager.iter_available())
703
+ except ImportError:
704
+ npe1_plugins = set()
698
705
  for pkg in current.pkgs:
699
706
  if pkg in pm2:
700
707
  pm2.unregister(pkg)
@@ -1471,13 +1471,10 @@ class BaseQtPluginDialog(QDialog):
1471
1471
  self.working_indicator.setMovie(mov)
1472
1472
  mov.start()
1473
1473
 
1474
- visibility_direct_entry = not self._on_bundle()
1475
1474
  self.direct_entry_edit = QLineEdit(self)
1476
1475
  self.direct_entry_edit.installEventFilter(self)
1477
1476
  self.direct_entry_edit.returnPressed.connect(self._install_packages)
1478
- self.direct_entry_edit.setVisible(visibility_direct_entry)
1479
1477
  self.direct_entry_btn = QToolButton(self)
1480
- self.direct_entry_btn.setVisible(visibility_direct_entry)
1481
1478
  self.direct_entry_btn.clicked.connect(self._install_packages)
1482
1479
  self.direct_entry_btn.setText(self._trans('Install'))
1483
1480
 
@@ -1518,8 +1515,6 @@ class BaseQtPluginDialog(QDialog):
1518
1515
 
1519
1516
  buttonBox.addWidget(self.direct_entry_edit)
1520
1517
  buttonBox.addWidget(self.direct_entry_btn)
1521
- if not visibility_direct_entry:
1522
- buttonBox.addStretch()
1523
1518
  buttonBox.addWidget(self.process_success_indicator)
1524
1519
  buttonBox.addWidget(self.process_error_indicator)
1525
1520
  buttonBox.addWidget(self.show_status_btn)
@@ -23,6 +23,10 @@ from napari_plugin_manager.utils import get_homepage_url
23
23
 
24
24
  PyPIname = str
25
25
 
26
+ BASE_API_URL = 'https://api.napari.org/api'
27
+ EXTENDED_SUMMARY_URL = f'{BASE_API_URL}/extended_summary'
28
+ CONDA_URL = f'{BASE_API_URL}/conda'
29
+
26
30
 
27
31
  @lru_cache
28
32
  def _user_agent() -> str:
@@ -51,7 +55,7 @@ def _user_agent() -> str:
51
55
 
52
56
 
53
57
  class _ShortSummaryDict(TypedDict):
54
- """Objects returned at https://npe2api.vercel.app/api/extended_summary ."""
58
+ """Objects returned from API extended_summary endpoint."""
55
59
 
56
60
  name: NotRequired[PyPIname]
57
61
  version: str
@@ -70,16 +74,18 @@ class SummaryDict(_ShortSummaryDict):
70
74
  @lru_cache
71
75
  def plugin_summaries() -> list[SummaryDict]:
72
76
  """Return PackageMetadata object for all known napari plugins."""
73
- url = 'https://npe2api.vercel.app/api/extended_summary'
74
- with urlopen(Request(url, headers={'User-Agent': _user_agent()})) as resp:
77
+ with urlopen(
78
+ Request(EXTENDED_SUMMARY_URL, headers={'User-Agent': _user_agent()})
79
+ ) as resp:
75
80
  return json.load(resp)
76
81
 
77
82
 
78
83
  @lru_cache
79
84
  def conda_map() -> dict[PyPIname, str | None]:
80
85
  """Return map of PyPI package name to conda_channel/package_name ()."""
81
- url = 'https://npe2api.vercel.app/api/conda'
82
- with urlopen(Request(url, headers={'User-Agent': _user_agent()})) as resp:
86
+ with urlopen(
87
+ Request(CONDA_URL, headers={'User-Agent': _user_agent()})
88
+ ) as resp:
83
89
  return json.load(resp)
84
90
 
85
91
 
@@ -104,12 +104,20 @@ class PluginListItem(BasePluginListItem):
104
104
  if plugin_name in pm2:
105
105
  pm2.enable(plugin_name) if state else pm2.disable(plugin_name)
106
106
  return
107
-
107
+ # new versions of napari after 0.7.0 won't have the plugin_manager
108
+ # this try/except block is to maintain compatibility
109
+ # between new napari-plugin-manager versions and old napari versions
110
+ try:
111
+ from napari.plugins import plugin_manager
112
+
113
+ npe1_plugins = set(plugin_manager.iter_available())
114
+ except ImportError:
115
+ npe1_plugins = set()
108
116
  for (
109
117
  npe1_name,
110
118
  _,
111
119
  distname,
112
- ) in napari.plugins.plugin_manager.iter_available():
120
+ ) in npe1_plugins:
113
121
  if distname and (normalized_name(distname) == plugin_name):
114
122
  napari.plugins.plugin_manager.set_blocked(
115
123
  npe1_name, not enabled
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: napari-plugin-manager
3
- Version: 0.1.9
3
+ Version: 0.1.10rc0
4
4
  Summary: Install plugins for napari, in napari.
5
5
  Author-email: napari team <napari-steering-council@googlegroups.com>
6
6
  License-Expression: BSD-3-Clause
@@ -1,13 +1,12 @@
1
1
  # For more information about tox, see https://tox.readthedocs.io/en/latest/
2
2
  [tox]
3
- envlist = pip-py{310,311,312,313}-{PyQt5,PyQt6,PySide6}-napari_{latest,repo}, conda-{py310,py311,py312,py313}-{PyQt5,PySide6}-napari_{latest,repo}
3
+ envlist = pip-py{310,312,313}-{PyQt5,PyQt6,PySide6}-napari_{latest,repo,066}, conda-{py310,py312,py313}-{PyQt5,PySide6}-napari_{latest,repo,066}
4
4
  toxworkdir=/tmp/.tox
5
5
  isolated_build = true
6
6
 
7
7
  [gh-actions]
8
8
  python =
9
9
  3.10: py310
10
- 3.11: py311
11
10
  3.12: py312
12
11
  3.13: py313
13
12
 
@@ -15,6 +14,7 @@ python =
15
14
  NAPARI =
16
15
  latest: napari_latest
17
16
  repo: napari_repo
17
+ 0.6.6: napari_066
18
18
  TOOL =
19
19
  pip: pip
20
20
  conda: conda
@@ -39,19 +39,21 @@ extras = testing
39
39
  commands = coverage run --parallel-mode -m pytest -v --color=yes
40
40
 
41
41
  # Conditional PIP dependencies based on environment variables
42
- [testenv:pip-{py310,py311,py312,py313}-{PyQt5,PyQt6,PySide6}-napari_{latest,repo}]
42
+ [testenv:pip-{py310,py312,py313}-{PyQt5,PyQt6,PySide6}-napari_{latest,repo,066}]
43
43
  deps =
44
44
  PyQt5: PyQt5
45
45
  PyQt5: PyQt5-sip
46
46
  PyQt6: PyQt6
47
47
  PySide6: PySide6 > 6.7
48
48
  napari_latest: napari
49
+ napari_066: napari==0.6.6
49
50
  napari_repo: git+https://github.com/napari/napari.git
50
51
 
51
52
 
52
53
  # Conditional dependencies for CONDA
53
- [testenv:conda-{py310,py311,py312}-{PyQt5,PySide6}-napari_{latest,repo}]
54
+ [testenv:conda-{py310,py312}-{PyQt5,PySide6}-napari_{latest,repo,066}]
54
55
  conda_deps =
55
- {py310,py311,py312}-PyQt5: pyqt
56
+ {py310,py312}-PyQt5: pyqt
56
57
  PySide6: pyside6 > 6.7
57
58
  napari_latest: napari
59
+ napari_066: napari==0.6.6