Repository: beetbox/beets

Issue:
discogs-client now deprecated
As of today, the [discogs-client](https://github.com/discogs/discogs_client) package has been deprecated. This will become an issue when upstream breaks API compatibility.

> This repository is no longer maintained. You can still use a REST client like [Requests](https://pypi.org/project/requests/) or other third-party Python library to access the [Discogs REST API](https://www.discogs.com/developers).
discogs-client now deprecated
As of today, the [discogs-client](https://github.com/discogs/discogs_client) package has been deprecated. This will become an issue when upstream breaks API compatibility.

> This repository is no longer maintained. You can still use a REST client like [Requests](https://pypi.org/project/requests/) or other third-party Python library to access the [Discogs REST API](https://www.discogs.com/developers).


Discussion:
That's too bad! Perhaps a volunteer is interested in forking it and attempting to maintain the library independently?
Yeah, I'll make a fork as I use this quite extensively.

For now, are you OK to depend on the current package? I don't expect it to break compatibility anytime soon! 
Yes, sounds good! No need to drop it if it's not currently causing problems. Thanks for being willing to adopt it! :smiley:
I've forked the current package [here](https://github.com/grawlinson/python-discogs-api), feel free to update documentation/code pointing to it.

Also, I'd appreciate if feedback could be made regarding improvements to the code as-is. It'll take me a bit of time to look at the closed issues/PRs on discogs-client.

EDIT: The package is also on [PyPi](https://pypi.org/project/discogs-api/).
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

is there timeline to get the code updated to use discogs_api vs discogs_client? I maintain the discogs_client port/package for OpenBSD and was looking to replace it with discogs_api but until the appropriate code is updated in beets that can't happen.
A pull request will need to be proposed. I wish I had the time to do this, so if you could do that, it would be great.

It should be as simple as replacing all calls made to `discogs_client` with `discogs_api`.

Any further issues, I'll be happy to help.
That would be great! And indeed; I don't think the change should be hard.
I think all you need to do codewise is replace the imports, the API seems to have mostly stayed the same.

I actually did the changes and wanted to do a PR [(here is the branch)](https://github.com/pbnoxious/beets/tree/discogs_api), but realized that there are now multiple forks, also one that keeps the package named [discogs_client](https://github.com/joalla/discogs_client).
Using that one would likely only require to change the dependency `discogs-client -> python3-discogs-client` in setup.py (and maybe the documentation).

What are your thoughts? Which of the forks should be used?
Can we trust your judgment on that? Does any one fork look more promising than the others?
Considering that the discogs community have converged on [joalla/discogs_client](https://github.com/joalla/discogs_client) rather than others (including my fork), it would be preferable to go with that one.
That's too bad! Perhaps a volunteer is interested in forking it and attempting to maintain the library independently?
Yeah, I'll make a fork as I use this quite extensively.

For now, are you OK to depend on the current package? I don't expect it to break compatibility anytime soon! 
Yes, sounds good! No need to drop it if it's not currently causing problems. Thanks for being willing to adopt it! :smiley:
I've forked the current package [here](https://github.com/grawlinson/python-discogs-api), feel free to update documentation/code pointing to it.

Also, I'd appreciate if feedback could be made regarding improvements to the code as-is. It'll take me a bit of time to look at the closed issues/PRs on discogs-client.

EDIT: The package is also on [PyPi](https://pypi.org/project/discogs-api/).
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

is there timeline to get the code updated to use discogs_api vs discogs_client? I maintain the discogs_client port/package for OpenBSD and was looking to replace it with discogs_api but until the appropriate code is updated in beets that can't happen.
A pull request will need to be proposed. I wish I had the time to do this, so if you could do that, it would be great.

It should be as simple as replacing all calls made to `discogs_client` with `discogs_api`.

Any further issues, I'll be happy to help.
That would be great! And indeed; I don't think the change should be hard.
I think all you need to do codewise is replace the imports, the API seems to have mostly stayed the same.

I actually did the changes and wanted to do a PR [(here is the branch)](https://github.com/pbnoxious/beets/tree/discogs_api), but realized that there are now multiple forks, also one that keeps the package named [discogs_client](https://github.com/joalla/discogs_client).
Using that one would likely only require to change the dependency `discogs-client -> python3-discogs-client` in setup.py (and maybe the documentation).

What are your thoughts? Which of the forks should be used?
Can we trust your judgment on that? Does any one fork look more promising than the others?
Considering that the discogs community have converged on [joalla/discogs_client](https://github.com/joalla/discogs_client) rather than others (including my fork), it would be preferable to go with that one.

Resolving patch:
diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py
--- a/beetsplug/discogs.py
+++ b/beetsplug/discogs.py
@@ -14,7 +14,7 @@
 # included in all copies or substantial portions of the Software.
 
 """Adds Discogs album search support to the autotagger. Requires the
-discogs-client library.
+python3-discogs-client library.
 """
 from __future__ import division, absolute_import, print_function
 
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -113,7 +113,6 @@ def build_manpages():
         'test': [
             'beautifulsoup4',
             'coverage',
-            'discogs-client',
             'flask',
             'mock',
             'pylast',
@@ -128,6 +127,9 @@ def build_manpages():
             ['pathlib'] if (sys.version_info < (3, 4, 0)) else []
         ) + [
             'rarfile<4' if sys.version_info < (3, 6, 0) else 'rarfile',
+        ] + [
+            'discogs-client' if (sys.version_info < (3, 0, 0))
+            else 'python3-discogs-client'
         ],
         'lint': [
             'flake8',
@@ -144,7 +146,10 @@ def build_manpages():
         'embyupdate': ['requests'],
         'chroma': ['pyacoustid'],
         'gmusic': ['gmusicapi'],
-        'discogs': ['discogs-client>=2.2.1'],
+        'discogs': (
+            ['discogs-client' if (sys.version_info < (3, 0, 0))
+                else 'python3-discogs-client']
+        ),
         'beatport': ['requests-oauthlib>=0.6.1'],
         'kodiupdate': ['requests'],
         'lastgenre': ['pylast'],


Test patch: