Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates #467

Merged
merged 8 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ trim_trailing_whitespace = true

[{*.yaml,*.yml}]
indent_size = 2

# Ignore all XML files in the `tests/` and `docs/` directories.
[{docs/**.xml,docs/**.rdf,tests/**.xml}]
charset = unset
end_of_line = unset
indent_size = unset
indent_style = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# The goal is to ensure that each individual runner
# is paired with all Python versions simultaneously.
# This nested-list syntax accomplishes that goal.
- - "3.8"
- - "3.9"
- "3.12"
# These last two keys are placeholders to ensure consistency in matrix values.
cpython-beta:
Expand All @@ -44,7 +44,6 @@ jobs:
name: "Linux (CPython)"
runner: "ubuntu-latest"
cpythons:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
Expand All @@ -59,7 +58,6 @@ jobs:
cpythons: []
cpython-beta: ""
pypys:
- "3.8"
- "3.9"
- "3.10"
# NOTE: Tox only offers "best effort" support for PyPy.
Expand Down Expand Up @@ -106,7 +104,8 @@ jobs:

- name: "Determine venv path"
shell: "bash"
run: "echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> $GITHUB_ENV"
run: |
echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> "$GITHUB_ENV"

- name: "Create virtual environment"
if: "steps.restore-cache.outputs.cache-hit == false"
Expand Down
27 changes: 22 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
ci:
autoupdate_schedule: "monthly"

default_language_version:
python: "python3.12"

repos:
- repo: "meta"
hooks:
Expand All @@ -26,31 +29,45 @@ repos:
rev: "v3.17.0"
hooks:
- id: "pyupgrade"
name: "Enforce Python 3.8+ idioms"
name: "Enforce Python 3.9+ idioms"
args:
- "--py38-plus"
- "--py39-plus"

- repo: "https://github.com/psf/black-pre-commit-mirror"
rev: "24.4.2"
rev: "24.8.0"
hooks:
- id: "black"
language_version: "python3.8"

- repo: "https://github.com/pycqa/isort"
rev: "5.13.2"
hooks:
- id: "isort"

- repo: "https://github.com/pycqa/flake8"
rev: "7.1.0"
rev: "7.1.1"
hooks:
- id: "flake8"
additional_dependencies:
- "flake8-bugbear==24.4.26"

- repo: "https://github.com/editorconfig-checker/editorconfig-checker.python"
rev: "2.7.3"
hooks:
- id: "editorconfig-checker"

- repo: "https://github.com/python-jsonschema/check-jsonschema"
rev: "0.29.1"
hooks:
- id: "check-dependabot"
- id: "check-github-workflows"
- id: "check-readthedocs"

- repo: "https://github.com/rhysd/actionlint"
rev: "v1.7.1"
hooks:
- id: "actionlint"

- repo: "https://github.com/kurtmckee/pre-commit-hooks"
rev: "v0.1.1"
hooks:
- id: "verify-consistent-pyproject-toml-python-requirements"
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sphinx:
configuration: "docs/conf.py"
fail_on_warning: true

# Enforce specific versions of Sphinx.
# Use exact package and dependency versions.
python:
install:
- requirements: "requirements/docs.txt"
- requirements: "requirements/docs/requirements.txt"
2 changes: 1 addition & 1 deletion CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Contributors
============

feedparser is written and maintained by `Kurt McKee <http://kurtmckee.org/>`_.
feedparser is written and maintained by `Kurt McKee <https://kurtmckee.org/>`_.
It was originally written by Mark Pilgrim.

Many people have contributed to feedparser. They are listed below in
Expand Down
26 changes: 13 additions & 13 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ feedparser and its unit tests are released under the following license:

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

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

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Expand All @@ -38,19 +38,19 @@ released under the following license:

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

Copyright (C) 2010-2023 Kurt McKee <[email protected]>
Copyright (C) 2010-2024 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,
PostScript, RTF and so forth) with or without modification, are permitted
provided that the following conditions are met:

* Redistributions of source code (Sphinx ReST) must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in compiled form (converted to HTML, PDF, PostScript, RTF and
other formats) must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
* Redistributions of source code (Sphinx ReST) must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in compiled form (converted to HTML, PDF, PostScript, RTF and
other formats) must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.

THIS DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of feedparser.
Copyright 2010-2023 Kurt McKee <[email protected]>
Copyright 2010-2024 Kurt McKee <[email protected]>
Copyright 2002-2008 Mark Pilgrim
Released under the BSD 2-clause license.

Expand Down
9 changes: 9 additions & 0 deletions changelog.d/20240806_090500_kurtmckee_updates.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Python support
--------------

* Drop Python 3.8 support.

Project development
-------------------

* Migrate to Poetry for cross-platform test suite dependency locking.
46 changes: 11 additions & 35 deletions docs/advanced.rst
Original file line number Diff line number Diff line change
@@ -1,38 +1,14 @@
Advanced Features
#################

.. toctree::
:maxdepth: 2

date-parsing
html-sanitization
content-normalization
namespace-handling
resolving-relative-links
version-detection
character-encoding
bozo













.. COMMENT: <section id="advanced.lang">
<?dbhtml filename="language-detection.html"?>
<sectioninfo>
<abstract>
<title/>
<para>xxx</para>
</abstract>
</sectioninfo>
<title>Language Detection</title>
<para>xxx</para>
</section>
.. toctree::
:maxdepth: 2

date-parsing
html-sanitization
content-normalization
namespace-handling
resolving-relative-links
version-detection
character-encoding
bozo
14 changes: 7 additions & 7 deletions docs/annotated-examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
Annotated Examples
##################

.. toctree::
:maxdepth: 2
.. toctree::
:maxdepth: 2

annotated-atom10
annotated-atom03
annotated-rss20
annotated-rss20-dc
annotated-rss10
annotated-atom10
annotated-atom03
annotated-rss20
annotated-rss20-dc
annotated-rss10
18 changes: 9 additions & 9 deletions docs/basic.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Basic Features
##############

.. toctree::
:maxdepth: 2
.. toctree::
:maxdepth: 2

introduction
common-rss-elements
common-atom-elements
atom-detail
uncommon-rss
uncommon-atom
basic-existence
introduction
common-rss-elements
common-atom-elements
atom-detail
uncommon-rss
uncommon-atom
basic-existence
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Project information
project = "feedparser"
copyright = "2010-2023 Kurt McKee, 2004-2008 Mark Pilgrim"
copyright = "2010-2024 Kurt McKee, 2004-2008 Mark Pilgrim"
language = "en"

# General configuration
Expand Down
64 changes: 32 additions & 32 deletions docs/date-parsing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,36 @@ History of Date Formats

Here is a brief history of feed date formats:

- :abbr:`CDF (Channel Definition Format)` states that all date values must
conform to ISO 8601:1988. ISO 8601:1988 is not a freely
available specification, but a brief (non-normative) description of the date
formats it describes is available here: `ISO 8601:1988 Date/Time Representations <http://hydracen.com/dx/iso8601.htm>`_.
- :abbr:`CDF (Channel Definition Format)` states that all date values must
conform to ISO 8601:1988. ISO 8601:1988 is not a freely
available specification, but a brief (non-normative) description of the date
formats it describes is available here: `ISO 8601:1988 Date/Time Representations <http://hydracen.com/dx/iso8601.htm>`_.

- :abbr:`RSS (Rich Site Summary)` 0.90 has no date elements.
- :abbr:`RSS (Rich Site Summary)` 0.90 has no date elements.

- Netscape :abbr:`RSS (Rich Site Summary)` 0.91 does not specify a date format,
but examples within the specification show :abbr:`RFC (Request For Comments)`
822-style dates with 4-digit years.
- Netscape :abbr:`RSS (Rich Site Summary)` 0.91 does not specify a date format,
but examples within the specification show :abbr:`RFC (Request For Comments)`
822-style dates with 4-digit years.

- Userland :abbr:`RSS (Rich Site Summary)` 0.91 states, "All date-times in
:abbr:`RSS (Rich Site Summary)` conform to the Date and Time Specification of
:abbr:`RFC (Request For Comments)` 822." `RFC 822 <http://www.ietf.org/rfc/rfc822.txt>`_
mandates 2-digit years; it does not allow 4-digit years.
- Userland :abbr:`RSS (Rich Site Summary)` 0.91 states, "All date-times in
:abbr:`RSS (Rich Site Summary)` conform to the Date and Time Specification of
:abbr:`RFC (Request For Comments)` 822." `RFC 822 <http://www.ietf.org/rfc/rfc822.txt>`_
mandates 2-digit years; it does not allow 4-digit years.

- :abbr:`RSS (Rich Site Summary)` 1.0 states that all date elements must
conform to `W3CDTF <http://www.w3.org/TR/NOTE-datetime>`_,
which is a profile of ISO 8601:1988.
- :abbr:`RSS (Rich Site Summary)` 1.0 states that all date elements must
conform to `W3CDTF <http://www.w3.org/TR/NOTE-datetime>`_,
which is a profile of ISO 8601:1988.

- :abbr:`RSS (Rich Site Summary)` 2.0 states, "All date-times in :abbr:`RSS (Rich Site Summary)` conform to the Date and Time Specification of RFC 822, with the exception that the year may be expressed with two characters or four characters (four preferred)."
- :abbr:`RSS (Rich Site Summary)` 2.0 states, "All date-times in :abbr:`RSS (Rich Site Summary)` conform to the Date and Time Specification of RFC 822, with the exception that the year may be expressed with two characters or four characters (four preferred)."

- Atom 0.3 states that all date elements must conform to
`W3CDTF <http://www.w3.org/TR/NOTE-datetime>`_.
- Atom 0.3 states that all date elements must conform to
`W3CDTF <http://www.w3.org/TR/NOTE-datetime>`_.

- Atom 1.0 states that all date elements "MUST conform to the date-time
production in `RFC 3339 <http://www.ietf.org/rfc/rfc3339.txt>`_.
In addition, an uppercase T character MUST be used to separate date and time,
and an uppercase Z character MUST be present in the absence of a numeric time
zone offset."
- Atom 1.0 states that all date elements "MUST conform to the date-time
production in `RFC 3339 <http://www.ietf.org/rfc/rfc3339.txt>`_.
In addition, an uppercase T character MUST be used to separate date and time,
and an uppercase Z character MUST be present in the absence of a numeric time
zone offset."


Recognized Date Formats
Expand Down Expand Up @@ -109,15 +109,15 @@ abbreviations defined in :abbr:`RFC (Request For Comments)` 822. In addition,
:program:`Universal Feed Parser` recognizes the following invalid timezones:


- ``AT`` is treated as ``AST``
- ``AT`` is treated as ``AST``

- ``ET`` is treated as ``EST``
- ``ET`` is treated as ``EST``

- ``CT`` is treated as ``CST``
- ``CT`` is treated as ``CST``

- ``MT`` is treated as ``MST``
- ``MT`` is treated as ``MST``

- ``PT`` is treated as ``PST``
- ``PT`` is treated as ``PST``



Expand Down Expand Up @@ -171,8 +171,8 @@ date string will still be available in the appropriate element in the results
dictionary.


.. tip::
.. tip::

If you write a new date handler, you are encouraged (but not required) to
`submit a patch <http://sourceforge.net/projects/feedparser/>`_ so it can be
integrated into the next version of :program:`Universal Feed Parser`.
If you write a new date handler, you are encouraged (but not required) to
`submit a patch <http://sourceforge.net/projects/feedparser/>`_ so it can be
integrated into the next version of :program:`Universal Feed Parser`.
Loading