|
24 | 24 | from readthedocs.doc_builder.python_environments import Conda, Virtualenv
|
25 | 25 | from readthedocs.projects.constants import BUILD_COMMANDS_OUTPUT_PATH_HTML
|
26 | 26 | from readthedocs.projects.exceptions import RepositoryError
|
27 |
| -from readthedocs.projects.models import Feature |
28 | 27 | from readthedocs.projects.signals import after_build, before_build, before_vcs
|
29 | 28 | from readthedocs.storage import build_tools_storage
|
30 | 29 |
|
@@ -250,16 +249,24 @@ def checkout(self):
|
250 | 249 | self.data.build["config"] = self.data.config.as_dict()
|
251 | 250 | self.data.build["readthedocs_yaml_path"] = custom_config_file
|
252 | 251 |
|
| 252 | + now = timezone.now() |
| 253 | + |
| 254 | + # fmt: off |
| 255 | + # These browndates matches https://blog.readthedocs.com/use-build-os-config/ |
| 256 | + browndates = any([ |
| 257 | + timezone.datetime(2023, 7, 14, 0, 0, 0, tzinfo=timezone.utc) < now < timezone.datetime(2023, 7, 14, 12, 0, 0, tzinfo=timezone.utc), # First, 12hs |
| 258 | + timezone.datetime(2023, 8, 14, 0, 0, 0, tzinfo=timezone.utc) < now < timezone.datetime(2023, 8, 15, 0, 0, 0, tzinfo=timezone.utc), # Second, 24hs |
| 259 | + timezone.datetime(2023, 9, 4, 0, 0, 0, tzinfo=timezone.utc) < now < timezone.datetime(2023, 9, 6, 0, 0, 0, tzinfo=timezone.utc), # Third, 24hs |
| 260 | + timezone.datetime(2023, 9, 25, 0, 0, 0, tzinfo=timezone.utc) < now, # Fully removal |
| 261 | + ]) |
| 262 | + # fmt: on |
| 263 | + |
253 | 264 | # Raise a build error if the project is not using a config file or using v1
|
254 |
| - if self.data.project.has_feature( |
255 |
| - Feature.NO_CONFIG_FILE_DEPRECATED |
256 |
| - ) and self.data.config.version not in ("2", 2): |
| 265 | + if browndates and self.data.config.version not in ("2", 2): |
257 | 266 | raise BuildUserError(BuildUserError.NO_CONFIG_FILE_DEPRECATED)
|
258 | 267 |
|
259 | 268 | # Raise a build error if the project is using "build.image" on their config file
|
260 | 269 |
|
261 |
| - now = timezone.now() |
262 |
| - |
263 | 270 | # fmt: off
|
264 | 271 | # These browndates matches https://blog.readthedocs.com/use-build-os-config/
|
265 | 272 | browndates = any([
|
|
0 commit comments