René's URL Explorer Experiment


Title: fix: treat explicitly-set zero page margins as zero in _block_width by 2025sl93041-gkb · Pull Request #1643 · python-openxml/python-docx · GitHub

Open Graph Title: fix: treat explicitly-set zero page margins as zero in _block_width by 2025sl93041-gkb · Pull Request #1643 · python-openxml/python-docx

X Title: fix: treat explicitly-set zero page margins as zero in _block_width by 2025sl93041-gkb · Pull Request #1643 · python-openxml/python-docx

Description: Create and modify Word documents with Python. Contribute to python-openxml/python-docx development by creating an account on GitHub.

Open Graph Description: What Document._block_width uses section.left_margin or Inches(1) and section.right_margin or Inches(1). Because 0 is falsy in Python, a margin that is explicitly set to zero falls back to Inches(1)...

X Description: What Document._block_width uses section.left_margin or Inches(1) and section.right_margin or Inches(1). Because 0 is falsy in Python, a margin that is explicitly set to zero falls back to Inches(1)...

Opengraph URL: https://github.com/python-openxml/python-docx/pull/1643

X: @github

direct link

Domain: github.com

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/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:f1ebd94f-bd85-b09b-aabf-c74692c126d0
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id866A:3EF81C:1C893B:278575:6AFF6381
html-safe-nonce3fdc652a4cdb9ab62fceddeebd1b097a822a0b06fb20e047890a0ee987b00d02
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjZBOjNFRjgxQzoxQzg5M0I6Mjc4NTc1OjZBRkY2MzgxIiwidmlzaXRvcl9pZCI6IjkwNTgxMjE1MDExOTQwMTk3MTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9ac8ad40c47344765e0aaad518674b8c801508159fbfd63bf1f764467bd8f3ea
hovercard-subject-tagpull_request:5221814770
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python-openxml/python-docx/1643/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/0f92217c2679b3edfd9e5a7b5debd7162583f0132a5249eb81da96937d2b9459/python-openxml/python-docx/pull/1643
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0f92217c2679b3edfd9e5a7b5debd7162583f0132a5249eb81da96937d2b9459/python-openxml/python-docx/pull/1643
og:image:altWhat Document._block_width uses section.left_margin or Inches(1) and section.right_margin or Inches(1). Because 0 is falsy in Python, a margin that is explicitly set to zero falls back to Inches(1)...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:username2025sl93041-gkb
hostnamegithub.com
expected-hostnamegithub.com
None41b58589a1c4eda1e3c8904144a412b88ca4455f63ca2ad3629f2e9f3c3a1d12
turbo-cache-controlno-cache
go-importgithub.com/python-openxml/python-docx git https://github.com/python-openxml/python-docx.git
octolytics-dimension-user_id3403760
octolytics-dimension-user_loginpython-openxml
octolytics-dimension-repository_id13592924
octolytics-dimension-repository_nwopython-openxml/python-docx
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id13592924
octolytics-dimension-repository_network_root_nwopython-openxml/python-docx
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
release8968d6d6acc65d74e4df332d23932dd3fd0502a4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python-openxml/python-docx/pull/1643#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fpull%2F1643
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%2Fpython-openxml%2Fpython-docx%2Fpull%2F1643
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%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python-openxml%2Fpython-docx
Reloadhttps://github.com/python-openxml/python-docx/pull/1643
Reloadhttps://github.com/python-openxml/python-docx/pull/1643
Reloadhttps://github.com/python-openxml/python-docx/pull/1643
python-openxmlhttps://github.com/python-openxml
python-docxhttps://github.com/python-openxml/python-docx
Codehttps://github.com/python-openxml/python-docx
Issues387 (387)https://github.com/python-openxml/python-docx/issues
Pull requests167 (167)https://github.com/python-openxml/python-docx/pulls
Actionshttps://github.com/python-openxml/python-docx/actions
Projectshttps://github.com/python-openxml/python-docx/projects
Wikihttps://github.com/python-openxml/python-docx/wiki
Security and qualityhttps://github.com/python-openxml/python-docx/security
Insightshttps://github.com/python-openxml/python-docx/insights
https://github.com/python-openxml/python-docx
2025sl93041-gkbhttps://github.com/2025sl93041-gkb
python-openxml:develophttps://github.com/python-openxml/python-docx/tree/develop
2025sl93041-gkb:fix/block-width-zero-marginhttps://github.com/2025sl93041-gkb/python-docx/tree/fix/block-width-zero-margin
Conversationhttps://github.com/python-openxml/python-docx/pull/1643
Commits27 (27)https://github.com/python-openxml/python-docx/pull/1643/commits
Checkshttps://github.com/python-openxml/python-docx/pull/1643/checks
Files changedhttps://github.com/python-openxml/python-docx/pull/1643/files
fix: treat explicitly-set zero page margins as zero in _block_widthhttps://github.com/python-openxml/python-docx/pull/1643#top
2025sl93041-gkbhttps://github.com/2025sl93041-gkb
python-openxml:develophttps://github.com/python-openxml/python-docx/tree/develop
2025sl93041-gkb:fix/block-width-zero-marginhttps://github.com/2025sl93041-gkb/python-docx/tree/fix/block-width-zero-margin
https://github.com/2025sl93041-gkb
2025sl93041-gkbhttps://github.com/2025sl93041-gkb
Nov 9, 2026https://github.com/python-openxml/python-docx/pull/1643#issue-6283638102
#1638https://github.com/python-openxml/python-docx/issues/1638
1.2.0: _block_width treats a zero page margin as 1 inch, so tables are too narrow #1638https://github.com/python-openxml/python-docx/issues/1638
#1638https://github.com/python-openxml/python-docx/issues/1638
Please reload this pagehttps://github.com/python-openxml/python-docx/pull/1643
scannyhttps://github.com/scanny
June 16, 2025 14:24https://github.com/python-openxml/python-docx/pull/1643#commits-pushed-5cb32d7
https://github.com/scanny
xfail: acceptance test for Document.commentshttps://github.com/python-openxml/python-docx/pull/1643/commits/5cb32d7787a79ad255ad6f11ad735d2513dd08c1
5cb32d7https://github.com/python-openxml/python-docx/pull/1643/commits/5cb32d7787a79ad255ad6f11ad735d2513dd08c1
https://github.com/scanny
comments: add Document.commentshttps://github.com/python-openxml/python-docx/pull/1643/commits/451747a944fe93dfdfec1363ff11516789eb5524
451747ahttps://github.com/python-openxml/python-docx/pull/1643/commits/451747a944fe93dfdfec1363ff11516789eb5524
https://github.com/scanny
comments: add DocumentPart.commentshttps://github.com/python-openxml/python-docx/pull/1643/commits/8f184cc41811995916fa0d0c02d9dab761092a67
8f184cchttps://github.com/python-openxml/python-docx/pull/1643/commits/8f184cc41811995916fa0d0c02d9dab761092a67
https://github.com/scanny
comments: add DocumentPart._comments_parthttps://github.com/python-openxml/python-docx/pull/1643/commits/ae0e82d979a972d758918072c7088fa49fa5eec3
ae0e82dhttps://github.com/python-openxml/python-docx/pull/1643/commits/ae0e82d979a972d758918072c7088fa49fa5eec3
https://github.com/scanny
comments: add CommentsPart.commentshttps://github.com/python-openxml/python-docx/pull/1643/commits/9c8a2e91fa743bf8f19226eb3353c9fa1a6973b3
9c8a2e9https://github.com/python-openxml/python-docx/pull/1643/commits/9c8a2e91fa743bf8f19226eb3353c9fa1a6973b3
https://github.com/scanny
comments: package-loader loads CommentsParthttps://github.com/python-openxml/python-docx/pull/1643/commits/595deccd0d4700cc993332f0cde61a98ca9a443b
595decchttps://github.com/python-openxml/python-docx/pull/1643/commits/595deccd0d4700cc993332f0cde61a98ca9a443b
https://github.com/scanny
comments: add Comments.__len__()https://github.com/python-openxml/python-docx/pull/1643/commits/6c0024c52e477707685ba5c373abb2336b9fef36
6c0024chttps://github.com/python-openxml/python-docx/pull/1643/commits/6c0024c52e477707685ba5c373abb2336b9fef36
https://github.com/scanny
comments: add Comments.__iter__()https://github.com/python-openxml/python-docx/pull/1643/commits/88ff3cab593bd68440e0d552631f2f80c476447d
88ff3cahttps://github.com/python-openxml/python-docx/pull/1643/commits/88ff3cab593bd68440e0d552631f2f80c476447d
https://github.com/scanny
comments: add Comments.get()https://github.com/python-openxml/python-docx/pull/1643/commits/e2aec420ba2d43991e4fa8acb04f200c65229ad0
e2aec42https://github.com/python-openxml/python-docx/pull/1643/commits/e2aec420ba2d43991e4fa8acb04f200c65229ad0
https://github.com/scanny
comments: add Comment.comment_idhttps://github.com/python-openxml/python-docx/pull/1643/commits/0eeaa2f0760b61374fef5f2912f63f7ded4bcaeb
0eeaa2fhttps://github.com/python-openxml/python-docx/pull/1643/commits/0eeaa2f0760b61374fef5f2912f63f7ded4bcaeb
https://github.com/scanny
xfail: acceptance test for Comment propertieshttps://github.com/python-openxml/python-docx/pull/1643/commits/7cf36d648fb18b13979ea7df631724d0dda1bc2c
7cf36d6https://github.com/python-openxml/python-docx/pull/1643/commits/7cf36d648fb18b13979ea7df631724d0dda1bc2c
https://github.com/scanny
comments: add Comment.authorhttps://github.com/python-openxml/python-docx/pull/1643/commits/8af46fe57a84299da4ffc3e1528eecc35accca92
8af46fehttps://github.com/python-openxml/python-docx/pull/1643/commits/8af46fe57a84299da4ffc3e1528eecc35accca92
https://github.com/scanny
comments: add Comment.initialshttps://github.com/python-openxml/python-docx/pull/1643/commits/cab50c5e65da92e31f64401f535efa0d9d0d8e84
cab50c5https://github.com/python-openxml/python-docx/pull/1643/commits/cab50c5e65da92e31f64401f535efa0d9d0d8e84
https://github.com/scanny
comments: add Comment.timestamphttps://github.com/python-openxml/python-docx/pull/1643/commits/cfb87e7708f561f09e6d4f3e7289c659c226eafb
cfb87e7https://github.com/python-openxml/python-docx/pull/1643/commits/cfb87e7708f561f09e6d4f3e7289c659c226eafb
https://github.com/scanny
comments: add Comment.paragraphshttps://github.com/python-openxml/python-docx/pull/1643/commits/19175adf57d91f314e95fa72972c6065f72b4dff
19175adhttps://github.com/python-openxml/python-docx/pull/1643/commits/19175adf57d91f314e95fa72972c6065f72b4dff
https://github.com/scanny
drawing: add image extraction from Drawinghttps://github.com/python-openxml/python-docx/pull/1643/commits/432dd15eb343476024167a3ffec39e2b86d5585c
432dd15https://github.com/python-openxml/python-docx/pull/1643/commits/432dd15eb343476024167a3ffec39e2b86d5585c
https://github.com/scanny
xfail: acceptance test for Comment mutationshttps://github.com/python-openxml/python-docx/pull/1643/commits/d360409273a9fdfd2d6a26a7f35b8f3bfc781f04
d360409https://github.com/python-openxml/python-docx/pull/1643/commits/d360409273a9fdfd2d6a26a7f35b8f3bfc781f04
https://github.com/scanny
comments: add Comments.add_comment()https://github.com/python-openxml/python-docx/pull/1643/commits/8ac9fc4f6b50b9b7f208974e853f1995d63a834a
8ac9fc4https://github.com/python-openxml/python-docx/pull/1643/commits/8ac9fc4f6b50b9b7f208974e853f1995d63a834a
https://github.com/scanny
comments: add Comment.author, .initials settershttps://github.com/python-openxml/python-docx/pull/1643/commits/761f4ccd7751afeeaa5fff5c6f47325c3e0970fa
761f4cchttps://github.com/python-openxml/python-docx/pull/1643/commits/761f4ccd7751afeeaa5fff5c6f47325c3e0970fa
https://github.com/scanny
xfail: acceptance test for Document.add_comment()https://github.com/python-openxml/python-docx/pull/1643/commits/66da52204db395466cc7ea033af0f5bffd228953
66da522https://github.com/python-openxml/python-docx/pull/1643/commits/66da52204db395466cc7ea033af0f5bffd228953
https://github.com/scanny
comments: add Document.add_comment()https://github.com/python-openxml/python-docx/pull/1643/commits/af3b973dd2c938f6851537978fe76f4f5e91dcc9
af3b973https://github.com/python-openxml/python-docx/pull/1643/commits/af3b973dd2c938f6851537978fe76f4f5e91dcc9
https://github.com/scanny
comments: add Run.mark_comment_range()https://github.com/python-openxml/python-docx/pull/1643/commits/e3a321d26195fdd6e368f59b63be06b1277dac14
e3a321dhttps://github.com/python-openxml/python-docx/pull/1643/commits/e3a321d26195fdd6e368f59b63be06b1277dac14
https://github.com/scanny
comments: add Comment.texthttps://github.com/python-openxml/python-docx/pull/1643/commits/a809d6cc8aec18648850d8b94d554f05621e433a
a809d6chttps://github.com/python-openxml/python-docx/pull/1643/commits/a809d6cc8aec18648850d8b94d554f05621e433a
https://github.com/scanny
docs: add Comments docshttps://github.com/python-openxml/python-docx/pull/1643/commits/4fbe1f684e08aa7eebb0ce6bfedfce512b5c95a2
4fbe1f6https://github.com/python-openxml/python-docx/pull/1643/commits/4fbe1f684e08aa7eebb0ce6bfedfce512b5c95a2
https://github.com/scanny
build: small adjustments for toxhttps://github.com/python-openxml/python-docx/pull/1643/commits/1fe660198aab18a421c95d019f53b2aa22d2fe2f
1fe6601https://github.com/python-openxml/python-docx/pull/1643/commits/1fe660198aab18a421c95d019f53b2aa22d2fe2f
https://github.com/scanny
release: prepare v1.2.0 releasehttps://github.com/python-openxml/python-docx/pull/1643/commits/e45454602b53e8e572b179ccf1c91093ec9f4ed7
e454546https://github.com/python-openxml/python-docx/pull/1643/commits/e45454602b53e8e572b179ccf1c91093ec9f4ed7
https://github.com/2025sl93041-gkb
fix: treat explicitly-set zero page margins as zero in _block_widthhttps://github.com/python-openxml/python-docx/pull/1643/commits/76d9a0b257023e0ba84acda8261798acfab3c67c
76d9a0bhttps://github.com/python-openxml/python-docx/pull/1643/commits/76d9a0b257023e0ba84acda8261798acfab3c67c
python-openxml#1638https://github.com/python-openxml/python-docx/issues/1638
https://github.co/hiddenchars
https://github.com/python-openxml/python-docx/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fpull%2F1643
Please reload this pagehttps://github.com/python-openxml/python-docx/pull/1643
Please reload this pagehttps://github.com/python-openxml/python-docx/pull/1643
https://github.com/2025sl93041-gkb
https://github.com/scanny
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.