Bug 2099823

Summary: Please branch and build python-m2r for EPEL9
Product: [Fedora] Fedora Reporter: Robert-Andr茅 Mauchin 馃惂 <eclipseo>
Component: python-m2rAssignee: Nikola Forr贸 <nforro>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 37CC: carl, mattias.ellert, michel, nforro, python-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-m2r-0.3.1-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-27 01:38:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2082019, 2133567    
Attachments:
Description Flags
The patch applied for the successful scratch build none

Description Robert-Andr茅 Mauchin 馃惂 2022-06-21 18:55:46 UTC
Hi,

m2r is a dependency of python-Automat, which I intend to build on EPEL8/9.

Could you please branch and build it so I can build Automat?

Comment 1 Nikola Forr贸 2022-06-22 06:05:41 UTC
Sure.

Comment 2 Robert-Andr茅 Mauchin 馃惂 2022-07-10 15:05:21 UTC
Pretty please, could you look into it?

Comment 3 Nikola Forr贸 2022-07-12 14:03:51 UTC
I already requested the branch, but I can't build it because it's blocked by python-mistune.

Comment 4 Ben Cotton 2022-08-09 13:39:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 5 Michel Lind 2022-10-10 21:41:41 UTC
*** Bug 2133569 has been marked as a duplicate of this bug. ***

Comment 6 Michel Lind 2022-10-10 21:49:48 UTC
Looks like Python SIG has access to mistune, so I've just requested a branch there

Comment 7 Mattias Ellert 2023-07-12 23:38:03 UTC
(In reply to Nikola Forr贸 from comment #3)
> I already requested the branch, but I can't build it because it's blocked by
> python-mistune.

python-m2r uses python-mistune08, not python-mistune.

python-mistune08 is already available in EPEL 9.

There is a monor glitch though:

On EPEL 9:

# m2r --help
usage: m2r [-h] [--overwrite] [--dry-run] [--no-underscore-emphasis]
           [--parse-relative-links] [--anonymous-references]
           [--disable-inline-math]
           [input_file ...]

positional arguments:
  input_file            files to convert to reST format

optional arguments:
  -h, --help            show this help message and exit
  --overwrite           overwrite output file without confirmaion
  --dry-run             print conversion result and not save output file
  --no-underscore-emphasis
                        do not use underscore (_) for emphasis
  --parse-relative-links
                        parse relative links into ref or doc directives
  --anonymous-references
                        use anonymous references in generated rst
  --disable-inline-math
                        disable parsing inline math


On Fedora:

# m2r --help
usage: m2r [-h] [--overwrite] [--dry-run] [--no-underscore-emphasis]
           [--parse-relative-links] [--anonymous-references]
           [--disable-inline-math]
           [input_file ...]

positional arguments:
  input_file            files to convert to reST format

options:
  -h, --help            show this help message and exit
  --overwrite           overwrite output file without confirmaion
  --dry-run             print conversion result and not save output file
  --no-underscore-emphasis
                        do not use underscore (_) for emphasis
  --parse-relative-links
                        parse relative links into ref or doc directives
  --anonymous-references
                        use anonymous references in generated rst
  --disable-inline-math
                        disable parsing inline math


I.e. the help text says "optional arguments:" instead of "options:". Which should not be a big problem. However, one of the tests checks that "m2r --help" contains some specifix strings:

    def test_no_file(self):
        p = subprocess.Popen(
            [sys.executable, '-m', 'm2r'],
            stdout=subprocess.PIPE,
        )
        p.wait()
        self.assertEqual(p.returncode, 0)
        with p.stdout as buffer:
            message = buffer.read().decode()
        self.assertIn('usage', message)
        self.assertIn('underscore-emphasis', message)
        self.assertIn('anonymous-references', message)
        self.assertIn('inline-math', message)
        self.assertIn('options:', message)


As can be seen here, one of the strings that it looks for is "options:", which causes the test to fail.
Removing this line (or replacing it wit a chech for something else) makes the test succeed and the package build.

Here is a link to a successful screatch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=103288047
The patch used is a modified version of the PR: https://github.com/miyakogi/m2r/pull/62

Comment 8 Mattias Ellert 2023-07-12 23:39:38 UTC
Created attachment 1975502 [details]
The patch applied for the successful scratch build

Comment 9 Mattias Ellert 2023-07-13 16:28:18 UTC
Pull Request:

https://src.fedoraproject.org/rpms/python-m2r/pull-request/3

Comment 10 Nikola Forr贸 2023-07-18 17:02:44 UTC
> python-m2r uses python-mistune08, not python-mistune

python-mistune08 didn't exist at the time of my comment :)

Thanks for the PR, let me comment there.

Comment 12 Fedora Update System 2023-07-18 17:29:23 UTC
FEDORA-EPEL-2023-440c007b72 has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-440c007b72

Comment 13 Fedora Update System 2023-07-19 04:12:54 UTC
FEDORA-EPEL-2023-440c007b72 has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-440c007b72

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2023-07-27 01:38:55 UTC
FEDORA-EPEL-2023-440c007b72 has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.