René's URL Explorer Experiment


Title: gs-usb WinUSB support and timeout=none is forever by BenGardiner · Pull Request #2031 · hardbyte/python-can · GitHub

Open Graph Title: gs-usb WinUSB support and timeout=none is forever by BenGardiner · Pull Request #2031 · hardbyte/python-can

X Title: gs-usb WinUSB support and timeout=none is forever by BenGardiner · Pull Request #2031 · hardbyte/python-can

Description: Summary of Changes This changes gs_usb handling of timeout=None to 'forever' by passing 0 to the underlying layer as suggested by @zariiii9003 in #2026 . But first I needed to make gs_usb use WinUSB instead of libusbK because I didn't want to zadig anymore. I had no clue how to do this so I got copilot claude opus 4.6 to make those base changes. Here's what they said in BenGardiner#1 The upstream gs_usb package hardcodes backend=libusb1.get_backend() in GsUsb.scan() and GsUsb.find(), which forces the libusb1 backend and requires libusbK on Windows. WCID-compatible devices (e.g. candleLight) auto-install WinUSB, but the forced backend prevents it from working. Additionally, the gs_usb interface directly imports usb (pyusb) but pyusb was only a transitive dependency via the gs-usb package, causing No module named 'usb' on import. can/interfaces/gs_usb.py: Replace GsUsb.scan() / GsUsb.find() with local _scan_gs_usb_devices() / _find_gs_usb_device() that call usb.core.find() without specifying a backend, letting pyusb auto-detect (WinUSB, libusbK, libusb, etc.) pyproject.toml: Add pyusb>=1.0.2 as explicit dependency in the gs-usb optional group since we now import usb directly doc/interfaces/gs_usb.rst: Update Windows driver guidance to reflect both WinUSB and libusbK support test/test_interface_gs_usb.py: Add tests verifying no backend is forced in device discovery I have tested here on a 500Kbps medium load bus; I used the same device and setup with all of the cantact, candle and gs_usb python-can drivers and got the same results Related Issues / Pull Requests Related to #2026 Type of Change Bug fix New feature Documentation update Refactoring Other (please describe): Checklist I have followed the contribution guide. I have added or updated tests as appropriate. I have added or updated documentation as appropriate. I have added a news fragment for towncrier. All checks and tests pass (tox). Additional Notes I will add news frag once I know what the PR # is.

Open Graph Description: Summary of Changes This changes gs_usb handling of timeout=None to 'forever' by passing 0 to the underlying layer as suggested by @zariiii9003 in #2026 . But first I needed to make gs_usb ...

X Description: Summary of Changes This changes gs_usb handling of timeout=None to 'forever' by passing 0 to the underlying layer as suggested by @zariiii9003 in #2026 . But first I needed to make...

