From 660e7dfecace1c847baa8213f7d2a29b72dfaa2c Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Fri, 10 Feb 2023 02:06:08 -0500 Subject: [PATCH] fix: Encode the FEEDS command-line argument as JSON --- docs/conf.py | 2 +- docs/news.rst | 8 ++++++++ scrapyd/VERSION | 2 +- scrapyd/environ.py | 3 ++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 2362c792..86646e38 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ author = "Scrapy group" # The short X.Y version -version = "1.4.0" +version = "1.4.1" # The full version, including alpha/beta/rc tags release = version diff --git a/docs/news.rst b/docs/news.rst index fb1939fd..c48f19c5 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -3,6 +3,14 @@ Release notes ============= +1.4.1 (2023-02-10) +------------------ + +Fixed +~~~~~ + +- Encode the ``FEEDS`` command-line argument as JSON. + 1.4.0 (2023-02-07) ------------------ diff --git a/scrapyd/VERSION b/scrapyd/VERSION index 88c5fb89..347f5833 100644 --- a/scrapyd/VERSION +++ b/scrapyd/VERSION @@ -1 +1 @@ -1.4.0 +1.4.1 diff --git a/scrapyd/environ.py b/scrapyd/environ.py index 83772b14..2f948794 100644 --- a/scrapyd/environ.py +++ b/scrapyd/environ.py @@ -1,3 +1,4 @@ +import json import os from urllib.parse import urlparse, urlunparse @@ -26,7 +27,7 @@ def get_settings(self, message): if self.logs_dir: settings['LOG_FILE'] = self._get_file(message, self.logs_dir, 'log') if self.items_dir: - settings['FEEDS'] = {self._get_feed_uri(message, 'jl'): {'format': 'jsonlines'}} + settings['FEEDS'] = json.dumps({self._get_feed_uri(message, 'jl'): {'format': 'jsonlines'}}) return settings def get_environment(self, message, slot):