File tree Expand file tree Collapse file tree 2 files changed +3
-23
lines changed
docs/02_guides/code/_scrapy_project/.actor Expand file tree Collapse file tree 2 files changed +3
-23
lines changed Original file line number Diff line number Diff line change 1
- FROM apify/actor-python:3.12
1
+ FROM apify/actor-python:3.13
2
2
3
- COPY pyproject.toml ./
3
+ COPY requirements.txt ./
4
4
5
- RUN echo "Python version:" \
6
- && python --version \
7
- && echo "Pip version:" \
8
- && pip --version \
9
- && echo "Installing Poetry:" \
10
- && pip install --no-cache-dir poetry~=1.8.0 \
11
- && echo "Installing dependencies:" \
12
- && poetry config virtualenvs.create false \
13
- && poetry install --only main --no-interaction --no-ansi \
14
- && rm -rf /tmp/.poetry-cache \
15
- && echo "All installed Python packages:" \
5
+ RUN pip install --no-cache-dir --requirement requirements.txt \
16
6
&& pip freeze
17
7
18
8
COPY . ./
Original file line number Diff line number Diff line change 35
35
from apify .log import _configure_logging , logger
36
36
from apify .storages import Dataset , KeyValueStore , RequestQueue
37
37
38
- try :
39
- import scrapy # noqa: F401
40
-
41
- scrapy_installed = True
42
- except ImportError :
43
- scrapy_installed = False
44
-
45
38
if TYPE_CHECKING :
46
39
import logging
47
40
from types import TracebackType
@@ -277,9 +270,6 @@ async def finalize() -> None:
277
270
self .log .debug (f'Not calling sys.exit({ exit_code } ) because Actor is running in IPython' )
278
271
elif os .getenv ('PYTEST_CURRENT_TEST' , default = False ): # noqa: PLW1508
279
272
self .log .debug (f'Not calling sys.exit({ exit_code } ) because Actor is running in an unit test' )
280
- elif scrapy_installed :
281
- self .log .debug (f'Not calling sys.exit({ exit_code } ) because Actor is running with Scrapy' )
282
- # Otherwise, it will just freeze.
283
273
else :
284
274
sys .exit (exit_code )
285
275
You can’t perform that action at this time.
0 commit comments