ports/www/py-flexget/files/patch-02-path.py-8.1

69 lines
2.9 KiB
Groff

Revert https://github.com/Flexget/Flexget/commit/0a401204a107
--- flexget/api/core/server.py.orig 2019-05-25 02:03:39 UTC
+++ flexget/api/core/server.py
@@ -571,6 +571,6 @@ class ServerCrashLogAPI(APIResource):
path = Path(self.manager.config_base)
crashes = [
{'name': file.name, 'content': file.open().readlines()}
- for file in path.listdir(match='crash_report*.log')
+ for file in path.listdir(pattern='crash_report*.log')
]
return jsonify(crashes)
--- flexget/plugin.py.orig 2019-05-25 02:03:39 UTC
+++ flexget/plugin.py
@@ -476,7 +476,7 @@ def _load_plugins_from_dirs(dirs):
_f for _f in plugin_path.relpath(plugins_dir).parent.splitall() if _f
]
module_name = '.'.join(
- [plugins_pkg.__name__] + plugin_subpackages + [plugin_path.stem]
+ [plugins_pkg.__name__] + plugin_subpackages + [plugin_path.namebase]
)
_import_plugin(module_name, plugin_path)
_check_phase_queue()
@@ -498,7 +498,7 @@ def _load_components_from_dirs(dirs):
_f for _f in component_path.relpath(component_dir).parent.splitall() if _f
]
package_name = '.'.join(
- [components_pkg.__name__] + plugin_subpackages + [component_path.stem]
+ [components_pkg.__name__] + plugin_subpackages + [component_path.namebase]
)
_import_plugin(package_name, component_path)
_check_phase_queue()
--- flexget/plugins/input/filesystem.py.orig 2019-05-25 02:03:39 UTC
+++ flexget/plugins/input/filesystem.py
@@ -129,7 +129,7 @@ class Filesystem(object):
entry['url'] = pathlib.Path(filepath).absolute().as_uri()
entry['filename'] = filepath.name
if filepath.isfile():
- entry['title'] = filepath.stem
+ entry['title'] = filepath.namebase
else:
entry['title'] = filepath.name
try:
--- flexget/tests/test_filesystem.py.orig 2019-05-25 02:03:39 UTC
+++ flexget/tests/test_filesystem.py
@@ -137,10 +137,10 @@ class TestFilesystem(object):
task_name,
file,
)
- assert task.find_entry(title=file.stem), assertion_error
+ assert task.find_entry(title=file.namebase), assertion_error
else:
assertion_error = 'Failed %s %s test, found %s' % (test_type, task_name, file)
- assert not task.find_entry(title=file.stem), assertion_error
+ assert not task.find_entry(title=file.namebase), assertion_error
def test_string(self, execute_task):
task_name = 'string'
--- requirements.txt.orig 2019-05-25 02:03:39 UTC
+++ requirements.txt
@@ -13,7 +13,7 @@ jinja2~=2.10
requests>=2.20.0
python-dateutil
jsonschema>=2.0
-path.py>=10.6
+path.py>=8.1.1,<10.6
pathlib>=1.0; python_version<'3.4'
guessit==3.0.3
rebulk>=0.9.0