Skip to content

Commit

Permalink
Switching website to pycurl.io
Browse files Browse the repository at this point in the history
  • Loading branch information
p committed Jan 30, 2016
1 parent b9483a3 commit 41f654c
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Documentation
-------------

Documentation for the most recent PycURL release is available on
`PycURL website <http://pycurl.sourceforge.net/doc/>`_.
`PycURL website <http://pycurl.io/docs/latest/>`_.

To build documentation from source, run ``make docs``.
Building documentation requires `Sphinx <http://sphinx-doc.org/>`_ to
Expand Down Expand Up @@ -175,7 +175,7 @@ License
included in the file COPYING-MIT. You can redistribute and/or modify PycURL
according to the terms of either license.

.. _PycURL: http://pycurl.sourceforge.net/
.. _PycURL: http://pycurl.io/
.. _libcurl: http://curl.haxx.se/libcurl/
.. _urllib: http://docs.python.org/library/urllib.html
.. _`the repository`: https://github.com/pycurl/pycurl
Expand Down
20 changes: 10 additions & 10 deletions doc/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Here is how we can retrieve a network resource in Python 2::

buffer = StringIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net/')
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
c.perform()
c.close()
Expand Down Expand Up @@ -51,7 +51,7 @@ Python 3 version is slightly more complicated::

buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net/')
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
c.perform()
c.close()
Expand Down Expand Up @@ -86,7 +86,7 @@ It is often helpful to compare verbose output from the program using PycURL
with that of ``curl`` command line tool when the latter is invoked with
``-v`` option::

curl -v http://pycurl.sourceforge.net/
curl -v http://pycurl.io/


Examining Response Headers
Expand Down Expand Up @@ -134,7 +134,7 @@ examine the response headers::

buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net')
c.setopt(c.URL, 'http://pycurl.io')
c.setopt(c.WRITEFUNCTION, buffer.write)
# Set our header function.
c.setopt(c.HEADERFUNCTION, header_function)
Expand Down Expand Up @@ -180,7 +180,7 @@ for a change::
# can write response body to it without decoding.
with open('out.html', 'wb') as f:
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net/')
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, f)
c.perform()
c.close()
Expand Down Expand Up @@ -239,7 +239,7 @@ accessible via ``getinfo`` call as follows::

buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net/')
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
c.perform()

Expand Down Expand Up @@ -279,7 +279,7 @@ beforehand::
from urllib import urlencode

c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net/tests/testpostvars.php')
c.setopt(c.URL, 'http://pycurl.io/tests/testpostvars.php')

post_data = {'field': 'value'}
# Form data must be provided already urlencoded.
Expand Down Expand Up @@ -309,7 +309,7 @@ use ``FORM_FILE`` as follows::
import pycurl

c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net/tests/testfileupload.php')
c.setopt(c.URL, 'http://pycurl.io/tests/testfileupload.php')

