Compare commits

..

7 Commits

Author SHA1 Message Date
Sandro 20751ea706 Set C standard to C17 explicitely (#70)
GCC 15 uses C23 by default. But `libmilter` is not compatible, yet.
This breaks the build as `bool` is a keyword in C23 (issue #68).
2025-03-12 20:05:10 -04:00
dotlambda 7197b82ed6 thread module has been renamed to _thread in Python 3 (#64) 2025-03-12 20:00:12 -04:00
Stuart D. Gathman 39a1fc78d8 Merge branch 'master' of github.com:sdgathman/pymilter 2024-10-15 19:43:54 -04:00
Stuart D. Gathman 5ad23e468d bsddb changed nulls in access file policy 2024-10-15 19:42:05 -04:00
Sandro 6eedaf7717 Python 3.13: Replace deprecated makeSuite() (#65)
The function has been deprecated in Python 3.11 and is no longer
available in Python 3.13.
2024-10-14 14:36:04 -04:00
Jean-Yves 4a8018c2de Welcome __NetBSD__ to the required header include. (#60)
Same rule applies for NetBSD as FreeBSD, <arpa/inet.h> include is
needed to provide inet_nto*() prototypes.
2024-06-05 08:18:15 -04:00
Stuart D. Gathman 1212a0ef59 Forgot to bump internal tags 2024-05-29 18:45:09 -04:00
12 changed files with 25 additions and 16 deletions
+3
View File
@@ -1,8 +1,11 @@
*.pyc
*.tar.gz
build/
test/*.out
test/*.tstout
test/*.log
test/*.db
test.db
dist
log
MANIFEST
+1 -1
View File
@@ -9,7 +9,7 @@
# This code is under the GNU General Public License. See COPYING for details.
from __future__ import print_function
__version__ = '1.0.5'
__version__ = '1.0.6'
import os
import re
+3
View File
@@ -1,7 +1,10 @@
from __future__ import print_function
import time
import shelve
try:
import thread
except:
import _thread as thread
import logging
import urllib
+1 -1
View File
@@ -4,7 +4,7 @@ web:
rsync -ravKk doc/html/ pymilter.org:/var/www/html/milter/pymilter
cd doc/html; zip -r ../../doc .
VERSION=1.0.5
VERSION=1.0.6
PKG=pymilter-$(VERSION)
SRCTAR=$(PKG).tar.gz
+1 -1
View File
@@ -72,7 +72,7 @@ $ python setup.py help
* published. Unfortunately I know of no good way to do this
* other than with OS-specific tests.
*/
#if defined(__FreeBSD__) || defined(__linux__) || defined(__sun__) || defined(__GLIBC__) || (defined(__APPLE__) && defined(__MACH__))
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) || defined(__sun__) || defined(__GLIBC__) || (defined(__APPLE__) && defined(__MACH__))
#define HAVE_IPV6_RFC2553
#include <arpa/inet.h>
#endif
+4 -1
View File
@@ -36,7 +36,10 @@ setup(name = "pymilter", version = '1.0.5',
# set MAX_ML_REPLY to 1 for sendmail < 8.13
define_macros = [ ('MAX_ML_REPLY',32) ],
# save lots of debugging time testing rfc2553 compliance
extra_compile_args = [ "-Werror=implicit-function-declaration" ]
extra_compile_args = [
"-Werror=implicit-function-declaration",
"-std=gnu17",
]
),
],
keywords = ['sendmail','milter'],
+1 -1
View File
@@ -11,7 +11,7 @@ class ConfigTestCase(unittest.TestCase):
miltersrs = cp.getboolean('srsmilter','miltersrs')
self.assertFalse(miltersrs)
def suite(): return unittest.makeSuite(ConfigTestCase,'test')
def suite(): return unittest.TestLoader().loadTestsFromTestCase(ConfigTestCase)
if __name__ == '__main__':
unittest.main()
+1 -1
View File
@@ -49,7 +49,7 @@ class GreylistTestCase(unittest.TestCase):
grey.close()
def suite():
s = unittest.makeSuite(GreylistTestCase,'test')
s = unittest.TestLoader().loadTestsFromTestCase(GreylistTestCase)
return s
if __name__ == '__main__':
+1 -1
View File
@@ -234,7 +234,7 @@ class MimeTestCase(unittest.TestCase):
#print(msg + filter.msg)
self.assertTrue(result.getvalue() == msg + filter.msg)
def suite(): return unittest.makeSuite(MimeTestCase,'test')
def suite(): return unittest.TestLoader().loadTestsFromTestCase(MimeTestCase)
if __name__ == '__main__':
if len(sys.argv) < 2:
+2 -2
View File
@@ -25,7 +25,7 @@ class PolicyTestCase(unittest.TestCase):
def testPolicy(self):
self.config.access_file_colon = False
self.config.access_file_nulls = True
self.config.access_file_nulls = False # FIXME: test old and new bsddb
with MTAPolicy('good@example.com',conf=self.config) as p:
pol = p.getPolicy('smtp-auth')
self.assertEqual(pol,'OK')
@@ -42,7 +42,7 @@ class PolicyTestCase(unittest.TestCase):
pol = p.getPolicy('smtp-test')
self.assertEqual(pol,'WILDCARD')
def suite(): return unittest.makeSuite(PolicyTestCase,'test')
def suite(): return unittest.TestLoader().loadTestsFromTestCase(PolicyTestCase)
if __name__ == '__main__':
if len(sys.argv) < 2:
+1 -1
View File
@@ -142,7 +142,7 @@ class BMSMilterTestCase(unittest.TestCase):
f.write(fp.getvalue())
milter.close()
def suite(): return unittest.makeSuite(BMSMilterTestCase,'test')
def suite(): return unittest.TestLoader().loadTestsFromTestCase(BMSMilterTestCase)
if __name__ == '__main__':
unittest.main()
+1 -1
View File
@@ -54,7 +54,7 @@ class AddrCacheTestCase(unittest.TestCase):
self.assertEqual(s,('WRONG', 'a@b'))
def suite():
s = unittest.makeSuite(AddrCacheTestCase,'test')
s = unittest.TestLoader().loadTestsFromTestCase(AddrCacheTestCase)
s.addTest(doctest.DocTestSuite(Milter.utils))
s.addTest(doctest.DocTestSuite(Milter.dynip))
s.addTest(doctest.DocTestSuite(Milter.pyip6))