<commit_before>from urlparse import urlparse, uses_netloc, uses_query

# workaround for http://bugs.python.org/issue7904
if urlparse('s3://bucket/key').netloc != 'bucket':
    uses_netloc.append('s3')
if urlparse('s3://bucket/key?key=value').query != 'key=value':
    uses_query.append('s3')<commit_msg>fix urlparse monkeypatches for python 2.7.4. closes #144<commit_after>from urlparse import urlparse

# workaround for http://bugs.python.org/issue7904 - Python < 2.7
if urlparse('s3://bucket/key').netloc != 'bucket':
    from urlparse import uses_netloc
    uses_netloc.append('s3')

# workaround for http://bugs.python.org/issue9374 - Python < 2.7.4
if urlparse('s3://bucket/key?key=value').query != 'key=value':
    from urlparse import uses_query
    uses_query.append('s3')
{'fraction_non_alphanumeric': 0.1564102564102564, 'fraction_numerical': 0.03974358974358974, 'mean_word_length': 4.8283582089552235, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5510025', 'n_tokens_mistral': 283, 'n_tokens_neox': 262, 'n_words': 53}