René's URL Explorer Experiment


Title: fix(cli): make 'timeout', 'per_page' and 'page' type explicit by thomasgl-orange · Pull Request #1862 · python-gitlab/python-gitlab · GitHub

Open Graph Title: fix(cli): make 'timeout', 'per_page' and 'page' type explicit by thomasgl-orange · Pull Request #1862 · python-gitlab/python-gitlab

X Title: fix(cli): make 'timeout', 'per_page' and 'page' type explicit by thomasgl-orange · Pull Request #1862 · python-gitlab/python-gitlab

Description: This PR is mainly for fixing handling of --timeout / GITLAB_TIMEOUT. Before: $ docker run -it --rm python-gitlab:latest --timeout=10 project get --id gitlab-org/gitlab Impossible to get object (Timeout value connect was 10, but it must be an int, float or None.) $ docker run -it --rm -e GITLAB_TIMEOUT=10 python-gitlab:latest project get --id gitlab-org/gitlab Impossible to get object (Timeout value connect was 10, but it must be an int, float or None.) After (with bbb7df5): $ docker run -it --rm python-gitlab:latest --timeout 10 project get --id gitlab-org/gitlab id: 278964 path: gitlab $ docker run -it --rm -e GITLAB_TIMEOUT=10 python-gitlab:latest project get --id gitlab-org/gitlab id: 278964 path: gitlab $ docker run -it --rm python-gitlab:latest --timeout xxx project get --id gitlab-org/gitlab usage: gitlab [--version] [-v] [-d] [-c CONFIG_FILE] [-g GITLAB] [-o {json,legacy,yaml}] [-f FIELDS] [--server-url SERVER_URL] [--ssl-verify SSL_VERIFY] [--timeout TIMEOUT] [--api-version API_VERSION] [--per-page PER_PAGE] [--pagination PAGINATION] [--order-by ORDER_BY] [--user-agent USER_AGENT] [--private-token PRIVATE_TOKEN | --oauth-token OAUTH_TOKEN | --job-token JOB_TOKEN] gitlab: error: argument --timeout: invalid int value: 'xxx' $ docker run -it --rm -e GITLAB_TIMEOUT=xxx python-gitlab:latest project get --id gitlab-org/gitlab usage: gitlab [--version] [-v] [-d] [-c CONFIG_FILE] [-g GITLAB] [-o {json,legacy,yaml}] [-f FIELDS] [--server-url SERVER_URL] [--ssl-verify SSL_VERIFY] [--timeout TIMEOUT] [--api-version API_VERSION] [--per-page PER_PAGE] [--pagination PAGINATION] [--order-by ORDER_BY] [--user-agent USER_AGENT] [--private-token PRIVATE_TOKEN | --oauth-token OAUTH_TOKEN | --job-token JOB_TOKEN] gitlab: error: argument --timeout: invalid int value: 'xxx' The 2nd commit (d493a5e) is less a fix, it's more to make things coherent for these two other int arguments. It improves handling of non-int values, I think. Before: $ docker run -it --rm -e GITLAB_PER_PAGE=xxx python-gitlab:latest project list Impossible to list objects (400: per_page is invalid) $ docker run -it --rm python-gitlab:latest --per-page xxx project list Impossible to list objects (400: per_page is invalid) $ docker run -it --rm python-gitlab:latest --per-page 2 project list --page xxx Impossible to list objects (400: page is invalid) After (with d493a5e): $ docker run -it --rm -e GITLAB_PER_PAGE=xxx python-gitlab:latest project list usage: gitlab [--version] [-v] [-d] [-c CONFIG_FILE] [-g GITLAB] [-o {json,legacy,yaml}] [-f FIELDS] [--server-url SERVER_URL] [--ssl-verify SSL_VERIFY] [--timeout TIMEOUT] [--api-version API_VERSION] [--per-page PER_PAGE] [--pagination PAGINATION] [--order-by ORDER_BY] [--user-agent USER_AGENT] [--private-token PRIVATE_TOKEN | --oauth-token OAUTH_TOKEN | --job-token JOB_TOKEN] gitlab: error: argument --per-page: invalid int value: 'xxx' $ docker run -it --rm python-gitlab:latest --per-page xxx project list usage: gitlab [--version] [-v] [-d] [-c CONFIG_FILE] [-g GITLAB] [-o {json,legacy,yaml}] [-f FIELDS] [--server-url SERVER_URL] [--ssl-verify SSL_VERIFY] [--timeout TIMEOUT] [--api-version API_VERSION] [--per-page PER_PAGE] [--pagination PAGINATION] [--order-by ORDER_BY] [--user-agent USER_AGENT] [--private-token PRIVATE_TOKEN | --oauth-token OAUTH_TOKEN | --job-token JOB_TOKEN] gitlab: error: argument --per-page: invalid int value: 'xxx' $ docker run -it --rm python-gitlab:latest --per-page 2 project list --page xxx usage: gitlab project list [-h] [--sudo SUDO] [--archived ARCHIVED] [--id-after ID_AFTER] [--id-before ID_BEFORE] [--last-activity-after LAST_ACTIVITY_AFTER] [--last-activity-before LAST_ACTIVITY_BEFORE] [--membership MEMBERSHIP] [--min-access-level MIN_ACCESS_LEVEL] [--order-by ORDER_BY] [--owned OWNED] [--repository-checksum-failed REPOSITORY_CHECKSUM_FAILED] [--repository-storage REPOSITORY_STORAGE] [--search-namespaces SEARCH_NAMESPACES] [--search SEARCH] [--simple SIMPLE] [--sort SORT] [--starred STARRED] [--statistics STATISTICS] [--topic TOPIC] [--visibility VISIBILITY] [--wiki-checksum-failed WIKI_CHECKSUM_FAILED] [--with-custom-attributes WITH_CUSTOM_ATTRIBUTES] [--with-issues-enabled WITH_ISSUES_ENABLED] [--with-merge-requests-enabled WITH_MERGE_REQUESTS_ENABLED] [--with-programming-language WITH_PROGRAMMING_LANGUAGE] [--page PAGE] [--per-page PER_PAGE] [--all] gitlab project list: error: argument --page: invalid int value: 'xxx' Note: all tests/examples above are run after rebuilding a container as documented in the README, so it seems to be with Python 3.10 (on Alpine).

