Skip to content

Commit

Permalink
Prefer https:// for URLs throughout project
Browse files Browse the repository at this point in the history
  • Loading branch information
jdufresne committed Sep 30, 2018
1 parent 8f20b7d commit b0ad249
Show file tree
Hide file tree
Showing 20 changed files with 90 additions and 90 deletions.
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ documentation](http://docs.python-requests.org/en/latest/community/release-proce
**Bugfixes**

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

2.5.2 (2015-02-23)
------------------
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright 2018 Kenneth Reitz
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
2 changes: 1 addition & 1 deletion _appveyor/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,4 @@ function main () {
InstallPip $env:PYTHON
}

main
main
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# AppVeyor.yml from https://github.com/ogrisel/python-appveyor-demo
# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
# License: CC0 1.0 Universal: https://creativecommons.org/publicdomain/zero/1.0/

build: off

Expand Down Expand Up @@ -31,7 +31,7 @@ environment:
TOXENV: "py37"

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

Expand Down
12 changes: 6 additions & 6 deletions docs/_templates/sidebarintro.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ <h3>Stay Informed</h3>
allowtransparency="true" frameborder="0" scrolling="0" width="200" height="20"></iframe></p>

<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>
<p><a href="http://tinyletter.com/kennethreitz">Join Mailing List</a>.</p>
<p><a href="https://tinyletter.com/kennethreitz">Join Mailing List</a>.</p>
<h3>Other Projects</h3>

<p>More <a href="http://kennethreitz.org/">Kenneth Reitz</a> projects:</p>
<p>More <a href="https://www.kennethreitz.org/">Kenneth Reitz</a> projects:</p>
<ul>
<li><a href="http://html.python-requests.org/">Requests-HTML</a></li>
<li><a href="https://html.python-requests.org/">Requests-HTML</a></li>
<li><a href="http://howtopython.org/">howtopython.org</a></li>
<li><a href="http://pipenv.org/">pipenv</a></li>
<li><a href="http://pep8.org/">pep8.org</a></li>
<li><a href="http://httpbin.org/">httpbin.org</a></li>
<li><a href="http://python-guide.org">The Python Guide</a></li>
<li><a href="https://pep8.org/">pep8.org</a></li>
<li><a href="https://httpbin.org/">httpbin.org</a></li>
<li><a href="https://docs.python-guide.org/">The Python Guide</a></li>
<li><a href="https://github.com/kennethreitz/maya">Maya: Datetimes for Humans</a></li>
<li><a href="https://github.com/kennethreitz/records">Records: SQL for Humans</a></li>
<li><a href="http://www.git-legit.org">Legit: Git for Humans</a></li>
Expand Down
12 changes: 6 additions & 6 deletions docs/_templates/sidebarlogo.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<h3>Stay Informed</h3>
<p>Receive updates on new releases and upcoming projects.</p>

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

<hr/>

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

<h3>Other Projects</h3>

<p>More <a href="http://kennethreitz.org/">Kenneth Reitz</a> projects:</p>
<p>More <a href="https://www.kennethreitz.org/">Kenneth Reitz</a> projects:</p>
<ul>
<li><a href="http://html.python-requests.org/">Requests-HTML</a></li>
<li><a href="https://html.python-requests.org/">Requests-HTML</a></li>
<li><a href="http://howtopython.org/">howtopython.org</a></li>
<li><a href="http://pipenv.org/">pipenv</a></li>
<li><a href="http://pep8.org/">pep8.org</a></li>
<li><a href="http://httpbin.org/">httpbin.org</a></li>
<li><a href="http://python-guide.org">The Python Guide</a></li>
<li><a href="https://pep8.org/">pep8.org</a></li>
<li><a href="https://httpbin.org/">httpbin.org</a></li>
<li><a href="https://docs.python-guide.org/">The Python Guide</a></li>
<li><a href="https://github.com/kennethreitz/maya">Maya: Datetimes for Humans</a></li>
<li><a href="https://github.com/kennethreitz/records">Records: SQL for Humans</a></li>
<li><a href="http://www.git-legit.org">Legit: Git for Humans</a></li>
Expand Down
10 changes: 5 additions & 5 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ API Changes
s = requests.Session() # formerly, session took parameters
s.auth = auth
s.headers.update(headers)
r = s.get('http://httpbin.org/headers')
r = s.get('https://httpbin.org/headers')

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

Expand Down Expand Up @@ -185,7 +185,7 @@ API Changes
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True

requests.get('http://httpbin.org/headers')
requests.get('https://httpbin.org/headers')



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

.. _ISC: http://opensource.org/licenses/ISC
.. _Apache 2.0: http://opensource.org/licenses/Apache-2.0
.. _ISC: https://opensource.org/licenses/ISC
.. _Apache 2.0: https://opensource.org/licenses/Apache-2.0


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

.. _blog: http://lukasa.co.uk/2013/09/Requests_20/
.. _blog: https://lukasa.co.uk/2013/09/Requests_20/


API Changes
Expand Down
10 changes: 5 additions & 5 deletions docs/community/out-there.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ To give it a try, simply::

Articles & Talks
================
- `Python for the Web <http://gun.io/blog/python-for-the-web/>`_ teaches how to use Python to interact with the web, using Requests.
- `Daniel Greenfeld's Review of Requests <http://pydanny.blogspot.com/2011/05/python-http-requests-for-humans.html>`_
- `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>`_ )
- `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.
- `Daniel Greenfeld's Review of Requests <https://pydanny.blogspot.com/2011/05/python-http-requests-for-humans.html>`_
- `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>`_ )
- `Issac Kelly's 'Consuming Web APIs' talk <https://issackelly.github.com/Consuming-Web-APIs-with-Python-Talk/slides/slides.html>`_
- `Blog post about Requests via Yum <http://arunsag.wordpress.com/2011/08/17/new-package-python-requests-http-for-humans/>`_
- `Russian blog post introducing Requests <http://habrahabr.ru/blogs/python/126262/>`_
- `Blog post about Requests via Yum <https://arunsag.wordpress.com/2011/08/17/new-package-python-requests-http-for-humans/>`_
- `Russian blog post introducing Requests <https://habr.com/post/126262/>`_
- `Sending JSON in Requests <http://www.coglib.com/~icordasc/blog/2014/11/sending-json-in-requests.html>`_
2 changes: 1 addition & 1 deletion docs/dev/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ model methods (e.g. ``__repr__``) are typically the exception to this rule.

