Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 811573 - dev-python/setuptools_scm_git_archive-1.1-r2 fails with dev-python/setuptools_scm > 6.0.1 - TypeError: can't use a string pattern on a bytes-like object
Summary: dev-python/setuptools_scm_git_archive-1.1-r2 fails with dev-python/setuptools...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Pacho Ramos
URL: https://github.com/Changaco/setuptool...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-04 09:45 UTC by Toralf Förster
Modified: 2021-10-20 18:09 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.34 KB, text/plain)
2021-09-04 09:45 UTC, Toralf Förster
Details
dev-python:pikepdf-2.16.1:20210904-093758.log (dev-python:pikepdf-2.16.1:20210904-093758.log,4.58 KB, text/plain)
2021-09-04 09:45 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,293.36 KB, text/plain)
2021-09-04 09:45 UTC, Toralf Förster
Details
environment (environment,114.20 KB, text/plain)
2021-09-04 09:45 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,34.06 KB, application/x-bzip)
2021-09-04 09:45 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,26.01 KB, application/x-bzip)
2021-09-04 09:45 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2021-09-04 09:45:10 UTC
  File "/usr/lib/python3.9/site-packages/setuptools_scm/version.py", line 20, in _parse_version_tag
    match = config.tag_regex.match(tagstring)
TypeError: expected string or bytes-like object
 * ERROR: dev-python/pikepdf-2.16.1::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no_multilib_hardened-j4-20210901-200247

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-11.2.0 *
clang version 12.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/12/bin
/usr/lib/llvm/12
12.0.1
Python 3.9.7
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.54.0
  [2]   rust-1.54.0 *
The Glorious Glasgow Haskell Compilation System, version 8.10.4

  HEAD of ::gentoo
commit 629af9e682b7e86354122c438ddaf2ac9f177fae
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sat Sep 4 08:36:30 2021 +0000

    2021-09-04 08:36:28 UTC

emerge -qpvO dev-python/pikepdf
[ebuild  N    ] dev-python/pikepdf-2.16.1  USE="-test" PYTHON_TARGETS="python3_9 -python3_8 -python3_10"
Comment 1 Toralf Förster gentoo-dev 2021-09-04 09:45:11 UTC
Created attachment 737449 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-09-04 09:45:12 UTC
Created attachment 737452 [details]
dev-python:pikepdf-2.16.1:20210904-093758.log
Comment 3 Toralf Förster gentoo-dev 2021-09-04 09:45:14 UTC
Created attachment 737455 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2021-09-04 09:45:16 UTC
Created attachment 737458 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2021-09-04 09:45:17 UTC
Created attachment 737461 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-09-04 09:45:19 UTC
Created attachment 737464 [details]
temp.tar.bz2
Comment 7 Louis Sautier (sbraz) gentoo-dev 2021-09-08 23:17:25 UTC
Let's see what upstream say at https://github.com/Changaco/setuptools_scm_git_archive/issues/19#issuecomment-912952427

In the meantime, downgrading setuptools_scm to 6.0.1-r1 is a workaround.
Comment 8 Marek Szuba archtester gentoo-dev 2021-09-10 10:04:03 UTC
I have just observed (on both amd64 and riscv) that dev-python/setuptools_scm_git_archive-1.1-r2 fails tests with dev-python/setuptools_scm-6.3.0-r1 present, with the same error. They do pass against setuptools_scm-6.0.1-r1.

BTW. This should probably be a setuptools_scm_git_archive issue, not a pikepdf one.
Comment 9 Louis Sautier (sbraz) gentoo-dev 2021-09-10 11:29:08 UTC
You are right, I renamed the bug. I guess we need to require an older setuptools_scm version to work around this
Comment 10 Larry the Git Cow gentoo-dev 2021-09-10 11:45:54 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a5d15943773df5714949633c16ae0b7303d3337

commit 7a5d15943773df5714949633c16ae0b7303d3337
Author:     Louis Sautier <sbraz@gentoo.org>
AuthorDate: 2021-09-10 11:41:54 +0000
Commit:     Louis Sautier <sbraz@gentoo.org>
CommitDate: 2021-09-10 11:44:45 +0000

    dev-python/setuptools_scm_git_archive: require setuptools_scm<6.1.0
    
    Bug: https://bugs.gentoo.org/811573
    Signed-off-by: Louis Sautier <sbraz@gentoo.org>

 ...t_archive-1.1-r2.ebuild => setuptools_scm_git_archive-1.1-r3.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 11 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2021-09-11 04:54:00 UTC
It looks like setuptools_scm (dependency of setuptools_scm_git_archive) have pushed a fix for this problem:
https://github.com/pypa/setuptools_scm/commit/e2d9f973271d78fec75bd52dde66c89c0392afa8

