From c4f5651199b03b4fcb181e8edafe72542a0bd67a Mon Sep 17 00:00:00 2001 From: UncleCode Date: Wed, 23 Apr 2025 16:35:15 +0800 Subject: [PATCH] chore(deps): upgrade to Python 3.12 and prepare for 0.6.0 release - Update Docker base image to Python 3.12-slim-bookworm - Bump version from 0.6.0rc1 to 0.6.0 - Update documentation to reflect release version changes - Fix license specification in pyproject.toml and setup.py - Clean up code formatting in demo_docker_api.py BREAKING CHANGE: Base Python version upgraded from 3.10 to 3.12 --- Dockerfile | 7 +++++-- README.md | 4 ++-- crawl4ai/__version__.py | 2 +- deploy/docker/README.md | 8 ++++---- docs/examples/docker/demo_docker_api.py | 3 --- pyproject.toml | 3 +-- setup.py | 3 +-- 7 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7ea648f9..1a89800c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10-slim +FROM python:3.12-slim-bookworm AS build # C4ai version ARG C4AI_VER=0.6.0 @@ -22,7 +22,7 @@ ENV PYTHONFAULTHANDLER=1 \ REDIS_HOST=localhost \ REDIS_PORT=6379 -ARG PYTHON_VERSION=3.10 +ARG PYTHON_VERSION=3.12 ARG INSTALL_TYPE=default ARG ENABLE_GPU=false ARG TARGETARCH @@ -71,6 +71,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get dist-upgrade -y \ + && rm -rf /var/lib/apt/lists/* + RUN if [ "$ENABLE_GPU" = "true" ] && [ "$TARGETARCH" = "amd64" ] ; then \ apt-get update && apt-get install -y --no-install-recommends \ nvidia-cuda-toolkit \ diff --git a/README.md b/README.md index 92628a5e..69a66d7a 100644 --- a/README.md +++ b/README.md @@ -269,8 +269,8 @@ The new Docker implementation includes: ```bash # Pull and run the latest release candidate -docker pull unclecode/crawl4ai:0.6.0rc1-r1 -docker run -d -p 11235:11235 --name crawl4ai --shm-size=1g unclecode/crawl4ai:0.6.0rc1-r1 +docker pull unclecode/crawl4ai:0.6.0-rN # Use your favorite revision number +docker run -d -p 11235:11235 --name crawl4ai --shm-size=1g unclecode/crawl4ai:0.6.0-rN # Use your favorite revision number # Visit the playground at http://localhost:11235/playground ``` diff --git a/crawl4ai/__version__.py b/crawl4ai/__version__.py index 06e10ed9..ee78de23 100644 --- a/crawl4ai/__version__.py +++ b/crawl4ai/__version__.py @@ -1,3 +1,3 @@ # crawl4ai/_version.py -__version__ = "0.6.0rc1" +__version__ = "0.6.0" diff --git a/deploy/docker/README.md b/deploy/docker/README.md index 1deebd50..9e81a818 100644 --- a/deploy/docker/README.md +++ b/deploy/docker/README.md @@ -62,7 +62,7 @@ Our latest release candidate is `0.6.0rc1-r1`. Images are built with multi-arch ```bash # Pull the release candidate (recommended for latest features) -docker pull unclecode/crawl4ai:0.6.0rc1-r1 +docker pull unclecode/crawl4ai:0.6.0-rN # Use your favorite revision number # Or pull the latest stable version docker pull unclecode/crawl4ai:latest @@ -99,7 +99,7 @@ EOL -p 11235:11235 \ --name crawl4ai \ --shm-size=1g \ - unclecode/crawl4ai:0.6.0rc1-r1 + unclecode/crawl4ai:0.6.0-rN # Use your favorite revision number ``` * **With LLM support:** @@ -110,7 +110,7 @@ EOL --name crawl4ai \ --env-file .llm.env \ --shm-size=1g \ - unclecode/crawl4ai:0.6.0rc1-r1 + unclecode/crawl4ai:0.6.0-rN # Use your favorite revision number ``` > The server will be available at `http://localhost:11235`. Visit `/playground` to access the interactive testing interface. @@ -160,7 +160,7 @@ The `docker-compose.yml` file in the project root provides a simplified approach ```bash # Pulls and runs the release candidate from Docker Hub # Automatically selects the correct architecture - IMAGE=unclecode/crawl4ai:0.6.0rc1-r1 docker compose up -d + IMAGE=unclecode/crawl4ai:0.6.0-rN # Use your favorite revision number docker compose up -d ``` * **Build and Run Locally:** diff --git a/docs/examples/docker/demo_docker_api.py b/docs/examples/docker/demo_docker_api.py index 77f3bf42..09625248 100644 --- a/docs/examples/docker/demo_docker_api.py +++ b/docs/examples/docker/demo_docker_api.py @@ -398,7 +398,6 @@ async def demo_param_js_execution(client: httpx.AsyncClient): elif results: console.print("[yellow]JS Execution Result not found in response.[/]") - async def demo_param_screenshot(client: httpx.AsyncClient): payload = { "urls": [SIMPLE_URL], @@ -430,8 +429,6 @@ async def demo_param_ssl_fetch(client: httpx.AsyncClient): elif results: console.print("[yellow]SSL Certificate data not found in response.[/]") - - async def demo_param_proxy(client: httpx.AsyncClient): proxy_params_list = load_proxies_from_env() # Get the list of parameter dicts if not proxy_params_list: diff --git a/pyproject.toml b/pyproject.toml index cffef4de..be44397e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ dynamic = ["version"] description = "🚀🤖 Crawl4AI: Open-source LLM Friendly Web Crawler & scraper" readme = "README.md" requires-python = ">=3.9" -license = {text = "Apache-2.0"} +license = "Apache-2.0" authors = [ {name = "Unclecode", email = "unclecode@kidocode.com"} ] @@ -48,7 +48,6 @@ dependencies = [ classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", diff --git a/setup.py b/setup.py index 16b1b53c..a0b91041 100644 --- a/setup.py +++ b/setup.py @@ -49,13 +49,12 @@ setup( url="https://github.com/unclecode/crawl4ai", author="Unclecode", author_email="unclecode@kidocode.com", - license="MIT", + license="Apache-2.0", packages=find_packages(), package_data={"crawl4ai": ["js_snippet/*.js"]}, classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10",