Skip to content

Commit ca6bab4

Browse files
authored
Merge pull request #59 from vcon-dev/58-remove-version-management-and-enforcement
58 remove version management and enforcement
2 parents a9c8066 + d9db1e8 commit ca6bab4

19 files changed

+464
-4620
lines changed

API_REFERENCE.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# vCon Library API Reference
22

3-
Complete API documentation for the vCon library - a Python implementation of the vCon 0.3.0 specification for Virtual Conversation objects.
3+
Complete API documentation for the vCon library - a Python implementation of the latest vCon specification for Virtual Conversation objects.
44

55
## Table of Contents
66

@@ -18,7 +18,7 @@ Complete API documentation for the vCon library - a Python implementation of the
1818

1919
## Overview
2020

21-
The vCon library provides a complete Python implementation of the vCon 0.3.0 specification for representing virtual conversations. It supports all features including parties, dialogs, attachments, analysis, digital signatures, and extensibility.
21+
The vCon library provides a complete Python implementation of the latest vCon specification for representing virtual conversations. It supports all features including parties, dialogs, attachments, analysis, digital signatures, and extensibility.
2222

2323
## Installation
2424

@@ -40,7 +40,7 @@ The main class for working with vCon objects.
4040
#### Constructor
4141

4242
```python
43-
Vcon(vcon_dict: Dict[str, Any] = None, property_handling: str = "default", strict_version: bool = False)
43+
Vcon(vcon_dict: Dict[str, Any] = None, property_handling: str = "default")
4444
```
4545

