diff --git a/.gitignore b/.gitignore
index 9bc512f..3556492 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,22 +1,28 @@
+# Python
 *.pyc
-.DS_Store
-.coverage
-
+build/
+dist/
 venv/
-.idea/
 .cache/
 .pytest_cache/
-build/
-dist/
-# docs/
+pygsheets.egg-info/
+.pytest_cache/
+
+# File types
 *.json
 *.csv
+
+# Tests
 test/*.json
 test/usages
 test/data/*.json
 test/manual_test1.py
-pygsheets.egg-info/
 
+# Other
+.idea/
+.DS_Store
+.python-version
+.coverage
 
 
 
diff --git a/pygsheets/authorization.py b/pygsheets/authorization.py
index 6c1b37f..0d4420b 100644
--- a/pygsheets/authorization.py
+++ b/pygsheets/authorization.py
@@ -59,7 +59,6 @@ _SCOPES = ('https://www.googleapis.com/auth/spreadsheets', 'https://www.googleap
 _deprecated_keyword_mapping = {
     'outh_file': 'client_secret',
     'outh_creds_store': 'credentials_directory',
-    'outh_nonlocal': 'non_local_authorization',
     'service_file': 'service_account_file',
     'credentials': 'custom_credentials'
 }
@@ -86,13 +85,15 @@ def authorize(client_secret='client_secret.json',
     :param kwargs:                  Parameters to be handed into the client constructor.
     :returns:                       :class:`Client`
     """
-    v = vars()
+
     for key in kwargs:
         if key in ['outh_file', 'outh_creds_store', 'service_file', 'credentials']:
             warnings.warn('The argument {} is deprecated. Use {} instead.'.format(key, _deprecated_keyword_mapping[key])
                           , category=DeprecationWarning)
-            v[_deprecated_keyword_mapping[key]] = kwargs[key]
-            del kwargs[key]
+    client_secret = kwargs.get('outh_file', client_secret)
+    service_account_file = kwargs.get('service_file', service_account_file)
+    credentials_directory = kwargs.get('outh_creds_store', credentials_directory)
+    custom_credentials = kwargs.get('credentials', custom_credentials)
             
     if custom_credentials is not None:
         credentials = custom_credentials

RuntimeError: dictionary changed size during iteration
https://github.com/nithinmurali/pygsheets/blob/0e2468fe9a1957b19f1cebe3667c601c32942bbd/pygsheets/authorization.py#L94

You can't delete keys from a dictionary you are currently iterating.
diff --git a/test/authorization_tests.py b/test/authorization_tests.py
index eee5b06..16389cb 100644
--- a/test/authorization_tests.py
+++ b/test/authorization_tests.py
@@ -26,4 +26,8 @@ class TestAuthorization(object):
 
         self.sheet = c.create('test_sheet')
         self.sheet.share('pygsheettest@gmail.com')
-        self.sheet.delete()
\ No newline at end of file
+        self.sheet.delete()
+
+    def test_deprecated_kwargs_removal(self):
+        c = pygsheets.authorize(service_file=self.base_path + '/pygsheettest_service_account.json')
+        assert isinstance(c, Client)
\ No newline at end of file

pip install -e .
parse_log_pytest
requirements.txt
pytest
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
cachetools==4.2.4
certifi==2021.5.30
charset-normalizer==2.0.12
google-api-core==2.8.2
google-api-python-client==2.52.0
google-auth==2.22.0
google-auth-httplib2==0.2.0
google-auth-oauthlib==1.2.1
googleapis-common-protos==1.56.3
httplib2==0.22.0
idna==3.10
importlib-metadata==4.8.3
iniconfig==1.1.1
oauthlib==3.2.2
packaging==21.3
pluggy==1.0.0
protobuf==3.19.6
py==1.11.0
pyasn1==0.5.1
pyasn1-modules==0.3.0
-e git+https://github.com/nithinmurali/pygsheets.git@136c295143f6365bdbca70328a876b1cc66baab3#egg=pygsheets
pyparsing==3.1.4
pytest==7.0.1
requests==2.27.1
requests-oauthlib==2.0.0
rsa==4.9
six==1.17.0
tomli==1.2.3
typing_extensions==4.1.1
uritemplate==4.1.1
urllib3==1.26.20
zipp==3.6.0

name: pygsheets
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - cachetools==4.2.4
      - charset-normalizer==2.0.12
      - google-api-core==2.8.2
      - google-api-python-client==2.52.0
      - google-auth==2.22.0
      - google-auth-httplib2==0.2.0
      - google-auth-oauthlib==1.2.1
      - googleapis-common-protos==1.56.3
      - httplib2==0.22.0
      - idna==3.10
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - oauthlib==3.2.2
      - packaging==21.3
      - pluggy==1.0.0
      - protobuf==3.19.6
      - py==1.11.0
      - pyasn1==0.5.1
      - pyasn1-modules==0.3.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - requests==2.27.1
      - requests-oauthlib==2.0.0
      - rsa==4.9
      - six==1.17.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - uritemplate==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/pygsheets

test/authorization_tests.py::TestAuthorization::test_deprecated_kwargs_removal
test/authorization_tests.py::TestAuthorization::test_service_account_authorization
test/authorization_tests.py::TestAuthorization::test_user_credentials_loading
.gitignore pygsheets/authorization.py
.gitignore pygsheets/authorization.py