Skip to content

Commit

Permalink
Rename the gnupg package to pretty_bad_protocol.
Browse files Browse the repository at this point in the history
The module formerly installable as `pip install gnupg` is now
installable as `pip install pretty_bad_protocol`.  To make legacy code
compatible, please change statements of `import gnupg` to
`from pretty_bad_protocol import gnupg`.

I'm still going to squat the pip `gnupg` namespace, because I can, and
because Vinay Sajip and all the other people involved with gnupg are
assholes and idiots, and fuck them. <3(A)
  • Loading branch information
isislovecruft committed Jul 6, 2018
1 parent e82eb20 commit 5d756ee
Show file tree
Hide file tree
Showing 26 changed files with 50 additions and 34 deletions.
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ nosetests.xml
*~
*.swp
*.swo
*.orig

# tags
TAGS
Expand All @@ -56,10 +57,10 @@ tags
*random_seed*
*.log
tests/doctests/*
gnupg/test/doctests/*
gnupg/test/logs/*
gnupg/test/tmp/*
gnupg/test/files/*
pretty_bad_protocol/test/doctests/*

This comment has been minimized.

Copy link
@excitoon

excitoon Apr 6, 2024

Too many assholes have managed to learn how to write code and use GitHub.
May I ask to not release it, so I won't have to downgrade to 2.3.1?

pretty_bad_protocol/test/logs/*
pretty_bad_protocol/test/tmp/*
pretty_bad_protocol/test/files/*

# Ignore distutils record of installed files:
installed-files.txt
Expand Down
22 changes: 12 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
SHELL=/bin/sh
TESTDIR=./gnupg/test
TESTDIR=./pretty_bad_protocol/test
TESTHANDLE=$(TESTDIR)/test_gnupg.py
FILES=$(SHELL find ./gnupg/ -name "*.py" -printf "%p,")
FILES=$(SHELL find ./pretty_bad_protocol/ -name "*.py" -printf "%p,")
PYTHON=$(SHELL which python)
PYTHON3=$(SHELL which python3)
PKG_NAME=python-gnupg
PKG_NAME=pretty_bad_protocol
DOC_DIR=docs
DOC_BUILD_DIR:=$(DOC_DIR)/_build
DOC_HTML_DIR:=$(DOC_BUILD_DIR)/html
Expand All @@ -29,8 +29,8 @@ cleanup-src: pycremoval

cleanup-tests: cleanup-src
cd $(TESTDIR) && rm -f \#*\#
mkdir -p gnupg/test/tmp
mkdir -p gnupg/test/logs
mkdir -p $(TESTDIR)/tmp
mkdir -p $(TESTDIR)/logs

cleanup-tests-all: cleanup-tests
rm -rf tests/tmp
Expand All @@ -42,6 +42,10 @@ cleanup-build:
cleanup-dist:
-rm -rf dist

clean: cleanup-build cleanup-tests-all cleanup-src

dist-clean: clean cleanup-dist

# it's not strictly necessary that gnupg2, gpg-agent, pinentry, or pip be
# installed, so ignore error exit statuses for those commands
test-before: cleanup-src cleanup-tests
Expand Down Expand Up @@ -111,11 +115,9 @@ coverage-html:
coverage html --rcfile=".coveragerc"

clean-test:
touch gnupg/test/placeholder.log
mv gnupg/test/*.log gnupg/test/logs/
rm gnupg/test/logs/placeholder.log
touch gnupg/test/random_seed_is_sekritly_pi
rm gnupg/test/random_seed*
-mv $(TESTDIR)/*.log $(TESTDIR)/logs/
-rm $(TESTDIR)/logs/placeholder.log
-rm $(TESTDIR)/random_seed*

test: test-run clean-test

Expand Down
28 changes: 18 additions & 10 deletions README
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. -*- coding: utf-8; mode: rst; -*-
**************************************
python-gnupg |On PyPI|
**************************************
*******************************************************
pretty-bad-protocol (a.k.a. python-gnupg) |On PyPI|
*******************************************************

Rewrite of `Vinay Sajip's python-gnupg <https://code.google.com/p/python-gnupg/>`__,
Complete rewrite of `Vinay Sajip's python-gnupg <https://code.google.com/p/python-gnupg/>`__,
including patches to fix a shell injection vulnerability due to unsanitised
inputs being passed to ``subprocess.Popen([...], shell=True)``.

Expand All @@ -21,6 +21,11 @@ From `PyPI <https://pypi.python.org>`__

It's simple. Just do::

[sudo] pip install pretty-bad-security

Additionally, the legacy way to install versions of this library <
3.0.0 is::

[sudo] pip install gnupg

--------
Expand All @@ -42,8 +47,7 @@ Optionally, to build the Sphinx documentation_, do::
To get started using python-gnupg's API, see the documentation_,
and import the module like so::

>>> import gnupg

>>> from pretty_bad_protocol import gnupg

The primary interface class you'll likely want to interact with is ``gnupg.GPG``::

Expand Down Expand Up @@ -76,7 +80,11 @@ The primary interface class you'll likely want to interact with is ``gnupg.GPG``
Bug Reports & Feature Requests
==============================

Our bugtracker can be found
`on Github <https://github.com/isislovecruft/python-gnupg/issues>`__. Public
comments and discussions are also welcome on the bugtracker, or as
`tweets <https://twitter.com/isislovecruft>`__. Patches are always welcome.
Our bugtracker can be found `on Github
<https://github.com/isislovecruft/python-gnupg/issues>`__. Public comments and
discussions are also welcome on the bugtracker. Patches are always welcome.

I increasingly have less and less time to deal with maintaining this
module. Please be patient, and if there is a patch your project
urgently needs, please consider temporarily forking until I or one of
the other maintainers can get to your issue.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
# built documents.
#
# The short X.Y version.
import gnupg
from pretty_bad_protocol import gnupg
version = gnupg.__version__
# The full version, including alpha/beta/rc tags.
release = gnupg.__version__
Expand Down
7 changes: 5 additions & 2 deletions gnupg/__init__.py → pretty_bad_protocol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@
__license__ = copyleft.full_text
__copyleft__ = copyleft.copyright

gnupg.__version__ = __version__
gnupg.__authors__ = __authors__
gnupg.__licence__ = __license__
gnupg.__copyleft__ = __copyleft__

## do not set __package__ = "gnupg", else we will end up with
## gnupg.<*allofthethings*>
__all__ = ["GPG", "_util", "_parsers", "_meta", "_logger"]

## avoid the "from gnupg import gnupg" idiom
del gnupg
del absolute_import
del copyleft
del get_versions
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 9 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
_isPyPy = True


versioneer.versionfile_source = 'gnupg/_version.py'
versioneer.versionfile_build = 'gnupg/_version.py'
versioneer.versionfile_source = 'pretty_bad_protocol/_version.py'
versioneer.versionfile_build = 'pretty_bad_protocol/_version.py'
versioneer.tag_prefix = ''
versioneer.parentdir_prefix = 'gnupg-'
versioneer.parentdir_prefix = 'pretty-bad-protocol-'

__author__ = "Isis Agora Lovecruft"
__contact__ = 'isis@patternsinthevoid.net'
Expand Down Expand Up @@ -97,7 +97,7 @@ def get_requirements():


setuptools.setup(
name = "gnupg",
name = "pretty-bad-protocol",
description="A Python wrapper for GnuPG",
long_description = """\
This module allows easy access to GnuPG's key management, encryption and \
Expand All @@ -118,11 +118,13 @@ def get_requirements():
maintainer_email=__contact__,
url=__url__,

package_dir={'gnupg': 'gnupg'},
packages=['gnupg'],
package_dir={
'pretty_bad_protocol': 'pretty_bad_protocol',
},
packages=['pretty_bad_protocol'],
package_data={'': ['README', 'LICENSE', 'TODO', 'requirements.txt']},
scripts=['versioneer.py'],
test_suite='gnupg.test.test_gnupg',
test_suite='pretty_bad_protocol.test.test_gnupg',

install_requires=requires,
dependency_links=deplinks,
Expand Down

0 comments on commit 5d756ee

Please sign in to comment.