Skip to content

Document breaking changes in Pelican 4.5 #2805

Description

@shniubobo
  • I have read the Filing Issues and subsequent “How to Get Help” sections of the documentation.
  • I have searched the issues (including closed ones) and believe that this is not a duplicate.
  • OS version and name: Ubuntu 18.04 (WSL)
  • Python version: 3.8.6

Issues

The first one

As of 58edad6, import pelican.signals is no longer valid.

$ git reset 58edad^ --hard
$ python -c "import pelican.signals"  # exits 0

$ git reset 58edad --hard
$ python -c "import pelican.signals"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pelican.signals'

The second one

As of ed1eca1, legacy plugins with . in their names stop working.

To reproduce

Create these files:

├── content
│   └── 1.rst
├── pelicanconf.py
├── plugins
│   └── m
│       └── test.py
.. content/1.rst
###
123
###
# pelicanconf.py
PLUGINS = [
    'm.test',
]
PLUGIN_PATHS = [
    'plugins'
]
# plugins/m/test.py
from pelican import signals


def takes_nothing():
    pass


def register():
    signals.initialized.connect(takes_nothing)

And then:

$ git reset ed1eca^ --hard
$ python -m pelican content
WARNING: Feeds generated without SITEURL set properly may not be valid
WARNING: No timezone information specified in the settings. Assuming your timezone is UTC for feed generation. Check http://docs.getpelican.com/en/latest/settings.html#timezone for more information
CRITICAL: takes_nothing() takes 0 positional arguments but 1 was given
# plugin correctly loaded

$ git reset ed1eca --hard
$ python -m pelican content
WARNING: Feeds generated without SITEURL set properly may not be valid
WARNING: No timezone information specified in the settings. Assuming your timezone is UTC for feed generation. Check http://docs.getpelican.com/en/latest/settings.html#timezone for more information
ERROR: Cannot load plugin `m.test`
  | No module named 'm'
ERROR: Skipping /[path redacted]/content/1.rst: could not find information about 'date'
Done: Processed 0 articles, 0 drafts, 0 pages, 0 hidden pages and 0 draft pages in 0.08 seconds.
# plugin not loaded

Projects affected by these changes

An example: https://github.com/mosra/m.css

And a related issue: mosra/m.css#178

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions