bug#50853: python-feedparser

2021-11-09 Thread Vinicius Monego
Em seg, 2021-09-27 às 22:00 +0200, Lio Novelli escreveu:
> This patch provides a bit more than just bugfix:
>  - Add two python package definitions sgmllib3k, sgqlc
>  - updates python-feedparser

Hi,

Could you format these patches with git-format-patch and submit as a
series of 4 to guix-patc...@gnu.org ?

My suggestion is:

1. Add python-sgmllib3k.
2. Add python-sgqlc.
3. Add dependency on python-sgmllib3k for python-feedparser.
4. Update python-feedparser.

See commit messages in git log for examples on how to write commit
messages for these changes.

> +(synopsis "A quick and dirty port of python2-sgmllib old
> module.")

Synopses should not end with full stop. You can use guix lint to check
for common linting mistakes.

> +(description
> + "An easy to use GraphQL client.")

Descriptions should be full sentences. e.g. "This package provides an
easy to use GraphQL client.".

See Submitting Patches in the documentation for more info:
https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html






bug#50853: python-feedparser

2021-09-27 Thread Lio Novelli
This patch provides a bit more than just bugfix:
 - Add two python package definitions sgmllib3k, sgqlc
 - updates python-feedparser
From bff17f280636f91fb79fbfa508ee95ec42f33bc2 Mon Sep 17 00:00:00 2001
From: l3n 
Date: Mon, 27 Sep 2021 21:57:36 +0200
Subject: [PATCH] Add two python package definitions sgmllib3k, sgqlc and
 update feedparser.

---
 gnu/packages/python-xyz.scm | 51 +
 gnu/packages/web.scm|  6 +++--
 2 files changed, 55 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 86b1cdc2b1..d4ba1781cd 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -108,6 +108,7 @@
 ;;; Copyright © 2021 Simon Streit 
 ;;; Copyright © 2021 Daniel Meißner 
 ;;; Copyright © 2021 Pradana Aumars 
+;;; Copyright © 2021 Liopold D. Novelli 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27116,3 +27117,53 @@ platform-specific directories, e.g. the ``user data dir''.")
  "This package provides the @code{python-box} Python module.
 It implements advanced Python dictionaries with dot notation access.")
 (license license:expat)))
+
+(define-public python-sgmllib3k
+  (package
+(name "python-sgmllib3k")
+(version "1.0.0")
+(source
+ (origin
+   (method url-fetch)
+   (uri (pypi-uri "sgmllib3k" version ".tar.gz"))
+   (sha256
+(base32
+ "1s8jm3dgqabgf8x96931scji679qkhvczlv3qld4qxpsicfgns3q"
+(build-system python-build-system)
+(arguments
+ '(#:tests? #f))
+(home-page
+ "https://github.com/conda-forge/sgmllib3k-feedstock;)
+(synopsis "A quick and dirty port of python2-sgmllib old module.")
+(description
+ "sgmllib was dropped in Python 3. For those depending on it, that’s somewhat unfortunate. This is a quick and dirty port of this old module. I just ran 2to3 on it and published it. I don’t intend to maintain it, so it might be a good idea to eventually think about finding another module to use.")
+(license license:bsd-3)))
+
+(define-public python-sgqlc
+  (package
+(name "python-sgqlc")
+(version "14.1")
+(source
+  (origin
+(method url-fetch)
+(uri (pypi-uri "sgqlc" version))
+(sha256
+ (base32
+  "0ba7s0n5w6fmdn7gd638k1dq5pydzgd5hl6krw1f9xsci3qlldki"
+(build-system python-build-system)
+(arguments
+ '(#:tests? #f)) ; The tests are not distributed
+(native-inputs
+ `(("python-sphinx" ,python-sphinx)
+   ("python-sphinx-argparse" ,python-sphinx-argparse)
+   ("python-websockets" ,python-websockets)
+ ))
+(propagated-inputs
+ `(("python-requests" ,python-requests)
+   ))
+(home-page "https://github.com/profusion/sgqlc;)
+(synopsis "An easy to use GraphQL client.")
+(description
+ "An easy to use GraphQL client.")
+(license "ISC License")))
+
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index d7bbd7489b..16200ae649 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -4764,15 +4764,17 @@ their web site.")
 (define-public python-feedparser
   (package
 (name "python-feedparser")
-(version "6.0.2")
+(version "6.0.8")
 (source
  (origin
(method url-fetch)
(uri (pypi-uri "feedparser" version ".tar.gz"))
(sha256
 (base32
- "0x0hm9brh3j71645pydvlkrwxaaca9dnwd7xahwjyjaz882s200v"
+ "0qcnkyjjfj5gg5rhd1j4zzlqx5h34bma18zwgj68q95b0l543q2w"
 (build-system python-build-system)
+(propagated-inputs
+ `(("python-sgmllib3k" ,python-sgmllib3k)))
 (arguments
  '(#:tests? #f))
 (home-page
-- 
2.33.0



bug#50853: python-feedparser

2021-09-27 Thread Lio Novelli
Feedparser module is missing sgmllib dependency:

>>> import feedparser
Traceback (most recent call last):
  File "", line 1, in 
  File

"/home/len/.guix-profile/lib/python3.8/site-packages/feedparser/__init__.py",
line 28, in  from .api import parse File
"/home/len/.guix-profile/lib/python3.8/site-packages/feedparser/api.py",
line 36, in  from .html import _BaseHTMLProcessor File

"/home/len/.guix-profile/lib/python3.8/site-packages/feedparser/html.py",
line 31, in  from .sgml import * File

"/home/len/.guix-profile/lib/python3.8/site-packages/feedparser/sgml.py",
line 30, in  import sgmllib ModuleNotFoundError: No
   module named 'sgmllib'

From https://pypi.org/project/sgmllib3k/

https://github.com/conda-forge/sgmllib3k-feedstock

I'll try to provide the patch but this will be my first one and I'm
having some issues getting through (understanding) guix documentation
on submitting bugs and patches.