RBTools 4.0__tar.gz → 5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {RBTools-4.0 → RBTools-5.0}/PKG-INFO +13 -3
- {RBTools-4.0 → RBTools-5.0}/RBTools.egg-info/PKG-INFO +13 -3
- {RBTools-4.0 → RBTools-5.0}/RBTools.egg-info/SOURCES.txt +24 -9
- RBTools-5.0/RBTools.egg-info/requires.txt +10 -0
- RBTools-5.0/contrib/P4V/README.md +49 -0
- {RBTools-4.0 → RBTools-5.0}/contrib/installers/windows/scripts/get-version.py +0 -2
- {RBTools-4.0 → RBTools-5.0}/rbtools/__init__.py +1 -1
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/cache.py +31 -95
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/capabilities.py +25 -8
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/client.py +18 -3
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/errors.py +220 -1
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/request.py +182 -26
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/resource.py +173 -112
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/tests/base.py +55 -9
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/tests/test_capabilities.py +25 -3
- RBTools-5.0/rbtools/api/tests/test_errors.py +476 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/tests/test_factory.py +0 -2
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/tests/test_http_request.py +2 -5
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/tests/test_resource.py +14 -26
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/transport/__init__.py +24 -6
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/transport/sync.py +42 -8
- RBTools-5.0/rbtools/api/utils.py +72 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/__init__.py +14 -36
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/base/patch.py +0 -2
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/base/registry.py +0 -10
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/base/repository.py +3 -4
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/base/scmclient.py +81 -37
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/bazaar.py +2 -3
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/clearcase.py +649 -627
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/cvs.py +1 -4
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/git.py +539 -257
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/mercurial.py +327 -132
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/perforce.py +210 -55
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/plastic.py +0 -2
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/sos.py +8 -15
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/svn.py +91 -54
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/__init__.py +3 -22
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/test_bzr.py +0 -2
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/test_clearcase.py +81 -71
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/test_cvs.py +0 -2
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/test_git.py +47 -2
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/test_mercurial.py +80 -25
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/test_p4.py +366 -3
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/test_scanning.py +0 -2
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/test_scmclient_registry.py +17 -70
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/test_sos.py +1 -4
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/test_svn.py +150 -8
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tfs.py +1 -6
- RBTools-5.0/rbtools/commands/__init__.py +264 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/alias.py +7 -8
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/api_get.py +8 -8
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/attach.py +6 -7
- RBTools-5.0/rbtools/commands/base/__init__.py +42 -0
- RBTools-4.0/rbtools/commands/__init__.py → RBTools-5.0/rbtools/commands/base/commands.py +473 -545
- RBTools-5.0/rbtools/commands/base/errors.py +39 -0
- RBTools-5.0/rbtools/commands/base/options.py +210 -0
- RBTools-5.0/rbtools/commands/base/output.py +286 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/clearcache.py +3 -3
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/close.py +6 -6
- RBTools-4.0/rbtools/commands/conf/rbt-bash-completion → RBTools-5.0/rbtools/commands/conf/completions/bash +1 -1
- RBTools-4.0/rbtools/commands/conf/_rbt-zsh-completion → RBTools-5.0/rbtools/commands/conf/completions/zsh +1 -1
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/diff.py +14 -19
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/info.py +4 -4
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/install.py +5 -5
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/land.py +59 -30
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/list_repo_types.py +4 -6
- RBTools-5.0/rbtools/commands/login.py +90 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/logout.py +4 -4
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/main.py +34 -27
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/patch.py +164 -60
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/post.py +371 -92
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/publish.py +5 -5
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/review.py +53 -24
- RBTools-5.0/rbtools/commands/setup_completion.py +68 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/setup_repo.py +16 -17
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/stamp.py +54 -22
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/status.py +7 -7
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/status_update.py +9 -15
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/tests/test_alias.py +1 -3
- RBTools-5.0/rbtools/commands/tests/test_base_output.py +245 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/tests/test_main.py +10 -11
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/tests/test_post.py +2 -4
- RBTools-5.0/rbtools/commands/tests/test_setup_completion.py +77 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/tests/test_setup_repo.py +0 -2
- RBTools-5.0/rbtools/config/__init__.py +27 -0
- RBTools-5.0/rbtools/config/config.py +742 -0
- RBTools-5.0/rbtools/config/errors.py +121 -0
- RBTools-5.0/rbtools/config/loader.py +154 -0
- RBTools-5.0/rbtools/config/tests/test_config.py +328 -0
- RBTools-5.0/rbtools/config/tests/test_loader.py +225 -0
- RBTools-5.0/rbtools/deprecation.py +66 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tests/test_gnu_diff_tool.py +122 -2
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tools/backends/gnu.py +74 -11
- {RBTools-4.0 → RBTools-5.0}/rbtools/helpers/hgext.py +0 -3
- {RBTools-4.0 → RBTools-5.0}/rbtools/hooks/common.py +75 -8
- {RBTools-4.0 → RBTools-5.0}/rbtools/hooks/git.py +42 -11
- {RBTools-4.0 → RBTools-5.0}/rbtools/testing/__init__.py +1 -1
- {RBTools-4.0 → RBTools-5.0}/rbtools/testing/api/payloads.py +0 -2
- {RBTools-4.0 → RBTools-5.0}/rbtools/testing/api/transport.py +32 -10
- {RBTools-4.0 → RBTools-5.0}/rbtools/testing/commands.py +110 -38
- {RBTools-4.0 → RBTools-5.0}/rbtools/testing/testcase.py +102 -11
- {RBTools-4.0 → RBTools-5.0}/rbtools/testing/transport.py +41 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/aliases.py +3 -5
- RBTools-5.0/rbtools/utils/browser.py +52 -0
- RBTools-5.0/rbtools/utils/checks.py +51 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/commands.py +2 -5
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/console.py +3 -6
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/diffs.py +2 -7
- RBTools-5.0/rbtools/utils/encoding.py +153 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/errors.py +0 -2
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/filesystem.py +75 -89
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/graphs.py +5 -7
- RBTools-5.0/rbtools/utils/mimetypes.py +232 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/process.py +2 -29
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/repository.py +2 -4
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/review_request.py +84 -242
- RBTools-5.0/rbtools/utils/tests/__init__.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/tests/test_aliases.py +0 -2
- RBTools-5.0/rbtools/utils/tests/test_checks.py +20 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/tests/test_console.py +0 -2
- RBTools-5.0/rbtools/utils/tests/test_encoding.py +119 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/tests/test_filesystem.py +0 -2
- RBTools-5.0/rbtools/utils/tests/test_mimetypes.py +89 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/tests/test_repository.py +18 -4
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/tests/test_review_request.py +0 -2
- RBTools-5.0/rbtools/utils/tests/test_web_login.py +301 -0
- RBTools-5.0/rbtools/utils/users.py +201 -0
- RBTools-5.0/rbtools/utils/web_login.py +612 -0
- RBTools-5.0/setup.cfg +36 -0
- {RBTools-4.0 → RBTools-5.0}/setup.py +21 -4
- RBTools-4.0/RBTools.egg-info/requires.txt +0 -10
- RBTools-4.0/contrib/P4Tool.txt +0 -2
- RBTools-4.0/contrib/README.P4Tool +0 -25
- RBTools-4.0/pytest.ini +0 -15
- RBTools-4.0/rbtools/api/tests/test_errors.py +0 -176
- RBTools-4.0/rbtools/api/utils.py +0 -116
- RBTools-4.0/rbtools/commands/login.py +0 -50
- RBTools-4.0/rbtools/commands/setup_completion.py +0 -117
- RBTools-4.0/rbtools/deprecation.py +0 -290
- RBTools-4.0/rbtools/tests.py +0 -23
- RBTools-4.0/rbtools/utils/checks.py +0 -121
- RBTools-4.0/rbtools/utils/encoding.py +0 -55
- RBTools-4.0/rbtools/utils/match_score.py +0 -57
- RBTools-4.0/rbtools/utils/testbase.py +0 -37
- RBTools-4.0/rbtools/utils/tests/test_checks.py +0 -42
- RBTools-4.0/rbtools/utils/users.py +0 -101
- RBTools-4.0/setup.cfg +0 -22
- {RBTools-4.0 → RBTools-5.0}/AUTHORS +0 -0
- {RBTools-4.0 → RBTools-5.0}/COPYING +0 -0
- {RBTools-4.0 → RBTools-5.0}/INSTALL +0 -0
- {RBTools-4.0 → RBTools-5.0}/MANIFEST.in +0 -0
- {RBTools-4.0 → RBTools-5.0}/NEWS +0 -0
- {RBTools-4.0 → RBTools-5.0}/RBTools.egg-info/dependency_links.txt +0 -0
- {RBTools-4.0 → RBTools-5.0}/RBTools.egg-info/entry_points.txt +0 -0
- {RBTools-4.0 → RBTools-5.0}/RBTools.egg-info/top_level.txt +0 -0
- {RBTools-4.0 → RBTools-5.0}/README.md +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/__init__.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/decode.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/decorators.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/factory.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/api/tests/__init__.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/base/__init__.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/errors.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/test_base_scmclient.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/test_plastic.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/clients/tests/test_tfs.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/commands/tests/__init__.py +0 -0
- {RBTools-4.0/rbtools/diffs → RBTools-5.0/rbtools/config}/tests/__init__.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/__init__.py +0 -0
- {RBTools-4.0/rbtools/helpers → RBTools-5.0/rbtools/diffs/tests}/__init__.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tests/test_apple_diff_tool.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tests/test_diff_file_result.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tests/test_diff_tools_registry.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tests/test_unified_diff_writer.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tools/__init__.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tools/backends/__init__.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tools/backends/apple.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tools/base/__init__.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tools/base/diff_file_result.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tools/base/diff_tool.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tools/errors.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/tools/registry.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/diffs/writers.py +0 -0
- {RBTools-4.0/rbtools/hooks → RBTools-5.0/rbtools/helpers}/__init__.py +0 -0
- {RBTools-4.0/rbtools/testing/api → RBTools-5.0/rbtools/hooks}/__init__.py +0 -0
- {RBTools-4.0/rbtools/utils → RBTools-5.0/rbtools/testing/api}/__init__.py +0 -0
- {RBTools-4.0/rbtools/utils/tests → RBTools-5.0/rbtools/utils}/__init__.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/appdirs.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/source_tree.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/streams.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/tests/test_buffered_iterator.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/tests/test_process.py +0 -0
- {RBTools-4.0 → RBTools-5.0}/rbtools/utils/tests/test_source_tree.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: RBTools
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0
|
|
4
4
|
Summary: Command line tools and API for working with code and document reviews on Review Board
|
|
5
5
|
Home-page: https://www.reviewboard.org/downloads/rbtools/
|
|
6
|
-
Download-URL: https://downloads.reviewboard.org/releases/RBTools/
|
|
6
|
+
Download-URL: https://downloads.reviewboard.org/releases/RBTools/5.0/
|
|
7
7
|
Author: Beanbag, Inc.
|
|
8
8
|
Author-email: reviewboard@googlegroups.com
|
|
9
9
|
License: MIT
|
|
@@ -16,17 +16,27 @@ Classifier: Natural Language :: English
|
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Classifier: Programming Language :: Python
|
|
18
18
|
Classifier: Programming Language :: Python :: 3
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.8
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.9
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
24
|
Classifier: Topic :: Software Development
|
|
25
25
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
26
26
|
Requires-Python: >=3.7
|
|
27
27
|
Description-Content-Type: text/markdown
|
|
28
28
|
License-File: COPYING
|
|
29
29
|
License-File: AUTHORS
|
|
30
|
+
Requires-Dist: certifi>=2023.5.7
|
|
31
|
+
Requires-Dist: colorama
|
|
32
|
+
Requires-Dist: housekeeping~=1.1
|
|
33
|
+
Requires-Dist: packaging>=21.3
|
|
34
|
+
Requires-Dist: pydiffx~=1.1.0
|
|
35
|
+
Requires-Dist: texttable
|
|
36
|
+
Requires-Dist: typing_extensions>=4.3.0
|
|
37
|
+
Requires-Dist: tqdm
|
|
38
|
+
Requires-Dist: importlib-metadata>=5.0
|
|
39
|
+
Requires-Dist: importlib-resources>=5.9
|
|
30
40
|
|
|
31
41
|
About RBTools
|
|
32
42
|
=============
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: RBTools
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0
|
|
4
4
|
Summary: Command line tools and API for working with code and document reviews on Review Board
|
|
5
5
|
Home-page: https://www.reviewboard.org/downloads/rbtools/
|
|
6
|
-
Download-URL: https://downloads.reviewboard.org/releases/RBTools/
|
|
6
|
+
Download-URL: https://downloads.reviewboard.org/releases/RBTools/5.0/
|
|
7
7
|
Author: Beanbag, Inc.
|
|
8
8
|
Author-email: reviewboard@googlegroups.com
|
|
9
9
|
License: MIT
|
|
@@ -16,17 +16,27 @@ Classifier: Natural Language :: English
|
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Classifier: Programming Language :: Python
|
|
18
18
|
Classifier: Programming Language :: Python :: 3
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.8
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.9
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
24
|
Classifier: Topic :: Software Development
|
|
25
25
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
26
26
|
Requires-Python: >=3.7
|
|
27
27
|
Description-Content-Type: text/markdown
|
|
28
28
|
License-File: COPYING
|
|
29
29
|
License-File: AUTHORS
|
|
30
|
+
Requires-Dist: certifi>=2023.5.7
|
|
31
|
+
Requires-Dist: colorama
|
|
32
|
+
Requires-Dist: housekeeping~=1.1
|
|
33
|
+
Requires-Dist: packaging>=21.3
|
|
34
|
+
Requires-Dist: pydiffx~=1.1.0
|
|
35
|
+
Requires-Dist: texttable
|
|
36
|
+
Requires-Dist: typing_extensions>=4.3.0
|
|
37
|
+
Requires-Dist: tqdm
|
|
38
|
+
Requires-Dist: importlib-metadata>=5.0
|
|
39
|
+
Requires-Dist: importlib-resources>=5.9
|
|
30
40
|
|
|
31
41
|
About RBTools
|
|
32
42
|
=============
|
|
@@ -4,7 +4,6 @@ INSTALL
|
|
|
4
4
|
MANIFEST.in
|
|
5
5
|
NEWS
|
|
6
6
|
README.md
|
|
7
|
-
pytest.ini
|
|
8
7
|
setup.cfg
|
|
9
8
|
setup.py
|
|
10
9
|
RBTools.egg-info/PKG-INFO
|
|
@@ -13,12 +12,10 @@ RBTools.egg-info/dependency_links.txt
|
|
|
13
12
|
RBTools.egg-info/entry_points.txt
|
|
14
13
|
RBTools.egg-info/requires.txt
|
|
15
14
|
RBTools.egg-info/top_level.txt
|
|
16
|
-
contrib/
|
|
17
|
-
contrib/README.P4Tool
|
|
15
|
+
contrib/P4V/README.md
|
|
18
16
|
contrib/installers/windows/scripts/get-version.py
|
|
19
17
|
rbtools/__init__.py
|
|
20
18
|
rbtools/deprecation.py
|
|
21
|
-
rbtools/tests.py
|
|
22
19
|
rbtools/api/__init__.py
|
|
23
20
|
rbtools/api/cache.py
|
|
24
21
|
rbtools/api/capabilities.py
|
|
@@ -93,13 +90,27 @@ rbtools/commands/setup_repo.py
|
|
|
93
90
|
rbtools/commands/stamp.py
|
|
94
91
|
rbtools/commands/status.py
|
|
95
92
|
rbtools/commands/status_update.py
|
|
96
|
-
rbtools/commands/
|
|
97
|
-
rbtools/commands/
|
|
93
|
+
rbtools/commands/base/__init__.py
|
|
94
|
+
rbtools/commands/base/commands.py
|
|
95
|
+
rbtools/commands/base/errors.py
|
|
96
|
+
rbtools/commands/base/options.py
|
|
97
|
+
rbtools/commands/base/output.py
|
|
98
|
+
rbtools/commands/conf/completions/bash
|
|
99
|
+
rbtools/commands/conf/completions/zsh
|
|
98
100
|
rbtools/commands/tests/__init__.py
|
|
99
101
|
rbtools/commands/tests/test_alias.py
|
|
102
|
+
rbtools/commands/tests/test_base_output.py
|
|
100
103
|
rbtools/commands/tests/test_main.py
|
|
101
104
|
rbtools/commands/tests/test_post.py
|
|
105
|
+
rbtools/commands/tests/test_setup_completion.py
|
|
102
106
|
rbtools/commands/tests/test_setup_repo.py
|
|
107
|
+
rbtools/config/__init__.py
|
|
108
|
+
rbtools/config/config.py
|
|
109
|
+
rbtools/config/errors.py
|
|
110
|
+
rbtools/config/loader.py
|
|
111
|
+
rbtools/config/tests/__init__.py
|
|
112
|
+
rbtools/config/tests/test_config.py
|
|
113
|
+
rbtools/config/tests/test_loader.py
|
|
103
114
|
rbtools/diffs/__init__.py
|
|
104
115
|
rbtools/diffs/writers.py
|
|
105
116
|
rbtools/diffs/tests/__init__.py
|
|
@@ -132,6 +143,7 @@ rbtools/testing/api/transport.py
|
|
|
132
143
|
rbtools/utils/__init__.py
|
|
133
144
|
rbtools/utils/aliases.py
|
|
134
145
|
rbtools/utils/appdirs.py
|
|
146
|
+
rbtools/utils/browser.py
|
|
135
147
|
rbtools/utils/checks.py
|
|
136
148
|
rbtools/utils/commands.py
|
|
137
149
|
rbtools/utils/console.py
|
|
@@ -140,21 +152,24 @@ rbtools/utils/encoding.py
|
|
|
140
152
|
rbtools/utils/errors.py
|
|
141
153
|
rbtools/utils/filesystem.py
|
|
142
154
|
rbtools/utils/graphs.py
|
|
143
|
-
rbtools/utils/
|
|
155
|
+
rbtools/utils/mimetypes.py
|
|
144
156
|
rbtools/utils/process.py
|
|
145
157
|
rbtools/utils/repository.py
|
|
146
158
|
rbtools/utils/review_request.py
|
|
147
159
|
rbtools/utils/source_tree.py
|
|
148
160
|
rbtools/utils/streams.py
|
|
149
|
-
rbtools/utils/testbase.py
|
|
150
161
|
rbtools/utils/users.py
|
|
162
|
+
rbtools/utils/web_login.py
|
|
151
163
|
rbtools/utils/tests/__init__.py
|
|
152
164
|
rbtools/utils/tests/test_aliases.py
|
|
153
165
|
rbtools/utils/tests/test_buffered_iterator.py
|
|
154
166
|
rbtools/utils/tests/test_checks.py
|
|
155
167
|
rbtools/utils/tests/test_console.py
|
|
168
|
+
rbtools/utils/tests/test_encoding.py
|
|
156
169
|
rbtools/utils/tests/test_filesystem.py
|
|
170
|
+
rbtools/utils/tests/test_mimetypes.py
|
|
157
171
|
rbtools/utils/tests/test_process.py
|
|
158
172
|
rbtools/utils/tests/test_repository.py
|
|
159
173
|
rbtools/utils/tests/test_review_request.py
|
|
160
|
-
rbtools/utils/tests/test_source_tree.py
|
|
174
|
+
rbtools/utils/tests/test_source_tree.py
|
|
175
|
+
rbtools/utils/tests/test_web_login.py
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
P4V Custom Tools for RBTools
|
|
2
|
+
============================
|
|
3
|
+
|
|
4
|
+
This directory contains custom tools for integrating RBTools into
|
|
5
|
+
[P4V](https://www.perforce.com/downloads/helix-visual-client-p4v). Once
|
|
6
|
+
installed, you can right-click on a changeset and post it for review to Review
|
|
7
|
+
Board.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Installation
|
|
11
|
+
------------
|
|
12
|
+
|
|
13
|
+
1. Make sure that `p4` and `rbt` are available in your system path.
|
|
14
|
+
|
|
15
|
+
You may need to restart P4V if it was opened when installing RBTools.
|
|
16
|
+
|
|
17
|
+
2. Download the correct P4V configuration for your configuration:
|
|
18
|
+
|
|
19
|
+
**Windows:**
|
|
20
|
+
[P4V-Windows-RBTools-Install.xml](P4V-Windows-RBTools-Install.xml)
|
|
21
|
+
|
|
22
|
+
**macOS / Linux:**
|
|
23
|
+
[P4V-Mac-Linux-Tools-Import.xml](P4V-Mac-Linux-Tools-Import.xml)
|
|
24
|
+
|
|
25
|
+
3. In P4V, go to **Tools -> Manage Tools -> Custom Tools** and click
|
|
26
|
+
**Import Custom Tools...**
|
|
27
|
+
|
|
28
|
+
4. Select the downloaded file and confirm.
|
|
29
|
+
|
|
30
|
+
You should now be set!
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
**Note:** These configurations are defaults. Depending on your system, you may
|
|
34
|
+
have to adjust the paths in your custom tools (found in **Tools -> Manage Tools
|
|
35
|
+
-> Custom Tools**).
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
Usage
|
|
39
|
+
-----
|
|
40
|
+
|
|
41
|
+
1. Right-click a change to post for review.
|
|
42
|
+
|
|
43
|
+
2. Click **Review Board - Post for Review**.
|
|
44
|
+
|
|
45
|
+
This can be used to create a new review request or update an existing one.
|
|
46
|
+
|
|
47
|
+
3. A browser window should open to the review request.
|
|
48
|
+
|
|
49
|
+
For more information, see [Using RBTools with Perforce](https://www.reviewboard.org/docs/rbtools/latest/workflows/perforce/).
|
|
@@ -10,7 +10,7 @@ Beanbag Tools. They're largely used for packaging purposes.
|
|
|
10
10
|
#:
|
|
11
11
|
#: (Major, Minor, Micro, Patch, alpha/beta/rc/final, Release Number, Released)
|
|
12
12
|
#:
|
|
13
|
-
VERSION = (
|
|
13
|
+
VERSION = (5, 0, 0, 0, 'final', 0, True)
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
def get_version_string():
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
"""Caching implementation for the RBTools API."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
1
5
|
import contextlib
|
|
2
6
|
import datetime
|
|
3
7
|
import json
|
|
@@ -8,20 +12,23 @@ import sqlite3
|
|
|
8
12
|
import threading
|
|
9
13
|
from email.message import Message
|
|
10
14
|
from http.client import HTTPResponse
|
|
11
|
-
from typing import
|
|
15
|
+
from typing import Dict, List, MutableMapping, Optional, Union
|
|
12
16
|
from urllib.request import urlopen, Request
|
|
13
17
|
|
|
14
18
|
from rbtools.api.errors import CacheError
|
|
15
|
-
from rbtools.deprecation import RemovedInRBTools50Warning
|
|
16
19
|
from rbtools.utils.appdirs import user_cache_dir
|
|
17
20
|
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
#: The minimum version of Review Board to allow HTTP caching.
|
|
23
|
+
#:
|
|
24
|
+
#: Versions prior to this had broken caching. If this version or older is
|
|
25
|
+
#: encountered, caching will be disabled.
|
|
26
|
+
MINIMUM_VERSION = '2.0.14'
|
|
20
27
|
|
|
21
28
|
_locale_lock = threading.Lock() # Lock for getting / setting locale.
|
|
22
29
|
|
|
23
30
|
|
|
24
|
-
class CacheEntry
|
|
31
|
+
class CacheEntry:
|
|
25
32
|
"""An entry in the API Cache."""
|
|
26
33
|
|
|
27
34
|
DATE_FORMAT = '%Y-%m-%dT%H:%M:%S' # ISO Date format
|
|
@@ -106,6 +113,10 @@ class CacheEntry(object):
|
|
|
106
113
|
def up_to_date(self) -> bool:
|
|
107
114
|
"""Determine if the cache entry is up to date.
|
|
108
115
|
|
|
116
|
+
Version Changed:
|
|
117
|
+
4.1:
|
|
118
|
+
This now returns ``False`` if ``max_age`` is not available.
|
|
119
|
+
|
|
109
120
|
Returns:
|
|
110
121
|
bool:
|
|
111
122
|
``True`` if the cache entry is still valid. ``False``, otherwise.
|
|
@@ -114,10 +125,10 @@ class CacheEntry(object):
|
|
|
114
125
|
max_age = datetime.timedelta(seconds=self.max_age)
|
|
115
126
|
return self.local_date + max_age > datetime.datetime.now()
|
|
116
127
|
|
|
117
|
-
return
|
|
128
|
+
return False
|
|
118
129
|
|
|
119
130
|
|
|
120
|
-
class LiveHTTPResponse
|
|
131
|
+
class LiveHTTPResponse:
|
|
121
132
|
"""An uncached HTTP response that can be read() more than once.
|
|
122
133
|
|
|
123
134
|
This is intended to be API-compatible with an
|
|
@@ -137,7 +148,7 @@ class LiveHTTPResponse(object):
|
|
|
137
148
|
response (http.client.HTTPResponse):
|
|
138
149
|
The response from the server.
|
|
139
150
|
"""
|
|
140
|
-
self.headers = response.
|
|
151
|
+
self.headers = response.headers
|
|
141
152
|
self.content = response.read()
|
|
142
153
|
self.status = response.status
|
|
143
154
|
|
|
@@ -150,22 +161,6 @@ class LiveHTTPResponse(object):
|
|
|
150
161
|
"""
|
|
151
162
|
return self.status
|
|
152
163
|
|
|
153
|
-
def info(self) -> Message:
|
|
154
|
-
"""Return the headers associated with the response.
|
|
155
|
-
|
|
156
|
-
Deprecated:
|
|
157
|
-
4.0:
|
|
158
|
-
Deprecated in favor of the :py:attr:`headers` attribute.
|
|
159
|
-
|
|
160
|
-
Returns:
|
|
161
|
-
email.message.Message:
|
|
162
|
-
The response headers.
|
|
163
|
-
"""
|
|
164
|
-
RemovedInRBTools50Warning.warn(
|
|
165
|
-
'LiveHTTPResponse.info() is deprecated and will be removed in '
|
|
166
|
-
'RBTools 5.0. Use LiveHTTPResponse.headers instead.')
|
|
167
|
-
return self.headers
|
|
168
|
-
|
|
169
164
|
def read(self) -> bytes:
|
|
170
165
|
"""Return the content associated with the response.
|
|
171
166
|
|
|
@@ -175,24 +170,8 @@ class LiveHTTPResponse(object):
|
|
|
175
170
|
"""
|
|
176
171
|
return self.content
|
|
177
172
|
|
|
178
|
-
def getcode(self) -> int:
|
|
179
|
-
"""Return the associated HTTP response code.
|
|
180
|
-
|
|
181
|
-
Deprecated:
|
|
182
|
-
4.0:
|
|
183
|
-
Deprecated in favor of the :py:attr:`code` attribute.
|
|
184
|
-
|
|
185
|
-
Returns:
|
|
186
|
-
int:
|
|
187
|
-
The HTTP response code.
|
|
188
|
-
"""
|
|
189
|
-
RemovedInRBTools50Warning.warn(
|
|
190
|
-
'LiveHTTPResponseInfo.getcode() is deprecated and will be removed '
|
|
191
|
-
'in RBTools 5.0. Use LiveHTTPResponse.code instead.')
|
|
192
|
-
return self.status
|
|
193
173
|
|
|
194
|
-
|
|
195
|
-
class CachedHTTPResponse(object):
|
|
174
|
+
class CachedHTTPResponse:
|
|
196
175
|
"""A response returned from the APICache.
|
|
197
176
|
|
|
198
177
|
This is intended to be API-compatible with a urllib response object.
|
|
@@ -225,22 +204,6 @@ class CachedHTTPResponse(object):
|
|
|
225
204
|
"""
|
|
226
205
|
return self.status
|
|
227
206
|
|
|
228
|
-
def info(self) -> dict:
|
|
229
|
-
"""Return the headers associated with the response.
|
|
230
|
-
|
|
231
|
-
Deprecated:
|
|
232
|
-
4.0:
|
|
233
|
-
Deprecated in favor of the :py:attr:`headers` attribute.
|
|
234
|
-
|
|
235
|
-
Returns:
|
|
236
|
-
dict:
|
|
237
|
-
The cached response headers.
|
|
238
|
-
"""
|
|
239
|
-
RemovedInRBTools50Warning.warn(
|
|
240
|
-
'CachedHTTPResponse.info() is deprecated and will be removed in '
|
|
241
|
-
'RBTools 5.0. Use CachedHTTPResponse.headers instead.')
|
|
242
|
-
return self.headers
|
|
243
|
-
|
|
244
207
|
def read(self) -> bytes:
|
|
245
208
|
"""Return the content associated with the response.
|
|
246
209
|
|
|
@@ -250,25 +213,8 @@ class CachedHTTPResponse(object):
|
|
|
250
213
|
"""
|
|
251
214
|
return self.content
|
|
252
215
|
|
|
253
|
-
def getcode(self) -> int:
|
|
254
|
-
"""Return the associated HTTP response code, which is always 200.
|
|
255
216
|
|
|
256
|
-
|
|
257
|
-
4.0:
|
|
258
|
-
Deprecated in favor of the :py:attr:`code` attribute.
|
|
259
|
-
|
|
260
|
-
Returns:
|
|
261
|
-
int:
|
|
262
|
-
200, always. This pretends that the response is the successful
|
|
263
|
-
result of an HTTP request.
|
|
264
|
-
"""
|
|
265
|
-
RemovedInRBTools50Warning.warn(
|
|
266
|
-
'CachedHTTPResponseInfo.getcode() is deprecated and will be '
|
|
267
|
-
'removed in RBTools 5.0. Use CachedHTTPResponse.code instead.')
|
|
268
|
-
return 200
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
class APICache(object):
|
|
217
|
+
class APICache:
|
|
272
218
|
"""An API cache backed by a SQLite database."""
|
|
273
219
|
|
|
274
220
|
# The format for the Expires: header. Requires an English locale.
|
|
@@ -285,7 +231,6 @@ class APICache(object):
|
|
|
285
231
|
self,
|
|
286
232
|
create_db_in_memory: bool = False,
|
|
287
233
|
db_location: Optional[str] = None,
|
|
288
|
-
urlopen: Optional[Callable] = None,
|
|
289
234
|
) -> None:
|
|
290
235
|
"""Create a new instance of the APICache
|
|
291
236
|
|
|
@@ -304,19 +249,10 @@ class APICache(object):
|
|
|
304
249
|
db_location (str):
|
|
305
250
|
The filename of the cache database, if using.
|
|
306
251
|
|
|
307
|
-
urlopen (callable):
|
|
308
|
-
The method to call for urlopen. This parameter has been
|
|
309
|
-
deprecated.
|
|
310
|
-
|
|
311
252
|
Raises:
|
|
312
253
|
CacheError:
|
|
313
254
|
The database exists but the schema could not be read.
|
|
314
255
|
"""
|
|
315
|
-
if urlopen is not None:
|
|
316
|
-
RemovedInRBTools50Warning.warn(
|
|
317
|
-
'The urlopen parameter to APICache is deprecated and will be '
|
|
318
|
-
'removed in RBTools 5.0.')
|
|
319
|
-
|
|
320
256
|
if create_db_in_memory:
|
|
321
257
|
logging.debug('Creating API cache in memory.')
|
|
322
258
|
|
|
@@ -364,17 +300,17 @@ class APICache(object):
|
|
|
364
300
|
# connect fails. In either case, HTTP requests can still be
|
|
365
301
|
# made, they will just passed through to the URL opener without
|
|
366
302
|
# attempting to interact with the API cache.
|
|
367
|
-
logging.
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
303
|
+
logging.warning(
|
|
304
|
+
'Could not create or access API cache "%s". Try running '
|
|
305
|
+
'"rbt clear-cache" to clear the HTTP cache for the API.',
|
|
306
|
+
self.cache_path)
|
|
371
307
|
|
|
372
308
|
if self.db is not None:
|
|
373
309
|
self.db.row_factory = APICache._row_factory
|
|
374
310
|
|
|
375
311
|
def make_request(
|
|
376
312
|
self,
|
|
377
|
-
request: Request
|
|
313
|
+
request: Request,
|
|
378
314
|
) -> Union[LiveHTTPResponse, CachedHTTPResponse]:
|
|
379
315
|
"""Perform the specified request.
|
|
380
316
|
|
|
@@ -413,18 +349,18 @@ class APICache(object):
|
|
|
413
349
|
|
|
414
350
|
response = LiveHTTPResponse(urlopen(request))
|
|
415
351
|
|
|
416
|
-
if response.
|
|
352
|
+
if response.code == 304:
|
|
417
353
|
logging.debug('Cached response for HTTP GET %s expired '
|
|
418
354
|
'and was not modified',
|
|
419
355
|
request.get_full_url())
|
|
420
356
|
entry.local_date = datetime.datetime.now()
|
|
421
357
|
self._save_entry(entry)
|
|
422
358
|
response = CachedHTTPResponse(entry)
|
|
423
|
-
elif 200 <= response.
|
|
359
|
+
elif 200 <= response.code < 300:
|
|
424
360
|
logging.debug('Cached response for HTTP GET %s expired '
|
|
425
361
|
'and was modified',
|
|
426
362
|
request.get_full_url())
|
|
427
|
-
response_headers = response.
|
|
363
|
+
response_headers = response.headers
|
|
428
364
|
cache_info = self._get_caching_info(request.headers,
|
|
429
365
|
response_headers)
|
|
430
366
|
|
|
@@ -456,7 +392,7 @@ class APICache(object):
|
|
|
456
392
|
self._delete_entry(entry)
|
|
457
393
|
else:
|
|
458
394
|
response = LiveHTTPResponse(urlopen(request))
|
|
459
|
-
response_headers = response.
|
|
395
|
+
response_headers = response.headers
|
|
460
396
|
|
|
461
397
|
cache_info = self._get_caching_info(request.headers,
|
|
462
398
|
response_headers)
|
|
@@ -520,7 +456,7 @@ class APICache(object):
|
|
|
520
456
|
try:
|
|
521
457
|
# 'setlocale' requires the second parameter to be a 'str'
|
|
522
458
|
# in both Python 2.x and Python 3+.
|
|
523
|
-
locale.setlocale(locale.LC_TIME,
|
|
459
|
+
locale.setlocale(locale.LC_TIME, 'C')
|
|
524
460
|
expires = datetime.datetime.strptime(expires,
|
|
525
461
|
self.EXPIRES_FORMAT)
|
|
526
462
|
|
|
@@ -602,7 +538,7 @@ class APICache(object):
|
|
|
602
538
|
'max_age': max_age,
|
|
603
539
|
'etag': etag,
|
|
604
540
|
'last_modified': last_modified,
|
|
605
|
-
'vary_headers': vary_headers
|
|
541
|
+
'vary_headers': vary_headers,
|
|
606
542
|
}
|
|
607
543
|
|
|
608
544
|
def _create_schema(self) -> None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Review Board server capability management."""
|
|
2
2
|
|
|
3
|
-
from typing import
|
|
3
|
+
from typing import Any, Mapping
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class Capabilities:
|
|
@@ -10,11 +10,11 @@ class Capabilities:
|
|
|
10
10
|
#:
|
|
11
11
|
#: Type:
|
|
12
12
|
#: dict
|
|
13
|
-
capabilities:
|
|
13
|
+
capabilities: Mapping
|
|
14
14
|
|
|
15
15
|
def __init__(
|
|
16
16
|
self,
|
|
17
|
-
capabilities:
|
|
17
|
+
capabilities: Mapping,
|
|
18
18
|
) -> None:
|
|
19
19
|
"""Initialize the capabilities information.
|
|
20
20
|
|
|
@@ -37,17 +37,34 @@ class Capabilities:
|
|
|
37
37
|
if the capability is set to ``False`` or is not present in the API
|
|
38
38
|
capabilities.
|
|
39
39
|
"""
|
|
40
|
+
# If only part of a capability path is specified, we don't want to
|
|
41
|
+
# evaluate to True just because it has contents. We want to only
|
|
42
|
+
# say we have a capability if it is indeed 'True'.
|
|
43
|
+
return self.get_capability(*cap_path) is True
|
|
44
|
+
|
|
45
|
+
def get_capability(self, *cap_path) -> Any:
|
|
46
|
+
"""Return the capability at the given path.
|
|
47
|
+
|
|
48
|
+
Version Added:
|
|
49
|
+
5.0
|
|
50
|
+
|
|
51
|
+
Args:
|
|
52
|
+
*cap_path (tuple of str):
|
|
53
|
+
The keys forming a path to the capability.
|
|
54
|
+
|
|
55
|
+
Returns:
|
|
56
|
+
Any:
|
|
57
|
+
The given capability setting. If not present, this will return
|
|
58
|
+
``None``.
|
|
59
|
+
"""
|
|
40
60
|
caps = self.capabilities
|
|
41
61
|
|
|
42
62
|
try:
|
|
43
63
|
for key in cap_path:
|
|
44
64
|
caps = caps[key]
|
|
45
65
|
|
|
46
|
-
|
|
47
|
-
# evaluate to True just because it has contents. We want to only
|
|
48
|
-
# say we have a capability if it is indeed 'True'.
|
|
49
|
-
return caps is True
|
|
66
|
+
return caps
|
|
50
67
|
except (TypeError, KeyError):
|
|
51
68
|
# The server either doesn't support the capability, or returned no
|
|
52
69
|
# capabilities at all.
|
|
53
|
-
return
|
|
70
|
+
return None
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import Optional, Type
|
|
2
2
|
from urllib.parse import urlparse
|
|
3
3
|
|
|
4
|
-
from rbtools.api.resource import Resource
|
|
4
|
+
from rbtools.api.resource import Resource, RootResource
|
|
5
5
|
from rbtools.api.transport import Transport
|
|
6
6
|
from rbtools.api.transport.sync import SyncTransport
|
|
7
7
|
|
|
@@ -36,6 +36,14 @@ class RBClient:
|
|
|
36
36
|
#: Type: str
|
|
37
37
|
url: str
|
|
38
38
|
|
|
39
|
+
#: The optional user agent for the client.
|
|
40
|
+
#:
|
|
41
|
+
#: Version Added:
|
|
42
|
+
#: 5.0
|
|
43
|
+
#:
|
|
44
|
+
#: Type: str
|
|
45
|
+
user_agent: Optional[str]
|
|
46
|
+
|
|
39
47
|
def __init__(
|
|
40
48
|
self,
|
|
41
49
|
url: str,
|
|
@@ -58,15 +66,22 @@ class RBClient:
|
|
|
58
66
|
**kwargs (dict):
|
|
59
67
|
Keyword arguments to pass to the transport.
|
|
60
68
|
"""
|
|
69
|
+
transport = transport_cls(url, *args, **kwargs)
|
|
70
|
+
|
|
61
71
|
self.url = url
|
|
62
72
|
self.domain = urlparse(url)[1]
|
|
63
|
-
self._transport =
|
|
73
|
+
self._transport = transport
|
|
74
|
+
|
|
75
|
+
if hasattr(transport, 'server') and hasattr(transport.server, 'agent'):
|
|
76
|
+
self.user_agent = transport.server.agent
|
|
77
|
+
else:
|
|
78
|
+
self.user_agent = None
|
|
64
79
|
|
|
65
80
|
def get_root(
|
|
66
81
|
self,
|
|
67
82
|
*args,
|
|
68
83
|
**kwargs,
|
|
69
|
-
) -> Optional[
|
|
84
|
+
) -> Optional[RootResource]:
|
|
70
85
|
"""Return the root resource of the API.
|
|
71
86
|
|
|
72
87
|
Args:
|