René's URL Explorer Experiment


Title: Non-CLI parts of the library must not write anything to stdout/stderr · Issue #678 · Shopify/shopify_python_api · GitHub

Open Graph Title: Non-CLI parts of the library must not write anything to stdout/stderr · Issue #678 · Shopify/shopify_python_api

X Title: Non-CLI parts of the library must not write anything to stdout/stderr · Issue #678 · Shopify/shopify_python_api

Description: Issue summary Currently, if the error happens during the GraphQL request the response body is being printed to stdout along with an empty line Libraries must not print anything to the console because they're being used in other applicati...

Open Graph Description: Issue summary Currently, if the error happens during the GraphQL request the response body is being printed to stdout along with an empty line Libraries must not print anything to the console becau...

X Description: Issue summary Currently, if the error happens during the GraphQL request the response body is being printed to stdout along with an empty line Libraries must not print anything to the console becau...

Opengraph URL: https://github.com/Shopify/shopify_python_api/issues/678

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Non-CLI parts of the library must not write anything to stdout/stderr","articleBody":"# Issue summary\r\n\r\nCurrently, if the error happens during the GraphQL request the response body is [being printed to stdout](https://github.com/Shopify/shopify_python_api/blob/5f295932bebbdde1835d35c4865093ff83564cdc/shopify/resources/graphql.py#L30-L31) along with an empty line\r\n\r\nLibraries must not print anything to the console because they're being used in other applications and the way these applications treat the stdout/stderr could vary:\r\n* User-facing CLIs could use the the stdout to present the data to users and they do it in a way they need it. Having a raw response in the stdout wouldn't be a desirable behavior\r\n* Server-side application often use stdout/stderr to stream logs. And logs are often expected to be in a certain format. Unexpectedly formatted log entries can negatively affect log viewers/analyzers\r\n\r\n\r\n## Expected behavior\r\n\r\nThe library doesn't do raw `print`s to the stdout. It does the logging using the standard way of [logging](https://docs.python.org/3/howto/logging.html) in Python using `logging` module\r\n\r\n\r\n## Actual behavior\r\n\r\nThe library [`print`s raw GraphQL responses](https://github.com/Shopify/shopify_python_api/blob/5f295932bebbdde1835d35c4865093ff83564cdc/shopify/resources/graphql.py#L30-L31)\r\n\r\n## Steps to reproduce the problem\r\n\r\n1. Issue an incorrect request to GraphQL API which leads to a HTTP error\r\n\r\n## Reduced test case\r\n\r\nN/A\r\n\r\n\r\n---\r\n\r\n## Checklist\r\n\r\n- [x] I have described this issue in a way that is actionable (if possible)\r\n","author":{"url":"https://github.com/outring","@type":"Person","name":"outring"},"datePublished":"2023-08-18T08:19:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/678/shopify_python_api/issues/678"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:636cdd7a-5ca3-ca1a-3880-5c3f0d256406
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9A1C:FB44E:23C56F:316B8D:696943F2
html-safe-nonce5efbb4d5926c43596d9e14302a3cb470b95f27acb9ca03418d2bf5c9986cfc4c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTFDOkZCNDRFOjIzQzU2RjozMTZCOEQ6Njk2OTQzRjIiLCJ2aXNpdG9yX2lkIjoiOTEyMDM3NzUxNTk3OTM5MTk4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd7b95cdba30e50b99bacc7bc944e3854b319cbc42dc3eb1356989882561449f6
hovercard-subject-tagissue:1856280808
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Shopify/shopify_python_api/678/issue_layout
twitter:imagehttps://avatars.githubusercontent.com/u/8085?s=400&v=4
twitter:cardsummary
og:imagehttps://avatars.githubusercontent.com/u/8085?s=400&v=4
og:image:altIssue summary Currently, if the error happens during the GraphQL request the response body is being printed to stdout along with an empty line Libraries must not print anything to the console becau...
og:site_nameGitHub
og:typeobject
og:author:usernameoutring
hostnamegithub.com
expected-hostnamegithub.com
None54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d
turbo-cache-controlno-preview
go-importgithub.com/Shopify/shopify_python_api git https://github.com/Shopify/shopify_python_api.git
octolytics-dimension-user_id8085
octolytics-dimension-user_loginShopify
octolytics-dimension-repository_id2249127
octolytics-dimension-repository_nwoShopify/shopify_python_api
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id2249127
octolytics-dimension-repository_network_root_nwoShopify/shopify_python_api
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released69ac0477df0f87da03b8b06cebd187012d7a930
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/Shopify/shopify_python_api/issues/678#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FShopify%2Fshopify_python_api%2Fissues%2F678
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%2FShopify%2Fshopify_python_api%2Fissues%2F678
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=Shopify%2Fshopify_python_api
Reloadhttps://github.com/Shopify/shopify_python_api/issues/678
Reloadhttps://github.com/Shopify/shopify_python_api/issues/678
Reloadhttps://github.com/Shopify/shopify_python_api/issues/678
Shopify https://github.com/Shopify
shopify_python_apihttps://github.com/Shopify/shopify_python_api
Notifications https://github.com/login?return_to=%2FShopify%2Fshopify_python_api
Fork 390 https://github.com/login?return_to=%2FShopify%2Fshopify_python_api
Star 1.4k https://github.com/login?return_to=%2FShopify%2Fshopify_python_api
Code https://github.com/Shopify/shopify_python_api
Issues 13 https://github.com/Shopify/shopify_python_api/issues
Pull requests 11 https://github.com/Shopify/shopify_python_api/pulls
Actions https://github.com/Shopify/shopify_python_api/actions
Models https://github.com/Shopify/shopify_python_api/models
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/Shopify/shopify_python_api/security
Please reload this pagehttps://github.com/Shopify/shopify_python_api/issues/678
Insights https://github.com/Shopify/shopify_python_api/pulse
Code https://github.com/Shopify/shopify_python_api
Issues https://github.com/Shopify/shopify_python_api/issues
Pull requests https://github.com/Shopify/shopify_python_api/pulls
Actions https://github.com/Shopify/shopify_python_api/actions
Models https://github.com/Shopify/shopify_python_api/models
Security https://github.com/Shopify/shopify_python_api/security
Insights https://github.com/Shopify/shopify_python_api/pulse
New issuehttps://github.com/login?return_to=https://github.com/Shopify/shopify_python_api/issues/678
New issuehttps://github.com/login?return_to=https://github.com/Shopify/shopify_python_api/issues/678
#679https://github.com/Shopify/shopify_python_api/pull/679
Non-CLI parts of the library must not write anything to stdout/stderrhttps://github.com/Shopify/shopify_python_api/issues/678#top
#679https://github.com/Shopify/shopify_python_api/pull/679
Stalehttps://github.com/Shopify/shopify_python_api/issues?q=state%3Aopen%20label%3A%22Stale%22
https://github.com/outring
https://github.com/outring
outringhttps://github.com/outring
on Aug 18, 2023https://github.com/Shopify/shopify_python_api/issues/678#issue-1856280808
being printed to stdouthttps://github.com/Shopify/shopify_python_api/blob/5f295932bebbdde1835d35c4865093ff83564cdc/shopify/resources/graphql.py#L30-L31
logginghttps://docs.python.org/3/howto/logging.html
prints raw GraphQL responseshttps://github.com/Shopify/shopify_python_api/blob/5f295932bebbdde1835d35c4865093ff83564cdc/shopify/resources/graphql.py#L30-L31
Stalehttps://github.com/Shopify/shopify_python_api/issues?q=state%3Aopen%20label%3A%22Stale%22
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.