diff --git a/.python-httplib2.metadata b/.python-httplib2.metadata
index b28ce63..82a365e 100644
--- a/.python-httplib2.metadata
+++ b/.python-httplib2.metadata
@@ -1 +1 @@
-79fef92f4a5c121adcb7be0cd7c43f4d8328a299 SOURCES/httplib2-0.10.3.tar.gz
+b280eaa068973daa20f9838f8284b3cce0931874  SOURCES/httplib2-0.20.4.tar.gz
diff --git a/SOURCES/python-httplib2.certfile.patch b/SOURCES/python-httplib2.certfile.patch
index e351169..3d6ab21 100644
--- a/SOURCES/python-httplib2.certfile.patch
+++ b/SOURCES/python-httplib2.certfile.patch
@@ -1,31 +1,79 @@
-diff -Nur httplib2-0.9.orig/python2/httplib2/__init__.py httplib2-0.9/python2/httplib2/__init__.py
---- httplib2-0.9.orig/python2/httplib2/__init__.py	2014-04-14 06:52:57.000000000 -0600
-+++ httplib2-0.9/python2/httplib2/__init__.py	2014-05-23 21:17:02.082118837 -0600
-@@ -191,8 +191,10 @@
-     CA_CERTS = ca_certs_locater.get()
- except ImportError:
-     # Default CA certificates file bundled with httplib2.
--    CA_CERTS = os.path.join(
--        os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt")
-+#    CA_CERTS = os.path.join(
-+#        os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt")
-+# Use Fedora system-wide shared certificate store for security, consistency.
-+    CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
- 
- # Which headers are hop-by-hop headers by default
- HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade']
---- httplib2-0.9/python3/httplib2/__init__.py	2014-04-14 05:52:57.000000000 -0700
-+++ httplib2-0.9/python3/httplib2/__init__.py.new	2015-01-12 17:22:19.815505848 -0800
-@@ -124,8 +124,10 @@
- HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade']
- 
- # Default CA certificates file bundled with httplib2.
--CA_CERTS = os.path.join(
--        os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt")
-+#CA_CERTS = os.path.join(
-+#        os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt")
-+# Use Fedora system-wide shared certificate store for security, consistency.
-+CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
- 
- def _get_end2end_headers(response):
-     hopbyhop = list(HOP_BY_HOP)
+diff --git a/python2/httplib2/certs.py b/python2/httplib2/certs.py
+index 59d1ffc..a2e7513 100644
+--- a/python2/httplib2/certs.py
++++ b/python2/httplib2/certs.py
+@@ -23,6 +23,7 @@ BUILTIN_CA_CERTS = os.path.join(
+     os.path.dirname(os.path.abspath(__file__)), "cacerts.txt"
+ )
+ 
++FEDORA_CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
+ 
+ def where():
+     env = os.environ.get("HTTPLIB2_CA_CERTS")
+@@ -35,7 +36,7 @@ def where():
+         return custom_ca_locater_where()
+     if certifi_available:
+         return certifi_where()
+-    return BUILTIN_CA_CERTS
++    return FEDORA_CA_CERTS
+ 
+ 
+ if __name__ == "__main__":
+diff --git a/python3/httplib2/certs.py b/python3/httplib2/certs.py
+index 59d1ffc..2708393 100644
+--- a/python3/httplib2/certs.py
++++ b/python3/httplib2/certs.py
+@@ -23,6 +23,8 @@ BUILTIN_CA_CERTS = os.path.join(
+     os.path.dirname(os.path.abspath(__file__)), "cacerts.txt"
+ )
+ 
++FEDORA_CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
++
+ 
+ def where():
+     env = os.environ.get("HTTPLIB2_CA_CERTS")
+@@ -35,7 +37,7 @@ def where():
+         return custom_ca_locater_where()
+     if certifi_available:
+         return certifi_where()
+-    return BUILTIN_CA_CERTS
++    return FEDORA_CA_CERTS
+ 
+ 
+ if __name__ == "__main__":
+diff --git a/tests/test_cacerts_from_env.py b/tests/test_cacerts_from_env.py
+index cb2bd9f..0fed4d5 100644
+--- a/tests/test_cacerts_from_env.py
++++ b/tests/test_cacerts_from_env.py
+@@ -7,6 +7,7 @@ import httplib2
+ 
+ 
+ CA_CERTS_BUILTIN = os.path.join(os.path.dirname(httplib2.__file__), "cacerts.txt")
++FEDORA_CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
+ CERTIFI_CERTS_FILE = "unittest_certifi_file"
+ CUSTOM_CA_CERTS = "unittest_custom_ca_certs"
+ 
+@@ -32,7 +33,7 @@ def ca_certs_tmpfile(clean_env):
+ @mock.patch("httplib2.certs.certifi_available", False)
+ @mock.patch("httplib2.certs.custom_ca_locater_available", False)
+ def test_certs_file_from_builtin(clean_env):
+-    assert httplib2.certs.where() == CA_CERTS_BUILTIN
++    assert httplib2.certs.where() == FEDORA_CA_CERTS
+ 
+ 
+ @mock.patch("httplib2.certs.certifi_available", False)
+@@ -44,7 +45,7 @@ def test_certs_file_from_environment(ca_certs_tmpfile):
+     with pytest.raises(RuntimeError):
+         httplib2.certs.where()
+     os.environ.pop("HTTPLIB2_CA_CERTS")
+-    assert httplib2.certs.where() == CA_CERTS_BUILTIN
++    assert httplib2.certs.where() == FEDORA_CA_CERTS
+ 
+ 
+ @mock.patch("httplib2.certs.certifi_where", mock.MagicMock(return_value=CERTIFI_CERTS_FILE))
+@@ -69,4 +70,4 @@ def test_with_certifi_removed_from_modules(ca_certs_tmpfile):
+     os.environ["HTTPLIB2_CA_CERTS"] = ca_certs_tmpfile
+     assert httplib2.certs.where() == ca_certs_tmpfile
+     os.environ.pop("HTTPLIB2_CA_CERTS")
+-    assert httplib2.certs.where() == CA_CERTS_BUILTIN
++    assert httplib2.certs.where() == FEDORA_CA_CERTS
diff --git a/SPECS/python-httplib2.spec b/SPECS/python-httplib2.spec
index 0e62b36..5dd6776 100644
--- a/SPECS/python-httplib2.spec
+++ b/SPECS/python-httplib2.spec
@@ -1,123 +1,232 @@
-%if 0%{?fedora} >= 13
-%global with_python3 1
-%else
-%if 0%{?rhel} >= 7
-%global with_python3 1
-%endif
-%endif
-
-%if 0%{?rhel} > 7
-# Disable python2 build by default
-%bcond_with python2
-%else
-%bcond_without python2
-%endif
-
-Name:           python-httplib2
-Version:        0.10.3
-Release:        4%{?dist}
-Summary:        A comprehensive HTTP client library
-Group:          System Environment/Libraries
+%global srcname httplib2
+
+Name:           python-%{srcname}
+Version:        0.20.4
+Release:        6%{?dist}
+Summary:        Comprehensive HTTP client library
 License:        MIT
 URL:            https://pypi.python.org/pypi/httplib2
-Source0:        https://pypi.python.org/packages/source/h/httplib2/httplib2-%{version}.tar.gz
-# See also the 'locater plugin' system httplib2 now allows, and
-# https://github.com/dreamhost/httplib2-ca_certs_locater
-# It's kind of problematic, though: https://github.com/jcgregorio/httplib2/issues/293
-Patch1:         %{name}.certfile.patch
-Patch2:         %{name}.getCertHost.patch
-Patch3:         %{name}.rfc2459.patch
+Source:         https://github.com/httplib2/httplib2/archive/v%{version}/%{srcname}-%{version}.tar.gz
 #
-# Fix proxy with plain http
-# https://bugzilla.redhat.com/show_bug.cgi?id=857514
-# https://github.com/jcgregorio/httplib2/issues/228
-# 
-Patch4:         python-httplib2-0.9-proxy-http.patch
-
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-%if %{with python2}
-BuildRequires:  python2-setuptools
-BuildRequires:  python2-devel
-%endif # with python2
-BuildArch:      noarch
+# Patch to use the Fedora ca certs instead of the bundled ones
+#
+Patch1:         python-%{srcname}.certfile.patch
 
-%if 0%{?with_python3}
-BuildRequires:  python3-devel
-BuildRequires:  python3-setuptools
-%endif # if with_python3
+BuildArch:      noarch
 
 %global _description\
 A comprehensive HTTP client library that supports many features left out of\
 other HTTP libraries.
 
-%description %_description
+%description %{_description}
 
-%if %{with python2}
-%package -n python2-httplib2
-Summary: %summary
-%{?python_provide:%python_provide python2-httplib2}
+%package -n python3-%{srcname}
+Summary:        %{summary}
+%{?python_provide:%python_provide python3-%{srcname}}
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+BuildRequires:  python3-pytest
+# This is listed as a test requirement, but doesn't seem to actually be used.
+#BuildRequires:  python3-pytest-forked
+BuildRequires:  python3-pytest-timeout
+BuildRequires:  python3-six
+BuildRequires:  python3-cryptography
 
-%description -n python2-httplib2 %_description
-%endif # with python2
+%description -n python3-%{srcname} %{_description}
 
-%if 0%{?with_python3}
-%package -n python3-httplib2
-Summary:        A comprehensive HTTP client library
-%{?python_provide:%python_provide python3-httplib2}
-
-%description -n python3-httplib2
-A comprehensive HTTP client library that supports many features left out of
-other HTTP libraries.
-%endif # with_python3
 
 %prep
-%setup -q -n httplib2-%{version}
-%patch1 -p1 -b .certfile
-%patch2 -p0 -b .getCertHost
-%patch3 -p0 -b .rfc2459
-%patch4 -p1
-
-%if 0%{?with_python3}
-rm -rf %{py3dir}
-cp -a . %{py3dir}
-find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
-%endif # with_python3
+%autosetup -p1 -n %{srcname}-%{version}
+rm -r python2
+
+# drop python2-only requirement for old pyparsing
+sed -i '/TODO remove after dropping Python2 support/d' requirements.txt
+
+# Drop coverage
+sed -i '/--cov/d' setup.cfg
 
-%build
-%if %{with python2}
-%py2_build
-%endif # with python2
 
-%if 0%{?with_python3}
-pushd %{py3dir}
+%build
 %py3_build
-popd
-%endif # with_python3
 
-%install
-%if %{with python2}
-%py2_install
-%endif # with python2
 
-%if 0%{?with_python3}
-pushd %{py3dir}
+%install
 %py3_install
-popd
-%endif # with_python3
 
-%if %{with python2}
-%files -n python2-httplib2
-%{python2_sitelib}/*
-%endif # with python2
 
-%if 0%{?with_python3}
-%files -n python3-httplib2
-%{python3_sitelib}/*
-%endif # with_python3
+%check
+# test_get_301_no_redirect is disabled because it leads to Segfault on Python 3.11
+# the other disabled tests are broken PySocks tests
+PYTHONPATH=%{buildroot}%{python3_sitelib} pytest -k "not test_unknown_server \
+	and not test_socks5_auth and not \
+	test_server_not_found_error_is_raised_for_invalid_hostname and not \
+	test_functional_noproxy_star_https and not \
+	test_sni_set_servername_callback and not test_not_trusted_ca and not \
+	test_invalid_ca_certs_path and not test_max_tls_version and not \
+	test_get_301_via_https and not test_client_cert_password_verified and not\
+	test_get_via_https and not test_min_tls_version and not\
+	test_client_cert_verified and not test_inject_space and not test_get_301_no_redirect and not\
+	test_from_env and not test_from_env_https and not test_noproxy_star"
+
+
+%files -n python3-%{srcname}
+%doc README.md
+%{python3_sitelib}/%{srcname}-*.egg-info/
+%{python3_sitelib}/%{srcname}/
 
 %changelog
-* Fri Jun 08 2018 Charalampos Stratakis <cstratak@redhat.com> - 0.10.3-4
-- Conditionalize the python2 subpackage
+* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.4-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
+
+* Wed Jul 20 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.20.4-5
+- Rebuilt for pyparsing-3.0.9 (2nd attempt)
+
+* Tue Jul 19 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.20.4-4
+- Rebuilt for pyparsing-3.0.9
+
+* Wed Jun 15 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 0.20.4-3
+- Disable broken test for compatibility with Python 3.11
+
+* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 0.20.4-2
+- Rebuilt for Python 3.11
+
+* Sun Feb 20 2022 Kevin Fenzi <kevin@scrye.com> - 0.20.4-1
+- Update to 0.20.4. Fixes rhbz#2049986
+
+* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.3-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+
+* Mon Dec 13 2021 Paul Wouters <paul.wouters@aiven.io> - 0.20.3-1
+- Update to 0.20.3. Only fixes test cases
+
+* Sat Nov 06 2021 Kevin Fenzi <kevin@scrye.com> - 0.20.2-1
+- Update to 0.20.2. Fixes rhbz#2011750
+
+* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.1-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
+
+* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.19.1-3
+- Rebuilt for Python 3.10
+
+* Thu May 13 2021 Miro Hrončok <mhroncok@redhat.com> - 0.19.1-2
+- Drop BuildRequires on pytest-flake8
+- Deselect failing test
+- Fixes: rhbz#1958945
+
+* Sat Apr 24 2021 Kevin Fenzi <kevin@scrye.com> - 0.19.1-1
+- Update to 0.19.1. Fixes rhbz#1944789
+
+* Wed Mar  3 2021 Pavel Cahyna <pcahyna@redhat.com> - 0.19.0-2
+- Remove unused python3-pytest-cov build dependency
+- Use mock from the standard library, remove build dependency
+  on the deprecated python-mock package
+
+* Sun Feb 07 2021 Kevin Fenzi <kevin@scrye.com> - 0.19.0-1
+- Update t0 0.19.0. Fixes rhbz#1925988
+
+* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.1-10
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+
+* Sat Jan 02 2021 Miro Hrončok <mhroncok@redhat.com> - 0.18.1-9
+- Disable Python 2 build entirely
+
+* Tue Nov 24 2020 Miro Hrončok <mhroncok@redhat.com> - 0.18.1-8
+- Disable Python 2 build on RHEL 9+
+
+* Fri Sep 04 2020 Joel Capitao <jcapitao@redhat.com> - 0.18.1-7
+- Remove unused BR
+
+* Wed Aug 05 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.18.1-6
+- Disable tests related to PySocks bug.
+
+* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.1-5
+- Second attempt - Rebuilt for
+  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+
+* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.1-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+
+* Thu Jun 11 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.18.1-3
+- BR fixes.
+
+* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 0.18.1-2
+- Rebuilt for Python 3.9
+
+* Wed May 20 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.18.1-1
+- 0.18.1
+
+* Wed May 20 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.18.0-1
+- 0.18.0
+
+* Wed May 20 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.17.4-1
+- 0.17.4
+
+* Mon May 04 2020 Miro Hrončok <mhroncok@redhat.com> - 0.17.3-3
+- Fix python2/python3 mishmash (#1830222)
+- Run tests
+
+* Wed Apr 22 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.17.3-2
+- Cleanup spec
+
+* Wed Apr 22 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.17.3-1
+- 0.17.3
+
+* Mon Apr 13 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.17.2-1
+- 0.17.2
+
+* Thu Apr 02 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.17.1-1
+- 0.17.1
+
+* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.0-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
+* Fri Jan 24 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.17.0-1
+- 0.17.0
+
+* Fri Jan 17 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.16.0-1
+- 0.16.0
+
+* Thu Dec 19 2019 Gwyn Ciesla <gwync@protonmail.com> - 0.15.0-1
+- 0.15.0
+
+* Wed Nov 06 2019 Gwyn Ciesla <gwync@protonmail.com> - 0.14.0-1
+- 0.14.0
+
+* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.13.1-2
+- Rebuilt for Python 3.8.0rc1 (#1748018)
+
+* Thu Aug 22 2019 Kevin Fenzi <kevin@scrye.com> - 0.13.1-1
+- Update to 0.13.1. Fixes bug #1742362
+
+* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 0.13.0-3
+- Rebuilt for Python 3.8
+
+* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
+* Sun Jun 30 2019 Kevin Fenzi <kevin@scrye.com> - 0.13.0-1
+- Update to 0.13.0.
+
+* Tue Apr 23 2019 Kevin Fenzi <kevin@scrye.com> - 0.12.3-1
+- Update to 0.12.3.
+
+* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.3-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
+* Sat Jul 21 2018 Kevin Fenzi <kevin@scrye.com> - 0.11.3-5
+- Fix files section on python2 subpackage.
+
+* Fri Jul 20 2018 Kevin Fenzi <kevin@scrye.com> - 0.11.3-4
+- Fix FTBFS bug #1605725
+
+* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.3-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
+* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 0.11.3-2
+- Rebuilt for Python 3.7
+
+* Sun Jun 10 2018 Kevin Fenzi <kevin@scrye.com> - 0.11.3-1
+- Update to 0.11.3. Fixes bug #1559204
 
 * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.3-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild