Skip to content

issue 6108 fix filesystem backend cannot not be serialized by picked#6120

Merged
auvipy merged 3 commits into
celery:masterfrom
singlaive:issue-6108_filesystem_backend_pickle
May 30, 2020
Merged

issue 6108 fix filesystem backend cannot not be serialized by picked#6120
auvipy merged 3 commits into
celery:masterfrom
singlaive:issue-6108_filesystem_backend_pickle

Conversation

@singlaive

Copy link
Copy Markdown
Contributor

#6108

Note: Before submitting this pull request, please review our contributing
guidelines
.

Description

This PR is to fix issue-6108, that when a instance of FilesystemBackend class is pickled, it cannot be deserialised because a mandatory parameter has not been provided.

The unit test still needs further working, since the backend complains it needs a live app to be pickled.

@lgtm-com

lgtm-com Bot commented May 27, 2020

Copy link
Copy Markdown

This pull request introduces 1 alert when merging ade0ab2 into 704896a - view on LGTM.com

new alerts:

  • 1 for Modification of parameter with default

@auvipy auvipy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

unit tests are failing

Comment thread t/unit/backends/test_filesystem.py Outdated
@pytest.mark.usefixtures('depends_on_current_app')
def test_pickleable(self):
tb = FilesystemBackend(app=self.app, url=self.url, serializer='pickle')
assert pickle.loads(pickle.dumps(tb)) No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no new line

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

check the flake8 error

@lgtm-com

lgtm-com Bot commented May 30, 2020

Copy link
Copy Markdown

This pull request introduces 2 alerts when merging db2f23d into 364bb29 - view on LGTM.com

new alerts:

  • 1 for Non-exception in 'except' clause
  • 1 for Modification of parameter with default

@lgtm-com

lgtm-com Bot commented May 30, 2020

Copy link
Copy Markdown

This pull request introduces 7 alerts when merging 8f37762 into 364bb29 - view on LGTM.com

new alerts:

  • 5 for Module is imported with 'import' and 'import from'
  • 1 for Non-exception in 'except' clause
  • 1 for Modification of parameter with default