GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: make backends private · python-gitlab/python-gitlab@1e629af

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • gitlab
    • _backends
      • __init__.py
      • requests_backend.py
    • client.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎gitlab/http_backends/__init__.py‎ ‎gitlab/_backends/__init__.py‎gitlab/http_backends/__init__.py renamed to gitlab/_backends/__init__.py

Copy file name to clipboard
File renamed without changes.
Collapse file

‎gitlab/http_backends/requests_backend.py‎ ‎gitlab/_backends/requests_backend.py‎gitlab/http_backends/requests_backend.py renamed to gitlab/_backends/requests_backend.py

Copy file name to clipboard
File renamed without changes.
Collapse file

‎gitlab/client.py‎

Copy file name to clipboardExpand all lines: gitlab/client.py
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import gitlab.config
1313
import gitlab.const
1414
import gitlab.exceptions
15-
from gitlab import http_backends, utils
15+
from gitlab import _backends, utils
1616

1717
REDIRECT_MSG = (
1818
"python-gitlab detected a {status_code} ({reason!r}) redirection. You must update "
@@ -52,9 +52,9 @@ class Gitlab:
5252
keep_base_url: keep user-provided base URL for pagination if it
5353
differs from response headers
5454
55-
Keyward Args:
56-
requests.Session session: Http Requests Session
57-
RequestsBackend http_backend: Backend that will be used to make http requests
55+
Keyword Args:
56+
requests.Session session: HTTP Requests Session
57+
RequestsBackend backend: Backend that will be used to make http requests
5858
"""
5959

6060
def __init__(
@@ -99,11 +99,11 @@ def __init__(
9999
self._set_auth_info()
100100

101101
#: Create a session object for requests
102-
http_backend: Type[http_backends.DefaultBackend] = kwargs.pop(
103-
"http_backend", http_backends.DefaultBackend
102+
_backend: Type[_backends.DefaultBackend] = kwargs.pop(
103+
"backend", _backends.DefaultBackend
104104
)
105-
self.http_backend = http_backend(**kwargs)
106-
self.session = self.http_backend.client
105+
self._backend = _backend(**kwargs)
106+
self.session = self._backend.client
107107

108108
self.per_page = per_page
109109
self.pagination = pagination
@@ -716,15 +716,15 @@ def http_request(
716716
retry_transient_errors = self.retry_transient_errors
717717

718718
# We need to deal with json vs. data when uploading files
719-
json, data, content_type = self.http_backend.prepare_send_data(
719+
json, data, content_type = self._backend.prepare_send_data(
720720
files, post_data, raw
721721
)
722722
opts["headers"]["Content-type"] = content_type
723723

724724
cur_retries = 0
725725
while True:
726726
try:
727-
result = self.http_backend.http_request(
727+
result = self._backend.http_request(
728728
method=verb,
729729
url=url,
730730
json=json,

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.