Thanks for helping to make the world a better place!

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

Documentation Contributions
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/philosophy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Requests is an open but opinionated library, created by an open but opinionated
Management Style
~~~~~~~~~~~~~~~~

`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.
`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.

`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.

Expand All @@ -26,7 +26,7 @@ Semantic Versioning

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.

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.
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.

Standard Library?
~~~~~~~~~~~~~~~~~
Expand Down
42 changes: 21 additions & 21 deletions docs/user/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Let's persist some cookies across requests::

s = requests.Session()

s.get('http://httpbin.org/cookies/set/sessioncookie/123456789')
r = s.get('http://httpbin.org/cookies')
s.get('https://httpbin.org/cookies/set/sessioncookie/123456789')
r = s.get('https://httpbin.org/cookies')

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

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


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

s = requests.Session()

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

r = s.get('http://httpbin.org/cookies')
r = s.get('https://httpbin.org/cookies')
print(r.text)
# '{"cookies": {}}'

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

>>> s = requests.Session()
>>> s.hooks['response'].append(print_url)
>>> s.get('http://httpbin.org')
http://httpbin.org
>>> s.get('https://httpbin.org/')
https://httpbin.org/
<Response [200]>

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

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

for line in r.iter_lines():

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

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

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

>>> s = requests.Session()
>>> s.mount('http://www.github.com', MyAdapter())
>>> s.mount('https://github.com/', MyAdapter())

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

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

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

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

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

.. _`connect()`: http://linux.die.net/man/2/connect
.. _`connect()`: https://linux.die.net/man/2/connect
6 changes: 3 additions & 3 deletions docs/user/authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Another very popular form of HTTP Authentication is Digest Authentication,
and Requests supports this out of the box as well::

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

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

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

.. _OAuth: http://oauth.net/
.. _OAuth: https://oauth.net/
.. _requests_oauthlib: https://github.com/requests/requests-oauthlib
.. _requests-oauthlib OAuth2 documentation: https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html
.. _Web Application Flow: https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html#web-application-flow
Expand Down
2 changes: 1 addition & 1 deletion docs/user/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To install Requests, simply run this simple command in your terminal of choice::
$ pipenv install requests

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,
`this Python installation guide <http://docs.python-guide.org/en/latest/starting/installation/>`_
`this Python installation guide <https://docs.python-guide.org/starting/installation/>`_
can guide you through the process.

Get the Source Code
Expand Down
4 changes: 2 additions & 2 deletions docs/user/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ closed-source software.

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

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


Requests License
Expand Down
Loading

0 comments on commit b0ad249

Please sign in to comment.