Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-bibtexparser for
openSUSE:Factory checked in at 2022-01-23 18:38:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-bibtexparser (Old)
and /work/SRC/openSUSE:Factory/.python-bibtexparser.new.1938 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-bibtexparser"
Sun Jan 23 18:38:44 2022 rev:7 rq:948244 version:1.2.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-bibtexparser/python-bibtexparser.changes
2020-12-14 18:09:44.595662460 +0100
+++
/work/SRC/openSUSE:Factory/.python-bibtexparser.new.1938/python-bibtexparser.changes
2022-01-23 18:38:47.257906853 +0100
@@ -1,0 +2,6 @@
+Sun Jan 23 16:41:55 UTC 2022 - Dirk M??ller <[email protected]>
+
+- update to 1.2.0:
+ * drop python2 support
+
+-------------------------------------------------------------------
Old:
----
python-bibtexparser-1.1.0.tar.gz
New:
----
python-bibtexparser-1.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-bibtexparser.spec ++++++
--- /var/tmp/diff_new_pack.AufUSh/_old 2022-01-23 18:38:47.753903516 +0100
+++ /var/tmp/diff_new_pack.AufUSh/_new 2022-01-23 18:38:47.757903489 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-bibtexparser
#
-# Copyright (c) 2020 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
@@ -17,14 +17,12 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%if 0%{?suse_version} > 1500
%define skip_python2 1
-%endif
Name: python-bibtexparser
-Version: 1.1.0
+Version: 1.2.0
Release: 0
Summary: Bibtex parser for python
-License: LGPL-3.0-only OR BSD-3-Clause
+License: BSD-3-Clause OR LGPL-3.0-only
Group: Development/Languages/Python
URL: https://github.com/sciunto-org/python-bibtexparser
Source:
https://github.com/sciunto-org/python-bibtexparser/archive/v%{version}.tar.gz#/python-bibtexparser-%{version}.tar.gz
++++++ python-bibtexparser-1.1.0.tar.gz -> python-bibtexparser-1.2.0.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-bibtexparser-1.1.0/.travis.yml
new/python-bibtexparser-1.2.0/.travis.yml
--- old/python-bibtexparser-1.1.0/.travis.yml 2019-01-17 16:31:34.000000000
+0100
+++ new/python-bibtexparser-1.2.0/.travis.yml 2020-05-26 11:31:10.000000000
+0200
@@ -2,8 +2,6 @@
language: python
matrix:
include:
- - python: "2.7"
- env: TEST_SUITE=suite_2_7
- python: "3.3"
env: TEST_SUITE=suite_3_3
- python: "3.4"
@@ -16,8 +14,6 @@
dist: xenial # Required for Python 3.7
sudo: true # travis-ci/travis-ci#9069
env: TEST_SUITE=suite_3_7
- - python: "pypy-5.7.1"
- env: TEST_SUITE=suite_pypy
- python: "pypy3.5-5.8.0"
env: TEST_SUITE=suite_pypy3
install:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-bibtexparser-1.1.0/CHANGELOG
new/python-bibtexparser-1.2.0/CHANGELOG
--- old/python-bibtexparser-1.1.0/CHANGELOG 2019-01-17 16:31:34.000000000
+0100
+++ new/python-bibtexparser-1.2.0/CHANGELOG 2020-05-26 11:31:10.000000000
+0200
@@ -1,15 +1,24 @@
-v1.xxx
+v1.2.0
======
+* Support for python 3 only
+
v1.1.0
======
+* Handles declarations on lines starting with spaces after comments (#199)
+* accept extra characters in @string (#148)
+* Add support for BibLaTeX annotations (#208)
+* Strip the latex command str for latex_to_unicode() (#182)
+* Add comma_last to BibTexWriter (#219)
+* Feature: crossref Support (#216)
* BUGFIX: Fix for pyparsing 2.3.1 (#226)
* NEW: Add support for BibLaTeX annotations (#208)
* NEW: Feature: crossref Support (#216)
* ENH: Handles declarations on lines starting with spaces after comments (#199)
* ENH: Checks for empty citekeys and whitespaces (#213)
+
v1.0.1
======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-bibtexparser-1.1.0/bibtexparser/__init__.py
new/python-bibtexparser-1.2.0/bibtexparser/__init__.py
--- old/python-bibtexparser-1.1.0/bibtexparser/__init__.py 2019-01-17
16:31:34.000000000 +0100
+++ new/python-bibtexparser-1.2.0/bibtexparser/__init__.py 2020-05-26
11:31:10.000000000 +0200
@@ -25,9 +25,7 @@
'loads', 'load', 'dumps', 'dump', 'bibdatabase',
'bparser', 'bwriter', 'bibtexexpression', 'latexenc', 'customization',
]
-__version__ = '1.1.0'
-
-import sys
+__version__ = '1.2.0'
from . import bibdatabase, bibtexexpression, bparser, bwriter, latexenc,
customization
@@ -107,8 +105,4 @@
"""
if writer is None:
writer = bwriter.BibTexWriter()
- if sys.version_info >= (3, 0):
- bibtex_file.write(writer.write(bib_database))
- else:
- # Encode to UTF-8
- bibtex_file.write(writer.write(bib_database).encode("utf-8"))
+ bibtex_file.write(writer.write(bib_database))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-bibtexparser-1.1.0/bibtexparser/bibdatabase.py
new/python-bibtexparser-1.2.0/bibtexparser/bibdatabase.py
--- old/python-bibtexparser-1.1.0/bibtexparser/bibdatabase.py 2019-01-17
16:31:34.000000000 +0100
+++ new/python-bibtexparser-1.2.0/bibtexparser/bibdatabase.py 2020-05-26
11:31:10.000000000 +0200
@@ -1,17 +1,10 @@
-#!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import OrderedDict
-import sys
import logging
logger = logging.getLogger(__name__)
-if sys.version_info >= (3, 0):
- ustr = str
-else:
- ustr = unicode
-
STANDARD_TYPES = set([
'article',
@@ -90,7 +83,7 @@
def entry_sort_key(entry, fields):
result = []
for field in fields:
- result.append(ustr(entry.get(field, '')).lower()) # Sorting
always as string
+ result.append(str(entry.get(field, '')).lower()) # Sorting always
as string
return tuple(result)
def _make_entries_dict(self):
@@ -276,4 +269,4 @@
(BibDataString, BibDataStringExpression)):
return text_string_or_expression.get_value()
else:
- return ustr(text_string_or_expression)
+ return str(text_string_or_expression)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-bibtexparser-1.1.0/bibtexparser/bibtexexpression.py
new/python-bibtexparser-1.2.0/bibtexparser/bibtexexpression.py
--- old/python-bibtexparser-1.1.0/bibtexparser/bibtexexpression.py
2019-01-17 16:31:34.000000000 +0100
+++ new/python-bibtexparser-1.2.0/bibtexparser/bibtexexpression.py
2020-05-26 11:31:10.000000000 +0200
@@ -99,6 +99,8 @@
ParseException = pp.ParseException
def __init__(self):
+ # Init parse action functions
+ self.set_string_name_parse_action(lambda s, l, t: None)
# Bibtex keywords
@@ -141,7 +143,6 @@
string_expr = pp.delimitedList(
(quoted_value | braced_value | string_name), delim='#'
)('StringExpression')
- self.set_string_expression_parse_action(lambda s, l, t: None)
string_expr.addParseAction(self._string_expr_parse_action)
value = (integer | string_expr)('Value')
@@ -270,17 +271,8 @@
def _string_name_parse_action(self, s, l, t):
return self._string_name_parse_action_fun(s, l, t)
- def set_string_expression_parse_action(self, fun):
- """Set the parseAction for string_expression expression.
-
- .. Note::
-
- See set_string_name_parse_action.
- """
- self._string_expr_parse_action_fun = fun
-
def _string_expr_parse_action(self, s, l, t):
- return self._string_expr_parse_action_fun(s, l, t)
+ return BibDataStringExpression.expression_if_needed(t)
def parseFile(self, file_obj):
return self.main_expression.parseFile(file_obj, parseAll=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-bibtexparser-1.1.0/bibtexparser/bparser.py
new/python-bibtexparser-1.2.0/bibtexparser/bparser.py
--- old/python-bibtexparser-1.1.0/bibtexparser/bparser.py 2019-01-17
16:31:34.000000000 +0100
+++ new/python-bibtexparser-1.2.0/bibtexparser/bparser.py 2020-05-26
11:31:10.000000000 +0200
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Original source: github.com/okfn/bibserver
@@ -7,7 +6,6 @@
# Etienne Posthumus (epoz)
# Francois Boulogne <fboulogne at april dot org>
-import sys
import io
import logging
@@ -20,12 +18,6 @@
__all__ = ['BibTexParser']
-if sys.version_info >= (3, 0):
- ustr = str
-else:
- ustr = unicode
-
-
def parse(data, *args, **kwargs):
parser = BibTexParser(*args, **kwargs)
return parser.parse(data)
@@ -186,14 +178,6 @@
self._expr.set_string_name_parse_action(
lambda s, l, t:
BibDataString(self.bib_database, t[0]))
- if self.interpolate_strings:
- maybe_interpolate = lambda expr: as_text(expr)
- else:
- maybe_interpolate = lambda expr: expr
- self._expr.set_string_expression_parse_action(
- lambda s, l, t:
- maybe_interpolate(
- BibDataStringExpression.expression_if_needed(t)))
# Add notice to logger
self._expr.add_log_function(logger.debug)
@@ -220,12 +204,13 @@
def _bibtex_file_obj(self, bibtex_str):
# Some files have Byte-order marks inserted at the start
byte = b'\xef\xbb\xbf'
- if isinstance(bibtex_str, ustr):
- byte = ustr(byte, self.encoding, 'ignore')
- if bibtex_str[0] == byte:
+
+ if isinstance(bibtex_str, str):
+ byte = str(byte, self.encoding, 'ignore')
+ if len(bibtex_str) >= 1 and bibtex_str[0] == byte:
bibtex_str = bibtex_str[1:]
else:
- if bibtex_str[:3] == byte:
+ if len(bibtex_str) >= 3 and bibtex_str[:3] == byte:
bibtex_str = bibtex_str[3:]
bibtex_str = bibtex_str.decode(encoding=self.encoding)
return io.StringIO(bibtex_str)
@@ -239,7 +224,10 @@
"""
if not val or val == "{}":
return ''
- return val
+ elif self.interpolate_strings:
+ return as_text(val)
+ else:
+ return val
def _clean_key(self, key):
""" Lowercase a key and return as unicode.
@@ -249,8 +237,8 @@
:returns: (unicode) string -- value
"""
key = key.lower()
- if not isinstance(key, ustr):
- return ustr(key, 'utf-8')
+ if not isinstance(key, str):
+ return str(key, 'utf-8')
else:
return key
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-bibtexparser-1.1.0/bibtexparser/bwriter.py
new/python-bibtexparser-1.2.0/bibtexparser/bwriter.py
--- old/python-bibtexparser-1.1.0/bibtexparser/bwriter.py 2019-01-17
16:31:34.000000000 +0100
+++ new/python-bibtexparser-1.2.0/bibtexparser/bwriter.py 2020-05-26
11:31:10.000000000 +0200
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Francois Boulogne
# License:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-bibtexparser-1.1.0/bibtexparser/customization.py
new/python-bibtexparser-1.2.0/bibtexparser/customization.py
--- old/python-bibtexparser-1.1.0/bibtexparser/customization.py 2019-01-17
16:31:34.000000000 +0100
+++ new/python-bibtexparser-1.2.0/bibtexparser/customization.py 2020-05-26
11:31:10.000000000 +0200
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@@ -482,7 +481,7 @@
if nodoi:
link = record['doi']
if link.startswith('10'):
- link = 'http://dx.doi.org/' + link
+ link = 'https://doi.org/' + link
record['link'].append({"url": link, "anchor": "doi"})
return record
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-bibtexparser-1.1.0/bibtexparser/latexenc.py
new/python-bibtexparser-1.2.0/bibtexparser/latexenc.py
--- old/python-bibtexparser-1.1.0/bibtexparser/latexenc.py 2019-01-17
16:31:34.000000000 +0100
+++ new/python-bibtexparser-1.2.0/bibtexparser/latexenc.py 2020-05-26
11:31:10.000000000 +0200
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Original source: github.com/okfn/bibserver
@@ -9,7 +8,6 @@
import itertools
import re
-import sys
import unicodedata
__all__ = ['string_to_latex', 'latex_to_unicode', 'protect_uppercase',
@@ -2686,16 +2684,10 @@
("\uD7FF", "\\mathtt{9}"),
)
- if sys.version_info >= (3, 0):
- unicode_to_latex = to_latex
- unicode_to_crappy_latex1 = to_crappy1
- unicode_to_crappy_latex2 = to_crappy2
- unicode_to_latex_map = dict(unicode_to_latex)
- else:
- unicode_to_latex = tuple((k.decode('unicode-escape'), v) for k, v in
to_latex)
- unicode_to_crappy_latex1 = tuple((k.decode('unicode-escape'), v) for
k, v in to_crappy1)
- unicode_to_crappy_latex2 = tuple((k.decode('unicode-escape'), v) for
k, v in to_crappy2)
- unicode_to_latex_map = dict(unicode_to_latex)
+ unicode_to_latex = to_latex
+ unicode_to_crappy_latex1 = to_crappy1
+ unicode_to_crappy_latex2 = to_crappy2
+ unicode_to_latex_map = dict(unicode_to_latex)
prepare_unicode_to_latex()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-bibtexparser-1.1.0/bibtexparser/tests/test_bparser.py
new/python-bibtexparser-1.2.0/bibtexparser/tests/test_bparser.py
--- old/python-bibtexparser-1.1.0/bibtexparser/tests/test_bparser.py
2019-01-17 16:31:34.000000000 +0100
+++ new/python-bibtexparser-1.2.0/bibtexparser/tests/test_bparser.py
2020-05-26 11:31:10.000000000 +0200
@@ -53,6 +53,13 @@
class TestBibtexParserList(unittest.TestCase):
+ def test_empty_string(self):
+ bib = BibTexParser("")
+ self.assertEqual(bib.entries, [])
+ self.assertEqual(bib.comments, [])
+ self.assertEqual(bib.preambles, [])
+ self.assertEqual(bib.strings, {})
+
###########
# ARTICLE
###########
@@ -612,6 +619,21 @@
self.assertEqual(res_dict, expected_dict)
self.assertEqual(bib.preambles, ["Blah blah"])
+ def test_does_not_fail_on_non_bibtex_with_partial(self):
+ bibraw = '''@misc{this looks,
+ like = a = bibtex file but
+ , is not a real one!
+ '''
+ parser = BibTexParser()
+ bib = parser.parse(bibraw, partial=False)
+ self.assertEqual(bib.entries, [])
+ self.assertEqual(bib.preambles, [])
+ self.assertEqual(bib.strings, {})
+ self.assertEqual(bib.comments, [
+ '@misc{this looks,\n'
+ ' like = a = bibtex file but\n'
+ ' , is not a real one!'])
+
def test_no_citekey_parsed_as_comment(self):
bib = BibTexParser('@BOOK{, title = "bla"}')
self.assertEqual(bib.entries, [])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-bibtexparser-1.1.0/bibtexparser/tests/test_bwriter.py
new/python-bibtexparser-1.2.0/bibtexparser/tests/test_bwriter.py
--- old/python-bibtexparser-1.1.0/bibtexparser/tests/test_bwriter.py
2019-01-17 16:31:34.000000000 +0100
+++ new/python-bibtexparser-1.2.0/bibtexparser/tests/test_bwriter.py
2020-05-26 11:31:10.000000000 +0200
@@ -8,7 +8,6 @@
import unittest
import os
import io
-import sys
from bibtexparser.bparser import BibTexParser
from bibtexparser.bwriter import BibTexWriter, to_bibtex
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-bibtexparser-1.1.0/docs/source/tutorial.rst
new/python-bibtexparser-1.2.0/docs/source/tutorial.rst
--- old/python-bibtexparser-1.1.0/docs/source/tutorial.rst 2019-01-17
16:31:34.000000000 +0100
+++ new/python-bibtexparser-1.2.0/docs/source/tutorial.rst 2020-05-26
11:31:10.000000000 +0200
@@ -375,7 +375,7 @@
bp = BibTexParser(interpolate_strings=False)
bib_database = bp.parse(bibtex)
bib_database.entries[0]
- as_text(bd.entries[0]['author'])
+ as_text(bib_database.entries[0]['author'])
.. code-block:: python
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-bibtexparser-1.1.0/docs/source/who.rst
new/python-bibtexparser-1.2.0/docs/source/who.rst
--- old/python-bibtexparser-1.1.0/docs/source/who.rst 2019-01-17
16:31:34.000000000 +0100
+++ new/python-bibtexparser-1.2.0/docs/source/who.rst 2020-05-26
11:31:10.000000000 +0200
@@ -3,6 +3,8 @@
If your project uses BibtexParser, you can ask for the addition of a link in
this list.
+* https://pypi.org/project/vitae/
+* https://github.com/pubs/pubs
* http://timotheepoisot.fr/2013/11/10/shared-bibtex-file-markdown/
* https://github.com/Phyks/BMC
* http://aurelien.naldi.info/research/publications.html