|
84 | 84 | level = "unstable"
|
85 | 85 | elif "[stable(" in line:
|
86 | 86 | level = "stable"
|
87 |
| - elif "[deprecated(" in line: |
88 |
| - level = "deprecated" |
89 | 87 | else:
|
90 | 88 | continue
|
91 | 89 |
|
|
94 | 92 | # the same line, e.g.
|
95 | 93 | # `#[unstable(feature = "foo", since = "1.0.0")]`
|
96 | 94 |
|
97 |
| - p = re.compile('(unstable|stable|deprecated).*feature *= *"(\w*)"') |
| 95 | + p = re.compile('(unstable|stable).*feature *= *"(\w*)"') |
98 | 96 | m = p.search(line)
|
99 | 97 | if not m is None:
|
100 | 98 | feature_name = m.group(2)
|
101 | 99 | since = None
|
102 |
| - if "stable" in line or "deprecated" in line: |
| 100 | + if "stable" in line: |
103 | 101 | pp = re.compile('since *= *"([\w\.]*)"')
|
104 | 102 | mm = pp.search(line)
|
105 | 103 | since = m.group(1)
|
|
135 | 133 | errors = True
|
136 | 134 |
|
137 | 135 | # Merge data about both lists
|
138 |
| -# name, lang, lib, status, stable since, partially deprecated |
| 136 | +# name, lang, lib, status, stable since |
139 | 137 |
|
140 | 138 | language_feature_stats = {}
|
141 | 139 |
|
|
145 | 143 | lib = False
|
146 | 144 | status = "unstable"
|
147 | 145 | stable_since = None
|
148 |
| - partially_deprecated = False |
149 | 146 |
|
150 | 147 | if f[2] == "Accepted":
|
151 | 148 | status = "stable"
|
152 | 149 | if status == "stable":
|
153 | 150 | stable_since = f[1]
|
154 | 151 |
|
155 |
| - language_feature_stats[name] = (name, lang, lib, status, stable_since, \ |
156 |
| - partially_deprecated) |
| 152 | + language_feature_stats[name] = (name, lang, lib, status, stable_since) |
157 | 153 |
|
158 | 154 | lib_feature_stats = {}
|
159 | 155 |
|
|
163 | 159 | lib = True
|
164 | 160 | status = "unstable"
|
165 | 161 | stable_since = None
|
166 |
| - partially_deprecated = False |
167 | 162 |
|
168 | 163 | is_stable = lib_features_and_level.get((name, "stable")) is not None
|
169 | 164 | is_unstable = lib_features_and_level.get((name, "unstable")) is not None
|
170 |
| - is_deprecated = lib_features_and_level.get((name, "deprecated")) is not None |
171 | 165 |
|
172 | 166 | if is_stable and is_unstable:
|
173 | 167 | print "error: feature '" + name + "' is both stable and unstable"
|
|
179 | 173 | elif is_unstable:
|
180 | 174 | status = "unstable"
|
181 | 175 | stable_since = lib_features_and_level[(name, "unstable")][0]
|
182 |
| - elif is_deprecated: |
183 |
| - status = "deprecated" |
184 | 176 |
|
185 |
| - if (is_stable or is_unstable) and is_deprecated: |
186 |
| - partially_deprecated = True |
187 |
| - |
188 |
| - lib_feature_stats[name] = (name, lang, lib, status, stable_since, \ |
189 |
| - partially_deprecated) |
| 177 | + lib_feature_stats[name] = (name, lang, lib, status, stable_since) |
190 | 178 |
|
191 | 179 | # Check for overlap in two sets
|
192 | 180 | merged_stats = { }
|
|
200 | 188 | lib_status = lib_feature_stats[name][3]
|
201 | 189 | lang_stable_since = lang_feature_stats[name][4]
|
202 | 190 | lib_stable_since = lib_feature_stats[name][4]
|
203 |
| - lang_partially_deprecated = lang_feature_stats[name][5] |
204 |
| - lib_partially_deprecated = lib_feature_stats[name][5] |
205 | 191 |
|
206 | 192 | if lang_status != lib_status and lib_status != "deprecated":
|
207 | 193 | print "error: feature '" + name + "' has lang status " + lang_status + \
|
208 | 194 | " but lib status " + lib_status
|
209 | 195 | errors = True
|
210 | 196 |
|
211 |
| - partially_deprecated = lang_partially_deprecated or lib_partially_deprecated |
212 |
| - if lib_status == "deprecated" and lang_status != "deprecated": |
213 |
| - partially_deprecated = True |
214 |
| - |
215 | 197 | if lang_stable_since != lib_stable_since:
|
216 | 198 | print "error: feature '" + name + "' has lang stable since " + lang_stable_since + \
|
217 | 199 | " but lib stable since " + lib_stable_since
|
218 | 200 | errors = True
|
219 | 201 |
|
220 |
| - merged_stats[name] = (name, True, True, lang_status, lang_stable_since, \ |
221 |
| - partially_deprecated) |
| 202 | + merged_stats[name] = (name, True, True, lang_status, lang_stable_since) |
222 | 203 |
|
223 | 204 | del language_feature_stats[name]
|
224 | 205 | del lib_feature_stats[name]
|
|
244 | 225 | "{: <8}".format(type_) + \
|
245 | 226 | "{: <12}".format(s[3]) + \
|
246 | 227 | "{: <8}".format(str(s[4]))
|
247 |
| - if s[5]: |
248 |
| - line += "(partially deprecated)" |
249 | 228 | lines += [line]
|
250 | 229 |
|
251 | 230 | lines.sort()
|
|
0 commit comments