cube-browser-playwright 0.2.0__tar.gz → 0.2.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: cube-browser-playwright
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Concrete browser session implementations for cube-standard
5
5
  Requires-Dist: cube-standard
6
6
  Requires-Dist: playwright
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cube-browser-playwright"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "Concrete browser session implementations for cube-standard"
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
@@ -39,3 +39,6 @@ extend-select = ["I"]
39
39
  testpaths = ["tests"]
40
40
  addopts = "-rs"
41
41
  asyncio_mode = "auto"
42
+
43
+ [tool.uv.sources]
44
+ cube-standard = { workspace = true }
@@ -169,12 +169,13 @@ class PlaywrightSession(BrowserSession):
169
169
  try:
170
170
  self._context.close()
171
171
  except Exception as e:
172
- logger.error("Error closing browser context; resources may be leaked: %s", e)
172
+ # "Event loop is closed" is expected when stop() is called during interpreter
173
+ # shutdown or after the sync-API event loop has already been torn down — not a leak.
174
+ if "Event loop is closed" not in str(e):
175
+ logger.error("Error closing browser context; resources may be leaked: %s", e)
173
176
  try:
174
177
  self._playwright.stop()
175
178
  except Exception as e:
176
- logger.error("Error stopping playwright; process may be leaked: %s", e)
177
- try:
178
- shutil.rmtree(self._user_data_dir)
179
- except OSError as e:
180
- logger.warning("Failed to remove temp profile dir %r: %s", self._user_data_dir, e)
179
+ if "Event loop is closed" not in str(e):
180
+ logger.error("Error stopping playwright; process may be leaked: %s", e)
181
+ shutil.rmtree(self._user_data_dir, ignore_errors=True)