Skip to content

Enhance vCon party management and documentation#55

Merged
howethomas merged 1 commit intomainfrom
54-inconsistent-mutability-of-returned-objects-vcondialog-vs-vconparties
Sep 18, 2025
Merged

Enhance vCon party management and documentation#55
howethomas merged 1 commit intomainfrom
54-inconsistent-mutability-of-returned-objects-vcondialog-vs-vconparties

Conversation

@howethomas
Copy link
Contributor

  • Updated the parties property to return a list of dictionaries instead of Party objects, allowing for in-place modifications.
  • Introduced a new method, get_party_objects(), to retrieve Party objects from the internal data structure.
  • Enhanced usage documentation to reflect changes in party data access and provide examples for both dictionary and object usage.
  • Updated tests to align with the new party data structure and ensure correct assertions.

- Updated the parties property to return a list of dictionaries instead of Party objects, allowing for in-place modifications.
- Introduced a new method, get_party_objects(), to retrieve Party objects from the internal data structure.
- Enhanced usage documentation to reflect changes in party data access and provide examples for both dictionary and object usage.
- Updated tests to align with the new party data structure and ensure correct assertions.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances vCon party management by addressing a mutability inconsistency between the dialog and parties properties. The main purpose is to make both properties return mutable references that allow in-place modifications, ensuring consistent behavior across the API.

  • Changed parties property to return dictionaries instead of Party objects for consistent mutability
  • Added get_party_objects() method for backward compatibility when Party objects are needed
  • Updated documentation and tests to reflect the new party data access patterns

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/vcon/vcon.py Modified parties property to return mutable dictionaries and added get_party_objects() method
tests/test_vcon.py Updated assertions to work with dictionary-based party access
tests/test_mutability_consistency.py Added comprehensive tests demonstrating mutability consistency
docs/source/usage.rst Enhanced documentation with examples for both dictionary and object usage
MUTABILITY_FIX_SUMMARY.md Added detailed documentation of the changes and migration guide

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@howethomas howethomas merged commit 5e7c02f into main Sep 18, 2025
6 checks passed
@howethomas howethomas deleted the 54-inconsistent-mutability-of-returned-objects-vcondialog-vs-vconparties branch September 18, 2025 21:32
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.

Inconsistent Mutability of Returned Objects: vcon.dialog vs vcon.parties

2 participants