Could you check if this fix does indeed fix our problem?
Comment 12 Louis Sautier (sbraz) gentoo-dev 2021-09-13 21:58:12 UTC
(In reply to Arthur Zamarin from comment #11)
> It looks like setuptools_scm (dependency of setuptools_scm_git_archive) have
> pushed a fix for this problem:
> https://github.com/pypa/setuptools_scm/commit/
> e2d9f973271d78fec75bd52dde66c89c0392afa8
> 
> Could you check if this fix does indeed fix our problem?

Tests still fail with setuptools_scm 6.3.2
Comment 13 Norman Back 2021-10-16 06:38:54 UTC
(In reply to Louis Sautier (sbraz) from comment #12)
> (In reply to Arthur Zamarin from comment #11)
> > It looks like setuptools_scm (dependency of setuptools_scm_git_archive) have
> > pushed a fix for this problem:
> > https://github.com/pypa/setuptools_scm/commit/
> > e2d9f973271d78fec75bd52dde66c89c0392afa8
> > 
> > Could you check if this fix does indeed fix our problem?
> 
> Tests still fail with setuptools_scm 6.3.2

I'm puzzled. I copied setuptools_scm_git_archive-1.1-r3 into my local portage as 1.1-r4, removing the setuptools_scm restriction and re-emerged. genlop -l shows:

     Sat Oct 16 07:31:32 2021 >>> dev-python/setuptools_scm-6.3.2
     Sat Oct 16 07:31:43 2021 >>> dev-python/setuptools_scm_git_archive-1.1-r4
     Sat Oct 16 07:32:50 2021 >>> dev-python/pikepdf-2.16.1
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-16 06:39:37 UTC
(In reply to Norman Back from comment #13)
> (In reply to Louis Sautier (sbraz) from comment #12)
> > (In reply to Arthur Zamarin from comment #11)
> > > It looks like setuptools_scm (dependency of setuptools_scm_git_archive) have
> > > pushed a fix for this problem:
> > > https://github.com/pypa/setuptools_scm/commit/
> > > e2d9f973271d78fec75bd52dde66c89c0392afa8
> > > 
> > > Could you check if this fix does indeed fix our problem?
> > 
> > Tests still fail with setuptools_scm 6.3.2
> 
> I'm puzzled. I copied setuptools_scm_git_archive-1.1-r3 into my local
> portage as 1.1-r4, removing the setuptools_scm restriction and re-emerged.
> genlop -l shows:
> 
>      Sat Oct 16 07:31:32 2021 >>> dev-python/setuptools_scm-6.3.2
>      Sat Oct 16 07:31:43 2021 >>>
> dev-python/setuptools_scm_git_archive-1.1-r4
>      Sat Oct 16 07:32:50 2021 >>> dev-python/pikepdf-2.16.1

You tried the test suite?
Comment 15 Norman Back 2021-10-16 08:32:19 UTC
(In reply to Sam James from comment #14)
> (In reply to Norman Back from comment #13)
> > (In reply to Louis Sautier (sbraz) from comment #12)
> > > (In reply to Arthur Zamarin from comment #11)
> > > > It looks like setuptools_scm (dependency of setuptools_scm_git_archive) have
> > > > pushed a fix for this problem:
> > > > https://github.com/pypa/setuptools_scm/commit/
> > > > e2d9f973271d78fec75bd52dde66c89c0392afa8
> > > > 
> > > > Could you check if this fix does indeed fix our problem?
> > > 
> > > Tests still fail with setuptools_scm 6.3.2
> > 
> > I'm puzzled. I copied setuptools_scm_git_archive-1.1-r3 into my local
> > portage as 1.1-r4, removing the setuptools_scm restriction and re-emerged.
> > genlop -l shows:
> > 
> >      Sat Oct 16 07:31:32 2021 >>> dev-python/setuptools_scm-6.3.2
> >      Sat Oct 16 07:31:43 2021 >>>
> > dev-python/setuptools_scm_git_archive-1.1-r4
> >      Sat Oct 16 07:32:50 2021 >>> dev-python/pikepdf-2.16.1
> 
> You tried the test suite?

I don't think I have access to that.
Comment 16 Norman Back 2021-10-16 15:06:41 UTC
(In reply to Sam James from comment #14)
<snip>
> 
> You tried the test suite?

My point is that the fix to dev-python/setuptools_scm-6.3.2 allows the merge of 
setuptools_scm_git_archive-1.1-r3 on my box when the restiction has been removed.
Comment 17 Louis Sautier (sbraz) gentoo-dev 2021-10-16 17:53:46 UTC
(In reply to Norman Back from comment #16)
> (In reply to Sam James from comment #14)
> <snip>
> > 
> > You tried the test suite?
> 
> My point is that the fix to dev-python/setuptools_scm-6.3.2 allows the merge
> of 
> setuptools_scm_git_archive-1.1-r3 on my box when the restiction has been
> removed.

I just checked my Dockerfile from https://github.com/Changaco/setuptools_scm_git_archive/issues/19#issuecomment-915634768 and it seems to work now. I'll try the test suite again and unmask if I can confirm that everything works correctly.
Comment 18 Larry the Git Cow gentoo-dev 2021-10-20 18:02:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f9fd5e77afd20e2f3a449a9149bfb591e4a28c9

commit 3f9fd5e77afd20e2f3a449a9149bfb591e4a28c9
Author:     Louis Sautier <sbraz@gentoo.org>
AuthorDate: 2021-10-20 17:54:57 +0000
Commit:     Louis Sautier <sbraz@gentoo.org>
CommitDate: 2021-10-20 18:02:00 +0000

    dev-python/setuptools_scm_git_archive: lift setuptools_scm restrict.
    
    setuptools_scm 6.3.2 works fine with setuptools_scm_git_archive.
    
    Closes: https://bugs.gentoo.org/811573
    Signed-off-by: Louis Sautier <sbraz@gentoo.org>

 ...t_archive-1.1-r3.ebuild => setuptools_scm_git_archive-1.1-r4.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)