[Python-modules-team] Bug#821886: proselint: clear_cache() function	clears the current directory instead of the cache directory
    Paul Wise 
    pabs at debian.org
       
    Wed Apr 20 08:35:43 UTC 2016
    
    
  
Package: python3-proselint
Version: 0.5.3-1
Severity: serious
File: /usr/lib/python3/dist-packages/proselint/command_line.py
When I run `proselint --debug` from my home directory it searches my
whole home directory for *.pyc files and deletes them. While *.pyc
files are usually Python bytecode that might not be true for every user
and even if they were, that doesn't mean the user doesn't want to keep
them. Either way it is completely unacceptable to delete stuff from the
user's home directory just because they want to debug proselint.
Also, what happened to removing use of shell=True?
def proselint(paths=None, version=None, initialize=None, clean=None,
              debug=None, score=None, output_json=None, time=None, demo=None,
              compact=None):
...
    # In debug or clean mode, delete cache & *.pyc files before running.
    if debug or clean:
        clear_cache()
def clear_cache():
    """Delete the contents of the cache."""
    click.echo("Deleting the cache...")
    subprocess.call("find . -name '*.pyc' -delete", shell=True)
    subprocess.call(
        "rm -rfv proselint/cache > /dev/null && mkdir -p {}".format(
            os.path.join(os.path.expanduser("~"), ".proselint")),
        shell=True)
-- System Information:
Debian Release: stretch/sid
  APT prefers testing-debug
  APT policy: (900, 'testing-debug'), (900, 'testing'), (860, 'testing-proposed-updates'), (850, 'buildd-testing-proposed-updates'), (800, 'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 4.6.0-rc3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages python3-proselint depends on:
ii  python3-click   6.6-1
ii  python3-future  0.15.2-1
ii  python3-six     1.10.0-2
pn  python3:any     <none>
python3-proselint recommends no packages.
python3-proselint suggests no packages.
-- no debconf information
-- 
bye,
pabs
https://wiki.debian.org/PaulWise
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20160420/96c60704/attachment.sig>
    
    
More information about the Python-modules-team
mailing list