Opengraph URL: https://github.com/hardbyte/python-can/pull/2031

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:bed02609-37de-9f70-2718-755b3acdfd7e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA400:2E2554:17F2F8:1ECAA5:6A5EA75A
html-safe-noncedf2977e91c6963e3f446e50e90938e495b35b9d5617dcd65ec62f2e4038d9747
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDAwOjJFMjU1NDoxN0YyRjg6MUVDQUE1OjZBNUVBNzVBIiwidmlzaXRvcl9pZCI6IjUwNDY3OTQ1OTU5MTIwMjY1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac763766fc87297adb3c0d887ab4ce34515e997cfceff4c8d0323dde501ffb3475
hovercard-subject-tagpull_request:3316448066
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/hardbyte/python-can/pull/2031/files
twitter:imagehttps://avatars.githubusercontent.com/u/243321?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/243321?s=400&v=4
og:image:altSummary of Changes This changes gs_usb handling of timeout=None to 'forever' by passing 0 to the underlying layer as suggested by @zariiii9003 in #2026 . But first I needed to make gs_usb ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7c7e31acb6a895494e518b880f5ccf39604f7fa9a8f2f3c64145efc3b776256d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/hardbyte/python-can git https://github.com/hardbyte/python-can.git
octolytics-dimension-user_id855189
octolytics-dimension-user_loginhardbyte
octolytics-dimension-repository_id69090889
octolytics-dimension-repository_nwohardbyte/python-can
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id69090889
octolytics-dimension-repository_network_root_nwohardbyte/python-can
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2d2ac9bdd71d5f53f2b731c9330677e38624e301
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/hardbyte/python-can/pull/2031/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhardbyte%2Fpython-can%2Fpull%2F2031%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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%2Fhardbyte%2Fpython-can%2Fpull%2F2031%2Ffiles
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%2Ffiles&source=header-repo&source_repo=hardbyte%2Fpython-can
Reloadhttps://github.com/hardbyte/python-can/pull/2031/files
Reloadhttps://github.com/hardbyte/python-can/pull/2031/files
Reloadhttps://github.com/hardbyte/python-can/pull/2031/files
hardbyte https://github.com/hardbyte
python-canhttps://github.com/hardbyte/python-can
Notifications https://github.com/login?return_to=%2Fhardbyte%2Fpython-can
Fork 687 https://github.com/login?return_to=%2Fhardbyte%2Fpython-can
Star 1.6k https://github.com/login?return_to=%2Fhardbyte%2Fpython-can
Code https://github.com/hardbyte/python-can
Issues 224 https://github.com/hardbyte/python-can/issues
Pull requests 35 https://github.com/hardbyte/python-can/pulls
Discussions https://github.com/hardbyte/python-can/discussions
Actions https://github.com/hardbyte/python-can/actions
Security and quality 0 https://github.com/hardbyte/python-can/security
Insights https://github.com/hardbyte/python-can/pulse
Code https://github.com/hardbyte/python-can
Issues https://github.com/hardbyte/python-can/issues
Pull requests https://github.com/hardbyte/python-can/pulls
Discussions https://github.com/hardbyte/python-can/discussions
Actions https://github.com/hardbyte/python-can/actions
Security and quality https://github.com/hardbyte/python-can/security
Insights https://github.com/hardbyte/python-can/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fhardbyte%2Fpython-can%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fhardbyte%2Fpython-can%2Fissues%2Fnew%2Fchoose
zariiii9003https://github.com/zariiii9003
hardbyte:mainhttps://github.com/hardbyte/python-can/tree/main
BenGardiner:gs_usb_WinUSB_and_timeoutNonehttps://github.com/BenGardiner/python-can/tree/gs_usb_WinUSB_and_timeoutNone
Conversation 9 https://github.com/hardbyte/python-can/pull/2031
Commits 13 https://github.com/hardbyte/python-can/pull/2031/commits
Checks 28 https://github.com/hardbyte/python-can/pull/2031/checks
Files changed 6 https://github.com/hardbyte/python-can/pull/2031/files
gs-usb WinUSB support and timeout=none is forever https://github.com/hardbyte/python-can/pull/2031/files#top
Show all changes 13 commits https://github.com/hardbyte/python-can/pull/2031/files
b335bbd Update gs_usb driver to support WinUSB by not forcing libusb1 backend Copilot Feb 23, 2026 https://github.com/hardbyte/python-can/pull/2031/commits/b335bbda21e004de3ac14db6ccded14331494851
eecde92 Add pyusb as explicit dependency in gs-usb optional group Copilot Feb 23, 2026 https://github.com/hardbyte/python-can/pull/2031/commits/eecde923084b617e2bbd5615547f768bfa2205c7
2408840 gs_usb: treat timeout=None as forever BenGardiner Feb 23, 2026 https://github.com/hardbyte/python-can/pull/2031/commits/2408840284fc53dcc0b93293fe56dd2942f126ac
d7e2e3a add news fragment BenGardiner Feb 23, 2026 https://github.com/hardbyte/python-can/pull/2031/commits/d7e2e3a4acc624dffa89b1b1484d407ae1521c38
1e68110 formatting fixes BenGardiner Feb 23, 2026 https://github.com/hardbyte/python-can/pull/2031/commits/1e68110dffc867f1976b05b677752fd1ae2357ae
f0cbee0 gs_usb module needed in tests deps now BenGardiner Feb 23, 2026 https://github.com/hardbyte/python-can/pull/2031/commits/f0cbee0b90b659801a05f9b50091ba5126003df8
4367d90 Fix gs_usb shutdown to always call parent BusABC.shutdown() Copilot Feb 23, 2026 https://github.com/hardbyte/python-can/pull/2031/commits/4367d9071a8e042b6133996876e15634c3a2918c
9618934 note pyusb not WinUSB in news and news frags are a sentence not a lis… BenGardiner Mar 4, 2026 https://github.com/hardbyte/python-can/pull/2031/commits/961893479bfd5bb432e66a46bde1cb5727737140
ea01de5 put gs-usb dep into tox.ini (@zariiii9003) BenGardiner Mar 4, 2026 https://github.com/hardbyte/python-can/pull/2031/commits/ea01de5870a594282543920252509a6b02c510a4
75fe619 combine _scan_gs_usb_devices() and _find_gs_usb_device() (@zariiii9003) BenGardiner Mar 4, 2026 https://github.com/hardbyte/python-can/pull/2031/commits/75fe6190556a02107bb970f1fe5925b808e00247
3e5b1c0 don't instantiate a GsUsb device for every one detected (@zariiii9003) BenGardiner Mar 4, 2026 https://github.com/hardbyte/python-can/pull/2031/commits/3e5b1c062ea6166f19680d64b0c5e68736aaef2d
22a3cbd remove gs-usb from mypy (@zariiii9003) BenGardiner Mar 6, 2026 https://github.com/hardbyte/python-can/pull/2031/commits/22a3cbde0aaf177e0772764f276657707f208a8b
ceeef98 gs_usb: explicitly handle timeout=None separate from =0 (@zariiii9003) BenGardiner Mar 6, 2026 https://github.com/hardbyte/python-can/pull/2031/commits/ceeef98bc9424782251e2169d09e0fb4f1df89a6
Clear filters https://github.com/hardbyte/python-can/pull/2031/files
Please reload this pagehttps://github.com/hardbyte/python-can/pull/2031/files
Please reload this pagehttps://github.com/hardbyte/python-can/pull/2031/files
gs_usb.py https://github.com/hardbyte/python-can/pull/2031/files#diff-728a0d4ef6d4645e099dd70a322662122111f58104af6963de1b6195ddbf9154
2031.changed.md https://github.com/hardbyte/python-can/pull/2031/files#diff-1b591c659728cdf3f0dcc949426a76202538e86430b941cce3561df640a8491c
gs_usb.rst https://github.com/hardbyte/python-can/pull/2031/files#diff-7f4dc54551625961ffdae4a2dfab085e357a4347f91efdb56bce63fec64e17a7
pyproject.toml https://github.com/hardbyte/python-can/pull/2031/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
test_interface_gs_usb.py https://github.com/hardbyte/python-can/pull/2031/files#diff-f80004928e9673c53b418f38fac2ee01100e824429dd18f312910640271650af
tox.ini https://github.com/hardbyte/python-can/pull/2031/files#diff-ef2cef9f88b4fe09ca3082140e67f5ad34fb65fb6e228f119d3812261ae51449
can/interfaces/gs_usb.pyhttps://github.com/hardbyte/python-can/pull/2031/files#diff-728a0d4ef6d4645e099dd70a322662122111f58104af6963de1b6195ddbf9154
View file https://github.com/BenGardiner/python-can/blob/ceeef98bc9424782251e2169d09e0fb4f1df89a6/can/interfaces/gs_usb.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/hardbyte/python-can/pull/2031/{{ revealButtonHref }}
https://github.com/hardbyte/python-can/pull/2031/files#diff-728a0d4ef6d4645e099dd70a322662122111f58104af6963de1b6195ddbf9154
https://github.com/hardbyte/python-can/pull/2031/files#diff-728a0d4ef6d4645e099dd70a322662122111f58104af6963de1b6195ddbf9154
https://github.com/hardbyte/python-can/pull/2031/files#diff-728a0d4ef6d4645e099dd70a322662122111f58104af6963de1b6195ddbf9154
https://github.com/hardbyte/python-can/pull/2031/files#diff-728a0d4ef6d4645e099dd70a322662122111f58104af6963de1b6195ddbf9154
https://github.com/hardbyte/python-can/pull/2031/files#diff-728a0d4ef6d4645e099dd70a322662122111f58104af6963de1b6195ddbf9154
https://github.com/hardbyte/python-can/pull/2031/files#diff-728a0d4ef6d4645e099dd70a322662122111f58104af6963de1b6195ddbf9154
doc/changelog.d/2031.changed.mdhttps://github.com/hardbyte/python-can/pull/2031/files#diff-1b591c659728cdf3f0dcc949426a76202538e86430b941cce3561df640a8491c
View file https://github.com/BenGardiner/python-can/blob/ceeef98bc9424782251e2169d09e0fb4f1df89a6/doc/changelog.d/2031.changed.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/hardbyte/python-can/pull/2031/{{ revealButtonHref }}
doc/interfaces/gs_usb.rsthttps://github.com/hardbyte/python-can/pull/2031/files#diff-7f4dc54551625961ffdae4a2dfab085e357a4347f91efdb56bce63fec64e17a7
View file https://github.com/BenGardiner/python-can/blob/ceeef98bc9424782251e2169d09e0fb4f1df89a6/doc/interfaces/gs_usb.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/hardbyte/python-can/pull/2031/{{ revealButtonHref }}
https://github.com/hardbyte/python-can/pull/2031/files#diff-7f4dc54551625961ffdae4a2dfab085e357a4347f91efdb56bce63fec64e17a7
https://github.com/hardbyte/python-can/pull/2031/files#diff-7f4dc54551625961ffdae4a2dfab085e357a4347f91efdb56bce63fec64e17a7
pyproject.tomlhttps://github.com/hardbyte/python-can/pull/2031/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
View file https://github.com/BenGardiner/python-can/blob/ceeef98bc9424782251e2169d09e0fb4f1df89a6/pyproject.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/hardbyte/python-can/pull/2031/{{ revealButtonHref }}
https://github.com/hardbyte/python-can/pull/2031/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
https://github.com/hardbyte/python-can/pull/2031/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
https://github.com/hardbyte/python-can/pull/2031/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
https://github.com/hardbyte/python-can/pull/2031/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
test/test_interface_gs_usb.pyhttps://github.com/hardbyte/python-can/pull/2031/files#diff-f80004928e9673c53b418f38fac2ee01100e824429dd18f312910640271650af
View file https://github.com/BenGardiner/python-can/blob/ceeef98bc9424782251e2169d09e0fb4f1df89a6/test/test_interface_gs_usb.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/hardbyte/python-can/pull/2031/{{ revealButtonHref }}
tox.inihttps://github.com/hardbyte/python-can/pull/2031/files#diff-ef2cef9f88b4fe09ca3082140e67f5ad34fb65fb6e228f119d3812261ae51449
View file https://github.com/BenGardiner/python-can/blob/ceeef98bc9424782251e2169d09e0fb4f1df89a6/tox.ini
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/hardbyte/python-can/pull/2031/{{ revealButtonHref }}
https://github.com/hardbyte/python-can/pull/2031/files#diff-ef2cef9f88b4fe09ca3082140e67f5ad34fb65fb6e228f119d3812261ae51449
https://github.com/hardbyte/python-can/pull/2031/files#diff-ef2cef9f88b4fe09ca3082140e67f5ad34fb65fb6e228f119d3812261ae51449
https://github.com/hardbyte/python-can/pull/2031/files#diff-ef2cef9f88b4fe09ca3082140e67f5ad34fb65fb6e228f119d3812261ae51449
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.