Repository: PyGithub/PyGithub

Issue:
Deprecating API authentication through query parameters
I'm using `g = Github("access_token")` on PyGithub-1.50 (latest) and got the below message from github. I am I doing something wrong?

```
On May 1st, 2020 at 16:31 (UTC) your personal access token using python-requests/2.22.0 was used as part of a query parameter to access an endpoint through the GitHub API:

[removed]

Please use the Authorization HTTP header instead, as using the `access_token` query parameter is deprecated. If this token is being used by an app you don't have control over, be aware that it may stop working as a result of this deprecation.

Depending on your API usage, we'll be sending you this email reminder on a monthly basis for each token and User-Agent used in API calls made on your behalf.
Just one URL that was accessed with a token and User-Agent combination will be listed in the email reminder, not all.

Visit https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param for more information about suggested workarounds and removal dates.
```


Discussion:
The user agent we send is "PyGithub/Python", not bare python-requests -- are you certain you don't have another script that calls GitHub directly?
I can't reproduce either
+1 here I just received the following email

Hi @crawfobw,

On May 3rd, 2020 at 13:34 (UTC) your application (DocumentGuardian) used its `client_id` and client_secret` (with the User-Agent PyGithub/Python) as part of a set of query parameters to access an endpoint through the GitHub API:

https://api.github.com/user/repos

Please use Basic Authentication instead as using OAuth credentials in query parameters has been deprecated.

Depending on your API usage, we'll be sending you this email reminder on a monthly basis.

Visit https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param for more information about suggested workarounds and removal dates.

Thanks,
The GitHub Team

This was in response to attempting the following code 
```
from github import Github

g = Github(client_id="redacted", client_secret="redacted")
g.get_user().get_repos()
```
I see, PyGithub should properly issue a deprecation warning, same as in:
https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param
Just to clarify we do not sent access_token via the URL query string, but we do sent client_id and client_secret. Agreed that we should warn about their use and remove them in November or so.

Resolving patch:
diff --git a/github/MainClass.py b/github/MainClass.py
--- a/github/MainClass.py
+++ b/github/MainClass.py
@@ -51,6 +51,7 @@
 import datetime
 import pickle
 import time
+import warnings
 
 import jwt
 import requests
@@ -132,6 +133,12 @@ def __init__(
             or isinstance(retry, (int))
             or isinstance(retry, (urllib3.util.Retry))
         )
+        if client_id is not None or client_secret is not None:
+            warnings.warn(
+                "client_id and client_secret are deprecated and will be removed in a future release, switch to token authentication",
+                FutureWarning,
+                stacklevel=2,
+            )
         self.__requester = Requester(
             login_or_token,
             password,


Test patch: