#12 Add _ast to hgdemandimport ignore list
Merged 3 years ago by pstodulk. Opened 3 years ago by pviktori.
rpms/ pviktori/mercurial hgdemandimport_ast  into  master

@@ -0,0 +1,11 @@ 

+ diff -U3 -r mercurial-5.4-orig/hgdemandimport/__init__.py mercurial-5.4/hgdemandimport/__init__.py

+ --- mercurial-5.4-orig/hgdemandimport/__init__.py	2020-05-01 18:17:29.000000000 +0200

+ +++ mercurial-5.4/hgdemandimport/__init__.py	2020-09-01 18:04:40.540165952 +0200

+ @@ -56,6 +56,7 @@

+      '__builtin__',

+      'builtins',

+      'urwid.command_map',  # for pudb

+ +    '_ast', # https://bugzilla.redhat.com/show_bug.cgi?id=1871992

+  }

+  

+  _pypy = '__pypy__' in sys.builtin_module_names

file modified
+8 -1
@@ -1,7 +1,7 @@ 

  Summary: Mercurial -- a distributed SCM

  Name: mercurial

  Version: 5.4

- Release: 3%{?dist}

+ Release: 4%{?dist}

  

  # Release: 1.rc1%%{?dist}

  
@@ -14,6 +14,7 @@ 

  Source0: http://www.selenic.com/mercurial/release/%{name}-%{upstreamversion}.tar.gz

  Source1: mercurial-site-start.el

  Patch2: 0001-setup-hg3.patch

+ Patch3: hgdemandimport_ast.patch

  BuildRequires: python2-devel python3-devel bash-completion

  BuildRequires: emacs-nox emacs-el pkgconfig gettext python3-docutils

  BuildRequires: gcc
@@ -133,6 +134,8 @@ 

  # sed -ri 's|python\b|python2|' %{_builddir}/%{name}-%{version}/Makefile %{_builddir}/%{name}-%{version}/doc/Makefile

  %patch2 -p1 -b .create_hg3

  

+ %patch3 -p1

+ 

  %build

  # copy hg to hg2/hg3 to be able to create /usr/bin/hg(2|3) script

  cp -a hg hg2
@@ -332,6 +335,10 @@ 

  

  

  %changelog

+ * Wed Sep 02 2020 Petr Viktorin <pviktori@redhat.com> - 5.4-4

+ - Add _ast to hgdemandimport ignore list

+   Works around: BZ#1871992

+ 

  * Mon Aug 10 2020 Petr Stodulka <pstodulk@redhat.com> - 5.4-3

  - Fix upgrade from previous mercurial 4.9 causing broken alternatives for

    mercurial

I was able to build Mercurial on Python 3.9 with this one-line patch.

I'm not sure whether to call this a workaround or a fix; that depends on how the CPython issue is solved.

Seems ok and works. Thanks guys!

Pull-Request has been merged by pstodulk

3 years ago

I've merged this to f33 as well and built.

@churchyard Thanks! I've missed that one.