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

Fix some deprecation warnings generated during the test suite #3673

Merged
merged 4 commits into from Mar 26, 2023

Conversation

tartley
Copy link
Contributor

@tartley tartley commented Mar 26, 2023

Pull Request Checklist

  • I’ve read the guidelines for contributing.
  • I updated AUTHORS.txt and CHANGES.txt (if the change is non-trivial) and documentation (if applicable).
  • I tested my changes.

Description

I added a trivial item to .gitignore. The 'tags' file is produced by utilities like 'ctags' (incl. the venerable exhuberant-ctags, and the modern universal-ctags), and is used by programs like Vim for 'go to definition' functionality.

I fixed two deprecation warnings that were generated when I ran the test suite, by making the substitutions suggested by the deprecation warnings themselves. Tests still pass, and the relevant functionality (RST to HTML and antialiasing in thumbnails) still seems to work in a freshly-built site.

The test suite does still generate two deprecation warnings, but they are from code in a dependency of ours (yapsy), and we are using the latest version of that.

Warning was triggered many times during test suite,
and read:

nikola/image_processing.py:148: DeprecationWarning: ANTIALIAS is
deprecated and will be removed in Pillow 10 (2023-07-01). Use LANCZOS or
Resampling.LANCZOS instead.

    im.thumbnail(size, Image.ANTIALIAS)
The warning was triggered during test suite, and read:

  nikola/plugins/compile/rest/__init__.py:80: PendingDeprecationWarning:
  nodes.Node.traverse() is obsoleted by Node.findall().

    for docinfo in document.traverse(docutils.nodes.docinfo):
@tartley tartley changed the title Superficial Fix some deprecation warnings generated by the test suite Mar 26, 2023
@tartley tartley changed the title Fix some deprecation warnings generated by the test suite Fix some deprecation warnings generated during the test suite Mar 26, 2023
.gitignore Outdated
@@ -5,6 +5,7 @@
tmp/
cache/
output/
tags
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a file or a directory? Is it placed in the repository root (then it should be /tags) or in some other static location?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, of course, silly me. Thank you for helping me get it right.

@Kwpolska Kwpolska enabled auto-merge March 26, 2023 16:07
@Kwpolska Kwpolska merged commit 21c8e82 into getnikola:master Mar 26, 2023
10 checks passed
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.

None yet

2 participants