Merge pull request #3 from apache/assert
Assertions must be enabled
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..060ee72
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1 @@
+prune test/
diff --git a/asfpy/aioldap.py b/asfpy/aioldap.py
index 1df0aac..00602d4 100755
--- a/asfpy/aioldap.py
+++ b/asfpy/aioldap.py
@@ -25,13 +25,9 @@
import asyncio
import logging
import concurrent.futures
-import threading
import bonsai
-# Map the various bonsai exceptions into our namespace.
-from bonsai import errors
-
# Re-map the LDAPSearchScope constants to our namespace.
# These can now be used as (eg.) asfpy.aioldap.SCOPE.SUBTREE
from bonsai import LDAPSearchScope as SCOPE
@@ -202,7 +198,8 @@
if __name__ == '__main__':
import os, getpass
- dn = 'uid=%s,ou=people,dc=apache,dc=org' % ('gstein',)
- p = os.environ.get('AIOLDAP_PASSWORD') or getpass.getpass()
+ u = os.environ.get('AIOLDAP_USER') or getpass.getuser()
+ dn = 'uid=%s,ou=people,dc=apache,dc=org' % u
+ p = os.environ.get('AIOLDAP_PASSWORD') or getpass.getpass(f"Password for {u}: ")
c = ASF_LDAPClient('ldaps://ldap-us.apache.org:636', dn, p)
test_conns(c)
diff --git a/asfpy/pubsub.py b/asfpy/pubsub.py
index e156557..5da259a 100644
--- a/asfpy/pubsub.py
+++ b/asfpy/pubsub.py
@@ -113,7 +113,7 @@
raw = await conn.content.readuntil(b'\n')
except ValueError as e:
LOGGER.error(f'Saw "{e}"; re-raising as ClientPayloadError to close/reconnect')
- raise aiohttp.ClientPayloadError(f're-raised from ValueError in readuntil()')
+ raise aiohttp.ClientPayloadError('re-raised from ValueError in readuntil()')
if not raw:
# We just hit EOF.
diff --git a/setup.py b/setup.py
index 0d8816b..4a47bc3 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@
def main():
setuptools.setup(name='asfpy',
- version='0.46',
+ version='0.47',
description='ASF Common Python Methods',
long_description="This is a common set of functions used by the ASF Infrastructure team such as libraries for sending email, ldap management and generic process daemonization.",
long_description_content_type = "text/plain",