Open Graph Description: This PR is mainly for fixing handling of --timeout / GITLAB_TIMEOUT. Before: $ docker run -it --rm python-gitlab:latest --timeout=10 project get --id gitlab-org/gitlab Impossible to get object (Tim...

X Description: This PR is mainly for fixing handling of --timeout / GITLAB_TIMEOUT. Before: $ docker run -it --rm python-gitlab:latest --timeout=10 project get --id gitlab-org/gitlab Impossible to get object (Tim...

Opengraph URL: https://github.com/python-gitlab/python-gitlab/pull/1862

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/checks(.:format)
route-controllerpull_requests
route-actionchecks
fetch-noncev2:5a9465e4-b81c-af76-659b-4d6b778b7e02
current-catalog-service-hash87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a
request-idB7D0:F5443:80AF2DE:B02EE77:697398FF
html-safe-nonce1a1ddf21274e8b8099db8b9fd39cbc22904f58bff6b4287b1892cd966148e42b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCN0QwOkY1NDQzOjgwQUYyREU6QjAyRUU3Nzo2OTczOThGRiIsInZpc2l0b3JfaWQiOiI1NjQ5NDgzNjkxMTM1ODU5MTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac334b1262ef4b68e82dbd631f489524cb00831f5639d2d4923d436ecdf27303ad
hovercard-subject-tagpull_request:831927717
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/checks
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python-gitlab/python-gitlab/pull/1862/checks
twitter:imagehttps://avatars.githubusercontent.com/u/6212720?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/6212720?s=400&v=4
og:image:altThis PR is mainly for fixing handling of --timeout / GITLAB_TIMEOUT. Before: $ docker run -it --rm python-gitlab:latest --timeout=10 project get --id gitlab-org/gitlab Impossible to get object (Tim...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None2050cdbbbbb4ed55fd8fdf9b956111480f540c8aea2ae70cb27cdafc585f54a8
turbo-cache-controlno-preview
go-importgithub.com/python-gitlab/python-gitlab git https://github.com/python-gitlab/python-gitlab.git
octolytics-dimension-user_id28886265
octolytics-dimension-user_loginpython-gitlab
octolytics-dimension-repository_id8077625
octolytics-dimension-repository_nwopython-gitlab/python-gitlab
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id8077625
octolytics-dimension-repository_network_root_nwopython-gitlab/python-gitlab
turbo-body-classeslogged-out env-production page-responsive full-width full-width-p-0
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasedb1779077eea7e25848d6e8f2461754c9e48f3ec
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-gitlab/python-gitlab/pull/1862/checks#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-gitlab%2Fpython-gitlab%2Fpull%2F1862%2Fchecks
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-gitlab%2Fpython-gitlab%2Fpull%2F1862%2Fchecks
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fchecks&source=header-repo&source_repo=python-gitlab%2Fpython-gitlab
Reloadhttps://github.com/python-gitlab/python-gitlab/pull/1862/checks
Reloadhttps://github.com/python-gitlab/python-gitlab/pull/1862/checks
Reloadhttps://github.com/python-gitlab/python-gitlab/pull/1862/checks
python-gitlab https://github.com/python-gitlab
python-gitlabhttps://github.com/python-gitlab/python-gitlab
Notifications https://github.com/login?return_to=%2Fpython-gitlab%2Fpython-gitlab
Fork 675 https://github.com/login?return_to=%2Fpython-gitlab%2Fpython-gitlab
Star 2.4k https://github.com/login?return_to=%2Fpython-gitlab%2Fpython-gitlab
Code https://github.com/python-gitlab/python-gitlab
Issues 26 https://github.com/python-gitlab/python-gitlab/issues
Pull requests 12 https://github.com/python-gitlab/python-gitlab/pulls
Discussions https://github.com/python-gitlab/python-gitlab/discussions
Actions https://github.com/python-gitlab/python-gitlab/actions
Projects 0 https://github.com/python-gitlab/python-gitlab/projects
Security 0 https://github.com/python-gitlab/python-gitlab/security
Insights https://github.com/python-gitlab/python-gitlab/pulse
Code https://github.com/python-gitlab/python-gitlab
Issues https://github.com/python-gitlab/python-gitlab/issues
Pull requests https://github.com/python-gitlab/python-gitlab/pulls
Discussions https://github.com/python-gitlab/python-gitlab/discussions
Actions https://github.com/python-gitlab/python-gitlab/actions
Projects https://github.com/python-gitlab/python-gitlab/projects
Security https://github.com/python-gitlab/python-gitlab/security
Insights https://github.com/python-gitlab/python-gitlab/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython-gitlab%2Fpython-gitlab%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython-gitlab%2Fpython-gitlab%2Fissues%2Fnew%2Fchoose
max-wittighttps://github.com/max-wittig
python-gitlab:mainhttps://github.com/python-gitlab/python-gitlab/tree/main
thomasgl-orange:cli-fix-timeouthttps://github.com/thomasgl-orange/python-gitlab/tree/cli-fix-timeout
Conversation 1 https://github.com/python-gitlab/python-gitlab/pull/1862
Commits 2 https://github.com/python-gitlab/python-gitlab/pull/1862/commits
Checks 0 https://github.com/python-gitlab/python-gitlab/pull/1862/checks
Files changed https://github.com/python-gitlab/python-gitlab/pull/1862/files
Please reload this pagehttps://github.com/python-gitlab/python-gitlab/pull/1862/checks
Please reload this pagehttps://github.com/python-gitlab/python-gitlab/pull/1862/checks
fix(cli): make 'timeout', 'per_page' and 'page' type explicit https://github.com/python-gitlab/python-gitlab/pull/1862/checks#top
Please reload this pagehttps://github.com/python-gitlab/python-gitlab/pull/1862/checks
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.