:param login_or_token: string deprecated, use auth=github.Auth.Login(...) or auth=github.Auth.Token(...) instead :param password: string deprecated, use auth=github.Auth.Login(...) instead :param jwt: string deprecated, use auth=github.Auth.AppAuth(...) or auth=github.Auth.A
(
self,
login_or_token: str | None = None,
password: str | None = None,
jwt: str | None = None,
app_auth: AppAuthentication | None = None,
base_url: str = Consts.DEFAULT_BASE_URL,
timeout: int = Consts.DEFAULT_TIMEOUT,
user_agent: str = Consts.DEFAULT_USER_AGENT,
per_page: int = Consts.DEFAULT_PER_PAGE,
verify: bool | str = True,
retry: int | Retry | None = default_retry,
pool_size: int | None = None,
seconds_between_requests: float | None = Consts.DEFAULT_SECONDS_BETWEEN_REQUESTS,
seconds_between_writes: float | None = Consts.DEFAULT_SECONDS_BETWEEN_WRITES,
auth: github.Auth.Auth | None = None,
# v3: set lazy = True as the default
lazy: bool = False,
)
| 174 | # v3: add * before first argument so all arguments must be named, |
| 175 | # allows to reorder / add new arguments / remove deprecated arguments without breaking user code |
| 176 | def __init__( |
| 177 | self, |
| 178 | login_or_token: str | None = None, |
| 179 | password: str | None = None, |
| 180 | jwt: str | None = None, |
| 181 | app_auth: AppAuthentication | None = None, |
| 182 | base_url: str = Consts.DEFAULT_BASE_URL, |
| 183 | timeout: int = Consts.DEFAULT_TIMEOUT, |
| 184 | user_agent: str = Consts.DEFAULT_USER_AGENT, |
| 185 | per_page: int = Consts.DEFAULT_PER_PAGE, |
| 186 | verify: bool | str = True, |
| 187 | retry: int | Retry | None = default_retry, |
| 188 | pool_size: int | None = None, |
| 189 | seconds_between_requests: float | None = Consts.DEFAULT_SECONDS_BETWEEN_REQUESTS, |
| 190 | seconds_between_writes: float | None = Consts.DEFAULT_SECONDS_BETWEEN_WRITES, |
| 191 | auth: github.Auth.Auth | None = None, |
| 192 | # v3: set lazy = True as the default |
| 193 | lazy: bool = False, |
| 194 | ) -> None: |
| 195 | """ |
| 196 | :param login_or_token: string deprecated, use auth=github.Auth.Login(...) or auth=github.Auth.Token(...) instead |
| 197 | :param password: string deprecated, use auth=github.Auth.Login(...) instead |
| 198 | :param jwt: string deprecated, use auth=github.Auth.AppAuth(...) or auth=github.Auth.AppAuthToken(...) instead |
| 199 | :param app_auth: github.AppAuthentication deprecated, use auth=github.Auth.AppInstallationAuth(...) instead |
| 200 | :param base_url: string |
| 201 | :param timeout: integer |
| 202 | :param user_agent: string |
| 203 | :param per_page: int |
| 204 | :param verify: boolean or string |
| 205 | :param retry: int or urllib3.util.retry.Retry object, |
| 206 | defaults to github.Github.default_retry, |
| 207 | set to None to disable retries |
| 208 | :param pool_size: int |
| 209 | :param seconds_between_requests: float |
| 210 | :param seconds_between_writes: float |
| 211 | :param auth: authentication method |
| 212 | :param lazy: completable objects created from this instance are lazy, |
| 213 | as well as completable objects created from those, and so on |
| 214 | """ |
| 215 | |
| 216 | assert login_or_token is None or isinstance(login_or_token, str), login_or_token |
| 217 | assert password is None or isinstance(password, str), password |
| 218 | assert jwt is None or isinstance(jwt, str), jwt |
| 219 | assert isinstance(base_url, str), base_url |
| 220 | assert isinstance(timeout, int), timeout |
| 221 | assert user_agent is None or isinstance(user_agent, str), user_agent |
| 222 | assert isinstance(per_page, int), per_page |
| 223 | assert isinstance(verify, (bool, str)), verify |
| 224 | assert retry is None or isinstance(retry, int) or isinstance(retry, urllib3.util.Retry), retry |
| 225 | assert pool_size is None or isinstance(pool_size, int), pool_size |
| 226 | assert seconds_between_requests is None or seconds_between_requests >= 0 |
| 227 | assert seconds_between_writes is None or seconds_between_writes >= 0 |
| 228 | assert auth is None or isinstance(auth, github.Auth.Auth), auth |
| 229 | assert isinstance(lazy, bool), lazy |
| 230 | |
| 231 | if password is not None: |
| 232 | warnings.warn( |
| 233 | "Arguments login_or_token and password are deprecated, please use " |