Tests fail on Python 3.7

Bug #1781564 reported by Aurélien Bompard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.smtptest
Fix Released
Undecided
Colin Watson

Bug Description

When I run the test suite on Python 3.7 I get the following errors:

=======================================================================================
$ /usr/bin/python3 setup.py nosetests
running nosetests
running egg_info
writing lazr.smtptest.egg-info/PKG-INFO
writing dependency_links to lazr.smtptest.egg-info/dependency_links.txt
writing namespace_packages to lazr.smtptest.egg-info/namespace_packages.txt
writing requirements to lazr.smtptest.egg-info/requires.txt
writing top-level names to lazr.smtptest.egg-info/top_level.txt
reading manifest file 'lazr.smtptest.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching '.bzrignore'
writing manifest file 'lazr.smtptest.egg-info/SOURCES.txt'
nose.config: INFO: Set working dir to /builddir/build/BUILD/lazr.smtptest-2.0.3
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
Doctest: README.rst ... ok
Doctest: queue.rst ... FAIL
Doctest: usage.rst ... ok
======================================================================
FAIL: Doctest: queue.rst
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.7/doctest.py", line 2198, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for queue.rst
  File "/builddir/build/BUILD/lazr.smtptest-2.0.3/lazr/smtptest/docs/queue.rst", line 0
----------------------------------------------------------------------
File "/builddir/build/BUILD/lazr.smtptest-2.0.3/lazr/smtptest/docs/queue.rst", line 140, in queue.rst
Failed example:
    for message in controller:
        print(message['message-id'])
Exception raised:
    Traceback (most recent call last):
      File "/builddir/build/BUILD/lazr.smtptest-2.0.3/lazr/smtptest/controller.py", line 129, in __iter__
        yield self.queue.get_nowait()
      File "/usr/lib64/python3.7/queue.py", line 198, in get_nowait
        return self.get(block=False)
      File "/usr/lib64/python3.7/queue.py", line 167, in get
        raise Empty
    _queue.Empty
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
      File "/builddir/build/BUILD/lazr.smtptest-2.0.3/lazr/smtptest/controller.py", line 131, in __iter__
        raise StopIteration
    StopIteration
    The above exception was the direct cause of the following exception:
    Traceback (most recent call last):
      File "/usr/lib64/python3.7/doctest.py", line 1329, in __run
        compileflags, 1), test.globs)
      File "<doctest queue.rst[25]>", line 1, in <module>
        for message in controller:
    RuntimeError: generator raised StopIteration
----------------------------------------------------------------------
File "/builddir/build/BUILD/lazr.smtptest-2.0.3/lazr/smtptest/docs/queue.rst", line 158, in queue.rst
Failed example:
    for message in controller:
        print(message['message-id'])
Exception raised:
    Traceback (most recent call last):
      File "/builddir/build/BUILD/lazr.smtptest-2.0.3/lazr/smtptest/controller.py", line 129, in __iter__
        yield self.queue.get_nowait()
      File "/usr/lib64/python3.7/queue.py", line 198, in get_nowait
        return self.get(block=False)
      File "/usr/lib64/python3.7/queue.py", line 167, in get
        raise Empty
    _queue.Empty
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
      File "/builddir/build/BUILD/lazr.smtptest-2.0.3/lazr/smtptest/controller.py", line 131, in __iter__
        raise StopIteration
    StopIteration
    The above exception was the direct cause of the following exception:
    Traceback (most recent call last):
      File "/usr/lib64/python3.7/doctest.py", line 1329, in __run
        compileflags, 1), test.globs)
      File "<doctest queue.rst[27]>", line 1, in <module>
        for message in controller:
    RuntimeError: generator raised StopIteration
