Skip to content

Commit ddb1539

Browse files
authored
Merge branch 'master' into rename-abcs
2 parents 0019778 + 4b7fe29 commit ddb1539

File tree

3 files changed

+5
-28
lines changed

3 files changed

+5
-28
lines changed

docs/upgrading/upgrading_to_v0x.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ This page summarizes the breaking changes between Crawlee for Python zero-based
99

1010
This section summarizes the breaking changes between v0.5.x and v0.6.0.
1111

12+
### Configuration
13+
14+
The `Configuration` fields `chrome_executable_path`, `xvfb`, and `verbose_log` have been removed. The `chrome_executable_path` and `xvfb` fields were unused, while `verbose_log` can be replaced by setting `log_level` to `DEBUG`.
15+
1216
### Abstract base classes
1317

1418
We decided to move away from [Hungarian notation](https://en.wikipedia.org/wiki/Hungarian_notation) and remove all the `Base` prefixes from the abstract classes. It includes the following public classes:

src/crawlee/_log_config.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
def get_configured_log_level() -> int:
3838
config = service_locator.get_configuration()
3939

40-
verbose_logging_requested = 'verbose_log' in config.model_fields_set and config.verbose_log
41-
4240
if 'log_level' in config.model_fields_set:
4341
if config.log_level == 'DEBUG':
4442
return logging.DEBUG
@@ -53,7 +51,7 @@ def get_configured_log_level() -> int:
5351

5452
assert_never(config.log_level)
5553

56-
if sys.flags.dev_mode or verbose_logging_requested:
54+
if sys.flags.dev_mode:
5755
return logging.DEBUG
5856

5957
return logging.INFO

src/crawlee/configuration.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ class Configuration(BaseSettings):
3232
internal_timeout: Annotated[timedelta | None, Field(alias='crawlee_internal_timeout')] = None
3333
"""Timeout for the internal asynchronous operations."""
3434

35-
verbose_log: Annotated[bool, Field(alias='crawlee_verbose_log')] = False
36-
"""Whether to enable verbose logging."""
37-
3835
default_browser_path: Annotated[
3936
str | None,
4037
Field(
@@ -244,17 +241,6 @@ class Configuration(BaseSettings):
244241
] = './storage'
245242
"""The path to the storage directory. This option is utilized by the `MemoryStorageClient`."""
246243

247-
chrome_executable_path: Annotated[
248-
str | None,
249-
Field(
250-
validation_alias=AliasChoices(
251-
'apify_chrome_executable_path',
252-
'crawlee_chrome_executable_path',
253-
)
254-
),
255-
] = None
256-
"""This setting is currently unused."""
257-
258244
headless: Annotated[
259245
bool,
260246
Field(
@@ -270,17 +256,6 @@ class Configuration(BaseSettings):
270256
https://playwright.dev/docs/api/class-browsertype#browser-type-launch.
271257
"""
272258

273-
xvfb: Annotated[
274-
bool,
275-
Field(
276-
validation_alias=AliasChoices(
277-
'apify_xvfb',
278-
'crawlee_xvfb',
279-
)
280-
),
281-
] = False
282-
"""This setting is currently unused."""
283-
284259
@classmethod
285260
def get_global_configuration(cls) -> Self:
286261
"""Retrieve the global instance of the configuration.

0 commit comments

Comments
 (0)