Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 16, 2025

The poetry.lock was locked to chrome-devtools-protocol==0.3.0 while pyproject.toml specified ^0.4.0, causing KeyError exceptions (e.g., KeyError: 'Page.documentOpened') when using the published PyPI package.

Changes

Dependency Updates

  • Regenerated poetry.lock with chrome-devtools-protocol==0.4.0
  • Updated to Python 3.12-compatible versions:
    • trio: 0.13.0 → 0.22.0
    • mypy: 0.770 → 1.4.1
    • pytest: 5.4.1 → 7.4.4
    • pytest-trio: 0.5.2 → 0.8.0
  • Migrated deprecated dev-dependencies to group.dev.dependencies

Generator Fixes
Enhanced generator/generate.py to handle new type annotations from chrome-devtools-protocol==0.4.0:

  • Added support for Optional, Dict, Generator annotation types
  • Added defensive hasattr() checks for _name attribute access

Generated Code
Regenerated all trio_cdp/generated/* modules with updated CDP 0.4.0 definitions, adding application_cache.py and removing obsolete modules (event_breakpoints.py, media.py, performance_timeline.py).

Original prompt

This section details on the original issue you should resolve

<issue_title>Publish 0.7.0 to PyPI</issue_title>
<issue_description>Currently, 0.6.0 is on PyPI.

Without manually building from master, I am getting KeyError (e.g., KeyError: 'Page.documentOpened') when using 0.6.0 from PyPI.

https://travis-ci.com/github/HyperionGray/trio-chrome-devtools-protocol/builds/160400374

I'm not very familiar with poetry, but I suspect you need to rerun poetry update when a dependency changes versions (e.g., chrome-devtools-protocol = "^0.4.0"). This will update the poetry.lock file to a coherent state.

Fixing the CI issues and publishing trio-chome-devtools-protocol with ^0.4.0 would be helpful for installing from PyPI. </issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Note

Aligns the project with chrome-devtools-protocol 0.4.0 and resolves lockfile mismatch causing runtime KeyErrors.

  • Dependencies: Regenerated poetry.lock; bumped trio, pytest, pytest-trio, mypy; migrated to [tool.poetry.group.dev.dependencies]
  • Generator: Added handling for typing.Optional, Dict, Generator; added hasattr guards for _name; improved union/optional formatting
  • Generated code: Regenerated trio_cdp/generated/* for CDP 0.4.0 — added application_cache, removed deprecated domains, and updated numerous function parameters/return types

Written by Cursor Bugbot for commit 9719229. Configure here.

Copilot AI self-assigned this Nov 16, 2025
Copilot AI changed the title [WIP] Publish version 0.7.0 to PyPI after fixing CI issues Fix poetry.lock sync and update dependencies for chrome-devtools-protocol 0.4.0 Nov 16, 2025
Copilot AI requested a review from P4X-ng November 16, 2025 04:20
Copilot AI added a commit that referenced this pull request Nov 22, 2025
@P4X-ng P4X-ng marked this pull request as ready for review January 10, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish 0.7.0 to PyPI

2 participants