Skip to content

Commit c212fb8

Browse files
authored
Bump version to 1.1.2 (#102)
Closes #98
1 parent 192acad commit c212fb8

File tree

6 files changed

+51
-3
lines changed

6 files changed

+51
-3
lines changed

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ filename =
44
./scripts/*.py,
55
./src/*.py,
66
./tests/*.py
7+
# Todo: remove "src/apify/consts.py: F401" once consts from apify-shared are not being reexported
78
per-file-ignores =
89
docs/*: D
910
scripts/*: D
1011
tests/*: D
12+
src/apify/consts.py: F401
1113

1214
# Google docstring convention + D204 & D401
1315
docstring-convention = all

.isort.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ line_length = 150
44
use_parentheses = True
55
multi_line_output = 3
66
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
7-
known_first_party = apify,apify_client, apify_shared
7+
known_first_party = apify,apify_client,apify_shared

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
=========
33

4+
[1.1.2](../../releases/tag/v1.1.2) - 2023-08-01
5+
-----------------------------------------------
6+
7+
### Internal changes
8+
9+
- Import general constants and utilities from [apify-shared](https://github.com/apify/apify-shared-python/) library
10+
411
[1.1.1](../../releases/tag/v1.1.1) - 2023-05-23
512
-----------------------------------------------
613

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "apify"
3-
version = "1.1.1"
3+
version = "1.1.2"
44
description = "Apify SDK for Python"
55
readme = "README.md"
66
license = {text = "Apache Software License"}

src/apify/consts.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
import re
2+
import warnings
23
from enum import Enum
4+
from typing import Any
5+
6+
from apify_shared.consts import BOOL_ENV_VARS as _BOOL_ENV_VARS
7+
from apify_shared.consts import DATETIME_ENV_VARS as _DATETIME_ENV_VARS
8+
from apify_shared.consts import FLOAT_ENV_VARS as _FLOAT_ENV_VARS
9+
from apify_shared.consts import INTEGER_ENV_VARS as _INTEGER_ENV_VARS
10+
from apify_shared.consts import STRING_ENV_VARS as _STRING_ENV_VARS
11+
from apify_shared.consts import ActorEventTypes as _ActorEventTypes
12+
from apify_shared.consts import ActorExitCodes as _ActorExitCodes
13+
from apify_shared.consts import ApifyEnvVars as _ApifyEnvVars
14+
15+
DEPRECATED_NAMES = [
16+
'BOOL_ENV_VARS',
17+
'DATETIME_ENV_VARS',
18+
'FLOAT_ENV_VARS',
19+
'INTEGER_ENV_VARS',
20+
'STRING_ENV_VARS',
21+
'ActorEventTypes',
22+
'ActorExitCodes',
23+
'ApifyEnvVars',
24+
]
25+
26+
27+
# The following piece of code is highly inspired by the example in https://peps.python.org/pep-0562.
28+
# The else branch is missing intentionally! Check the following discussion for details:
29+
# https://github.com/apify/apify-client-python/pull/132#discussion_r1277294315.
30+
def __getattr__(name: str) -> Any:
31+
if name in DEPRECATED_NAMES:
32+
warnings.warn(
33+
(
34+
f'Importing "{name}" from "apify_client.consts" is deprecated and will be removed in the future. '
35+
'Please use "apify_shared" library instead.'
36+
),
37+
category=DeprecationWarning,
38+
stacklevel=2,
39+
)
40+
return globals()[f'_{name}']
41+
raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
342

443

544
class _StorageTypes(str, Enum):

tests/integration/test_actor_api_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class TestActorAbort:
235235
async def test_actor_abort(self, make_actor: ActorFactory) -> None:
236236
async def main_inner() -> None:
237237
async with Actor:
238-
await asyncio.sleep(60)
238+
await asyncio.sleep(120)
239239
# This should not be set, the actor should be aborted by now
240240
await Actor.set_value('OUTPUT', 'dummy')
241241

0 commit comments

Comments
 (0)