pylibravatar:master

Last commit made on 2016-03-14
Get this branch:
git clone -b master https://git.launchpad.net/pylibravatar
Only François Marier can upload to this branch. If you are François Marier please log in for upload directions.

Branch merges

Branch information

Name:
master
Repository:
lp:pylibravatar

Recent commits

9ba8d77... by François Marier

Fail gracefully when DNS servers are unavailable

b506b4c... by Stefano Rivera

If no servers are discovered, req() will return None

5729a3b... by François Marier

Be specific about the supported sub-versions of Python

e2d4c96... by François Marier

Add pep257 to the unit tests

4850465... by François Marier

Document release process and automate more of it

a0a2b14... by François Marier

Update changelog and version number for release

d9f72c0... by François Marier

Merge changes

1a5692d... by Ralph Bean <email address hidden>

Use tcp for SRV lookups.

By default, the DNS module is using udp. I discovered this because it would
periodically time out on our server -- requests would sometimes take 30s that
would normally take less than 1s. I'd like to use tcp for our use case in
order to avoid timeouts. However, that alone is not reason enough to ask
everyone else to use tcp. They may want udp. It is faster, right?

While playing with this, I found that on average tcp is repeatably faster than
udp for these kinds of requests.

See tcp:

  $ time python -c """
  import DNS
  DNS.DiscoverNameServers()
  [DNS.Request(name='_avatars._tcp.ralph.id.fedoraproject.org', qtype='SRV', protocol='tcp').req() for i in range(128)]
  """
  python -c 0.10s user 0.03s system 10% cpu 1.270 total

Versus udp:

  $ time python -c """
  import DNS
  DNS.DiscoverNameServers()
  [DNS.Request(name='_avatars._tcp.ralph.id.fedoraproject.org', qtype='SRV', protocol='udp').req() for i in range(128)]
  """
  python -c 0.24s user 0.11s system 3% cpu 9.514 total

Which makes it a more suitable default for libravatar.py, no?

1a531e4... by unknown <email address hidden>

Add a test for UTF-8 URLs

To make sure that we don't introduce a problem similar to the one that
was in the main Libravatar codebase:

  https://bugs.launchpad.net/libravatar/+bug/1363804

8bb5c3c... by unknown <email address hidden>

Fix new pep8 and pylint warnings