lp:~ralph-bean/pylibravatar/tcp-dns

Created by Ralph Bean and last modified
Get this branch:
bzr branch lp:~ralph-bean/pylibravatar/tcp-dns
Only Ralph Bean can upload to this branch. If you are Ralph Bean please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Ralph Bean
Project:
pyLibravatar
Status:
Merged

Recent revisions

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

38. By François Marier

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

37. By François Marier

Fix new pep8 and pylint warnings

36. By François Marier

Bump changelog and version number for release

35. By François Marier

Disable pylint errors around the Python 3 libraries

34. By François Marier

Add Python 3 support (bug #1080558)

Thanks to Ralph Bean for the patch!

33. By François Marier

Add a coverage target to the Makefile which runs python-coverage

http://nedbatchelder.com/code/coverage/

32. By François Marier

Fix typo in comment

31. By François Marier

Fixed type of https parameter in README example

30. By François Marier

Better options for running pylint

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:pylibravatar
This branch contains Public information 
Everyone can see this information.

Subscribers