@@ -4,7 +4,85 @@ Release notes
44Version (next)
55------------------------------
66
7+ TBD.
8+
9+ Version 31.0.0 - (2022-05-16)
10+ ------------------------------
11+
12+ This is a major version with API-breaking changes in the resource module.
13+
14+ - The Resource has no rid (resource id) and no pid (parent id). Instead
15+ we now use internally a simpler mapping of {path: Resource} object.
16+ As a result the iteration on a Codebase is faster but this requires more
17+ memory.
18+
19+ - The Codebase and VirtualCodebase accepts a new "paths" argument that is list
20+ of paths. When provided, the Codebase will only contain Resources with these
21+ paths and no other resources. This handy to create a Codebase with only a
22+ subset of paths of interest. When we create a Codebase or VirtualCodebase
23+ with paths, we also always create any intermediate directories. So if you
24+ ask for a path of "root/dir/file", we create three resources: "root",
25+ "root/dir" and "root/dir/file". We accumulate codebase errors if the paths
26+ does not exists in the Codebase or VirtualCodebase. The paths must start with
27+ the root path segment and must be POSIX paths.
28+
29+ - When you create a VirtualCodebase with multiple scans, we now prefix each
30+ scan path with a codebase-1/, codebase-2/, etc. directory in addition to the
31+ "virtual_root" shared root directory. Otherwise files data was overwritten
32+ and inconsistent when each location "files" were sharing leading path
33+ segments. So if you provide to JSON inputs with that each contain the path
34+ "root/dir/file", the VirtualCodebase will contain these paths:
35+
36+ - "virtual_root/codebase-1/root/dir/file"
37+ - "virtual_root/codebase-2/root/dir/file"
38+
39+ It is otherwise practically impossible to correctly merge file data from
40+ multiple codebases reliably, so adding this prefix ensures that we are doing
41+ the right thing
42+
43+ - The Resource.path now never contains leading or trailing slash. We also
44+ normalize the path everywhere. In particular this behaviour is visible when
45+ you create a Codebase with a "full_root" argument. Previously, the paths of a
46+ "full_root" Codebase were prefixed with a slash "/".
47+
48+ - When you create a VirtualCodebase with more than one Resource, we now recreate
49+ the directory tree for any intermediary directory used in a path that is
50+ otherwise missing from files path list.
51+ In particular this behaviour changed when you create a VirtualCodebase from
52+ a previous Codebase created with a "full_root" argument. Previously, the
53+ missing paths of a "full_root" Codebase were kept unchanged.
54+ Note that the VirtualCodebase has always ignored the "full_root" argument.
55+
56+ - The Codebase and VirtualCodebase are now iterable. Iterating on a codebase
57+ is the same as a top-down walk.
58+
59+ - The "Codebase.original_location" attributed has been removed.
60+ No known users of commoncode used this.
61+
62+ - The Codebase and VirtualCodebase no longer have a "full_root" and
63+ "strip_root" constructor arguments and attributes. These can still be
64+ passed but they will be ignored.
65+
66+ - Resource.path is now always the plain path where the first segment
67+ is the last segment of the root location, e.g. the root fiename.
68+
69+ - The Resource now has new "full_root_path" and "strip_root_path"
70+ properties that return the corresponding paths.
71+
72+ - The Resource.to_dict and the new Codebase.to_list both have a new
73+ "full_root" and "strip_root" arguments
74+
75+ - The Resource.get_path() method accepts "full_root" and "strip_root" arguments.
76+
77+ - The Resource.create_child() method has been removed.
78+
79+ Other changes:
80+
781- Remove Python upper version limit.
82+ - Merge latest skeleton
83+ - fileutils.parent_directory() now accepts a "with_trail" argument.
84+ The returned directory has a trailing path separator unless with_trail is False.
85+ The default is True and the default behaviour is unchanged.
886
987
1088Version 30.2.0 - (2022-05-02)
@@ -39,7 +117,7 @@ Version 30.1.0 (2022-04-05)
39117Version 30.0.0 (2021-09-24)
40118------------------------------
41119
42- - Switch back from clamver to semver.
120+ - Switch back from calver to semver.
43121- Adopt latest skeleton. The default virtualenv directory is now venv and no
44122 longer tmp
45123- Fix issue with Click progressbar API #23 that prohibited to use all supported
0 commit comments