c.setopt(c.HTTPPOST, [
('fileupload', (
Expand All @@ -330,7 +330,7 @@ For example, to set a different filename and content type::
import pycurl

c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net/tests/testfileupload.php')
c.setopt(c.URL, 'http://pycurl.io/tests/testfileupload.php')

c.setopt(c.HTTPPOST, [
('fileupload', (
Expand All @@ -353,7 +353,7 @@ If the file data is in memory, use ``BUFFER``/``BUFFERPTR`` as follows::
import pycurl

c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net/tests/testfileupload.php')
c.setopt(c.URL, 'http://pycurl.io/tests/testfileupload.php')

c.setopt(c.HTTPPOST, [
('fileupload', (
Expand Down
10 changes: 5 additions & 5 deletions doc/unicode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ in binary mode for the writes to work::

import pycurl
c = pycurl.Curl()
c.setopt(c.URL,'http://pycurl.sourceforge.net')
c.setopt(c.URL,'http://pycurl.io')
# File opened in binary mode.
with open('/dev/null','wb') as f:
c.setopt(c.WRITEDATA, f)
Expand Down Expand Up @@ -131,7 +131,7 @@ object::
import pycurl
from StringIO import StringIO
c = pycurl.Curl()
c.setopt(c.URL,'http://pycurl.sourceforge.net')
c.setopt(c.URL,'http://pycurl.io')
buffer = StringIO()
c.setopt(c.WRITEDATA, buffer)
# Same result if using WRITEFUNCTION instead:
Expand All @@ -145,7 +145,7 @@ the response must be written to a ``BytesIO`` object::
import pycurl
from io import BytesIO
c = pycurl.Curl()
c.setopt(c.URL,'http://pycurl.sourceforge.net')
c.setopt(c.URL,'http://pycurl.io')
buffer = BytesIO()
c.setopt(c.WRITEDATA, buffer)
# Same result if using WRITEFUNCTION instead:
Expand All @@ -158,7 +158,7 @@ Attempting to use a ``StringIO`` object will produce an error::
import pycurl
from io import StringIO
c = pycurl.Curl()
c.setopt(c.URL,'http://pycurl.sourceforge.net')
c.setopt(c.URL,'http://pycurl.io')
buffer = StringIO()
c.setopt(c.WRITEDATA, buffer)
c.perform()
Expand All @@ -180,7 +180,7 @@ Python 2 and Python 3::
# Python 2
from StringIO import StringIO as BytesIO
c = pycurl.Curl()
c.setopt(c.URL,'http://pycurl.sourceforge.net')
c.setopt(c.URL,'http://pycurl.io')
buffer = BytesIO()
c.setopt(c.WRITEDATA, buffer)
c.perform()
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net/')
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
# For older PycURL versions:
#c.setopt(c.WRITEFUNCTION, buffer.write)
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/get_python2.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

buffer = StringIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net/')
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
# For older PycURL versions:
#c.setopt(c.WRITEFUNCTION, buffer.write)
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/get_python3.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net/')
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
c.perform()
c.close()
Expand Down
12 changes: 6 additions & 6 deletions examples/quickstart/response_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,32 @@ def header_function(header_line):
# On Python 2, decoding step can be skipped.
# On Python 3, decoding step is required.
header_line = header_line.decode('iso-8859-1')

# Header lines include the first status line (HTTP/1.x ...).
# We are going to ignore all lines that don't have a colon in them.
# This will botch headers that are split on multiple lines...
if ':' not in header_line:
return

# Break the header line into header name and value.
name, value = header_line.split(':', 1)

# Remove whitespace that may be present.
# Header lines include the trailing newline, and there may be whitespace
# around the colon.
name = name.strip()
value = value.strip()

# Header names are case insensitive.
# Lowercase name here.
name = name.lower()

# Now we can actually record the header name and value.
headers[name] = value

buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net')
c.setopt(c.URL, 'http://pycurl.io')
c.setopt(c.WRITEFUNCTION, buffer.write)
# Set our header function.
c.setopt(c.HEADERFUNCTION, header_function)
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/response_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net/')
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
c.perform()

Expand Down
4 changes: 2 additions & 2 deletions examples/tests/test_build_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from StringIO import StringIO as BytesIO

c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.sourceforge.net')
c.setopt(c.URL, 'http://pycurl.io')
#c.setopt(c.ENCODING, 'deflate')
c.setopt(c.HTTPHEADER, ['Accept-Encoding: deflate'])
body = BytesIO()
Expand All @@ -33,7 +33,7 @@ def header_function(header):
print('Server served deflated body')

c.reset()
c.setopt(c.URL, 'http://pycurl.sourceforge.net')
c.setopt(c.URL, 'http://pycurl.io')
c.setopt(c.ENCODING, 'deflate')
body = BytesIO()
c.setopt(c.WRITEFUNCTION, body.write)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ def gen_docstrings_sources():
author_email="kjetilja at gmail.com, markus at oberhumer.com, oleg at bsdpower.com",
maintainer="Oleg Pudeyev",
maintainer_email="oleg@bsdpower.com",
url="http://pycurl.sourceforge.net/",
url="http://pycurl.io/",
license="LGPL/MIT",
keywords=['curl', 'libcurl', 'urllib', 'wget', 'download', 'file transfer',
'http', 'www'],
Expand Down

0 comments on commit 41f654c

Please sign in to comment.