import re


def sanitize_id(x):
    """
    Sanitize an ID similar to github_sanitize_id, but with the
    following differences:
     * no downcasing
     * dots (.) are replaced with hyphens (which helps Python module
       namespaces look better)
    """
    return re.sub(r'[^-\w ]', '', x.replace('.', '-'), re.U).replace(' ', '-')