Skip to content

Commit b0ad249

Browse files
committed
Prefer https:// for URLs throughout project
1 parent 8f20b7d commit b0ad249

20 files changed

+90
-90
lines changed

HISTORY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ documentation](http://docs.python-requests.org/en/latest/community/release-proce
646646
**Bugfixes**
647647

648648
- Revert changes to our vendored certificate bundle. For more context
649-
see (\#2455, \#2456, and <http://bugs.python.org/issue23476>)
649+
see (\#2455, \#2456, and <https://bugs.python.org/issue23476>)
650650

651651
2.5.2 (2015-02-23)
652652
------------------

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright 2018 Kenneth Reitz
44
you may not use this file except in compliance with the License.
55
You may obtain a copy of the License at
66

7-
http://www.apache.org/licenses/LICENSE-2.0
7+
https://www.apache.org/licenses/LICENSE-2.0
88

99
Unless required by applicable law or agreed to in writing, software
1010
distributed under the License is distributed on an "AS IS" BASIS,

_appveyor/install.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,4 +226,4 @@ function main () {
226226
InstallPip $env:PYTHON
227227
}
228228

229-
main
229+
main

appveyor.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AppVeyor.yml from https://github.com/ogrisel/python-appveyor-demo
2-
# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
2+
# License: CC0 1.0 Universal: https://creativecommons.org/publicdomain/zero/1.0/
33

44
build: off
55

@@ -31,7 +31,7 @@ environment:
3131
TOXENV: "py37"
3232

3333
install:
34-
# Install Python (from the official .msi of http://python.org) and pip when
34+
# Install Python (from the official .msi of https://www.python.org/) and pip when
3535
# not already installed.
3636
- ps: if (-not(Test-Path($env:PYTHON))) { & _appveyor\install.ps1 }
3737

docs/_templates/sidebarintro.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ <h3>Stay Informed</h3>
2525
allowtransparency="true" frameborder="0" scrolling="0" width="200" height="20"></iframe></p>
2626

2727
<p><a href="https://twitter.com/kennethreitz" class="twitter-follow-button" data-show-count="false">Follow @kennethreitz</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
28-
<p><a href="http://tinyletter.com/kennethreitz">Join Mailing List</a>.</p>
28+
<p><a href="https://tinyletter.com/kennethreitz">Join Mailing List</a>.</p>
2929
<h3>Other Projects</h3>
3030

31-
<p>More <a href="http://kennethreitz.org/">Kenneth Reitz</a> projects:</p>
31+
<p>More <a href="https://www.kennethreitz.org/">Kenneth Reitz</a> projects:</p>
3232
<ul>
33-
<li><a href="http://html.python-requests.org/">Requests-HTML</a></li>
33+
<li><a href="https://html.python-requests.org/">Requests-HTML</a></li>
3434
<li><a href="http://howtopython.org/">howtopython.org</a></li>
3535
<li><a href="http://pipenv.org/">pipenv</a></li>
36-
<li><a href="http://pep8.org/">pep8.org</a></li>
37-
<li><a href="http://httpbin.org/">httpbin.org</a></li>
38-
<li><a href="http://python-guide.org">The Python Guide</a></li>
36+
<li><a href="https://pep8.org/">pep8.org</a></li>
37+
<li><a href="https://httpbin.org/">httpbin.org</a></li>
38+
<li><a href="https://docs.python-guide.org/">The Python Guide</a></li>
3939
<li><a href="https://github.com/kennethreitz/maya">Maya: Datetimes for Humans</a></li>
4040
<li><a href="https://github.com/kennethreitz/records">Records: SQL for Humans</a></li>
4141
<li><a href="http://www.git-legit.org">Legit: Git for Humans</a></li>

docs/_templates/sidebarlogo.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<h3>Stay Informed</h3>
2121
<p>Receive updates on new releases and upcoming projects.</p>
2222

23-
<p><a href="http://tinyletter.com/kennethreitz">Join Mailing List</a>.</p>
23+
<p><a href="https://tinyletter.com/kennethreitz">Join Mailing List</a>.</p>
2424

2525
<hr/>
2626

@@ -34,14 +34,14 @@ <h3>Stay Informed</h3>
3434

3535
<h3>Other Projects</h3>
3636

37-
<p>More <a href="http://kennethreitz.org/">Kenneth Reitz</a> projects:</p>
37+
<p>More <a href="https://www.kennethreitz.org/">Kenneth Reitz</a> projects:</p>
3838
<ul>
39-
<li><a href="http://html.python-requests.org/">Requests-HTML</a></li>
39+
<li><a href="https://html.python-requests.org/">Requests-HTML</a></li>
4040
<li><a href="http://howtopython.org/">howtopython.org</a></li>
4141
<li><a href="http://pipenv.org/">pipenv</a></li>
42-
<li><a href="http://pep8.org/">pep8.org</a></li>
43-
<li><a href="http://httpbin.org/">httpbin.org</a></li>
44-
<li><a href="http://python-guide.org">The Python Guide</a></li>
42+
<li><a href="https://pep8.org/">pep8.org</a></li>
43+
<li><a href="https://httpbin.org/">httpbin.org</a></li>
44+
<li><a href="https://docs.python-guide.org/">The Python Guide</a></li>
4545
<li><a href="https://github.com/kennethreitz/maya">Maya: Datetimes for Humans</a></li>
4646
<li><a href="https://github.com/kennethreitz/records">Records: SQL for Humans</a></li>
4747
<li><a href="http://www.git-legit.org">Legit: Git for Humans</a></li>

docs/api.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ API Changes
139139
s = requests.Session() # formerly, session took parameters
140140
s.auth = auth
141141
s.headers.update(headers)
142-
r = s.get('http://httpbin.org/headers')
142+
r = s.get('https://httpbin.org/headers')
143143

144144
* All request hooks have been removed except 'response'.
145145

@@ -185,7 +185,7 @@ API Changes
185185
requests_log.setLevel(logging.DEBUG)
186186
requests_log.propagate = True
187187

188-
requests.get('http://httpbin.org/headers')
188+
requests.get('https://httpbin.org/headers')
189189

190190

191191

@@ -197,8 +197,8 @@ license from the ISC_ license to the `Apache 2.0`_ license. The Apache 2.0
197197
license ensures that contributions to Requests are also covered by the Apache
198198
2.0 license.
199199

200-
.. _ISC: http://opensource.org/licenses/ISC
201-
.. _Apache 2.0: http://opensource.org/licenses/Apache-2.0
200+
.. _ISC: https://opensource.org/licenses/ISC
201+
.. _Apache 2.0: https://opensource.org/licenses/Apache-2.0
202202

203203

204204
Migrating to 2.x
@@ -213,7 +213,7 @@ For more details on the changes in this release including new APIs, links
213213
to the relevant GitHub issues and some of the bug fixes, read Cory's blog_
214214
on the subject.
215215

216-
.. _blog: http://lukasa.co.uk/2013/09/Requests_20/
216+
.. _blog: https://lukasa.co.uk/2013/09/Requests_20/
217217

218218

219219
API Changes

docs/community/out-there.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ To give it a try, simply::
1515

1616
Articles & Talks
1717
================
18-
- `Python for the Web <http://gun.io/blog/python-for-the-web/>`_ teaches how to use Python to interact with the web, using Requests.
19-
- `Daniel Greenfeld's Review of Requests <http://pydanny.blogspot.com/2011/05/python-http-requests-for-humans.html>`_
20-
- `My 'Python for Humans' talk <http://python-for-humans.heroku.com>`_ ( `audio <http://codeconf.s3.amazonaws.com/2011/pycodeconf/talks/PyCodeConf2011%20-%20Kenneth%20Reitz.m4a>`_ )
18+
- `Python for the Web <https://www.gun.io/blog/python-for-the-web>`_ teaches how to use Python to interact with the web, using Requests.
19+
- `Daniel Greenfeld's Review of Requests <https://pydanny.blogspot.com/2011/05/python-http-requests-for-humans.html>`_
20+
- `My 'Python for Humans' talk <http://python-for-humans.heroku.com>`_ ( `audio <https://codeconf.s3.amazonaws.com/2011/pycodeconf/talks/PyCodeConf2011%20-%20Kenneth%20Reitz.m4a>`_ )
2121
- `Issac Kelly's 'Consuming Web APIs' talk <https://issackelly.github.com/Consuming-Web-APIs-with-Python-Talk/slides/slides.html>`_
22-
- `Blog post about Requests via Yum <http://arunsag.wordpress.com/2011/08/17/new-package-python-requests-http-for-humans/>`_
23-
- `Russian blog post introducing Requests <http://habrahabr.ru/blogs/python/126262/>`_
22+
- `Blog post about Requests via Yum <https://arunsag.wordpress.com/2011/08/17/new-package-python-requests-http-for-humans/>`_
23+
- `Russian blog post introducing Requests <https://habr.com/post/126262/>`_
2424
- `Sending JSON in Requests <http://www.coglib.com/~icordasc/blog/2014/11/sending-json-in-requests.html>`_

docs/dev/contributing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ model methods (e.g. ``__repr__``) are typically the exception to this rule.
157157

158158
Thanks for helping to make the world a better place!
159159

160-
.. _PEP 8: http://pep8.org
160+
.. _PEP 8: https://pep8.org/
161161
.. _line continuations: https://www.python.org/dev/peps/pep-0008/#indentation
162162

163163
Documentation Contributions

docs/dev/philosophy.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Requests is an open but opinionated library, created by an open but opinionated
99
Management Style
1010
~~~~~~~~~~~~~~~~
1111

12-
`Kenneth Reitz <http://kennethreitz.org>`_ is the BDFL. He has final say in any decision related to the Requests project. Kenneth is responsible for the direction and form of the library, as well as its presentation. In addition to making decisions based on technical merit, he is responsible for making decisions based on the development philosophy of Requests.
12+
`Kenneth Reitz <https://www.kennethreitz.org/>`_ is the BDFL. He has final say in any decision related to the Requests project. Kenneth is responsible for the direction and form of the library, as well as its presentation. In addition to making decisions based on technical merit, he is responsible for making decisions based on the development philosophy of Requests.
1313

1414
`Ian Cordasco <http://www.coglib.com/~icordasc/>`_ and `Cory Benfield <https://lukasa.co.uk/about/>`_ are the core contributors. They are responsible for triaging bug reports, reviewing pull requests and ensuring that Kenneth is kept up to speed with developments around the library. The day-to-day managing of the project is done by the core contributors. They are responsible for making judgements about whether or not a feature request is likely to be accepted by Kenneth. Their word is, in some ways, more final than Kenneth's.
1515

@@ -26,7 +26,7 @@ Semantic Versioning
2626

2727
For many years, the open source community has been plagued with version number dystonia. Numbers vary so greatly from project to project, they are practically meaningless.
2828

29-
Requests uses `Semantic Versioning <http://semver.org>`_. This specification seeks to put an end to this madness with a small set of practical guidelines for you and your colleagues to use in your next project.
29+
Requests uses `Semantic Versioning <https://semver.org/>`_. This specification seeks to put an end to this madness with a small set of practical guidelines for you and your colleagues to use in your next project.
3030

3131
Standard Library?
3232
~~~~~~~~~~~~~~~~~

docs/user/advanced.rst

+21-21
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Let's persist some cookies across requests::
2525

2626
s = requests.Session()
2727

28-
s.get('http://httpbin.org/cookies/set/sessioncookie/123456789')
29-
r = s.get('http://httpbin.org/cookies')
28+
s.get('https://httpbin.org/cookies/set/sessioncookie/123456789')
29+
r = s.get('https://httpbin.org/cookies')
3030

3131
print(r.text)
3232
# '{"cookies": {"sessioncookie": "123456789"}}'
@@ -40,7 +40,7 @@ is done by providing data to the properties on a Session object::
4040
s.headers.update({'x-test': 'true'})
4141

4242
# both 'x-test' and 'x-test2' are sent
43-
s.get('http://httpbin.org/headers', headers={'x-test2': 'true'})
43+
s.get('https://httpbin.org/headers', headers={'x-test2': 'true'})
4444

4545

4646
Any dictionaries that you pass to a request method will be merged with the
@@ -53,11 +53,11 @@ with the first request, but not the second::
5353

5454
s = requests.Session()
5555

56-
r = s.get('http://httpbin.org/cookies', cookies={'from-my': 'browser'})
56+
r = s.get('https://httpbin.org/cookies', cookies={'from-my': 'browser'})
5757
print(r.text)
5858
# '{"cookies": {"from-my": "browser"}}'
5959

60-
r = s.get('http://httpbin.org/cookies')
60+
r = s.get('https://httpbin.org/cookies')
6161
print(r.text)
6262
# '{"cookies": {}}'
6363

@@ -69,7 +69,7 @@ If you want to manually add cookies to your session, use the
6969
Sessions can also be used as context managers::
7070

7171
with requests.Session() as s:
72-
s.get('http://httpbin.org/cookies/set/sessioncookie/123456789')
72+
s.get('https://httpbin.org/cookies/set/sessioncookie/123456789')
7373

7474
This will make sure the session is closed as soon as the ``with`` block is
7575
exited, even if unhandled exceptions occurred.
@@ -97,7 +97,7 @@ The ``Response`` object contains all of the information returned by the server a
9797
also contains the ``Request`` object you created originally. Here is a simple
9898
request to get some very important information from Wikipedia's servers::
9999

100-
>>> r = requests.get('http://en.wikipedia.org/wiki/Monty_Python')
100+
>>> r = requests.get('https://en.wikipedia.org/wiki/Monty_Python')
101101

102102
If we want to access the headers the server sent back to us, we do this::
103103

@@ -323,7 +323,7 @@ inefficiency with connections. If you find yourself partially reading request
323323
bodies (or not reading them at all) while using ``stream=True``, you should
324324
make the request within a ``with`` statement to ensure it's always closed::
325325

326-
with requests.get('http://httpbin.org/get', stream=True) as r:
326+
with requests.get('https://httpbin.org/get', stream=True) as r:
327327
# Do things with the response here.
328328

329329
.. _keep-alive:
@@ -393,7 +393,7 @@ upload image files to an HTML form with a multiple file field 'images'::
393393

394394
To do that, just set files to a list of tuples of ``(form_field_name, file_info)``::
395395

396-
>>> url = 'http://httpbin.org/post'
396+
>>> url = 'https://httpbin.org/post'
397397
>>> multiple_files = [
398398
('images', ('foo.png', open('foo.png', 'rb'), 'image/png')),
399399
('images', ('bar.png', open('bar.png', 'rb'), 'image/png'))]
@@ -455,13 +455,13 @@ anything, nothing else is affected.
455455

456456
Let's print some request method arguments at runtime::
457457

458-
>>> requests.get('http://httpbin.org', hooks={'response': print_url})
459-
http://httpbin.org
458+
>>> requests.get('https://httpbin.org/', hooks={'response': print_url})
459+
https://httpbin.org/
460460
<Response [200]>
461461

462462
You can add multiple hooks to a single request. Let's call two hooks at once::
463463

464-
>>> r = requests.get('http://httpbin.org', hooks={'response': [print_url, record_hook]})
464+
>>> r = requests.get('https://httpbin.org/', hooks={'response': [print_url, record_hook]})
465465
>>> r.hook_called
466466
True
467467

@@ -470,8 +470,8 @@ be called on every request made to the session. For example::
470470

471471
>>> s = requests.Session()
472472
>>> s.hooks['response'].append(print_url)
473-
>>> s.get('http://httpbin.org')
474-
http://httpbin.org
473+
>>> s.get('https://httpbin.org/')
474+
https://httpbin.org/
475475
<Response [200]>
476476

477477
A ``Session`` can have multiple hooks, which will be called in the order
@@ -529,7 +529,7 @@ set ``stream`` to ``True`` and iterate over the response with
529529
import json
530530
import requests
531531

532-
r = requests.get('http://httpbin.org/stream/20', stream=True)
532+
r = requests.get('https://httpbin.org/stream/20', stream=True)
533533

534534
for line in r.iter_lines():
535535

@@ -543,7 +543,7 @@ When using `decode_unicode=True` with
543543
:meth:`Response.iter_content() <requests.Response.iter_content>`, you'll want
544544
to provide a fallback encoding in the event the server doesn't provide one::
545545

546-
r = requests.get('http://httpbin.org/stream/20', stream=True)
546+
r = requests.get('https://httpbin.org/stream/20', stream=True)
547547

548548
if r.encoding is None:
549549
r.encoding = 'utf-8'
@@ -657,7 +657,7 @@ encoding in the HTTP header, and if none is present, will use `chardet
657657
The only time Requests will not do this is if no explicit charset
658658
is present in the HTTP headers **and** the ``Content-Type``
659659
header contains ``text``. In this situation, `RFC 2616
660-
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.1>`_ specifies
660+
<https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.1>`_ specifies
661661
that the default charset must be ``ISO-8859-1``. Requests follows the
662662
specification in this case. If you require a different encoding, you can
663663
manually set the :attr:`Response.encoding <requests.Response.encoding>`
@@ -921,7 +921,7 @@ it should apply to.
921921
::
922922

923923
>>> s = requests.Session()
924-
>>> s.mount('http://www.github.com', MyAdapter())
924+
>>> s.mount('https://github.com/', MyAdapter())
925925

926926
The mount call registers a specific instance of a Transport Adapter to a
927927
prefix. Once mounted, any HTTP request made using that session whose URL starts
@@ -959,7 +959,7 @@ library to use SSLv3::
959959
num_pools=connections, maxsize=maxsize,
960960
block=block, ssl_version=ssl.PROTOCOL_SSLv3)
961961

962-
.. _`described here`: http://www.kennethreitz.org/essays/the-future-of-python-http
962+
.. _`described here`: https://www.kennethreitz.org/essays/the-future-of-python-http
963963
.. _`urllib3`: https://github.com/shazow/urllib3
964964

965965
.. _blocking-or-nonblocking:
@@ -1003,7 +1003,7 @@ The **connect** timeout is the number of seconds Requests will wait for your
10031003
client to establish a connection to a remote machine (corresponding to the
10041004
`connect()`_) call on the socket. It's a good practice to set connect timeouts
10051005
to slightly larger than a multiple of 3, which is the default `TCP packet
1006-
retransmission window <http://www.hjp.at/doc/rfc/rfc2988.txt>`_.
1006+
retransmission window <https://www.hjp.at/doc/rfc/rfc2988.txt>`_.
10071007

10081008
Once your client has connected to the server and sent the HTTP request, the
10091009
**read** timeout is the number of seconds the client will wait for the server
@@ -1028,4 +1028,4 @@ coffee.
10281028

10291029
r = requests.get('https://github.com', timeout=None)
10301030

1031-
.. _`connect()`: http://linux.die.net/man/2/connect
1031+
.. _`connect()`: https://linux.die.net/man/2/connect

docs/user/authentication.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Another very popular form of HTTP Authentication is Digest Authentication,
5353
and Requests supports this out of the box as well::
5454

5555
>>> from requests.auth import HTTPDigestAuth
56-
>>> url = 'http://httpbin.org/digest-auth/auth/user/pass'
56+
>>> url = 'https://httpbin.org/digest-auth/auth/user/pass'
5757
>>> requests.get(url, auth=HTTPDigestAuth('user', 'pass'))
5858
<Response [200]>
5959

@@ -122,7 +122,7 @@ To do so, subclass :class:`AuthBase <requests.auth.AuthBase>` and implement the
122122
... # Implement my authentication
123123
... return r
124124
...
125-
>>> url = 'http://httpbin.org/get'
125+
>>> url = 'https://httpbin.org/get'
126126
>>> requests.get(url, auth=MyAuth())
127127
<Response [200]>
128128

@@ -134,7 +134,7 @@ authentication will additionally add hooks to provide further functionality.
134134
Further examples can be found under the `Requests organization`_ and in the
135135
``auth.py`` file.
136136

137-
.. _OAuth: http://oauth.net/
137+
.. _OAuth: https://oauth.net/
138138
.. _requests_oauthlib: https://github.com/requests/requests-oauthlib
139139
.. _requests-oauthlib OAuth2 documentation: https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html
140140
.. _Web Application Flow: https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html#web-application-flow

docs/user/install.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To install Requests, simply run this simple command in your terminal of choice::
1818
$ pipenv install requests
1919

2020
If you don't have `pipenv <http://pipenv.org/>`_ installed (tisk tisk!), head over to the Pipenv website for installation instructions. Or, if you prefer to just use pip and don't have it installed,
21-
`this Python installation guide <http://docs.python-guide.org/en/latest/starting/installation/>`_
21+
`this Python installation guide <https://docs.python-guide.org/starting/installation/>`_
2222
can guide you through the process.
2323

2424
Get the Source Code

docs/user/intro.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ closed-source software.
3737

3838
Requests is released under terms of `Apache2 License`_.
3939

40-
.. _`GPL Licensed`: http://www.opensource.org/licenses/gpl-license.php
41-
.. _`Apache2 License`: http://opensource.org/licenses/Apache-2.0
40+
.. _`GPL Licensed`: https://opensource.org/licenses/gpl-license.php
41+
.. _`Apache2 License`: https://opensource.org/licenses/Apache-2.0
4242

4343

4444
Requests License

0 commit comments

Comments
 (0)