You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: strict PEP 440 version parsing, update docs and schema description
Address review feedback: remove InvalidVersion fallback that created
mixed str/Version types causing TypeError in comparisons. Instead,
non-PEP 440 versions (e.g. 1.0.0-0.3.7) are rejected explicitly.
- Revert fallback in PackageVersion.__init__ to strict Version() parsing
- Add test verifying non-PEP 440 forms are rejected
- Update schema description from semver reference to PEP 440
- Update docs/config.md and test docs to reference PEP 440
- Update API docs from semver.VersionInfo to packaging.version.Version
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/config.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The `aea-config.yaml` defines the AEA project. The compulsory components are lis
14
14
``` yaml
15
15
agent_name: my_agent # Name of the AEA project (must satisfy PACKAGE_REGEX)
16
16
author: fetchai # Author handle of the project's author (must satisfy AUTHOR_REGEX)
17
-
version: 0.1.0 # Version of the AEA project (a semantic version number, see https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string")
17
+
version: 0.1.0 # Version of the AEA project (a version in MAJOR.MINOR.PATCH format, see PEP 440)
18
18
description: A demo project # Description of the AEA project
19
19
license: Apache-2.0 # License of the AEA project
20
20
aea_version: '>=2.0.0, <3.0.0' # AEA framework version(s) compatible with the AEA project (a version number that matches PEP 440 version schemes, or a comma-separated list of PEP 440 version specifiers, see https://www.python.org/dev/peps/pep-0440/#version-specifiers)
@@ -91,7 +91,7 @@ The `connection.yaml`, which is present in each connection package, has the foll
91
91
``` yaml
92
92
name: scaffold # Name of the package (must satisfy PACKAGE_REGEX)
93
93
author: fetchai # Author handle of the package's author (must satisfy AUTHOR_REGEX)
94
-
version: 0.1.0 # Version of the package (a semantic version number, see https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string")
94
+
version: 0.1.0 # Version of the package (a version in MAJOR.MINOR.PATCH format, see PEP 440)
95
95
type: connection # The type of the package; for connections, it must be "connection"
96
96
description: A scaffold connection # Description of the package
97
97
license: Apache-2.0 # License of the package
@@ -117,7 +117,7 @@ The `contract.yaml`, which is present in each contract package, has the followin
117
117
``` yaml
118
118
name: scaffold # Name of the package (must satisfy PACKAGE_REGEX)
119
119
author: fetchai # Author handle of the package's author (must satisfy AUTHOR_REGEX)
120
-
version: 0.1.0 # Version of the package (a semantic version number, see https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string")
120
+
version: 0.1.0 # Version of the package (a version in MAJOR.MINOR.PATCH format, see PEP 440)
121
121
type: contract # The type of the package; for contracts, it must be "contract"
122
122
description: A scaffold contract # Description of the package
123
123
license: Apache-2.0 # License of the package
@@ -139,7 +139,7 @@ The `protocol.yaml`, which is present in each protocol package, has the followin
139
139
```yaml
140
140
name: scaffold # Name of the package (must satisfy PACKAGE_REGEX)
141
141
author: fetchai # Author handle of the package's author (must satisfy AUTHOR_REGEX)
142
-
version: 0.1.0 # Version of the package (a semantic version number, see https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string")
142
+
version: 0.1.0 # Version of the package (a version in MAJOR.MINOR.PATCH format, see PEP 440)
143
143
type: protocol # The type of the package; for protocols, it must be "protocol"
144
144
description: A scaffold protocol # Description of the package
145
145
license: Apache-2.0 # License of the package
@@ -158,7 +158,7 @@ The `skill.yaml`, which is present in each protocol package, has the following r
158
158
``` yaml
159
159
name: scaffold # Name of the package (must satisfy PACKAGE_REGEX)
160
160
author: fetchai # Author handle of the package's author (must satisfy AUTHOR_REGEX)
161
-
version: 0.1.0 # Version of the package (a semantic version number, see https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string")
161
+
version: 0.1.0 # Version of the package (a version in MAJOR.MINOR.PATCH format, see PEP 440)
162
162
type: skill # The type of the package; for skills, it must be "skill"
163
163
description: A scaffold skill # Description of the package
agent_name: my_agent # Name of the AEA project (must satisfy PACKAGE_REGEX)
9
9
author: fetchai # Author handle of the project's author (must satisfy AUTHOR_REGEX)
10
-
version: 0.1.0 # Version of the AEA project (a semantic version number, see https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string")
10
+
version: 0.1.0 # Version of the AEA project (a version in MAJOR.MINOR.PATCH format, see PEP 440)
11
11
description: A demo project # Description of the AEA project
12
12
license: Apache-2.0 # License of the AEA project
13
13
aea_version: '>=2.0.0, <3.0.0'# AEA framework version(s) compatible with the AEA project (a version number that matches PEP 440 version schemes, or a comma-separated list of PEP 440 version specifiers, see https://www.python.org/dev/peps/pep-0440/#version-specifiers)
@@ -71,7 +71,7 @@ models: # override configurations for mo
71
71
```yaml
72
72
name: scaffold # Name of the package (must satisfy PACKAGE_REGEX)
73
73
author: fetchai # Author handle of the package's author (must satisfy AUTHOR_REGEX)
74
-
version: 0.1.0 # Version of the package (a semantic version number, see https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string")
74
+
version: 0.1.0 # Version of the package (a version in MAJOR.MINOR.PATCH format, see PEP 440)
75
75
type: connection # The type of the package; for connections, it must be "connection"
76
76
description: A scaffold connection # Description of the package
77
77
license: Apache-2.0 # License of the package
@@ -93,7 +93,7 @@ is_abstract: false # An optional boolean that if `t
93
93
```yaml
94
94
name: scaffold # Name of the package (must satisfy PACKAGE_REGEX)
95
95
author: fetchai # Author handle of the package's author (must satisfy AUTHOR_REGEX)
96
-
version: 0.1.0 # Version of the package (a semantic version number, see https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string")
96
+
version: 0.1.0 # Version of the package (a version in MAJOR.MINOR.PATCH format, see PEP 440)
97
97
type: contract # The type of the package; for contracts, it must be "contract"
98
98
description: A scaffold contract # Description of the package
99
99
license: Apache-2.0 # License of the package
@@ -111,7 +111,7 @@ dependencies: {} # The python dependencies the pa
111
111
```yaml
112
112
name: scaffold # Name of the package (must satisfy PACKAGE_REGEX)
113
113
author: fetchai # Author handle of the package's author (must satisfy AUTHOR_REGEX)
114
-
version: 0.1.0 # Version of the package (a semantic version number, see https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string")
114
+
version: 0.1.0 # Version of the package (a version in MAJOR.MINOR.PATCH format, see PEP 440)
115
115
type: protocol # The type of the package; for protocols, it must be "protocol"
116
116
description: A scaffold protocol # Description of the package
117
117
license: Apache-2.0 # License of the package
@@ -126,7 +126,7 @@ dependencies: {} # The python dependencies the pa
126
126
```yaml
127
127
name: scaffold # Name of the package (must satisfy PACKAGE_REGEX)
128
128
author: fetchai # Author handle of the package's author (must satisfy AUTHOR_REGEX)
129
-
version: 0.1.0 # Version of the package (a semantic version number, see https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string")
129
+
version: 0.1.0 # Version of the package (a version in MAJOR.MINOR.PATCH format, see PEP 440)
130
130
type: skill # The type of the package; for skills, it must be "skill"
131
131
description: A scaffold skill # Description of the package
0 commit comments