-------------------- >> begin captured logging << --------------------
lazr.smtptest: INFO: [SMTPServer] listening: localhost:9025
lazr.smtptest: INFO: starting the SMTP server thread
lazr.smtptest: INFO: [SMTPServer] starting asyncore loop
lazr.smtptest: INFO: connecting to localhost:9025
lazr.smtptest: INFO: [SMTPServer] accepted: ('::1', 44848, 0, 0)
lazr.smtptest: INFO: Got HELO response: (250, b'buildvm-aarch64-12.arm.fedoraproject.org')
lazr.smtptest: INFO: [SMTPServer] accepted: ('::1', 44850, 0, 0)
lazr.smtptest: INFO: [SMTPServer] processing: ('::1', 44850, 0, 0), <email address hidden>, ['<email address hidden>'], size=133
lazr.smtptest: INFO: [SMTPServer] processed message: <elephant>
lazr.smtptest: INFO: [SMTPServer] processing: ('::1', 44850, 0, 0), <email address hidden>, ['<email address hidden>'], size=131
lazr.smtptest: INFO: [SMTPServer] processed message: <falcon>
lazr.smtptest: INFO: [SMTPServer] processing: ('::1', 44850, 0, 0), <email address hidden>, ['<email address hidden>'], size=129
lazr.smtptest: INFO: [SMTPServer] processed message: <goat>
lazr.smtptest: INFO: stopping the SMTP server thread
lazr.smtptest: INFO: [SMTPServer] accepted: ('::1', 44852, 0, 0)
lazr.smtptest: INFO: SMTP server stopped
lazr.smtptest: INFO: [SMTPServer] listening: localhost:9025
lazr.smtptest: INFO: starting the SMTP server thread
lazr.smtptest: INFO: [SMTPServer] starting asyncore loop
lazr.smtptest: INFO: connecting to localhost:9025
lazr.smtptest: INFO: [SMTPServer] accepted: ('::1', 44854, 0, 0)
lazr.smtptest: INFO: Got HELO response: (250, b'buildvm-aarch64-12.arm.fedoraproject.org')
lazr.smtptest: INFO: [SMTPServer] accepted: ('::1', 44856, 0, 0)
lazr.smtptest: INFO: [SMTPServer] processing: ('::1', 44856, 0, 0), <email address hidden>, ['<email address hidden>'], size=130
lazr.smtptest: INFO: [SMTPServer] processed message: <horse>
lazr.smtptest: INFO: [SMTPServer] processing: ('::1', 44856, 0, 0), <email address hidden>, ['<email address hidden>'], size=131
lazr.smtptest: INFO: [SMTPServer] processed message: <iguana>
lazr.smtptest: INFO: [SMTPServer] processing: ('::1', 44856, 0, 0), <email address hidden>, ['<email address hidden>'], size=131
lazr.smtptest: INFO: [SMTPServer] processed message: <jackel>
lazr.smtptest: INFO: [SMTPServer] processing: ('::1', 44856, 0, 0), <email address hidden>, ['<email address hidden>'], size=133
lazr.smtptest: INFO: [SMTPServer] processed message: <kangaroo>
lazr.smtptest: INFO: [SMTPServer] processing: ('::1', 44856, 0, 0), <email address hidden>, ['<email address hidden>'], size=130
lazr.smtptest: INFO: [SMTPServer] processed message: <llama>
lazr.smtptest: INFO: [SMTPServer] processing: ('::1', 44856, 0, 0), <email address hidden>, ['<email address hidden>'], size=131
lazr.smtptest: INFO: [SMTPServer] processed message: <moose>
lazr.smtptest: INFO: resetting the SMTP server.
lazr.smtptest: INFO: [SMTPServer] accepted: ('::1', 44858, 0, 0)
lazr.smtptest: INFO: stopping the SMTP server thread
lazr.smtptest: INFO: [SMTPServer] accepted: ('::1', 44860, 0, 0)
lazr.smtptest: INFO: SMTP server stopped
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
Ran 3 tests in 0.615s
FAILED (failures=1)
=======================================================================================

Is Python 3.7 supported at all? The homepage says that it is recommended to use aiosmtpd on Python3 instead of this package.

Related branches

Colin Watson (cjwatson)
Changed in lazr.smtptest:
status: New → In Progress
assignee: nobody → Colin Watson (cjwatson)
Colin Watson (cjwatson)
Changed in lazr.smtptest:
status: In Progress → Fix Committed
Revision history for this message
Colin Watson (cjwatson) wrote :

Fixed in lazr.smtptest 2.0.4.

Changed in lazr.smtptest:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.