Skip to content

Conversation

stevecohen42
Copy link
Contributor

The API has changed to use style names rather than style IDs. This is a great step forward, but it now generates "style lookup by style_id is deprecated" warnings if headings (with a level number) or tables (without a style) are added to the document. This pull request fixes the automatic style name generation for headings and uses a valid style name for new tables.

@scanny
Copy link
Contributor

scanny commented Feb 11, 2015

Good catch Steve! :)

Didn't think of that one and the tests of course completely miss that sort of thing.

I'll get it merged in here and get a point release out.

scanny pushed a commit that referenced this pull request Feb 11, 2015
Legacy style ids were used in Document api methods for heading styles
and default table style. Update tests, docstrings, and values to reflect
style name instead of style id.
@scanny
Copy link
Contributor

scanny commented Feb 11, 2015

Fixed in release v0.8.1 on Feb 10, 2015.

Thanks again for the catch Steve, I credited you the commit: b28b6cd :)

@scanny scanny closed this Feb 11, 2015
@stevecohen42
Copy link
Contributor Author

Steve,

 Thanks for the quick response.  I saw the other pull-requests sitting

there and was afraid you were not actively working on python-docx any
more. Then I noted that you had produced the release just the day before
and...

 I am not at all certain I found all the documentation that needs to be

updated for this change. You might just keep it in mind as you go about
the usual process of updating, etc. I did some grepping and such, but
things still slip through.

 Thanks again for all your hard work on this project.

Cheers,

Steve

On Wed, Feb 11, 2015 at 3:09 AM, Steve Canny notifications@github.com
wrote:

Fixed in release v0.8.1 on Feb 10, 2015.

Thanks again for the catch Steve, I credited you the commit: b28b6cd
b28b6cd
:)


Reply to this email directly or view it on GitHub
#140 (comment)
.

@scanny
Copy link
Contributor

scanny commented Feb 12, 2015

We get a bit of a backlog on pull requests. Most of them require a lot of additional work to meet the standards for being committed. In particular, most show up without tests. But they're still valuable to keep around. Sometimes another community member can use one as a holdover while waiting for a feature or as a starting point for their own efforts. And they often serve as a useful reference point when we work on the feature in earnest.

I went back to the acceptance tests and worked my way forward on these changes, so I think we've got this change well covered. It's only in the API-level that we call the library from itself like that, to provide convenience functions, and I grepped the full project for those calls, so I feel like we've done our due diligence. If someone finds an outlier I'm sure we'll hear of it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants