Signed-off-by: András Schmelczer <andras@schmelczer.dev>
This commit is contained in:
Andras Schmelczer 2022-04-10 14:48:07 +02:00
parent 0dd48dca60
commit baad19f682
6 changed files with 6 additions and 6 deletions

0
example/main_batch.py Normal file → Executable file
View file

View file

@ -41,7 +41,7 @@ def set_default_config(
_set_seed(seed)
if not persistence_driver.is_threadsafe:
logger.warn(
logger.warning(
f"The selected persistence driver ({type(persistence_driver).__name__}) is not threadsafe"
)
_context = Context(
@ -61,7 +61,7 @@ def _is_in_production_mode(override: Optional[bool], logger: Logger) -> bool:
if is_production:
logger.info("Running in production mode ✅")
else:
logger.warn("Running in development mode ‼️")
logger.warning("Running in development mode ‼️")
return is_production

View file

@ -20,6 +20,6 @@ def process_batch(
if not get_context().persistence.is_threadsafe:
concurrency = 1
get_context().logger.warn("Concurrency is ignored")
get_context().logger.warning("Concurrency is ignored")
return parallel_map(inner, batch, concurrency=concurrency)

View file

@ -14,7 +14,7 @@ if __name__ == "__main__":
LargeFile.configure_credentials_from_file(args.secrets)
if not args.cache and not args.push and not args.delete:
logger.warn("No action required.")
logger.warning("No action required.")
parser.print_help()
try:
if args.cache:

View file

@ -317,7 +317,7 @@ class LargeFile:
if self._version is None:
self._version = self.version_ids[-1]
logger.info(f"Lastest version of {self._local_name} is {self._version}")
logger.info(f"Latest version of {self._name} is {self._version}")
elif self._version not in self.version_ids:
raise FileNotFoundError(

View file

@ -32,7 +32,7 @@ def parallel_map(
)
if concurrency == 1 or len(values) <= chunk_size:
logger.warn(f"Running in series, there is no reason for parallelism")
logger.warning(f"Running in series, there is no reason for parallelism")
iterable = values if disable_progress else tqdm(values)
return [function(v) for v in iterable]