Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-suntime for openSUSE:Factory 
checked in at 2024-03-14 17:46:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-suntime (Old)
 and      /work/SRC/openSUSE:Factory/.python-suntime.new.1905 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-suntime"

Thu Mar 14 17:46:00 2024 rev:3 rq:1158009 version:1.3.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-suntime/python-suntime.changes    
2024-03-06 23:06:13.693006280 +0100
+++ /work/SRC/openSUSE:Factory/.python-suntime.new.1905/python-suntime.changes  
2024-03-14 17:47:44.199321321 +0100
@@ -1,0 +2,9 @@
+Thu Mar 14 13:50:31 UTC 2024 - Dirk Müller <dmuel...@suse.com>
+
+- update to 1.3.2:
+  * Back to work with datetime to avoid breaking changes
+  * Set default values on methods also to avoid incompatibility
+- update to 1.3.1:
+  * Delete unnecessary prints
+
+-------------------------------------------------------------------

Old:
----
  suntime-1.3.0.tar.gz

New:
----
  suntime-1.3.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-suntime.spec ++++++
--- /var/tmp/diff_new_pack.I6Q5Ml/_old  2024-03-14 17:47:44.791343056 +0100
+++ /var/tmp/diff_new_pack.I6Q5Ml/_new  2024-03-14 17:47:44.795343203 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           python-suntime
-Version:        1.3.0
+Version:        1.3.2
 Release:        0
 Summary:        Python sunset and sunrise time calculation
 License:        LGPL-3.0-only

++++++ suntime-1.3.0.tar.gz -> suntime-1.3.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/suntime-1.3.0/PKG-INFO new/suntime-1.3.2/PKG-INFO
--- old/suntime-1.3.0/PKG-INFO  2024-03-05 22:12:42.316976000 +0100
+++ new/suntime-1.3.2/PKG-INFO  2024-03-10 22:48:27.125199300 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: suntime
-Version: 1.3.0
+Version: 1.3.2
 Summary: Simple sunset and sunrise time calculation python library
 Home-page: https://github.com/SatAgro/suntime
 Author: Krzysztof Stopa
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/suntime-1.3.0/setup.py new/suntime-1.3.2/setup.py
--- old/suntime-1.3.0/setup.py  2024-03-05 22:12:33.000000000 +0100
+++ new/suntime-1.3.2/setup.py  2024-03-10 22:47:16.000000000 +0100
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 from setuptools import setup
-
+from suntime import __version__, __author__, __license__
 
 # read the contents of your README file
 from os import path
@@ -10,13 +10,13 @@
     long_description = f.read()
 
 setup(name='suntime',
-      version='1.3.0',
+      version=__version__,
       description='Simple sunset and sunrise time calculation python library',
       long_description=long_description,
       long_description_content_type='text/markdown',
-      author='Krzysztof Stopa',
+      author=__author__,
       url='https://github.com/SatAgro/suntime',
       copyright='Copyright 2024 SatAgro',
-      license='LGPLv3',
+      license=__license__,
       packages=['suntime'],
       install_requires=['python-dateutil'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/suntime-1.3.0/suntime/__init__.py 
new/suntime-1.3.2/suntime/__init__.py
--- old/suntime-1.3.0/suntime/__init__.py       2024-02-29 14:43:04.000000000 
+0100
+++ new/suntime-1.3.2/suntime/__init__.py       2024-03-10 22:47:16.000000000 
+0100
@@ -1 +1,5 @@
 from .suntime import Sun, SunTimeException
+
+__version__ = '1.3.2'
+__author__ = 'Krzysztof Stopa'
+__license__ = 'LGPLv3'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/suntime-1.3.0/suntime/suntime.py 
new/suntime-1.3.2/suntime/suntime.py
--- old/suntime-1.3.0/suntime/suntime.py        2024-03-05 18:52:58.000000000 
+0100
+++ new/suntime-1.3.2/suntime/suntime.py        2024-03-10 22:47:16.000000000 
+0100
@@ -1,6 +1,6 @@
 import math
 import warnings
-from datetime import date, datetime, timedelta, time, timezone
+from datetime import datetime, timedelta, time, timezone
 
 
 # CONSTANT
@@ -24,7 +24,7 @@
 
         self.lngHour = self._lon / 15
 
-    def get_sunrise_time(self, at_date=date.today(), time_zone=timezone.utc):
+    def get_sunrise_time(self, at_date=datetime.now(), time_zone=timezone.utc):
         """
         :param at_date: Reference date. datetime.now() if not provided.
         :param time_zone: pytz object with .tzinfo() or None
@@ -37,7 +37,7 @@
         else:
             return datetime.combine(at_date, time(tzinfo=time_zone)) + 
time_delta
 
-    def get_sunset_time(self, at_date=date.today(), time_zone=timezone.utc):
+    def get_sunset_time(self, at_date=datetime.now(), time_zone=timezone.utc):
         """
         Calculate the sunset time for given date.
         :param at_date: Reference date. datetime.now() if not provided.
@@ -51,13 +51,14 @@
         else:
             return datetime.combine(at_date, time(tzinfo=time_zone)) + 
time_delta
 
-    def get_local_sunrise_time(self, at_date, time_zone):
+    def get_local_sunrise_time(self, at_date=datetime.now(), time_zone=None):
         """ DEPRECATED: Use get_sunrise_time() instead. """
         warnings.warn("get_local_sunrise_time is deprecated and will be 
removed in future versions."
                       "Use get_sunrise_time with proper time zone", 
DeprecationWarning)
+
         return self.get_sunrise_time(at_date, time_zone)
 
-    def get_local_sunset_time(self, at_date, time_zone):
+    def get_local_sunset_time(self, at_date=datetime.now(), time_zone=None):
         """ DEPRECATED: Use get_sunset_time() instead. """
         warnings.warn("get_local_sunset_time is deprecated and will be removed 
in future versions."
                       "Use get_sunset_time with proper time zone.", 
DeprecationWarning)
@@ -73,6 +74,10 @@
         :return: timedelta showing hour, minute, and second of sunrise or 
sunset
         """
 
+        # If not set get local timezone from datetime
+        if time_zone is None:
+            time_zone = datetime.now().tzinfo
+
         # 1. first get the day of the year
         N = at_date.timetuple().tm_yday
 
@@ -132,10 +137,8 @@
 
         # 7c. rounding and impose range bounds
         UT = round(UT, 2)
-        print("UT 1 {}".format(UT))
         if is_rise_time:
             UT = self._force_range(UT, 24)
-        print(UT)
 
         # 8. return timedelta
         return timedelta(hours=UT)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/suntime-1.3.0/suntime.egg-info/PKG-INFO 
new/suntime-1.3.2/suntime.egg-info/PKG-INFO
--- old/suntime-1.3.0/suntime.egg-info/PKG-INFO 2024-03-05 22:12:42.000000000 
+0100
+++ new/suntime-1.3.2/suntime.egg-info/PKG-INFO 2024-03-10 22:48:27.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: suntime
-Version: 1.3.0
+Version: 1.3.2
 Summary: Simple sunset and sunrise time calculation python library
 Home-page: https://github.com/SatAgro/suntime
 Author: Krzysztof Stopa

Reply via email to