Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 support #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions collective/watcherlist/actions/watching.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ class IWatchingAction(interface.Interface):
)


@interface.implementer(IWatchingAction, IRuleElementData)
class WatchingAction(SimpleItem):
interface.implements(IWatchingAction, IRuleElementData)

watching = 'watch'
name = ''
element = 'collective.watcherlist.actions.Watching'
summary = _(u'Change if the user is in the watchers list or not.')


@interface.implementer(IExecutable)
class WatchingActionExecutor(object):
interface.implements(IExecutable)
adapts(interface.Interface, IWatchingAction, interface.Interface)

def __init__(self, context, element, event):
Expand Down
4 changes: 2 additions & 2 deletions collective/watcherlist/browser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from email.MIMEText import MIMEText
from email.MIMEMultipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from Products.Five.browser import BrowserView

from collective.watcherlist import utils
Expand Down
9 changes: 6 additions & 3 deletions collective/watcherlist/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,25 @@ class IAddedToWatchingEvent(IObjectEvent):
"""Event for when a user is added to the watchers list."""


@interface.implementer(IAddedToWatchingEvent)
class AddedToWatchingEvent(ObjectEvent):
interface.implements(IAddedToWatchingEvent)
""""""


class IRemovedFromWatchingEvent(IObjectEvent):
"""Event for when a user is removed from the watchers list."""


@interface.implementer(IRemovedFromWatchingEvent)
class RemovedFromWatchingEvent(ObjectEvent):
interface.implements(IRemovedFromWatchingEvent)
""""""


class IToggleWatchingEvent(IObjectEvent):
"""Event for when a user is added to or removed from the watchers list.
This event is sent before the add or remove events."""


@interface.implementer(IToggleWatchingEvent)
class ToggleWatchingEvent(ObjectEvent):
interface.implements(IToggleWatchingEvent)
""""""
8 changes: 4 additions & 4 deletions collective/watcherlist/mailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ def simple_send_mail(message, addresses, subject, immediate=False):
"MailHost correctly.")
# We print some info, which is perfect for checking in unit
# tests.
print 'Subject =', subject
print 'Addresses =', addresses
print 'Message ='
print message
print('Subject =', subject)
print('Addresses =', addresses)
print('Message =')
print(message)
return

mfrom = utils.get_mail_from_address()
Expand Down
1 change: 0 additions & 1 deletion collective/watcherlist/tests/__init__.py

This file was deleted.

223 changes: 0 additions & 223 deletions collective/watcherlist/tests/cornercases.txt

This file was deleted.

Loading