Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-agate-sql for openSUSE:Factory checked in at 2022-01-15 21:45:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-agate-sql (Old) and /work/SRC/openSUSE:Factory/.python-agate-sql.new.1892 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-agate-sql" Sat Jan 15 21:45:18 2022 rev:9 rq:946666 version:0.5.8 Changes: -------- --- /work/SRC/openSUSE:Factory/python-agate-sql/python-agate-sql.changes 2021-07-13 22:37:51.817921521 +0200 +++ /work/SRC/openSUSE:Factory/.python-agate-sql.new.1892/python-agate-sql.changes 2022-01-15 21:45:44.285631191 +0100 @@ -1,0 +2,8 @@ +Sat Jan 15 16:26:26 UTC 2022 - Dirk M??ller <dmuel...@suse.com> + +- update to 0.5.8: + * Fix tests for Linux packages. + * Add wheels distribution. +- drop fix_test_fixture_33.patch: obsolete + +------------------------------------------------------------------- Old: ---- 0.5.6.tar.gz fix_test_fixture_33.patch New: ---- 0.5.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-agate-sql.spec ++++++ --- /var/tmp/diff_new_pack.6sdHYf/_old 2022-01-15 21:45:44.769631448 +0100 +++ /var/tmp/diff_new_pack.6sdHYf/_new 2022-01-15 21:45:44.777631452 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-agate-sql # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-agate-sql -Version: 0.5.6 +Version: 0.5.8 Release: 0 Summary: SQL read/write support for agate License: MIT @@ -28,8 +28,6 @@ Source: https://github.com/wireservice/agate-sql/archive/%{version}.tar.gz # we do not have crate dialect Patch0: python-agate-sql-no-crate.patch -# PATCH-FIX-UPSTREAM fix_test_fixture_33.patch gh#wireservice/agate-sql#33 mc...@suse.com -Patch1: fix_test_fixture_33.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes ++++++ 0.5.6.tar.gz -> 0.5.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-sql-0.5.6/.github/workflows/ci.yml new/agate-sql-0.5.8/.github/workflows/ci.yml --- old/agate-sql-0.5.6/.github/workflows/ci.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/agate-sql-0.5.8/.github/workflows/ci.yml 2021-09-15 20:07:20.000000000 +0200 @@ -0,0 +1,29 @@ +name: CI +on: [push, pull_request] +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + python-version: [3.6, 3.7, 3.8, 3.9, pypy-3.6, pypy-3.7] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + # https://github.com/actions/cache/blob/main/examples.md#using-a-script-to-get-cache-location + - id: pip-cache + run: python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)" + - uses: actions/cache@v1 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + - run: pip install --upgrade check-manifest flake8 isort setuptools + - run: check-manifest + - run: flake8 . + - run: isort . --check-only + - run: pip install .[test] + - run: nosetests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-sql-0.5.6/.travis.yml new/agate-sql-0.5.8/.travis.yml --- old/agate-sql-0.5.6/.travis.yml 2021-03-05 01:29:48.000000000 +0100 +++ new/agate-sql-0.5.8/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -dist: xenial -language: python -python: - - "3.6" - - "3.7" -install: pip install .[test] -script: nosetests tests -sudo: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-sql-0.5.6/CHANGELOG.rst new/agate-sql-0.5.8/CHANGELOG.rst --- old/agate-sql-0.5.6/CHANGELOG.rst 2021-03-05 01:29:48.000000000 +0100 +++ new/agate-sql-0.5.8/CHANGELOG.rst 2021-09-15 20:07:20.000000000 +0200 @@ -1,5 +1,17 @@ -0.5.6 ------ +0.5.8 - September 15, 2021 +-------------------------- + +* Fix tests for Linux packages. + +0.5.7 - July 13, 2021 +--------------------- + +* Add wheels distribution. + +0.5.6 - March 4, 2021 +--------------------- + +* Fix test that fails in specific environments. 0.5.5 - July 7, 2020 -------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-sql-0.5.6/MANIFEST.in new/agate-sql-0.5.8/MANIFEST.in --- old/agate-sql-0.5.6/MANIFEST.in 2021-03-05 01:29:48.000000000 +0100 +++ new/agate-sql-0.5.8/MANIFEST.in 2021-09-15 20:07:20.000000000 +0200 @@ -1,5 +1,8 @@ +include *.db +include *.py +include *.rst include COPYING -include AUTHORS.rst -include CHANGELOG.rst -include README.rst +recursive-include docs *.py +recursive-include docs *.rst +recursive-include docs Makefile recursive-include tests *.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-sql-0.5.6/README.rst new/agate-sql-0.5.8/README.rst --- old/agate-sql-0.5.6/README.rst 2021-03-05 01:29:48.000000000 +0100 +++ new/agate-sql-0.5.8/README.rst 2021-09-15 20:07:20.000000000 +0200 @@ -1,7 +1,11 @@ -.. image:: https://travis-ci.org/wireservice/agate-sql.png - :target: https://travis-ci.org/wireservice/agate-sql +.. image:: https://github.com/wireservice/agate-sql/workflows/CI/badge.svg + :target: https://github.com/wireservice/agate-sql/actions :alt: Build status +.. image:: https://img.shields.io/pypi/dm/agate-sql.svg + :target: https://pypi.python.org/pypi/agate-sql + :alt: PyPI downloads + .. image:: https://img.shields.io/pypi/v/agate-sql.svg :target: https://pypi.python.org/pypi/agate-sql :alt: Version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-sql-0.5.6/agatesql/table.py new/agate-sql-0.5.8/agatesql/table.py --- old/agate-sql-0.5.6/agatesql/table.py 2021-03-05 01:29:48.000000000 +0100 +++ new/agate-sql-0.5.8/agatesql/table.py 2021-09-15 20:07:20.000000000 +0200 @@ -5,18 +5,19 @@ :class:`Table <agate.table.Table>`. """ -import decimal import datetime -import six +import decimal + import agate +import six from sqlalchemy import Column, MetaData, Table, UniqueConstraint, create_engine, dialects -from sqlalchemy.engine import Connection -from sqlalchemy.types import BOOLEAN, DATE, DATETIME, DECIMAL, FLOAT, TEXT, TIMESTAMP, VARCHAR, Interval from sqlalchemy.dialects.mssql import BIT from sqlalchemy.dialects.oracle import INTERVAL as ORACLE_INTERVAL from sqlalchemy.dialects.postgresql import INTERVAL as POSTGRES_INTERVAL +from sqlalchemy.engine import Connection from sqlalchemy.schema import CreateTable from sqlalchemy.sql import select +from sqlalchemy.types import BOOLEAN, DATE, DATETIME, DECIMAL, FLOAT, TEXT, TIMESTAMP, VARCHAR, Interval SQL_TYPE_MAP = { agate.Boolean: None, # See below @@ -220,7 +221,8 @@ if not isinstance(column.data_type, agate.DateTime): sql_column_kwargs['nullable'] = table.aggregate(agate.HasNulls(column_name)) - sql_table.append_column(make_sql_column(column_name, column, sql_type_kwargs, sql_column_kwargs, sql_column_type)) + sql_table.append_column(make_sql_column(column_name, column, + sql_type_kwargs, sql_column_kwargs, sql_column_type)) if unique_constraint: sql_table.append_constraint(UniqueConstraint(*unique_constraint)) @@ -230,7 +232,7 @@ def to_sql(self, connection_or_string, table_name, overwrite=False, create=True, create_if_not_exists=False, insert=True, prefixes=[], - db_schema=None, constraints=True, unique_constraint=[], chunk_size=None, + db_schema=None, constraints=True, unique_constraint=[], chunk_size=None, min_col_len=1, col_len_multiplier=1): """ Write this table to the given SQL database. @@ -268,7 +270,7 @@ dialect = connection.engine.dialect.name sql_table = make_sql_table(self, table_name, dialect=dialect, db_schema=db_schema, constraints=constraints, - unique_constraint=unique_constraint, connection=connection, + unique_constraint=unique_constraint, connection=connection, min_col_len=min_col_len, col_len_multiplier=col_len_multiplier) if create: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-sql-0.5.6/docs/conf.py new/agate-sql-0.5.8/docs/conf.py --- old/agate-sql-0.5.6/docs/conf.py 2021-03-05 01:29:48.000000000 +0100 +++ new/agate-sql-0.5.8/docs/conf.py 2021-09-15 20:07:20.000000000 +0200 @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # -# flake8: noqa -# # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this @@ -54,9 +52,9 @@ # built documents. # # The short X.Y version. -version = '0.5.6' +version = '0.5.8' # The full version, including alpha/beta/rc tags. -release = '0.5.6' +release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -191,8 +189,8 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'agate-sql.tex', u'agate-sql Documentation', - u'Christopher Groskopf', 'manual'), + ('index', 'agate-sql.tex', u'agate-sql Documentation', + u'Christopher Groskopf', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-sql-0.5.6/example.py new/agate-sql-0.5.8/example.py --- old/agate-sql-0.5.6/example.py 2021-03-05 01:29:48.000000000 +0100 +++ new/agate-sql-0.5.8/example.py 2021-09-15 20:07:20.000000000 +0200 @@ -1,6 +1,7 @@ #!/usr/bin/env python import agate + import agatesql table = agate.Table.from_sql('sqlite:///example.db', 'test') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-sql-0.5.6/setup.cfg new/agate-sql-0.5.8/setup.cfg --- old/agate-sql-0.5.6/setup.cfg 2021-03-05 01:29:48.000000000 +0100 +++ new/agate-sql-0.5.8/setup.cfg 2021-09-15 20:07:20.000000000 +0200 @@ -1,2 +1,14 @@ +[flake8] +max-line-length = 119 +per-file-ignores = + # imported but unused + agatesql/__init__.py: F401 + example.py: F401 + # block comment should start with '# ' + docs/conf.py: E265 + +[isort] +line_length = 119 + [bdist_wheel] universal = 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-sql-0.5.6/setup.py new/agate-sql-0.5.8/setup.py --- old/agate-sql-0.5.6/setup.py 2021-03-05 01:29:48.000000000 +0100 +++ new/agate-sql-0.5.8/setup.py 2021-09-15 20:07:20.000000000 +0200 @@ -1,12 +1,14 @@ -#!/usr/bin/env python +from setuptools import find_packages, setup -from setuptools import setup +with open('README.rst') as f: + long_description = f.read() setup( name='agate-sql', - version='0.5.6', + version='0.5.8', description='agate-sql adds SQL read/write support to agate.', - long_description=open('README.rst').read(), + long_description=long_description, + long_description_content_type='text/x-rst', author='Christopher Groskopf', author_email='chrisgrosk...@gmail.com', url='http://agate-sql.readthedocs.org/', @@ -21,19 +23,17 @@ 'Programming Language :: Python', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', - 'Topic :: Multimedia :: Graphics', 'Topic :: Scientific/Engineering :: Information Analysis', - 'Topic :: Scientific/Engineering :: Visualization', 'Topic :: Software Development :: Libraries :: Python Modules', ], - packages=[ - 'agatesql' - ], + packages=find_packages(exclude=['tests', 'tests.*']), install_requires=[ 'agate>=1.5.0', - 'sqlalchemy>=1.0.8' + 'sqlalchemy>=1.0.8', ], extras_require={ 'test': [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/agate-sql-0.5.6/tests/test_agatesql.py new/agate-sql-0.5.8/tests/test_agatesql.py --- old/agate-sql-0.5.6/tests/test_agatesql.py 2021-03-05 01:29:48.000000000 +0100 +++ new/agate-sql-0.5.8/tests/test_agatesql.py 2021-09-15 20:07:20.000000000 +0200 @@ -2,12 +2,15 @@ # -*- coding: utf8 -*- from decimal import Decimal +from textwrap import dedent import agate -import agatesql # noqa from sqlalchemy import create_engine from sqlalchemy.exc import IntegrityError +import agatesql + + class TestSQL(agate.AgateTestCase): def setUp(self): self.rows = ( @@ -105,48 +108,65 @@ def test_to_sql_create_statement(self): statement = self.table.to_sql_create_statement('test_table') - self.assertEqual(statement.replace('\t', ' '), '''CREATE TABLE test_table ( - number DECIMAL, - textcol VARCHAR NOT NULL, - boolean BOOLEAN, - date DATE, - datetime TIMESTAMP -);''') # noqa + self.assertEqual(statement.replace('\t', ' '), dedent('''\ + CREATE TABLE test_table ( + number DECIMAL, + textcol VARCHAR NOT NULL, + boolean BOOLEAN, + date DATE, + datetime TIMESTAMP + );''')) # noqa: W291 def test_to_sql_create_statement_no_constraints(self): statement = self.table.to_sql_create_statement('test_table', constraints=False) - self.assertEqual(statement.replace('\t', ' '), '''CREATE TABLE test_table ( - number DECIMAL, - textcol VARCHAR, - boolean BOOLEAN, - date DATE, - datetime TIMESTAMP -);''') # noqa + self.assertEqual(statement.replace('\t', ' '), dedent('''\ + CREATE TABLE test_table ( + number DECIMAL, + textcol VARCHAR, + boolean BOOLEAN, + date DATE, + datetime TIMESTAMP + );''')) # noqa: W291 def test_to_sql_create_statement_unique_constraint(self): statement = self.table.to_sql_create_statement('test_table', unique_constraint=['number', 'textcol']) - self.assertEqual(statement.replace('\t', ' '), '''CREATE TABLE test_table ( - number DECIMAL, - textcol VARCHAR NOT NULL, - boolean BOOLEAN, - date DATE, - datetime TIMESTAMP, - UNIQUE (number, textcol) -);''') # noqa + self.assertEqual(statement.replace('\t', ' '), dedent('''\ + CREATE TABLE test_table ( + number DECIMAL, + textcol VARCHAR NOT NULL, + boolean BOOLEAN, + date DATE, + datetime TIMESTAMP, + UNIQUE (number, textcol) + );''')) # noqa: W291 def test_to_sql_create_statement_with_schema(self): statement = self.table.to_sql_create_statement('test_table', db_schema='test_schema', dialect='mysql') - self.assertEqual(statement.replace('\t', ' '), '''CREATE TABLE test_schema.test_table ( - number DECIMAL(38, 3), - textcol VARCHAR(1) NOT NULL, - boolean BOOL, - date DATE, - datetime TIMESTAMP NULL, - CHECK (boolean IN (0, 1)) -);''') # noqa + # https://github.com/wireservice/agate-sql/issues/33#issuecomment-879267838 + if 'CHECK' in statement: + expected = '''\ + CREATE TABLE test_schema.test_table ( + number DECIMAL(38, 3), + textcol VARCHAR(1) NOT NULL, + boolean BOOL, + date DATE, + datetime TIMESTAMP NULL, + CHECK (boolean IN (0, 1)) + );''' # noqa: W291 + else: + expected = '''\ + CREATE TABLE test_schema.test_table ( + number DECIMAL(38, 3), + textcol VARCHAR(1) NOT NULL, + boolean BOOL, + date DATE, + datetime TIMESTAMP NULL + );''' # noqa: W291 + + self.assertEqual(statement.replace('\t', ' '), dedent(expected)) def test_to_sql_create_statement_with_dialects(self): for dialect in ['crate', 'mssql', 'mysql', 'postgresql', 'sqlite']: @@ -160,10 +180,11 @@ statement = table.to_sql_create_statement('test_table', db_schema='test_schema', dialect='mysql') - self.assertEqual(statement.replace('\t', ' '), '''CREATE TABLE test_schema.test_table ( - id DECIMAL(38, 0) NOT NULL, - name VARCHAR(1) -);''') # noqa + self.assertEqual(statement.replace('\t', ' '), dedent('''\ + CREATE TABLE test_schema.test_table ( + id DECIMAL(38, 0) NOT NULL, + name VARCHAR(1) + );''')) # noqa: W291 def test_to_sql_create_statement_wide_width(self): rows = ((1, 'x' * 21845), (2, '')) @@ -173,10 +194,11 @@ statement = table.to_sql_create_statement('test_table', db_schema='test_schema', dialect='mysql') - self.assertEqual(statement.replace('\t', ' '), '''CREATE TABLE test_schema.test_table ( - id DECIMAL(38, 0) NOT NULL, - name TEXT -);''') # noqa + self.assertEqual(statement.replace('\t', ' '), dedent('''\ + CREATE TABLE test_schema.test_table ( + id DECIMAL(38, 0) NOT NULL, + name TEXT + );''')) # noqa: W291 def test_make_sql_table_col_len_multiplier(self): rows = ((1, 'x' * 10), (2, '')) @@ -187,7 +209,6 @@ sql_table = agatesql.table.make_sql_table(table, 'test_table', dialect='mysql', db_schema='test_schema', constraints=True, col_len_multiplier=1.5) - self.assertEqual(sql_table.columns.get('name').type.length, 15) def test_make_sql_table_min_col_len(self): @@ -196,10 +217,9 @@ column_types = [agate.Number(), agate.Text()] table = agate.Table(rows, column_names, column_types) - sql_table = agatesql.table.make_sql_table(table, 'test_table', dialect='mysql', db_schema='test_schema', + sql_table = agatesql.table.make_sql_table(table, 'test_table', dialect='mysql', db_schema='test_schema', constraints=True, min_col_len=20) - self.assertEqual(sql_table.columns.get('name').type.length, 20) def test_sql_query_simple(self): ++++++ python-agate-sql-no-crate.patch ++++++ --- /var/tmp/diff_new_pack.6sdHYf/_old 2022-01-15 21:45:44.905631520 +0100 +++ /var/tmp/diff_new_pack.6sdHYf/_new 2022-01-15 21:45:44.909631522 +0100 @@ -1,7 +1,9 @@ ---- a/tests/test_agatesql.py -+++ b/tests/test_agatesql.py -@@ -149,7 +149,7 @@ class TestSQL(agate.AgateTestCase): - );''') # noqa +Index: agate-sql-0.5.8/tests/test_agatesql.py +=================================================================== +--- agate-sql-0.5.8.orig/tests/test_agatesql.py ++++ agate-sql-0.5.8/tests/test_agatesql.py +@@ -169,7 +169,7 @@ class TestSQL(agate.AgateTestCase): + self.assertEqual(statement.replace('\t', ' '), dedent(expected)) def test_to_sql_create_statement_with_dialects(self): - for dialect in ['crate', 'mssql', 'mysql', 'postgresql', 'sqlite']: