Hello community,
here is the log from the commit of package python-sas7bdat for openSUSE:Factory
checked in at 2019-07-26 12:39:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sas7bdat (Old)
and /work/SRC/openSUSE:Factory/.python-sas7bdat.new.4126 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sas7bdat"
Fri Jul 26 12:39:21 2019 rev:4 rq:717958 version:2.2.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-sas7bdat/python-sas7bdat.changes
2018-12-24 11:48:03.489098735 +0100
+++
/work/SRC/openSUSE:Factory/.python-sas7bdat.new.4126/python-sas7bdat.changes
2019-07-26 12:39:21.725943415 +0200
@@ -1,0 +2,13 @@
+Tue Jul 23 17:24:26 UTC 2019 - Todd R <[email protected]>
+
+- Update to 2.2.3
+ * fix: set the success flag to False on exceptions
+ * fix: add optional strip_whitespace_from_strings kwarg to disable
stripping whitespace from string type data
+- Update to 2.2.2
+ * Fix for datasets which have unicode headers.
+ * note how to install
+ * suggest use of 'skip_header'
+ * add documentation around getting column information
+ * use more descriptive variable name for SAS7BDAT instance in README
+
+-------------------------------------------------------------------
Old:
----
sas7bdat-2.2.1.tar.gz
New:
----
sas7bdat-2.2.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-sas7bdat.spec ++++++
--- /var/tmp/diff_new_pack.cDvj5r/_old 2019-07-26 12:39:22.313943024 +0200
+++ /var/tmp/diff_new_pack.cDvj5r/_new 2019-07-26 12:39:22.313943024 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-sas7bdat
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,14 +18,14 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-sas7bdat
-Version: 2.2.1
+Version: 2.2.3
Release: 0
Summary: A sas7bdat file reader for Python
License: MIT
Group: Development/Languages/Python
Url: https://bitbucket.org/jaredhobbs/sas7bdat
Source:
https://files.pythonhosted.org/packages/source/s/sas7bdat/sas7bdat-%{version}.tar.gz
-BuildRequires: %{python_module devel}
+BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.8.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
++++++ sas7bdat-2.2.1.tar.gz -> sas7bdat-2.2.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sas7bdat-2.2.1/MANIFEST.in
new/sas7bdat-2.2.3/MANIFEST.in
--- old/sas7bdat-2.2.1/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100
+++ new/sas7bdat-2.2.3/MANIFEST.in 2018-05-25 17:44:04.000000000 +0200
@@ -0,0 +1,2 @@
+include README.md
+include LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sas7bdat-2.2.1/PKG-INFO new/sas7bdat-2.2.3/PKG-INFO
--- old/sas7bdat-2.2.1/PKG-INFO 2018-11-05 06:24:29.000000000 +0100
+++ new/sas7bdat-2.2.3/PKG-INFO 2019-07-15 17:29:43.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: sas7bdat
-Version: 2.2.1
+Version: 2.2.3
Summary: A sas7bdat file reader for Python
Home-page: https://bitbucket.org/jaredhobbs/sas7bdat
Author: Jared Hobbs
@@ -9,49 +9,67 @@
Description: sas7bdat.py
===========
- This module will read sas7bdat files using pure Python (2.6+, 3+). No
- SAS software required! The module started out as a port of the R script
- of the same name found here: https://github.com/BioStatMatt/sas7bdat
but
- has since been completely rewritten.
+ This module will read sas7bdat files using pure Python (2.6+, 3+). No
SAS software
+ required! The module started out as a port of the R script of the same
name
+ found here: <https://github.com/BioStatMatt/sas7bdat> but has since
been
+ completely rewritten.
Also included with this library is a simple command line script,
- ``sas7bdat_to_csv``, which converts sas7bdat files to csv files. It
will
- also print out header information and meta data using the ``--header``
- option and it will batch convert files as well. Use the ``--help``
- option for more information.
-
- As is, I’ve successfully tested the script almost three hundred sample
- files I found on the internet. For the most part, it works well. We can
- now read compressed files!
-
- I’m sure there are more issues that I haven’t come across yet. Please
- let me know if you come across a data file that isn’t supported and
I’ll
- see if I can add support for the file.
+ `sas7bdat_to_csv`, which converts sas7bdat files to csv files. It will
also
+ print out header information and meta data using the `--header` option
and it
+ will batch convert files as well. Use the `--help` option for more
information.
+
+ As is, I've successfully tested the script almost three hundred sample
files I
+ found on the internet. For the most part, it works well. We can now
read
+ compressed files!
+
+ I'm sure there are more issues that I haven't come across yet. Please
let me
+ know if you come across a data file that isn't supported and I'll see
if I can
+ add support for the file.
Usage
=====
- To create a sas7bdat object, simply pass the constructor a file path.
- The object is iterable so you can read the contents like this:
+ To install, run:
- ::
-
- #!python
- from sas7bdat import SAS7BDAT
- with SAS7BDAT('foo.sas7bdat') as f:
- for row in f:
- print row
-
- The values in each row will be a ``string``, ``float``,
- ``datetime.date``, ``datetime.datetime``, or ``datetime.time``
instance.
-
- If you’d like to get a pandas DataFrame, use the ``to_data_frame``
- method:
-
- ::
-
- #!python
- df = f.to_data_frame()
+ ```
+ pip install sas7bdat
+ ```
+
+ To create a sas7bdat object, simply pass the constructor a file path.
The
+ object is iterable so you can read the contents like this:
+
+ ```
+ #!python
+ from sas7bdat import SAS7BDAT
+ with SAS7BDAT('foo.sas7bdat', skip_header=True) as reader:
+ for row in reader:
+ print row
+ ```
+
+ Each row will be a list of values of type `string`, `float`,
`datetime.date`,
+ `datetime.datetime`, or `datetime.time`. Without `skip_header`, the
first row
+ returned will be the SAS variable names.
+
+ If you'd like to get a pandas DataFrame, use the `to_data_frame`
method:
+
+ ```
+ #!python
+ df = reader.to_data_frame()
+ ```
+
+ [Variable
+
attributes](https://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#n08fs0rt7fikeln1uh0t8v5pt25d.htm)
+ are available from `reader.columns`. The order of these columns will
be the same
+ as the corresponding values in each `row`. Each `Column` has the
following
+ attributes:
+
+ * `col_id` (`int`) - the column number
+ * `name` (`bytes`)
+ * `label` (`bytes`)
+ * `format` (`str`)
+ * `type` (`str`)
+ * `length` (`int`)
Keywords: sas,sas7bdat,csv,converter
Platform: UNKNOWN
@@ -66,3 +84,4 @@
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
+Description-Content-Type: text/markdown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sas7bdat-2.2.1/README.md new/sas7bdat-2.2.3/README.md
--- old/sas7bdat-2.2.1/README.md 2015-01-27 19:11:51.000000000 +0100
+++ new/sas7bdat-2.2.3/README.md 2018-12-27 18:29:19.000000000 +0100
@@ -22,23 +22,43 @@
Usage
=====
+To install, run:
+
+```
+pip install sas7bdat
+```
+
To create a sas7bdat object, simply pass the constructor a file path. The
object is iterable so you can read the contents like this:
```
#!python
from sas7bdat import SAS7BDAT
-with SAS7BDAT('foo.sas7bdat') as f:
- for row in f:
+with SAS7BDAT('foo.sas7bdat', skip_header=True) as reader:
+ for row in reader:
print row
```
-The values in each row will be a `string`, `float`, `datetime.date`,
-`datetime.datetime`, or `datetime.time` instance.
+Each row will be a list of values of type `string`, `float`, `datetime.date`,
+`datetime.datetime`, or `datetime.time`. Without `skip_header`, the first row
+returned will be the SAS variable names.
If you'd like to get a pandas DataFrame, use the `to_data_frame` method:
```
#!python
-df = f.to_data_frame()
+df = reader.to_data_frame()
```
+
+[Variable
+attributes](https://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#n08fs0rt7fikeln1uh0t8v5pt25d.htm)
+are available from `reader.columns`. The order of these columns will be the
same
+as the corresponding values in each `row`. Each `Column` has the following
+attributes:
+
+* `col_id` (`int`) - the column number
+* `name` (`bytes`)
+* `label` (`bytes`)
+* `format` (`str`)
+* `type` (`str`)
+* `length` (`int`)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sas7bdat-2.2.1/sas7bdat.egg-info/PKG-INFO
new/sas7bdat-2.2.3/sas7bdat.egg-info/PKG-INFO
--- old/sas7bdat-2.2.1/sas7bdat.egg-info/PKG-INFO 1970-01-01
01:00:00.000000000 +0100
+++ new/sas7bdat-2.2.3/sas7bdat.egg-info/PKG-INFO 2019-07-15
17:29:43.000000000 +0200
@@ -0,0 +1,87 @@
+Metadata-Version: 2.1
+Name: sas7bdat
+Version: 2.2.3
+Summary: A sas7bdat file reader for Python
+Home-page: https://bitbucket.org/jaredhobbs/sas7bdat
+Author: Jared Hobbs
+Author-email: [email protected]
+License: MIT
+Description: sas7bdat.py
+ ===========
+
+ This module will read sas7bdat files using pure Python (2.6+, 3+). No
SAS software
+ required! The module started out as a port of the R script of the same
name
+ found here: <https://github.com/BioStatMatt/sas7bdat> but has since
been
+ completely rewritten.
+
+ Also included with this library is a simple command line script,
+ `sas7bdat_to_csv`, which converts sas7bdat files to csv files. It will
also
+ print out header information and meta data using the `--header` option
and it
+ will batch convert files as well. Use the `--help` option for more
information.
+
+ As is, I've successfully tested the script almost three hundred sample
files I
+ found on the internet. For the most part, it works well. We can now
read
+ compressed files!
+
+ I'm sure there are more issues that I haven't come across yet. Please
let me
+ know if you come across a data file that isn't supported and I'll see
if I can
+ add support for the file.
+
+ Usage
+ =====
+
+ To install, run:
+
+ ```
+ pip install sas7bdat
+ ```
+
+ To create a sas7bdat object, simply pass the constructor a file path.
The
+ object is iterable so you can read the contents like this:
+
+ ```
+ #!python
+ from sas7bdat import SAS7BDAT
+ with SAS7BDAT('foo.sas7bdat', skip_header=True) as reader:
+ for row in reader:
+ print row
+ ```
+
+ Each row will be a list of values of type `string`, `float`,
`datetime.date`,
+ `datetime.datetime`, or `datetime.time`. Without `skip_header`, the
first row
+ returned will be the SAS variable names.
+
+ If you'd like to get a pandas DataFrame, use the `to_data_frame`
method:
+
+ ```
+ #!python
+ df = reader.to_data_frame()
+ ```
+
+ [Variable
+
attributes](https://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#n08fs0rt7fikeln1uh0t8v5pt25d.htm)
+ are available from `reader.columns`. The order of these columns will
be the same
+ as the corresponding values in each `row`. Each `Column` has the
following
+ attributes:
+
+ * `col_id` (`int`) - the column number
+ * `name` (`bytes`)
+ * `label` (`bytes`)
+ * `format` (`str`)
+ * `type` (`str`)
+ * `length` (`int`)
+
+Keywords: sas,sas7bdat,csv,converter
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Console
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: Science/Research
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Topic :: Text Processing
+Classifier: Topic :: Utilities
+Description-Content-Type: text/markdown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sas7bdat-2.2.1/sas7bdat.egg-info/SOURCES.txt
new/sas7bdat-2.2.3/sas7bdat.egg-info/SOURCES.txt
--- old/sas7bdat-2.2.1/sas7bdat.egg-info/SOURCES.txt 1970-01-01
01:00:00.000000000 +0100
+++ new/sas7bdat-2.2.3/sas7bdat.egg-info/SOURCES.txt 2019-07-15
17:29:43.000000000 +0200
@@ -0,0 +1,11 @@
+LICENSE
+MANIFEST.in
+README.md
+sas7bdat.py
+setup.py
+sas7bdat.egg-info/PKG-INFO
+sas7bdat.egg-info/SOURCES.txt
+sas7bdat.egg-info/dependency_links.txt
+sas7bdat.egg-info/requires.txt
+sas7bdat.egg-info/top_level.txt
+scripts/sas7bdat_to_csv
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sas7bdat-2.2.1/sas7bdat.egg-info/dependency_links.txt
new/sas7bdat-2.2.3/sas7bdat.egg-info/dependency_links.txt
--- old/sas7bdat-2.2.1/sas7bdat.egg-info/dependency_links.txt 1970-01-01
01:00:00.000000000 +0100
+++ new/sas7bdat-2.2.3/sas7bdat.egg-info/dependency_links.txt 2019-07-15
17:29:43.000000000 +0200
@@ -0,0 +1 @@
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sas7bdat-2.2.1/sas7bdat.egg-info/requires.txt
new/sas7bdat-2.2.3/sas7bdat.egg-info/requires.txt
--- old/sas7bdat-2.2.1/sas7bdat.egg-info/requires.txt 1970-01-01
01:00:00.000000000 +0100
+++ new/sas7bdat-2.2.3/sas7bdat.egg-info/requires.txt 2019-07-15
17:29:43.000000000 +0200
@@ -0,0 +1 @@
+six>=1.8.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sas7bdat-2.2.1/sas7bdat.egg-info/top_level.txt
new/sas7bdat-2.2.3/sas7bdat.egg-info/top_level.txt
--- old/sas7bdat-2.2.1/sas7bdat.egg-info/top_level.txt 1970-01-01
01:00:00.000000000 +0100
+++ new/sas7bdat-2.2.3/sas7bdat.egg-info/top_level.txt 2019-07-15
17:29:43.000000000 +0200
@@ -0,0 +1 @@
+sas7bdat
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sas7bdat-2.2.1/sas7bdat.py
new/sas7bdat-2.2.3/sas7bdat.py
--- old/sas7bdat-2.2.1/sas7bdat.py 2018-11-05 05:56:25.000000000 +0100
+++ new/sas7bdat-2.2.3/sas7bdat.py 2019-07-15 17:22:18.000000000 +0200
@@ -322,7 +322,7 @@
encoding='utf8',
encoding_errors='ignore',
align_correction=True,
- fh=None):
+ fh=None, strip_whitespace_from_strings=True):
"""
x.__init__(...) initializes x; see help(type(x)) for signature
"""
@@ -342,6 +342,7 @@
self.DATE_FORMAT_STRINGS, extra_date_format_strings
)
self.skip_header = skip_header
+ self.strip_whitespace_from_strings = strip_whitespace_from_strings
self.encoding = encoding
self.encoding_errors = encoding_errors
self.align_correction = align_correction
@@ -363,7 +364,7 @@
self.header = SASHeader(self)
self.properties = self.header.properties
self.header.parse_metadata()
- self.logger.debug('\n%s', str(self.header))
+ self.logger.debug('\n%s', self.header)
self._iter = self.readlines()
def __repr__(self):
@@ -473,7 +474,9 @@
newfmt = '<%s' % newfmt
val = struct.unpack(str(newfmt), raw_bytes[:size])[0]
if fmt == 's':
- val = val.strip(b'\x00').strip()
+ val = val.strip(b'\x00')
+ if self.strip_whitespace_from_strings:
+ val = val.strip()
elif math.isnan(val):
val = None
elif fmt == 'datetime':
@@ -696,10 +699,14 @@
out.writerow(line)
except IOError:
self.logger.warn('wrote %s lines before interruption', i)
+ success = False
break
self.logger.info('\u27f6 [%s] wrote %s of %s lines',
os.path.basename(out_file), i - 1,
self.properties.row_count or 0)
+ except Exception:
+ self.logger.exception()
+ success = False
finally:
if out_f is not None:
out_f.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sas7bdat-2.2.1/scripts/sas7bdat_to_csv
new/sas7bdat-2.2.3/scripts/sas7bdat_to_csv
--- old/sas7bdat-2.2.1/scripts/sas7bdat_to_csv 2018-05-24 23:01:20.000000000
+0200
+++ new/sas7bdat-2.2.3/scripts/sas7bdat_to_csv 2019-07-15 17:19:12.000000000
+0200
@@ -32,6 +32,8 @@
opts = {}
if options.no_align_correction:
opts['align_correction'] = False
+ if options.no_strip_whitespace:
+ opts['strip_whitespace_from_strings'] = False
successes = 0
errors = []
for i in xrange(len(in_files)):
@@ -90,6 +92,11 @@
help="Certain files raise an exception when processing "
"data with alignment correction turned on. Use "
"this flag to disable alignment correction.")
+ parser.add_option('--no-strip-whitespace', action='store_true',
+ default=False,
+ help="By default, whitespace is stripped from string "
+ "type data. Use this flag to disable this "
+ "behavior.")
options, args = parser.parse_args()
if len(args) < 1:
parser.print_help()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sas7bdat-2.2.1/setup.cfg new/sas7bdat-2.2.3/setup.cfg
--- old/sas7bdat-2.2.1/setup.cfg 1970-01-01 01:00:00.000000000 +0100
+++ new/sas7bdat-2.2.3/setup.cfg 2019-07-15 17:29:43.000000000 +0200
@@ -0,0 +1,4 @@
+[egg_info]
+tag_build =
+tag_date = 0
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sas7bdat-2.2.1/setup.py new/sas7bdat-2.2.3/setup.py
--- old/sas7bdat-2.2.1/setup.py 2018-11-05 06:24:05.000000000 +0100
+++ new/sas7bdat-2.2.3/setup.py 2019-07-15 17:29:12.000000000 +0200
@@ -2,17 +2,10 @@
from __future__ import division, absolute_import, print_function,\
unicode_literals
import sys
-from distutils.core import setup
+from setuptools import setup
-try:
- from pypandoc import convert_file
-except ImportError:
- print('warning: pypandoc not found, could not convert Markdown to RST.')
-
- def convert_file(filename, to):
- with open(filename, 'r') as f:
- data = f.read()
- return data
+with open('README.md', 'r') as f:
+ long_description = f.read()
if sys.version_info < (2, 6):
@@ -21,13 +14,14 @@
setup(name='sas7bdat',
- version='2.2.1',
+ version='2.2.3',
author='Jared Hobbs',
author_email='[email protected]',
license='MIT',
url='https://bitbucket.org/jaredhobbs/sas7bdat',
description='A sas7bdat file reader for Python',
- long_description=convert_file('README.md', 'rst'),
+ long_description=long_description,
+ long_description_content_type='text/markdown',
py_modules=['sas7bdat'],
scripts=['scripts/sas7bdat_to_csv'],
install_requires=['six>=1.8.0'],