FAQ
Public bug reported:

On Centos 6 (64 bit), the following tests fail due to what looks like some kind of Python object printing quirk with the version that ships with RHEL 6 and derivatives:
     src/mailman/model/docs/membership.txt
     src/mailman/model/docs/users.txt

The errors all look like this:

File "/home/sgoss/mailman_clone/src/mailman/model/docs/membership.txt", line 296, in membership.txt
Failed example:
     gwen_member.address = new_address
Differences (ndiff with -expected +actual):
       Traceback (most recent call last):
     - ...
     - UnverifiedAddressError: gperson at example.com
     + File "/usr/lib64/python2.6/doctest.py", line 1248, in __run
     + compileflags, 1) in test.globs
     + File "<doctest membership.txt[68]>", line 1, in <module>
     + gwen_member.address = new_address
     + File "/home/sgoss/mailman_clone/src/mailman/model/member.py", line 116, in address
     + raise UnverifiedAddressError(new_address)
     + UnverifiedAddressError: <unprintable UnverifiedAddressError object>


The system reports Python version 2.6.5.

This error does not seem to occur with Python 2.7 on Ubuntu 11.04.

One possibility is that for some reason when it comes to printing out
those error objects, Python doesn't have a default encoding scheme for
representing the embedded unicode strings in that particular context
(email address in the above example).

** Affects: mailman
      Importance: Undecided
          Status: New


** Tags: mailman3

--
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.
https://bugs.launchpad.net/bugs/826861

Title:
   doctests failing on Centos 6 due to "unprintable" error objects

To manage notifications about this bug go to:
https://bugs.launchpad.net/mailman/+bug/826861/+subscriptions

Search Discussions

  • Stephen A. Goss at Aug 15, 2011 at 5:35 pm
    A quick fix to this is to convert the unicode addresses to string
    objects in the __str__ methods for those Error classes. The attached
    patch does just that, causing the tests to pass unchanged on Centos 6.

    ** Patch added: "mm3_826861.patch"
        https://bugs.launchpad.net/mailman/+bug/826861/+attachment/2280565/+files/mm3_826861.patch

    --
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
    https://bugs.launchpad.net/bugs/826861

    Title:
       doctests failing on Centos 6 due to "unprintable" error objects

    To manage notifications about this bug go to:
    https://bugs.launchpad.net/mailman/+bug/826861/+subscriptions
  • Barry Warsaw at Aug 16, 2011 at 1:54 am
    I can't reproduce this with Python 2.6.7 on Ubuntu 11.10 64bit either.
    I'll have to bring up CentOS in a VM, but it would be interesting to
    know whether 2.6.7 possibly has a related fix, or Ubuntu, or something
    about the way CentOS builds Python. What's odd here is that there
    shouldn't be any non-ascii unicodes in the printed representation.
    Hmm...

    --
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
    https://bugs.launchpad.net/bugs/826861

    Title:
       doctests failing on Centos 6 due to "unprintable" error objects

    To manage notifications about this bug go to:
    https://bugs.launchpad.net/mailman/+bug/826861/+subscriptions
  • Stephen A. Goss at Sep 6, 2011 at 6:24 pm
    Since recent code changes another test is failing in this way on Centos
    6:

    src/mailman/model/docs/registration.txt

    File "/home/sgoss/mailman_clone/src/mailman/model/docs/registration.txt", line 61, in registration.txt
    Failed example:
         registrar.register(mlist, '\xa0 at example.com')
    Differences (ndiff with -expected +actual):
           Traceback (most recent call last):
         - ...
         - InvalidEmailAddressError: \xa0 at example.com
         + File "/usr/lib64/python2.6/doctest.py", line 1248, in __run
         + compileflags, 1) in test.globs
         + File "<doctest registration.txt[11]>", line 1, in <module>
         + registrar.register(mlist, '\xa0 at example.com')
         + File "/home/sgoss/mailman_clone/src/mailman/app/registrar.py", line 60, in register
         + getUtility(IEmailValidator).validate(email)
         + File "/home/sgoss/mailman_clone/src/mailman/email/validate.py", line 69, in validate
         + raise InvalidEmailAddressError(email)
         + InvalidEmailAddressError: <unprintable InvalidEmailAddressError object>

    --
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
    https://bugs.launchpad.net/bugs/826861

    Title:
       doctests failing on Centos 6 due to "unprintable" error objects

    To manage notifications about this bug go to:
    https://bugs.launchpad.net/mailman/+bug/826861/+subscriptions
  • Barry Warsaw at Apr 7, 2012 at 3:03 am
    ** Changed in: mailman
            Status: New => Triaged

    ** Changed in: mailman
        Importance: Undecided => High

    --
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
    https://bugs.launchpad.net/bugs/826861

    Title:
       doctests failing on Centos 6 due to "unprintable" error objects

    To manage notifications about this bug go to:
    https://bugs.launchpad.net/mailman/+bug/826861/+subscriptions
  • Barry Warsaw at Sep 24, 2012 at 5:33 pm
    I finally managed to get a Centos 6 VM up and running. All tests pass
    for me without error. Does this still happen for you with bzr head?
    Note that I'm running in an en_US.utf8 locale - what about you? Maybe
    there are problems in other locales?


    ** Changed in: mailman
            Status: Triaged => Invalid


    ** Changed in: mailman
            Status: Invalid => Incomplete


    --
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
    https://bugs.launchpad.net/bugs/826861


    Title:
       doctests failing on Centos 6 due to "unprintable" error objects


    To manage notifications about this bug go to:
    https://bugs.launchpad.net/mailman/+bug/826861/+subscriptions
  • Abhilash Raj at May 23, 2015 at 6:57 am
    This bug has been moved to the new gitlab repo here:
    https://gitlab.com/maxking/mailman/issues/6


    --
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
    https://bugs.launchpad.net/bugs/826861


    Title:
       doctests failing on Centos 6 due to "unprintable" error objects


    To manage notifications about this bug go to:
    https://bugs.launchpad.net/mailman/+bug/826861/+subscriptions
  • Abhilash Raj at May 23, 2015 at 7:05 am
    Please ignore the above comment, the bug has been moved here:
    https://gitlab.com/mailman/mailman/issues/6


    --
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
    https://bugs.launchpad.net/bugs/826861


    Title:
       doctests failing on Centos 6 due to "unprintable" error objects


    To manage notifications about this bug go to:
    https://bugs.launchpad.net/mailman/+bug/826861/+subscriptions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-coders @
categoriespython
postedAug 15, '11 at 5:11p
activeMay 23, '15 at 7:05a
posts8
users2
websitelist.org

2 users in discussion

Abhilash Raj: 5 posts Stephen A. Goss: 3 posts

People

Translate

site design / logo © 2021 Grokbase