Skip to content

Commit 1c8d3f1

Browse files
vdusekjanbuchar
andauthored
docs: add upgrading guide to v03 (#464)
### Description - Add upgrading guide from v0.2.x to 0.3.0. - There were 2 breaking changes: - declaration of public & private interface, - request queue v2. ### Issues - N/A ### Testing - Website was rendered locally. ### Checklist - [x] CI passed --------- Co-authored-by: Jan Buchar <[email protected]>
1 parent e35f25c commit 1c8d3f1

File tree

2 files changed

+54
-16
lines changed

2 files changed

+54
-16
lines changed

docs/upgrading/upgrading_to_v03.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
id: upgrading-to-v03
3+
title: Upgrading to v0.3
4+
---
5+
6+
This page summarizes most of the breaking changes between Crawlee for Python v0.2.x and v0.3.0.
7+
8+
## Public and private interface declaration
9+
10+
In previous versions, the majority of the package was fully public, including many elements intended for internal use only. With the release of v0.3, we have clearly defined the public and private interface of the package. As a result, some imports have been updated (see below). If you are importing something now designated as private, we recommend reconsidering its use or discussing your use case with us in the discussions/issues.
11+
12+
Here is a list of the updated public imports:
13+
14+
```diff
15+
- from crawlee.enqueue_strategy import EnqueueStrategy
16+
+ from crawlee import EnqueueStrategy
17+
```
18+
19+
```diff
20+
- from crawlee.models import Request
21+
+ from crawlee import Request
22+
```
23+
24+
```diff
25+
- from crawlee.basic_crawler import Router
26+
+ from crawlee.router import Router
27+
```
28+
29+
## Request queue
30+
31+
There were internal changes that should not affect the intended usage:
32+
33+
- The unused `BaseRequestQueueClient.list_requests()` method was removed
34+
- `RequestQueue` internals were updated to match the "Request Queue V2" implementation in Crawlee for JS
35+
36+
## Service container
37+
38+
A new module, `crawlee.service_container`, was added to allow management of "global instances" - currently it contains `Configuration`, `EventManager` and `BaseStorageClient`. The module also replaces the `StorageClientManager` static class. It is likely that its interface will change in the future. If your use case requires working with it, please get in touch - we'll be glad to hear any feedback.

website/sidebars.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -103,22 +103,22 @@ module.exports = {
103103
// },
104104
// ],
105105
// },
106-
// {
107-
// type: 'category',
108-
// label: 'Upgrading',
109-
// link: {
110-
// type: 'generated-index',
111-
// title: 'Upgrading',
112-
// slug: '/upgrading',
113-
// keywords: ['upgrading'],
114-
// },
115-
// items: [
116-
// {
117-
// type: 'autogenerated',
118-
// dirName: 'upgrading',
119-
// },
120-
// ],
121-
// },
106+
{
107+
type: 'category',
108+
label: 'Upgrading',
109+
link: {
110+
type: 'generated-index',
111+
title: 'Upgrading',
112+
slug: '/upgrading',
113+
keywords: ['upgrading'],
114+
},
115+
items: [
116+
{
117+
type: 'autogenerated',
118+
dirName: 'upgrading',
119+
},
120+
],
121+
},
122122
{
123123
type: 'doc',
124124
label: 'Changelog',

0 commit comments

Comments
 (0)