Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.0 - change package name, merge upstream, add Custom Properties support #23

Merged
merged 145 commits into from
May 23, 2024

Conversation

ryanamannion
Copy link

@ryanamannion ryanamannion commented May 23, 2024

CHANGELOG

  • change package name to python-docx-bb to avoid confusion with version numbers of upstream package
  • DEV-3948: Merge in upstream through python-openxml/python-docx:1.1.2
  • DEV-3861: add Custom Properties support from michael-koeller:feature/custom_properties
python-openxml Changes
1.1.2 (2024-05-01) - Fix python-openxml#1383 Revert lxml<=4.9.2 pin that breaks Python 3.12 install
- Fix python-openxml#1385 Support use of Part._rels by python-docx-template
- Add support and testing for Python 3.12
1.1.1 (2024-04-29) - Fix python-openxml#531, python-openxml#1146 Index error on table with misaligned borders
- Fix python-openxml#1335 Tolerate invalid float value in bottom-margin
- Fix python-openxml#1337 Do not require typing-extensions at runtime
1.1.0 (2023-11-03) - Add BlockItemContainer.iter_inner_content()
1.0.1 (2023-10-12) - Fix python-openxml#1256: parse_xml() and OxmlElement moved.
- Add Hyperlink.fragment and .url
1.0.0 (2023-10-01) - Remove Python 2 support. Supported versions are 3.7+
- Fix python-openxml#85: Paragraph.text includes hyperlink text
- Add python-openxml#1113: Hyperlink.address
- Add Hyperlink.contains_page_break
- Add Hyperlink.runs
- Add Hyperlink.text
- Add Paragraph.contains_page_break
- Add Paragraph.hyperlinks
- Add Paragraph.iter_inner_content()
- Add Paragraph.rendered_page_breaks
- Add RenderedPageBreak.following_paragraph_fragment
- Add RenderedPageBreak.preceding_paragraph_fragment
- Add Run.contains_page_break
- Add Run.iter_inner_content()
- Add Section.iter_inner_content()

Component PRs

scanny and others added 30 commits September 24, 2023 12:18
This improves packaging reliability because it prevents tests from
running against the current directory instead of the installed version
of the package.
This required a large number of adjustments. I took the opportunity to
make some further clean-up of top-matter.
Also any Python 2 clean-up that was handy.
* encoding header is no longer needed
* from __future__ imports no longer needed
* make module docstrings PEP 257 compliant.
Sphinx handling is actually better, not only using italic but also a
mono-width font.
Done by `docformatter`, it can't get the summary line right if it's too
long, but adjusts the description block width and gets the shorter
docstrings right, so a lot better than doing them all by hand. The rest
will have to wait for hand curation as we go.
Back in the day I thought it better to extract a test-specific fixture
for each test. That had the benefit of making parameterized tests fold
cleanly without the parameters in the decorator. The downside was you
had to look in two places to understand the test so I dropped that
practice. Fix some of these I need to change or add to later.
The old @lazyproperty implementation worked, but was much messier than
the modern version, adding a member to the object __dict__. This later
version that stores the value in the descriptor is much more tidy and
more performant too I expect.
Also for example `BaseStoryPart` -> `StoryPart` for the same reason.
This removes some import cycles.
Metaclasses are different and somewhat better in Python 3. Modernize the
`xmlchemy` custom element metaclass mechanism and remove Python 2
work-arounds that are no longer required.
Add additional run inner-content elements having a text equivalent, in
particular `w:noBreakHyphen` and `w:ptab`. Give each of them their own
custom element class having a `__str__()` method so they can each report
their text content (constant in some cases like "-" for no-break
hyphen).
ryanamannion and others added 27 commits May 15, 2024 15:46
comment part on Document part would return two different parts when loaded with comments_parth vs. _comments_part because of loading from self.package? I think maybe it was loading a default
# Conflicts:
#	HISTORY.rst
#	src/docx/__init__.py
#	src/docx/oxml/__init__.py
#	src/docx/oxml/table.py
#	src/docx/oxml/text/paragraph.py
#	src/docx/oxml/text/parfmt.py
#	src/docx/text/paragraph.py
…es' into DEV-3861

# Conflicts:
#	src/docx/opc/package.py
Dev 3948: Merge in python-openxml/python-docx up to v1.1.2
DEV-3861: Add Custom properties functionality
@ryanamannion ryanamannion requested a review from jonathanherr May 23, 2024 19:37
@ryanamannion ryanamannion merged commit a57a4bd into master May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment