Skip to content

Commit

Permalink
Merge branch 'release-6.0.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtmckee committed May 21, 2022
2 parents 6280520 + b7cffc9 commit 32adbe1
Show file tree
Hide file tree
Showing 38 changed files with 57 additions and 40 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ feedparser and its unit tests are released under the following license:

----- begin license block -----

Copyright (C) 2010-2021 Kurt McKee <[email protected]>
Copyright (C) 2010-2022 Kurt McKee <[email protected]>
Copyright (C) 2002-2008 Mark Pilgrim
All rights reserved.

Expand Down Expand Up @@ -38,7 +38,7 @@ released under the following license:

----- begin license block -----

Copyright (C) 2010-2021 Kurt McKee <[email protected]>
Copyright (C) 2010-2022 Kurt McKee <[email protected]>
Copyright (C) 2004-2008 Mark Pilgrim. All rights reserved.

Redistribution and use in source (Sphinx ReST) and "compiled" forms (HTML, PDF,
Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
coming in the next release:

6.0.10 - 21 May 2022
* Populate ``<summary>`` correctly if it comes after ``<content>``. (#260)

6.0.9 - 19 May 2022
* Fix a crash that can occur with GeoRSS feeds that lack a ``<where>`` tag. (#305)

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
feedparser - Parse Atom and RSS feeds in Python.

| Copyright 2010-2021 Kurt McKee <[email protected]>
| Copyright 2010-2022 Kurt McKee <[email protected]>
| Copyright 2002-2008 Mark Pilgrim
feedparser is open source. See the LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# project information
project = 'feedparser'
copyright = '2010-2021 Kurt McKee, 2004-2008 Mark Pilgrim'
copyright = '2010-2022 Kurt McKee, 2004-2008 Mark Pilgrim'
language = 'en'

# documentation options
Expand Down
2 changes: 1 addition & 1 deletion docs/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Documentation license
=====================

Copyright 2010-2021 Kurt McKee, 2004-2008 Mark Pilgrim. All rights reserved.
Copyright 2010-2022 Kurt McKee, 2004-2008 Mark Pilgrim. All rights reserved.

Redistribution and use in source (Sphinx ReST) and "compiled" forms (HTML, PDF,
PostScript, RTF and so forth) with or without modification, are permitted
Expand Down
2 changes: 1 addition & 1 deletion dodo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of feedparser.
# Copyright 2020-2021 Kurt McKee <[email protected]>
# Copyright 2020-2022 Kurt McKee <[email protected]>
# Released under the BSD 2-clause license.

# The tasks defined in this file automates the entire
Expand Down
4 changes: 2 additions & 2 deletions feedparser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down Expand Up @@ -32,7 +32,7 @@

__author__ = 'Kurt McKee <[email protected]>'
__license__ = 'BSD 2-clause'
__version__ = '6.0.9'
__version__ = '6.0.10'

# HTTP "User-Agent" header to send to servers when downloading feeds.
# If you are embedding feedparser in a larger application, you should
Expand Down
2 changes: 1 addition & 1 deletion feedparser/api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The public API for feedparser
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/datetimes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/datetimes/asctime.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/datetimes/greek.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/datetimes/hungarian.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/datetimes/iso8601.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/datetimes/korean.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/datetimes/perforce.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/datetimes/rfc822.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/datetimes/w3dtf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/encodings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Character encoding routines
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Exceptions used throughout feedparser
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/html.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/http.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
3 changes: 2 additions & 1 deletion feedparser/mixin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down Expand Up @@ -193,6 +193,7 @@ def __init__(self):
self.svgOK = 0
self.title_depth = -1
self.depth = 0
self.hasContent = 0
if self.lang:
self.feeddata['language'] = self.lang.replace('_', '-')

Expand Down
9 changes: 6 additions & 3 deletions feedparser/namespaces/_base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Support for the Atom, RSS, RDF, and CDF feed formats
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down Expand Up @@ -259,6 +259,7 @@ def _start_item(self, attrs_d):
def _end_item(self):
self.pop('item')
self.inentry = 0
self.hasContent = 0
_end_entry = _end_item

def _start_language(self, attrs_d):
Expand Down Expand Up @@ -388,7 +389,7 @@ def _end_title(self):

def _start_description(self, attrs_d):
context = self._get_context()
if 'summary' in context:
if 'summary' in context and not self.hasContent:
self._summaryKey = 'content'
self._start_content(attrs_d)
else:
Expand Down Expand Up @@ -429,7 +430,7 @@ def _end_generator(self):

def _start_summary(self, attrs_d):
context = self._get_context()
if 'summary' in context:
if 'summary' in context and not self.hasContent:
self._summaryKey = 'content'
self._start_content(attrs_d)
else:
Expand Down Expand Up @@ -466,6 +467,7 @@ def _end_source(self):
self.sourcedata.clear()

def _start_content(self, attrs_d):
self.hasContent = 1
self.push_content('content', attrs_d, 'text/plain', 1)
src = attrs_d.get('src')
if src:
Expand All @@ -477,6 +479,7 @@ def _start_body(self, attrs_d):
_start_xhtml_body = _start_body

def _start_content_encoded(self, attrs_d):
self.hasContent = 1
self.push_content('content', attrs_d, 'text/html', 1)
_start_fullitem = _start_content_encoded

Expand Down
2 changes: 1 addition & 1 deletion feedparser/namespaces/admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Support for the administrative elements extension
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/namespaces/cc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Support for the Creative Commons licensing extensions
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/namespaces/dc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Support for the Dublin Core metadata extensions
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/namespaces/georss.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Support for the GeoRSS format
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/namespaces/itunes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Support for the iTunes format
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/namespaces/mediarss.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Support for the Media RSS format
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/namespaces/psc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Support for the Podlove Simple Chapters format
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/parsers/loose.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The loose feed parser that interfaces with an SGML parsing library
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/parsers/strict.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The strict feed parser that interfaces with an XML parsing library
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/sanitizer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/sgml.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion feedparser/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2021 Kurt McKee <[email protected]>
# Copyright 2010-2022 Kurt McKee <[email protected]>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
Expand Down
10 changes: 10 additions & 0 deletions tests/wellformed/atom10/entry_content_and_summary.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!--
Description: entry summary follows content with different value
Expect: not bozo and entries[0]['summary'] == 'Summary'
-->
<feed xmlns="http://www.w3.org/2005/Atom">
<entry>
<content>Example Atom</content>
<summary>Summary</summary>
</entry>
</feed>

0 comments on commit 32adbe1

Please sign in to comment.