changed debian/source/format to native
This commit is contained in:
parent
94dbf11c36
commit
b80f7dd741
|
@ -1,172 +0,0 @@
|
|||
From: Daniele Tricoli <eriol@debian.org>
|
||||
Date: Thu, 26 Mar 2020 01:57:09 +0100
|
||||
Subject: Remove remote images, traking code and ads
|
||||
|
||||
---
|
||||
docs/_templates/hacks.html | 54 ---------------------------------------
|
||||
docs/_templates/sidebarintro.html | 6 -----
|
||||
docs/_templates/sidebarlogo.html | 24 -----------------
|
||||
docs/conf.py | 2 +-
|
||||
docs/index.rst | 17 ------------
|
||||
5 files changed, 1 insertion(+), 102 deletions(-)
|
||||
|
||||
diff --git a/docs/_templates/hacks.html b/docs/_templates/hacks.html
|
||||
index eca5dff..196abbe 100644
|
||||
--- a/docs/_templates/hacks.html
|
||||
+++ b/docs/_templates/hacks.html
|
||||
@@ -24,57 +24,3 @@
|
||||
div.highlight pre {margin-right: -30px;}
|
||||
}
|
||||
</style>
|
||||
-
|
||||
-<!-- Native CPC by BuySellAds -->
|
||||
-
|
||||
-<script type="text/javascript" src="//m.servedby-buysellads.com/monetization.js"></script>
|
||||
-
|
||||
-<div id="native-ribbon">
|
||||
-</div>
|
||||
-
|
||||
-<script>
|
||||
-_bsa.init('custom', 'CK7D62JU', 'placement:pythonrequestsorg',
|
||||
- {
|
||||
- target: '#native-ribbon',
|
||||
- template: `
|
||||
-<div class="native-sponsor">Sponsored by ##company## — Learn More</div>
|
||||
- <a href="##link##" class="native-flex">
|
||||
- <style>
|
||||
- #native-ribbon #_custom_ {
|
||||
- background: linear-gradient(-30deg, ##backgroundColor##E5, ##backgroundColor##E5 45%, ##backgroundColor## 45%) #fff;
|
||||
- }
|
||||
-
|
||||
- .native-details,
|
||||
- .native-sponsor,
|
||||
- .native-bsa {
|
||||
- color: ##textColor## !important;
|
||||
- }
|
||||
-
|
||||
- .native-details:hover {
|
||||
- color: ##textColorHover## !important;
|
||||
- }
|
||||
-
|
||||
- .native-cta {
|
||||
- color: ##ctaTextColor##;
|
||||
- background-color: ##ctaBackgroundColor##;
|
||||
- }
|
||||
-
|
||||
- .native-cta:hover {
|
||||
- color: ##ctaTextColorHover##;
|
||||
- background-color: ##ctaBackgroundColorHover##;
|
||||
- }
|
||||
- </style>
|
||||
- <div class="native-main">
|
||||
- <img class="native-img" src="##logo##">
|
||||
- <div class="native-details">
|
||||
- <span class="native-company">##title##</span>
|
||||
- <span class="native-desc">##description##</span>
|
||||
- </div>
|
||||
- </div>
|
||||
- <span class="native-cta">##callToAction##</span>
|
||||
- </a>
|
||||
-</div>
|
||||
-`
|
||||
- }
|
||||
- );
|
||||
-</script>
|
||||
diff --git a/docs/_templates/sidebarintro.html b/docs/_templates/sidebarintro.html
|
||||
index 2b595b5..241c4fc 100644
|
||||
--- a/docs/_templates/sidebarintro.html
|
||||
+++ b/docs/_templates/sidebarintro.html
|
||||
@@ -4,11 +4,6 @@
|
||||
</a>
|
||||
</p>
|
||||
|
||||
-<p>
|
||||
- <iframe src="https://ghbtns.com/github-btn.html?user=psf&repo=requests&type=watch&count=true&size=large"
|
||||
- allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
|
||||
-</p>
|
||||
-
|
||||
<p>
|
||||
Requests is an elegant and simple HTTP library for Python, built for
|
||||
human beings.
|
||||
@@ -33,5 +28,4 @@
|
||||
<li><a href="https://github.com/psf/requests/issues">Issue Tracker</a></li>
|
||||
</ul>
|
||||
|
||||
-<div id="native-ribbon">
|
||||
</div>
|
||||
diff --git a/docs/_templates/sidebarlogo.html b/docs/_templates/sidebarlogo.html
|
||||
index a3454b7..2b4057d 100644
|
||||
--- a/docs/_templates/sidebarlogo.html
|
||||
+++ b/docs/_templates/sidebarlogo.html
|
||||
@@ -1,30 +1,6 @@
|
||||
-<p>
|
||||
- <iframe src="https://ghbtns.com/github-btn.html?user=psf&repo=requests&type=watch&count=true&size=large"
|
||||
- allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
|
||||
-</p>
|
||||
-
|
||||
<p>
|
||||
Requests is an elegant and simple HTTP library for Python, built for
|
||||
human beings. You are currently looking at the documentation of the
|
||||
development release.
|
||||
</p>
|
||||
|
||||
-<h3>Useful Links</h3>
|
||||
-<ul>
|
||||
- <li><a href="https://requests.readthedocs.io/en/latest/user/quickstart/">Quickstart</a></li>
|
||||
- <li><a href="https://requests.readthedocs.io/en/latest/user/advanced/">Advanced Usage</a></li>
|
||||
- <li><a href="https://requests.readthedocs.io/en/latest/api/">API Reference</a></li>
|
||||
- <li><a href="https://requests.readthedocs.io/en/latest/community/updates/#release-history">Release History</a></li>
|
||||
- <li><a href="https://requests.readthedocs.io/en/latest/dev/contributing/">Contributors Guide</a></li>
|
||||
-
|
||||
- <p></p>
|
||||
-
|
||||
- <li><a href="https://requests.readthedocs.io/en/latest/community/recommended/">Recommended Packages and Extensions</a></li>
|
||||
-
|
||||
- <p></p>
|
||||
-
|
||||
- <li><a href="https://github.com/psf/requests">Requests @ GitHub</a></li>
|
||||
- <li><a href="https://pypi.org/project/requests/">Requests @ PyPI</a></li>
|
||||
- <li><a href="https://github.com/psf/requests/issues">Issue Tracker</a></li>
|
||||
-</ul>
|
||||
-
|
||||
diff --git a/docs/conf.py b/docs/conf.py
|
||||
index edbd72b..1f5b050 100644
|
||||
--- a/docs/conf.py
|
||||
+++ b/docs/conf.py
|
||||
@@ -128,7 +128,7 @@ html_theme_options = {
|
||||
"show_powered_by": False,
|
||||
"github_user": "requests",
|
||||
"github_repo": "requests",
|
||||
- "github_banner": True,
|
||||
+ "github_banner": False,
|
||||
"show_related": False,
|
||||
"note_bg": "#FFF59C",
|
||||
}
|
||||
diff --git a/docs/index.rst b/docs/index.rst
|
||||
index 306b60f..6f1beda 100644
|
||||
--- a/docs/index.rst
|
||||
+++ b/docs/index.rst
|
||||
@@ -8,23 +8,6 @@ Requests: HTTP for Humans™
|
||||
|
||||
Release v\ |version|. (:ref:`Installation <install>`)
|
||||
|
||||
-
|
||||
-.. image:: https://pepy.tech/badge/requests/month
|
||||
- :target: https://pepy.tech/project/requests
|
||||
- :alt: Requests Downloads Per Month Badge
|
||||
-
|
||||
-.. image:: https://img.shields.io/pypi/l/requests.svg
|
||||
- :target: https://pypi.org/project/requests/
|
||||
- :alt: License Badge
|
||||
-
|
||||
-.. image:: https://img.shields.io/pypi/wheel/requests.svg
|
||||
- :target: https://pypi.org/project/requests/
|
||||
- :alt: Wheel Support Badge
|
||||
-
|
||||
-.. image:: https://img.shields.io/pypi/pyversions/requests.svg
|
||||
- :target: https://pypi.org/project/requests/
|
||||
- :alt: Python Version Support Badge
|
||||
-
|
||||
**Requests** is an elegant and simple HTTP library for Python, built for human beings.
|
||||
|
||||
-------------------
|
|
@ -1,79 +0,0 @@
|
|||
Description: Fix autopkgtest when HTTP/HTTPS proxy is set
|
||||
The pytest suite does not expect the http_proxy, https_proxy and no_proxy
|
||||
variables to be present in the environment. They make pytest fail and
|
||||
therefore autopkgtest fail as well.
|
||||
Author: Olivier Gayot <olivier.gayot@canonical.com>
|
||||
Bug: <URL to the upstream bug report if any, implies patch has been forwarded, optional>
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/requests/+bug/1974182
|
||||
Forwarded: no
|
||||
Last-Update: 2022-05-19
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- a/tests/test_requests.py
|
||||
+++ b/tests/test_requests.py
|
||||
@@ -579,8 +579,9 @@
|
||||
),
|
||||
)
|
||||
def test_errors(self, url, exception):
|
||||
- with pytest.raises(exception):
|
||||
- requests.get(url, timeout=1)
|
||||
+ with override_environ(http_proxy=None, https_proxy=None):
|
||||
+ with pytest.raises(exception):
|
||||
+ requests.get(url, timeout=1)
|
||||
|
||||
def test_proxy_error(self):
|
||||
# any proxy related error (address resolution, no route to host, etc) should result in a ProxyError
|
||||
@@ -603,14 +604,14 @@
|
||||
requests.get(httpbin(), proxies={"http": "http:///example.com:8080"})
|
||||
|
||||
def test_respect_proxy_env_on_send_self_prepared_request(self, httpbin):
|
||||
- with override_environ(http_proxy=INVALID_PROXY):
|
||||
+ with override_environ(no_proxy=None, http_proxy=INVALID_PROXY):
|
||||
with pytest.raises(ProxyError):
|
||||
session = requests.Session()
|
||||
request = requests.Request("GET", httpbin())
|
||||
session.send(request.prepare())
|
||||
|
||||
def test_respect_proxy_env_on_send_session_prepared_request(self, httpbin):
|
||||
- with override_environ(http_proxy=INVALID_PROXY):
|
||||
+ with override_environ(no_proxy=None, http_proxy=INVALID_PROXY):
|
||||
with pytest.raises(ProxyError):
|
||||
session = requests.Session()
|
||||
request = requests.Request("GET", httpbin())
|
||||
@@ -618,7 +619,7 @@
|
||||
session.send(prepared)
|
||||
|
||||
def test_respect_proxy_env_on_send_with_redirects(self, httpbin):
|
||||
- with override_environ(http_proxy=INVALID_PROXY):
|
||||
+ with override_environ(no_proxy=None, http_proxy=INVALID_PROXY):
|
||||
with pytest.raises(ProxyError):
|
||||
session = requests.Session()
|
||||
url = httpbin("redirect/1")
|
||||
@@ -627,13 +628,13 @@
|
||||
session.send(request.prepare())
|
||||
|
||||
def test_respect_proxy_env_on_get(self, httpbin):
|
||||
- with override_environ(http_proxy=INVALID_PROXY):
|
||||
+ with override_environ(no_proxy=None, http_proxy=INVALID_PROXY):
|
||||
with pytest.raises(ProxyError):
|
||||
session = requests.Session()
|
||||
session.get(httpbin())
|
||||
|
||||
def test_respect_proxy_env_on_request(self, httpbin):
|
||||
- with override_environ(http_proxy=INVALID_PROXY):
|
||||
+ with override_environ(no_proxy=None, http_proxy=INVALID_PROXY):
|
||||
with pytest.raises(ProxyError):
|
||||
session = requests.Session()
|
||||
session.request(method="GET", url=httpbin())
|
||||
--- a/tests/utils.py
|
||||
+++ b/tests/utils.py
|
||||
@@ -7,7 +7,8 @@
|
||||
save_env = dict(os.environ)
|
||||
for key, value in kwargs.items():
|
||||
if value is None:
|
||||
- del os.environ[key]
|
||||
+ with contextlib.suppress(KeyError):
|
||||
+ del os.environ[key]
|
||||
else:
|
||||
os.environ[key] = value
|
||||
try:
|
|
@ -1,91 +0,0 @@
|
|||
Description: Remove charset-normalizer package as a backup to chardet
|
||||
Since requests can use either chardet or charset-normalizer for character set
|
||||
interpretations, and charset-normalizer is in universe, remove it as a
|
||||
dependency to keep requests in main without issues.
|
||||
Forwarded: not-needed
|
||||
X-Not-Forwarded-Reason: charset-normalizer being in universe is Ubuntu-specific
|
||||
Author: Lena Voytek <lena.voytek@canonical.com>
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/requests/+bug/1975541
|
||||
Last-Update: 2022-11-28
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- a/requests/compat.py
|
||||
+++ b/requests/compat.py
|
||||
@@ -7,11 +7,7 @@
|
||||
compatibility until the next major version.
|
||||
"""
|
||||
|
||||
-try:
|
||||
- import chardet
|
||||
-except ImportError:
|
||||
- import charset_normalizer as chardet
|
||||
-
|
||||
+import chardet
|
||||
import sys
|
||||
|
||||
# -------
|
||||
--- a/requests/help.py
|
||||
+++ b/requests/help.py
|
||||
@@ -10,10 +10,7 @@
|
||||
|
||||
from . import __version__ as requests_version
|
||||
|
||||
-try:
|
||||
- import charset_normalizer
|
||||
-except ImportError:
|
||||
- charset_normalizer = None
|
||||
+charset_normalizer = None
|
||||
|
||||
try:
|
||||
import chardet
|
||||
@@ -112,7 +109,7 @@
|
||||
"implementation": implementation_info,
|
||||
"system_ssl": system_ssl_info,
|
||||
"using_pyopenssl": pyopenssl is not None,
|
||||
- "using_charset_normalizer": chardet is None,
|
||||
+ "using_charset_normalizer": False,
|
||||
"pyOpenSSL": pyopenssl_info,
|
||||
"urllib3": urllib3_info,
|
||||
"chardet": chardet_info,
|
||||
--- a/requests/__init__.py
|
||||
+++ b/requests/__init__.py
|
||||
@@ -44,10 +44,7 @@
|
||||
|
||||
from .exceptions import RequestsDependencyWarning
|
||||
|
||||
-try:
|
||||
- from charset_normalizer import __version__ as charset_normalizer_version
|
||||
-except ImportError:
|
||||
- charset_normalizer_version = None
|
||||
+charset_normalizer_version = None
|
||||
|
||||
try:
|
||||
from chardet import __version__ as chardet_version
|
||||
--- a/requests/packages.py
|
||||
+++ b/requests/packages.py
|
||||
@@ -1,13 +1,5 @@
|
||||
import sys
|
||||
-
|
||||
-try:
|
||||
- import chardet
|
||||
-except ImportError:
|
||||
- import warnings
|
||||
-
|
||||
- import charset_normalizer as chardet
|
||||
-
|
||||
- warnings.filterwarnings("ignore", "Trying to detect", module="charset_normalizer")
|
||||
+import chardet
|
||||
|
||||
# This code exists for backwards compatibility reasons.
|
||||
# I don't like it either. Just look the other way. :)
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -59,7 +59,7 @@
|
||||
sys.exit()
|
||||
|
||||
requires = [
|
||||
- "charset_normalizer>=2,<4",
|
||||
+ "chardet>=3.0.2,<5",
|
||||
"idna>=2.5,<4",
|
||||
"urllib3>=1.21.1,<3",
|
||||
"certifi>=2017.4.17",
|
|
@ -1,3 +0,0 @@
|
|||
0001-Remove-remote-images-traking-code-and-ads.patch
|
||||
0002-Fix-tests-with-HTTP-proxy.patch
|
||||
remove-charset-normalizer-dependency.patch
|
|
@ -1 +1 @@
|
|||
3.0 (quilt)
|
||||
3.0 (native)
|
||||
|
|
Loading…
Reference in New Issue