Skip to content

Commit

Permalink
Merge branch 'branch-0.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
da4089 committed Dec 16, 2024
2 parents 6d907ee + d07626f commit daed901
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test_files/simple_2_0_test.ics
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//PYVOBJECT//NONSGML Version 1//EN
PRODID:-//PYVOBJECT//NONSGML Version %s//EN
BEGIN:VEVENT
UID:Not very random UID
DTSTART:20060509T000000
Expand Down
4 changes: 2 additions & 2 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from dateutil.tz import tzutc
from dateutil.rrule import rrule, rruleset, WEEKLY, MONTHLY

from vobject import base, iCalendar
from vobject import VERSION, base, iCalendar
from vobject import icalendar

from vobject.base import __behaviorRegistry as behavior_registry
Expand Down Expand Up @@ -56,7 +56,7 @@ def test_scratchbuild(self):
"""
CreateCalendar 2.0 format from scratch
"""
test_cal = get_test_file("simple_2_0_test.ics")
test_cal = get_test_file("simple_2_0_test.ics") % VERSION
cal = base.newFromBehavior('vcalendar', '2.0')
cal.add('vevent')
cal.vevent.add('dtstart').value = datetime.datetime(2006, 5, 9)
Expand Down
4 changes: 2 additions & 2 deletions vobject/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@
"""

from .base import newFromBehavior, readOne, readComponents
from .base import VERSION, newFromBehavior, readOne, readComponents
from . import icalendar, vcard


# Package version
__version__ = VERSION = "1.0.0"
__version__ = VERSION


def iCalendar():
Expand Down
4 changes: 4 additions & 0 deletions vobject/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
import six
import sys

# Package version
VERSION = "1.0.0"


# ------------------------------------ Python 2/3 compatibility challenges ----
# Python 3 no longer has a basestring type, so....
try:
Expand Down
4 changes: 2 additions & 2 deletions vobject/icalendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class NonExistentTimeError(Exception):
pytz = Pytz # keeps quantifiedcode happy

from . import behavior
from .base import (VObjectError, NativeError, ValidateError, ParseError,
from .base import (VERSION, VObjectError, NativeError, ValidateError, ParseError,
Component, ContentLine, logger, registerBehavior,
backslashEscape, foldOneLine)

Expand All @@ -38,7 +38,7 @@ class NonExistentTimeError(Exception):
DATENAMES = ("rdate", "exdate")
RULENAMES = ("exrule", "rrule")
DATESANDRULES = ("exrule", "rrule", "rdate", "exdate")
PRODID = u"-//PYVOBJECT//NONSGML Version 1//EN"
PRODID = u"-//PYVOBJECT//NONSGML Version %s//EN" % VERSION

WEEKDAYS = "MO", "TU", "WE", "TH", "FR", "SA", "SU"
FREQUENCIES = ('YEARLY', 'MONTHLY', 'WEEKLY', 'DAILY', 'HOURLY', 'MINUTELY',
Expand Down

0 comments on commit daed901

Please sign in to comment.