4646
**Parameters:**
@@ -49,7 +49,6 @@ Vcon(vcon_dict: Dict[str, Any] = None, property_handling: str = "default", stric
4949
- `"default"`: Keep non-standard properties (default)
5050
- `"strict"`: Remove non-standard properties
5151
- `"meta"`: Move non-standard properties to meta object
52-
- `strict_version` (bool): If True, reject vCons not at version "0.3.0". Defaults to False.
5352

5453
#### Class Methods
5554

@@ -60,14 +59,15 @@ Create a new vCon object with default values.
6059
vcon = Vcon.build_new()
6160
```
6261

63-
##### `build_from_json(json_str: str, property_handling: str = "default", strict_version: bool = False) -> Vcon`
62+
##### `build_from_json(json_str: str, property_handling: str = "default") -> Vcon`
6463
Create a vCon object from JSON string.
6564

6665
```python
67-
vcon = Vcon.build_from_json('{"uuid": "123", "vcon": "0.3.0"}')
66+
vcon = Vcon.build_from_json('{"uuid": "123", "created_at": "2024-01-01T00:00:00Z"}')
6867
```
6968

70-
##### `load(file_path_or_url: str, property_handling: str = "default", strict_version: bool = False) -> Vcon`
69+
##### `load(file_path_or_url: str, property_handling: str = "default") -> Vcon`
70+
7171
Load a vCon from file or URL.
7272

7373
```python
@@ -78,10 +78,11 @@ vcon = Vcon.load("conversation.vcon.json")
7878
vcon = Vcon.load("https://example.com/conversation.vcon.json")
7979
```
8080

81-
##### `load_from_file(file_path: str, property_handling: str = "default", strict_version: bool = False) -> Vcon`
81+
##### `load_from_file(file_path: str, property_handling: str = "default") -> Vcon`
8282
Load a vCon from a local file.
8383

84-
##### `load_from_url(url: str, property_handling: str = "default", strict_version: bool = False) -> Vcon`
84+
##### `load_from_url(url: str, property_handling: str = "default") -> Vcon`
85+
8586
Load a vCon from a URL.
8687

8788
##### `validate_file(file_path: str) -> Tuple[bool, List[str]]`
@@ -343,8 +344,8 @@ Set the update timestamp.
343344
##### `uuid -> str`
344345
Get the vCon UUID.
345346

346-
##### `vcon -> str`
347-
Get the vCon version.
347+
##### `vcon -> Optional[str]`
348+
Get the vCon version (optional field).
348349

349350
##### `subject -> Optional[str]`
350351
Get the vCon subject.

CHANGELOG.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,75 @@
11
# Changelog
22

3+
## [0.8.0] - 2025-01-26
4+
5+
### 🎉 Major Release: Version Management Simplification
6+
7+
This release aligns with the upcoming vCon draft specification by removing mandatory version management and enforcement, making the version field optional while maintaining full backward compatibility.
8+
9+
### ✨ Added
10+
11+
#### **Flexible Versioning**
12+
- **Optional Version Field**: The `vcon` field is now optional in vCon objects
13+
- **Version Preservation**: Existing vCons with version fields continue to work unchanged
14+
- **Simplified Creation**: New vCons can be created without version fields
15+
16+
### 🔄 Changed
17+
18+
#### **Version Management Simplification**
19+
- **Removed `strict_version` Parameter**: Eliminated from all Vcon methods (`__init__`, `build_from_json`, `build_new`, `load`, `load_from_file`, `load_from_url`)
20+
- **No Automatic Version Assignment**: vCon objects no longer automatically get a version field
21+
- **No Version Migration**: Removed automatic migration from older versions
22+
- **Updated Validation**: The `is_valid()` method no longer requires the version field
23+
24+
#### **Method Signatures Updated**
25+
- `Vcon(vcon_dict=None, property_handling="default")` - removed `strict_version` parameter
26+
- `build_from_json(json_str, property_handling="default")` - removed `strict_version` parameter
27+
- `build_new(created_at=None, property_handling="default")` - removed `strict_version` parameter
28+
- `load(source, property_handling="default")` - removed `strict_version` parameter
29+
- `load_from_file(file_path, property_handling="default")` - removed `strict_version` parameter
30+
- `load_from_url(url, property_handling="default")` - removed `strict_version` parameter
31+
32+
### 🧪 Testing
33+
34+
#### **Updated Test Suite**
35+
- **Replaced Version Migration Tests**: Updated tests to cover optional version field behavior
36+
- **New Test Cases**: Added comprehensive tests for versionless vCon creation and preservation
37+
- **Backward Compatibility Tests**: Ensured existing vCons with version fields continue to work
38+
39+
### 📄 Documentation
40+
41+
#### **Updated Documentation**
42+
- **README.md**: Updated to reflect version field being optional
43+
- **API_REFERENCE.md**: Removed `strict_version` parameter from all method signatures
44+
- **GUIDE.md**: Updated examples to show versionless vCon creation
45+
- **MIGRATION_GUIDE.md**: Added migration steps for version management changes
46+
47+
#### **Updated Sample Files**
48+
- **Removed Version Fields**: All sample vCon JSON files updated to demonstrate versionless vCons
49+
- **Backward Compatibility**: Existing vCons with version fields continue to work
50+
51+
### 🔧 Technical Details
52+
53+
#### **Implementation Changes**
54+
- **Removed Version Logic**: Eliminated version checking, migration, and enforcement code
55+
- **Simplified Initialization**: Streamlined vCon object creation process
56+
- **Preserved Functionality**: All other features remain unchanged
57+
58+
#### **Backward Compatibility**
59+
- **Existing vCons**: Continue to work without any changes
60+
- **Version Fields**: Preserved when present, not added when absent
61+
- **API Compatibility**: All other methods and properties remain unchanged
62+
63+
### 🎯 Benefits
64+
65+
1. **Enhanced Flexibility**: vCon objects can now exist without mandatory versioning
66+
2. **Simplified Implementation**: Reduced complexity in version management
67+
3. **Better Privacy Support**: Enables creation of redacted versions without version conflicts
68+
4. **Multiple Version Support**: Allows different versions of the same vCon to coexist
69+
5. **Specification Compliance**: Aligns with upcoming vCon draft specification
70+
71+
---
72+
373
## [0.7.0] - 2025-07-19
474

575
### 🎉 Major Release: Complete vCon 0.3.0 Specification Compliance

GUIDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ from vcon import Vcon
2424

2525
#### Properties
2626
- `uuid`: Unique identifier
27-
- `vcon`: Version number
27+
- `vcon`: Version number (optional)
2828
- `created_at`: Creation timestamp
2929
- `updated_at`: Last update timestamp
3030
- `parties`: List of participants
@@ -84,7 +84,7 @@ from vcon.dialog import Dialog
8484
vcon = Vcon.build_new()
8585

8686
# Create from dictionary
87-
vcon = Vcon({"uuid": "...", "vcon": "0.3.0"})
87+
vcon = Vcon({"uuid": "...", "created_at": "2024-01-01T00:00:00Z"})
8888

8989
# Create from JSON
9090
vcon = Vcon.build_from_json(json_string)
@@ -276,6 +276,6 @@ if not is_valid:
276276
is_valid, errors = Vcon.validate_file("path/to/vcon.json")
277277

278278
# Validate a vCon JSON string
279-
json_str = '{"uuid": "123", "vcon": "0.3.0", ...}'
279+
json_str = '{"uuid": "123", "created_at": "2024-01-01T00:00:00Z", ...}'
280280
is_valid, errors = Vcon.validate_json(json_str)
281281
```

MIGRATION_GUIDE.md

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1-
# Migration Guide: New Required Fields
1+
# Migration Guide: Version Management Changes
22

3-
This guide helps you migrate your existing vCon code to use the new required fields introduced in the latest version.
3+
This guide helps you migrate your existing vCon code to work with the updated version management system.
44

55
## Overview
66

7-
The vCon library now supports additional fields as specified in the IETF vCon specification. All new fields are **optional** and **backward compatible**, so existing code will continue to work without changes.
7+
The vCon library has been updated to align with the latest vCon specification changes. The most significant change is that the **version field is now optional** and version management has been simplified. All changes are **backward compatible**, so existing code will continue to work without changes.
8+
9+
## Key Changes
10+
11+
### Version Field is Now Optional
12+
- The `vcon` field is no longer required in vCon objects
13+
- No automatic version assignment or migration
14+
- Existing vCons with version fields continue to work unchanged
15+
- New vCons can be created without version fields
16+
17+
### Removed Version Management
18+
- Removed `strict_version` parameter from all methods
19+
- No more automatic version migration
20+
- No more version enforcement or validation
821

922
## What's New
1023

@@ -24,7 +37,42 @@ The vCon library now supports additional fields as specified in the IETF vCon sp
2437

2538
## Migration Steps
2639

27-
### Step 1: Add Extensions (Optional)
40+
### Step 1: Update Method Calls (Required if using strict_version)
41+
42+
If you were using the `strict_version` parameter, you need to remove it:
43+
44+
```python
45+
# Old code (will cause errors)
46+
vcon = Vcon.load("file.json", strict_version=True)
47+
vcon = Vcon.build_from_json(json_str, strict_version=True)
48+
vcon = Vcon(data, strict_version=True)
49+
50+
# New code (remove strict_version parameter)
51+
vcon = Vcon.load("file.json")
52+
vcon = Vcon.build_from_json(json_str)
53+
vcon = Vcon(data)
54+
```
55+
56+
### Step 2: Version Field Handling (Optional)
57+
58+
The version field is now optional. You can choose to:
59+
60+
**Option A: Remove version fields from new vCons**
61+
```python
62+
# Old code
63+
vcon = Vcon({"uuid": "123", "vcon": "0.3.0", "created_at": "2024-01-01T00:00:00Z"})
64+
65+
# New code (version field optional)
66+
vcon = Vcon({"uuid": "123", "created_at": "2024-01-01T00:00:00Z"})
67+
```
68+
69+
**Option B: Keep existing version fields**
70+
```python
71+
# This still works - no changes needed
72+
vcon = Vcon({"uuid": "123", "vcon": "0.3.0", "created_at": "2024-01-01T00:00:00Z"})
73+
```
74+
75+
### Step 3: Add Extensions (Optional)
2876

2977
If you want to declare extension capabilities:
3078

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A Python library for working with vCon (Virtual Conversation) objects according
44

55
## Overview
66

7-
The vCon library provides a complete implementation of the vCon format for representing conversations and related metadata. It supports all features defined in the vCon 0.3.0 specification including:
7+
The vCon library provides a complete implementation of the vCon format for representing conversations and related metadata. It supports all features defined in the latest vCon specification including:
88

99
- **Conversation Management**: Parties, dialogs, attachments, and analysis
1010
- **Contact Information**: Multiple contact methods (tel, email, SIP, DID)
@@ -14,15 +14,15 @@ The vCon library provides a complete implementation of the vCon format for repre
1414
- **Location Data**: Civic address information (GEOPRIV)
1515
- **Event Tracking**: Party history with join/drop/hold/mute events
1616

17-
## New in vCon 0.3.0
17+
## Key Features
1818

19-
This library implements the latest vCon specification (0.3.0) with the following new features:
19+
This library implements the latest vCon specification with the following features:
2020

2121
### Enhanced Party Information
2222
```python
2323
from vcon import Vcon, Party
2424

25-
# Create a party with new vCon 0.3.0 fields
25+
# Create a party with enhanced contact information
2626
party = Party(
2727
tel="+1234567890",
2828
name="John Doe",
@@ -158,9 +158,6 @@ vcon = Vcon.load("conversation.vcon.json")
158158

159159
# Load from URL
160160
vcon = Vcon.load("https://example.com/conversation.vcon.json")
161-
162-
# Load with strict version checking
163-
vcon = Vcon.load("conversation.vcon.json", strict_version=True)
164161
```
165162

166163
### Validation
@@ -288,7 +285,7 @@ vcon.add_analysis(
288285

289286
## Specification Compliance
290287

291-
This library implements the vCon 0.3.0 specification with:
288+
This library implements the latest vCon specification with:
292289

293290
- ✅ All required fields and validation
294291
- ✅ Proper media type support
@@ -297,6 +294,7 @@ This library implements the vCon 0.3.0 specification with:
297294
- ✅ Transfer dialog support
298295
- ✅ Content hashing and security
299296
- ✅ Extensions and must_support
297+
- ✅ Flexible versioning (version field is optional)
300298
- ✅ Backward compatibility
301299

302300
## Testing
@@ -307,12 +305,13 @@ Run the test suite:
307305
pytest tests/
308306
```
309307

310-
All 149 tests pass, covering:
308+
All tests pass, covering:
311309
- Basic functionality
312-
- New vCon 0.3.0 features
310+
- Enhanced vCon features
313311
- Validation and error handling
314312
- Media type support
315313
- Security features
314+
- Flexible versioning
316315
- Backward compatibility
317316

318317
## License

docs/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5-
<meta http-equiv="refresh" content="0; url=./vcon.html"/>
5+
<meta http-equiv="refresh" content="0; url=./build/html/index.html"/>
6+
<title>vCon Documentation - Redirecting...</title>
67
</head>
8+
<body>
9+
<p>Redirecting to the latest documentation...</p>
10+
<p>If you are not redirected automatically, <a href="./build/html/index.html">click here</a>.</p>
11+
</body>
712
</html>

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
copyright = "2024, Thomas McCarthy-Howe"
1616
author = "Thomas McCarthy-Howe"
1717

18-
version = "0.3.9"
19-
release = "0.3.9"
18+
version = "0.7.0"
19+
release = "0.7.0"
2020

2121
# -- General configuration ---------------------------------------------------
2222
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ vcon is a Python library for working with vCon (Video Conference) containers, wh
1515
installation
1616
usage
1717
new_required_fields
18+
version_management
1819
api/modules
1920

2021
Installation

docs/source/new_required_fields.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ The resulting JSON will include:
258258
259259
{
260260
"uuid": "...",
261-
"vcon": "0.3.0",
262261
"extensions": ["video"],
263262
"must_support": ["encryption"],
264263
"parties": [{

0 commit comments

Comments
 (0)