PageRenderTime 60ms CodeModel.GetById 30ms RepoModel.GetById 1ms app.codeStats 0ms

/media-sound/beets/files/1.4.9-0004-Fix-3608-Replace-discogs-client-with-python3-discogs.patch

https://gitlab.com/redcore/portage
Patch | 134 lines | 121 code | 13 blank | 0 comment | 0 complexity | 49f4d3c805d71230f284f2699347ac3c MD5 | raw file
  1. From 0da62a5ed7aa5fcfc8501a06f26c3af6afa8bc52 Mon Sep 17 00:00:00 2001
  2. From: George Rawlinson <george@rawlinson.net.nz>
  3. Date: Thu, 25 Feb 2021 20:00:34 +1300
  4. Subject: [PATCH] Fix #3608: Replace discogs-client with python3-discogs-client
  5. discogs-client has been deprecated since June 2020, the replacement
  6. is actively developed by the community and does not have any breaking
  7. API changes.
  8. Signed-off-by: George Rawlinson <george@rawlinson.net.nz>
  9. ---
  10. beetsplug/discogs.py | 2 +-
  11. docs/plugins/discogs.rst | 8 +++----
  12. setup.py | 50 +++++++++++++++++++++++++++-------------
  13. 4 files changed, 41 insertions(+), 21 deletions(-)
  14. diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py
  15. index 5a2bf57e..78d94eb1 100644
  16. --- a/beetsplug/discogs.py
  17. +++ b/beetsplug/discogs.py
  18. @@ -14,7 +14,7 @@
  19. # included in all copies or substantial portions of the Software.
  20. """Adds Discogs album search support to the autotagger. Requires the
  21. -discogs-client library.
  22. +python3-discogs-client library.
  23. """
  24. from __future__ import division, absolute_import, print_function
  25. For plugin developers:
  26. diff --git a/docs/plugins/discogs.rst b/docs/plugins/discogs.rst
  27. index a02b3459..f8406fd2 100644
  28. --- a/docs/plugins/discogs.rst
  29. +++ b/docs/plugins/discogs.rst
  30. @@ -10,9 +10,9 @@ Installation
  31. ------------
  32. To use the ``discogs`` plugin, first enable it in your configuration (see
  33. -:ref:`using-plugins`). Then, install the `discogs-client`_ library by typing::
  34. +:ref:`using-plugins`). Then, install the `python3-discogs-client`_ library by typing::
  35. - pip install discogs-client
  36. + pip install python3-discogs-client
  37. You will also need to register for a `Discogs`_ account, and provide
  38. authentication credentials via a personal access token or an OAuth2
  39. @@ -36,7 +36,7 @@ Authentication via Personal Access Token
  40. As an alternative to OAuth, you can get a token from Discogs and add it to
  41. your configuration.
  42. -To get a personal access token (called a "user token" in the `discogs-client`_
  43. +To get a personal access token (called a "user token" in the `python3-discogs-client`_
  44. documentation), login to `Discogs`_, and visit the
  45. `Developer settings page
  46. <https://www.discogs.com/settings/developers>`_. Press the ``Generate new
  47. @@ -57,4 +57,4 @@ Here are two things you can try:
  48. * Make sure that your system clock is accurate. The Discogs servers can reject
  49. your request if your clock is too out of sync.
  50. -.. _discogs-client: https://github.com/discogs/discogs_client
  51. +.. _python3-discogs-client: https://github.com/joalla/discogs_client
  52. diff --git a/setup.py b/setup.py
  53. index 79278f8b..768c40a0 100755
  54. --- a/setup.py
  55. +++ b/setup.py
  56. @@ -107,30 +107,48 @@ setup(
  57. ['colorama'] if (sys.platform == 'win32') else []
  58. ),
  59. - tests_require=[
  60. - 'beautifulsoup4',
  61. - 'flask',
  62. - 'mock',
  63. - 'pylast',
  64. - 'rarfile',
  65. - 'responses',
  66. - 'pyxdg',
  67. - 'python-mpd2',
  68. - 'discogs-client'
  69. - ] + (
  70. - # Tests for the thumbnails plugin need pathlib on Python 2 too.
  71. - ['pathlib'] if (sys.version_info < (3, 4, 0)) else []
  72. - ),
  73. -
  74. # Plugin (optional) dependencies:
  75. extras_require={
  76. + 'test': [
  77. + 'beautifulsoup4',
  78. + 'coverage',
  79. + 'flask',
  80. + 'mock',
  81. + 'pylast',
  82. + 'pytest',
  83. + 'python-mpd2',
  84. + 'pyxdg',
  85. + 'responses>=0.3.0',
  86. + 'requests_oauthlib',
  87. + 'reflink',
  88. + ] + (
  89. + # Tests for the thumbnails plugin need pathlib on Python 2 too.
  90. + ['pathlib'] if (sys.version_info < (3, 4, 0)) else []
  91. + ) + [
  92. + 'rarfile<4' if sys.version_info < (3, 6, 0) else 'rarfile',
  93. + ] + [
  94. + 'discogs-client' if (sys.version_info < (3, 0, 0))
  95. + else 'python3-discogs-client'
  96. + ],
  97. + 'lint': [
  98. + 'flake8',
  99. + 'flake8-coding',
  100. + 'flake8-docstrings',
  101. + 'flake8-future-import',
  102. + 'pep8-naming',
  103. + ],
  104. +
  105. + # Plugin (optional) dependencies:
  106. 'absubmit': ['requests'],
  107. 'fetchart': ['requests', 'Pillow'],
  108. 'embedart': ['Pillow'],
  109. 'embyupdate': ['requests'],
  110. 'chroma': ['pyacoustid'],
  111. 'gmusic': ['gmusicapi'],
  112. - 'discogs': ['discogs-client>=2.2.1'],
  113. + 'discogs': (
  114. + ['discogs-client' if (sys.version_info < (3, 0, 0))
  115. + else 'python3-discogs-client']
  116. + ),
  117. 'beatport': ['requests-oauthlib>=0.6.1'],
  118. 'kodiupdate': ['requests'],
  119. 'lastgenre': ['pylast'],
  120. --
  121. 2.26.3