René's URL Explorer Experiment


Title: Bit cannot round-trip accepted empty values through text · Issue #165 · pgvector/pgvector-python · GitHub

Open Graph Title: Bit cannot round-trip accepted empty values through text · Issue #165 · pgvector/pgvector-python

X Title: Bit cannot round-trip accepted empty values through text · Issue #165 · pgvector/pgvector-python

Description: Bit accepts a zero-length value from bytes or binary data, but cannot reconstruct that value from its own to_text() output. Direct construction from an empty string or list fails the same way. Reproduced on current master at 8cef6e4e867b...

Open Graph Description: Bit accepts a zero-length value from bytes or binary data, but cannot reconstruct that value from its own to_text() output. Direct construction from an empty string or list fails the same way. Repr...

X Description: Bit accepts a zero-length value from bytes or binary data, but cannot reconstruct that value from its own to_text() output. Direct construction from an empty string or list fails the same way. Repr...

Opengraph URL: https://github.com/pgvector/pgvector-python/issues/165

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bit cannot round-trip accepted empty values through text","articleBody":"`Bit` accepts a zero-length value from bytes or binary data, but cannot reconstruct that value from its own `to_text()` output. Direct construction from an empty string or list fails the same way.\n\nReproduced on current `master` at `8cef6e4e867b8d07971da1a3d6170fb6e75e3c40` (package version 0.5.1), with Python 3.13.16:\n\n```python\nfrom struct import pack\nfrom pgvector import Bit\n\nbit = Bit(b\"\")\nassert bit.to_list() == []\nassert bit.to_text() == \"\"\nassert bit.to_binary() == pack(\">i\", 0)\nassert Bit.from_binary(bit.to_binary()) == bit\n\nBit.from_text(bit.to_text())\n# ValueError: invalid literal for int() with base 2: ''\n\n# These also raise the same ValueError:\n# Bit(\"\")\n# Bit([])\n```\n\nThe shared string/list constructor reaches `int(value, 2)` with `value == \"\"`. This makes text round trips inconsistent with the already accepted empty bytes/binary representation. I would expect the empty text/list inputs to preserve that same zero-length value, rather than represent a one-bit zero or raise an integer-parsing error.\n\nNonempty controls at lengths 1, 7, 8 and 9 preserve their exact text and binary representations. `Bit(b\"\\x00\")` remains eight zero bits, distinct from the empty value, and invalid strings such as `\"0b1\"`, `\"1_0\"` and `\"201\"` are still rejected. This is separate from the invalid-string validation fixed in #161 and the SQLAlchemy input adaptation proposed in #137.\n\nThis report concerns the public `Bit` conversion API only. The reproduction and controls were executed directly against the cited source using the Python standard library; no NumPy or PostgreSQL round trip is claimed. The repository pytest suite could not start because pytest was unavailable, and dependency restoration failed over verified HTTPS, so I am not submitting a code fix as validated.\n\nPrepared with AI assistance; no human review is claimed.","author":{"url":"https://github.com/j45856021-dev","@type":"Person","name":"j45856021-dev"},"datePublished":"2026-10-14T09:03:00Z","url":"https://github.com/pgvector/pgvector-python/issues/165"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:aee50958-034e-f508-72d0-b432b32ea659
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE45C:729DB:B5A9A0:EE4A44:6AFE8816
html-safe-noncedfd65f6a3a5a736415a11e230a0ec4900da99ab0ee17514319f06bedf1eebefb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDVDOjcyOURCOkI1QTlBMDpFRTRBNDQ6NkFGRTg4MTYiLCJ2aXNpdG9yX2lkIjoiODU5OTI2MjgxNjA4NTM3OTA5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacdeb9997a72666755c6b54e1a1f6bfc3d7db9e7c8c19932f9fb5a7aaf005c994c
hovercard-subject-tagissue:5844978328
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/pgvector/pgvector-python/165/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a68aead321ce369a980cbdfcbff202ecbed7da052c94c78cb25c8da5c36510d7/pgvector/pgvector-python/issues/165
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a68aead321ce369a980cbdfcbff202ecbed7da052c94c78cb25c8da5c36510d7/pgvector/pgvector-python/issues/165
og:image:altBit accepts a zero-length value from bytes or binary data, but cannot reconstruct that value from its own to_text() output. Direct construction from an empty string or list fails the same way. Repr...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamej45856021-dev
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
go-importgithub.com/pgvector/pgvector-python git https://github.com/pgvector/pgvector-python.git
octolytics-dimension-user_id98363230
octolytics-dimension-user_loginpgvector
octolytics-dimension-repository_id376300726
octolytics-dimension-repository_nwopgvector/pgvector-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id376300726
octolytics-dimension-repository_network_root_nwopgvector/pgvector-python
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
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/pgvector/pgvector-python/issues/165#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpgvector%2Fpgvector-python%2Fissues%2F165
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpgvector%2Fpgvector-python%2Fissues%2F165
Sign uphttps://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=pgvector%2Fpgvector-python
Reloadhttps://github.com/pgvector/pgvector-python/issues/165
Reloadhttps://github.com/pgvector/pgvector-python/issues/165
Reloadhttps://github.com/pgvector/pgvector-python/issues/165
pgvectorhttps://github.com/pgvector
pgvector-pythonhttps://github.com/pgvector/pgvector-python
Codehttps://github.com/pgvector/pgvector-python
Issues2 (2)https://github.com/pgvector/pgvector-python/issues
Pull requests8 (8)https://github.com/pgvector/pgvector-python/pulls
Actionshttps://github.com/pgvector/pgvector-python/actions
Security and qualityhttps://github.com/pgvector/pgvector-python/security
Insightshttps://github.com/pgvector/pgvector-python/insights
https://github.com/pgvector/pgvector-python
New issuehttps://github.com/login?return_to=https://github.com/pgvector/pgvector-python/issues/165
New issuehttps://github.com/login?return_to=https://github.com/pgvector/pgvector-python/issues/165
Bit cannot round-trip accepted empty values through texthttps://github.com/pgvector/pgvector-python/issues/165#top
https://github.com/j45856021-dev
j45856021-devhttps://github.com/j45856021-dev
on Oct 14, 2026https://github.com/pgvector/pgvector-python/issues/165#issue-5844978328
#161https://github.com/pgvector/pgvector-python/issues/161
#137https://github.com/pgvector/pgvector-python/pull/137
ankanehttps://github.com/ankane
completedhttps://github.com/pgvector/pgvector-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
2915a59https://github.com/pgvector/pgvector-python/commit/2915a599ac1a22876fe5d05fdb55bc40feadaa36
on Oct 14, 2026https://github.com/pgvector/pgvector-python/issues/165#event-33270389113
https://github.com/ankane
ankanehttps://github.com/ankane
on Oct 14, 2026https://github.com/pgvector/pgvector-python/issues/165#issuecomment-6178706031
@j45856021-devhttps://github.com/j45856021-dev
Sign up for freehttps://github.com/signup?return_to=https://github.com/pgvector/pgvector-python/issues/165
Sign in to commenthttps://github.com/login?return_to=https://github.com/pgvector/pgvector-python/issues/165
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.