Re: Python (was: Merging core-updates?)

2023-02-19 Thread Kaelyn
--- Original Message ---
On Sunday, February 19th, 2023 at 10:08 PM, Andreas Enge  
wrote:


> 
> There is poezio, which has a new release (0.14), with a license change to
> gpl3+. I updated python-slixmpp, a dependency of poezio, but this is not
> enough: The newest poezio still depends on python-potr, which in turn depends
> on python-pycrypto.

It was mentioned recently that python-pycryptodome is / should be a drop-in 
replacement for python-pycrypto (it is also says that in the package 
description); perhaps replace the python-pycrypto input with 
python-pycryptodome for python-potr, with a snippet to change the pycrypto 
dependency to pycryptodome in python-potr's setup.py? After taking a peek at 
the poezio and python-potr git repos, the main alternative I can see to 
patching the dependency is to remove python-potr from poezio's inputs since 
python-potr is listed as an optional dependency in poezio's setup.py (for its 
OTR plugin).

Cheers,
Kaelyn

> 
> Andreas



Re: Architecture support

2023-02-19 Thread Andreas Enge
Hello,

Am Fri, Feb 17, 2023 at 04:49:33PM + schrieb Christopher Baines:
> I'll keep an eye on the core-updates state on data.qa.guix.gnu.org and
> submit some builds for core things manually when the derivations are
> available.

the bootstrapping of core-updates seems to be in place, so maybe you could
launch "hello" so that people can work on issues further down (concerning
particular languages and packages, for instance) without having to do the
bootstrap for themselves?

Andreas




Re: Python (was: Merging core-updates?)

2023-02-19 Thread Andreas Enge
Hello Ricardo,

python-graphviz does not pass its tests any more in core-updates, and
I can trace it back to your commit 3d388fe3d0475f2e991ae061cc1364529a97af42.
Adding python-mock back to native-inputs fixes it.

Or maybe python-pytest-mock should have python-mock as propagated input?
It calls itself a "Thin-wrapper around the mock package for easier use
with py.test", but does not even have python-mock as any kind of input.

Thanks for your help,

Andreas




Re: Python (was: Merging core-updates?)

2023-02-19 Thread Andreas Enge
There is poezio, which has a new release (0.14), with a license change to
gpl3+. I updated python-slixmpp, a dependency of poezio, but this is not
enough: The newest poezio still depends on python-potr, which in turn depends
on python-pycrypto.

Andreas




Re: Python (was: Merging core-updates?)

2023-02-19 Thread Andreas Enge
Am Sun, Feb 19, 2023 at 04:50:37PM +0100 schrieb Lars-Dominik Braun:
> The rest seems to be alive
> without any references to python-pycrypto. So these should be upgradable
> and then we can drop python-pycrypto.

I more or less got rid of one of them: python-ledgerblue.
I have updated it from 0.1.16 of 2016 (!) to 0.1.44 of last month.
The package builds, but the tests fail. I did not find an intermediate
commit that would not depend on python-pycrypto, but pass its tests.
(Well, I did not check each and every of them either.)

I pushed nevertheless, since the situation is not worse than before.
Maybe someone more knowledgeable could have a look and see whether the
tests can be fixed or should be disabled. Here is the error message:
running build_ext
usage: -c [-h] [--targetId TARGETID] [--rootPrivateKey ROOTPRIVATEKEY]
  [--apdu] [--deployLegacy]
-c: error: unrecognized arguments: test
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "python" arguments: ("-c" "import 
setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', 
open)(__file__);code=f.read().replace('\\r\\n', 
'\\n');f.close();exec(compile(code, __file__, 'exec'))" "test") exit-status: 2 
term-signal: #f stop-signal: #f>
phase `check' failed after 1.2 seconds
command "python" "-c" "import setuptools, 
tokenize;__file__='setup.py';f=getattr(tokenize, 'open', 
open)(__file__);code=f.read().replace('\\r\\n', 
'\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with 
status 2
builder for 
`/gnu/store/9kfks35xhr6abgkmpmy0la2m2nrwg6i1-python-ledgerblue-0.1.44.drv' 
failed with exit code 1
build of 
/gnu/store/9kfks35xhr6abgkmpmy0la2m2nrwg6i1-python-ledgerblue-0.1.44.drv failed

Andreas




Re: Python

2023-02-19 Thread Andreas Enge
And yet another one: python-testtool

Tests running...
==
FAIL: testtools.tests.test_testresult.TestNonAsciiResults.test_syntax_error
--
Traceback (most recent call last):
  File 
"/tmp/guix-build-python-testtools-2.5.0.drv-0/testtools-2.5.0/testtools/tests/test_testresult.py",
 line 2675, in test_syntax_error
self.assertIn(self._as_output(
  File 
"/tmp/guix-build-python-testtools-2.5.0.drv-0/testtools-2.5.0/testtools/testcase.py",
 line 399, in assertIn
self.assertThat(haystack, Contains(needle), message)
  File 
"/tmp/guix-build-python-testtools-2.5.0.drv-0/testtools-2.5.0/testtools/testcase.py",
 line 480, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: '  File "", line 1\nf(a, b 
c)\n ^\nSyntaxError: ' not in 'Tests 
running...\n==\nERROR:
 
test_syntax_error.Test.runTest\n--\nTraceback
 (most recent call last):\n  File 
"/tmp/guix-build-python-testtools-2.5.0.drv-0/TestNonAsciiResults3xz34fmg/test_syntax_error.py",
 line 6, in runTest\nexec (\'f(a, b c)\')\n  File "", line 1\n
f(a, b c)\n ^^^\nSyntaxError: invalid syntax. Perhaps you forgot a 
comma?\n\nRan 1 test in 0.001s\nFAILED (failures=1)\n'
==
FAIL: 
testtools.tests.test_testresult.TestNonAsciiResultsWithUnittest.test_syntax_error
--
Traceback (most recent call last):
  File 
"/tmp/guix-build-python-testtools-2.5.0.drv-0/testtools-2.5.0/testtools/tests/test_testresult.py",
 line 2675, in test_syntax_error
self.assertIn(self._as_output(
  File 
"/tmp/guix-build-python-testtools-2.5.0.drv-0/testtools-2.5.0/testtools/testcase.py",
 line 399, in assertIn
self.assertThat(haystack, Contains(needle), message)
  File 
"/tmp/guix-build-python-testtools-2.5.0.drv-0/testtools-2.5.0/testtools/testcase.py",
 line 480, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: '  File "", line 1\nf(a, b 
c)\n ^\nSyntaxError: ' not in 
'E\n==\nERROR:
 runTest 
(test_syntax_error.Test)\ntest_syntax_error.Test.runTest\n--\ntesttools.testresult.real._StringException:
 Traceback (most recent call last):\n  File 
"/tmp/guix-build-python-testtools-2.5.0.drv-0/TestNonAsciiResultsWithUnittest7v17h5v5/test_syntax_error.py",
 line 6, in runTest\nexec (\'f(a, b c)\')\n  File "", line 1\n
f(a, b c)\n ^^^\nSyntaxError: invalid syntax. Perhaps you forgot a 
comma?\n\n\n--\nRan
 1 test in 0.000s\n\nFAILED (errors=1)\n'

Ran 2627 tests in 1.178s
FAILED (failures=2)
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "python" arguments: ("-m" "testtools.run" 
"testtools.tests.test_suite") exit-status: 1 term-signal: #f stop-signal: #f>
phase `check' failed after 2.2 seconds
command "python" "-m" "testtools.run" "testtools.tests.test_suite" failed with 
status 1
builder for 
`/gnu/store/gj4g2wcf8gam52rl1ndjrypiya6pa6r0-python-testtools-2.5.0.drv' failed 
with exit code 1
build of /gnu/store/gj4g2wcf8gam52rl1ndjrypiya6pa6r0-python-testtools-2.5.0.drv 
failed
View build log at 
'/var/log/guix/drvs/gj/4g2wcf8gam52rl1ndjrypiya6pa6r0-python-testtools-2.5.0.drv.gz'.

What an entangled mess these languages are that are not C!
Again, this is apparently the latest version of the package.

Andreas




Re: Python

2023-02-19 Thread Andreas Enge
Am Sun, Feb 19, 2023 at 04:50:37PM +0100 schrieb Lars-Dominik Braun:
> eolie upstream looks dead, same with jrnl.

How do we drop them from the distribution? Do we need to prepare a NEWS
item?

> The rest seems to be alive
> without any references to python-pycrypto. So these should be upgradable
> and then we can drop python-pycrypto.

I found python-miio, which depends on python-android-backup, which depends
on python-pycrypto.

The first one looks alive with a new release last July, the middle one
looks dead.

Looking at
   https://github.com/rytilahti/python-miio/blob/master/pyproject.toml
android-backup appears to be an optional dependency.

Are you okay with dropping python-android-backup from Guix?

Andreas




Re: Building arm64 guix system image

2023-02-19 Thread Efraim Flashner
On Fri, Feb 17, 2023 at 10:29:35AM +0200, Max Brieiev wrote:
> I want to run Guix on Apple M1 as a Qemu virtual machine.
> 
> On the Mac machine I run arm64 dedian image. I installed there guix as a
> package manager. Now I am trying to create a guix system image to use
> with Qemu, but it fails.
> 
> Here is what I do:
> 
> max@debian:~$ guix system image --system=aarch64-linux -t qcow2 
> ~/code/guix/gnu/system/examples/bare-bones.tmpl 
> guix system: warning: Consider running 'guix pull' followed by
> 'guix system reconfigure' to get up-to-date packages and security updates.
> 
> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 
> 100.0%
> The following derivations will be built:
>   /gnu/store/dhknasynfsx9ffsv2m188mmhfvz4l1cl-grub-2.06.drv
>   /gnu/store/875pz541zymv6vhl0hkfll151jv8sd2p-qemu-minimal-7.2.0.drv
>   /gnu/store/2vbjnb0f6dzcnvvyaaqjzww0146fpwmj-openbios-qemu-ppc-1.1.drv
>   /gnu/store/dclmdk80rbqqpix98vh6srhdbgscyiwb-qemu-7.2.0.tar.xz.drv
>   /gnu/store/g9crxhl9j2pw35kwgx9bdcjg3jrvi77v-linux-libre-6.1.9.drv
>   /gnu/store/blyj3j5v3p2lh6pj7mw81xjg58d1k4zb-shepherd-0.9.3.drv
>   /gnu/store/r517qlsjsl877kpjfl9ixay9mzh0n923-grub-efi32-2.06.drv
>   /gnu/store/pyv1w00f9c0q291qhi6y0911sqlvfcrv-grub-efi-2.06.drv
>   /gnu/store/875pz541zymv6vhl0hkfll151jv8sd2p-qemu-minimal-7.2.0.drv
>   /gnu/store/brzpisxg4dkvad07pd95riwn7c8559j6-genimage-15-1.ec44ae0.drv
> 
> 1.0 MB will be downloaded
>  alsa-utils-1.2.4  987KiB 4.5MiB/s 00:00 [##] 
> 100.0%
> building 
> /gnu/store/g9crxhl9j2pw35kwgx9bdcjg3jrvi77v-linux-libre-6.1.9.drv...
> building 
> /gnu/store/2vbjnb0f6dzcnvvyaaqjzww0146fpwmj-openbios-qemu-ppc-1.1.drv...
> | 'build' phasebuilder for 
> `/gnu/store/2vbjnb0f6dzcnvvyaaqjzww0146fpwmj-openbios-qemu-ppc-1.1.drv' 
> failed with exit code 1
> build of 
> /gnu/store/2vbjnb0f6dzcnvvyaaqjzww0146fpwmj-openbios-qemu-ppc-1.1.drv failed
> View build log at 
> '/var/log/guix/drvs/2v/bjnb0f6dzcnvvyaaqjzww0146fpwmj-openbios-qemu-ppc-1.1.drv.gz'.
> cannot build derivation 
> `/gnu/store/875pz541zymv6vhl0hkfll151jv8sd2p-qemu-minimal-7.2.0.drv': 1 
> dependencies couldn't be built
> guix system: error: build of 
> `/gnu/store/875pz541zymv6vhl0hkfll151jv8sd2p-qemu-minimal-7.2.0.drv' failed
> 
> 
> The relevant part of the build log shows the following errors:
> 
> Building OpenBIOS for ppc
> Building...
> error:
> 
> /gnu/store/gm5mbaxkqhzafwy0wnimrg53j884glxn-linux-libre-headers-5.10.35/include/asm/sigcontext.h:128:2:
>  error: unknown type name ‘__u32’
>   128 |  __u32 size; /* size in bytes of the extra space */
>   |  ^
> 
> /gnu/store/gm5mbaxkqhzafwy0wnimrg53j884glxn-linux-libre-headers-5.10.35/include/asm/sigcontext.h:129:2:
>  error: unknown type name ‘__u32’
>   129 |  __u32 __reserved[3];
>   |  ^
> 
> /gnu/store/gm5mbaxkqhzafwy0wnimrg53j884glxn-linux-libre-headers-5.10.35/include/asm/sigcontext.h:136:2:
>  error: unknown type name ‘__u16’
>   136 |  __u16 vl;
>   |  ^
> 
> /gnu/store/gm5mbaxkqhzafwy0wnimrg53j884glxn-linux-libre-headers-5.10.35/include/asm/sigcontext.h:137:2:
>  error: unknown type name ‘__u16’
>   137 |  __u16 __reserved[3];
>   |  ^
> make[1]: *** [rules.mak:83: host/kernel/bootstrap.o] Error 1
> make[1]: *** Waiting for unfinished jobs
> make[1]: Leaving directory 
> '/tmp/guix-build-openbios-qemu-ppc-1.1.drv-0/source/obj-ppc'
> make: *** [Makefile:19: build] Error 1
> error: in phase 'build': uncaught exception:
> %exception #<&invoke-error program: "make" arguments: ("-j" "4") 
> exit-status: 2 term-signal: #f stop-signal: #f> 
> phase `build' failed after 0.2 seconds
> command "make" "-j" "4" failed with status 2
> 
> I don't know where to look to fix this error. Please, help me.
> 
> Also, I thought I could find somewhere arm64 guix build, but apparently
> there is none?
> 
> I found only a raw image for Pinebook Pro:
> https://ci.guix.gnu.org/eval/196495
> 
> But for some reason it says it is x86_64 system, and this confuses me.
> 
> Thank you in advance.

I have two patches on the core-updates branch that should allow building
openbios-qemu-ppc from aarch64. I'll try cherry-picking them to master
and see if that allows building qemu-minimal.

-- 
Efraim Flashner  אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


Re: Python (was: Merging core-updates?)

2023-02-19 Thread Andreas Enge
Am Sun, Feb 19, 2023 at 12:57:07PM +0100 schrieb Andreas Enge:
> > which seems to be the only change in attrdict3, see 
> > https://github.com/pirofti/AttrDict3/commit/f6678b627b469c9aeddca2a9e4ba4e1ee9e3ccbb
> Great, I will replace the package then.

Done. Interestingly enough, there was only one dependent: python-wxpython;
which has three dependents, of which python-matplotlib, and from there it
propagates everywhere...

Andreas




Re: Python (was: Merging core-updates?)

2023-02-19 Thread Lars-Dominik Braun
Hi,

> Except that we have to decide what to do about its dependents...
upgrade or drop if not possible. pycryptodome does not provide an entirely
compatible interface (see https://www.pycryptodome.org/src/vs_pycrypto),
so we cannot simply switch existing packages from pycrypto to pycryptdome
without manual testing and (possibly) patching.

eolie upstream looks dead, same with jrnl. The rest seems to be alive
without any references to python-pycrypto. So these should be upgradable
and then we can drop python-pycrypto.

Lars




Re: Python (was: Merging core-updates?)

2023-02-19 Thread Attila Lendvai
> but it is somehow in the same git repository as trezor-agent,
> and I do not totally understand how these are related. Taking
> back my rant and acknowledging my ignorance.

weirdly enough, upstream uses one git repo for multiple projects, and uses 
prefixed tag names for them.

FYI, there's this long-pending patchset to update the trezor-agent (something i 
can test myself):

https://issues.guix.gnu.org/58437#4

it's been pending so long, maybe it should be updated again.

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“Hurt people hurt people. That's how pain patterns gets passed on, generation 
after generation after generation. Break the chain today. Meet anger with 
sympathy, contempt with compassion, cruelty with kindness. Greet grimaces with 
smiles. Forgive and forget about finding fault. Love is the weapon of the 
future.”
— Yehuda Berg




Re: Building arm64 guix system image

2023-02-19 Thread Roman Scherer

Hi Max,

I'm running Guix system on an Apple M1 and also run into these
issues. At the moment I'm using the following commit to build my system:

7833acab0da02335941974608510c02e2d1d8069

Roman

Max Brieiev  writes:

> Hi,
>
> Akira Kyle  writes:
>
>> I think I may be one of the few (only?) guix users that has a setup
>> like this. IIRC getting grub setup with qemu was the one trickier
>> parts of this. Feel free to ping me directly if you're having trouble.
>
> Thanks.
>
>> This is also how I got my guix system on qemu setup. For the record, I
>> initially tried fedora but iirc, selinux was causing some
>> difficulties.
>
> Was it by any chance a syslinux? It causes build failures for me right
> now. How did you work around it?
>
>> This is the relevant issue
>> https://issues.guix.gnu.org/60719. Unfortunately until this is fixed,
>> guix system won't build since grub-efi depends on qemu-minimial which
>> in turn (recently) depends on openbios-qemu-ppc.
>
> I used time-machine to go back to the parent of "Unbundle OpenBIOS"
> commit. open-bios-qemu-ppc issue is gone, but now it fails to build
> syslinux:
>
> guix time-machine --commit=53a1fce25a -- system image 
> --system=aarch64-linux -t qcow2 
> ~/code/guix/gnu/system/examples/bare-bones.tmpl
> ...
> building 
> /gnu/store/gf432a4p1a3ll314g8sina9d4mis37ca-syslinux-6.04-pre-1.bb41e93.drv...
> - 'build' phasebuilder for 
> `/gnu/store/gf432a4p1a3ll314g8sina9d4mis37ca-syslinux-6.04-pre-1.bb41e93.drv' 
> failed with exit code 1
> build of 
> /gnu/store/gf432a4p1a3ll314g8sina9d4mis37ca-syslinux-6.04-pre-1.bb41e93.drv 
> failed
> View build log at 
> '/var/log/guix/drvs/gf/432a4p1a3ll314g8sina9d4mis37ca-syslinux-6.04-pre-1.bb41e93.drv.gz'.
> cannot build derivation 
> `/gnu/store/0smy079q2zsmnq0lvxw7c0amy9va3vv7-ipxe-qemu-1.21.1.drv': 1 
> dependencies couldn't be built
> building 
> /gnu/store/i7ir5yv7ifw1rh8x20141dx4c8h7wcgd-u-boot-2022.10.tar.xz.drv...
> cannot build derivation 
> `/gnu/store/rz143y972xmgv2gzw830b3ckm93z15l3-qemu-minimal-7.2.0.drv': 1 
> dependencies couldn't be built
> guix system: error: build of 
> `/gnu/store/rz143y972xmgv2gzw830b3ckm93z15l3-qemu-minimal-7.2.0.drv' failed
>
> How can I proceed from here?
>
> Thank you.


signature.asc
Description: PGP signature


Re: Building arm64 guix system image

2023-02-19 Thread Max Brieiev
Hi,

Akira Kyle  writes:

> I think I may be one of the few (only?) guix users that has a setup
> like this. IIRC getting grub setup with qemu was the one trickier
> parts of this. Feel free to ping me directly if you're having trouble.

Thanks.

> This is also how I got my guix system on qemu setup. For the record, I
> initially tried fedora but iirc, selinux was causing some
> difficulties.

Was it by any chance a syslinux? It causes build failures for me right
now. How did you work around it?

> This is the relevant issue
> https://issues.guix.gnu.org/60719. Unfortunately until this is fixed,
> guix system won't build since grub-efi depends on qemu-minimial which
> in turn (recently) depends on openbios-qemu-ppc.

I used time-machine to go back to the parent of "Unbundle OpenBIOS"
commit. open-bios-qemu-ppc issue is gone, but now it fails to build
syslinux:

guix time-machine --commit=53a1fce25a -- system image 
--system=aarch64-linux -t qcow2 ~/code/guix/gnu/system/examples/bare-bones.tmpl
...
building 
/gnu/store/gf432a4p1a3ll314g8sina9d4mis37ca-syslinux-6.04-pre-1.bb41e93.drv...
- 'build' phasebuilder for 
`/gnu/store/gf432a4p1a3ll314g8sina9d4mis37ca-syslinux-6.04-pre-1.bb41e93.drv' 
failed with exit code 1
build of 
/gnu/store/gf432a4p1a3ll314g8sina9d4mis37ca-syslinux-6.04-pre-1.bb41e93.drv 
failed
View build log at 
'/var/log/guix/drvs/gf/432a4p1a3ll314g8sina9d4mis37ca-syslinux-6.04-pre-1.bb41e93.drv.gz'.
cannot build derivation 
`/gnu/store/0smy079q2zsmnq0lvxw7c0amy9va3vv7-ipxe-qemu-1.21.1.drv': 1 
dependencies couldn't be built
building 
/gnu/store/i7ir5yv7ifw1rh8x20141dx4c8h7wcgd-u-boot-2022.10.tar.xz.drv...
cannot build derivation 
`/gnu/store/rz143y972xmgv2gzw830b3ckm93z15l3-qemu-minimal-7.2.0.drv': 1 
dependencies couldn't be built
guix system: error: build of 
`/gnu/store/rz143y972xmgv2gzw830b3ckm93z15l3-qemu-minimal-7.2.0.drv' failed

How can I proceed from here?

Thank you.



Re: Python (was: Merging core-updates?)

2023-02-19 Thread Andreas Enge
Hello Lars,

thanks for having a look!

Am Sun, Feb 19, 2023 at 12:47:46PM +0100 schrieb Lars-Dominik Braun:
> > command "python" "-m" "compileall" "--invalidation-mode=unchecked-hash" 
> > "/gnu/store/5i3yqwaqd8mayl2vr9lmrihxwv8203b1-python-pycrypto-2.6.1" failed 
> > with status 1
> this particular line looks different with Python 3.9, since the package
> is built with an automated Python 2 to Python 3 converter, which does
> not seems to work correctly on 3.10 (build_py_2to3 in setup.py). Not
> sure why though. Given the warning on their homepage it’s probably
> safe to drop the package.

Except that we have to decide what to do about its dependents...

> > from collections import Mapping
> > ImportError: cannot import name 'Mapping' from 'collections' 
> > (/gnu/store/blals34ar25fiifvm17m2b504waxzys0-python-3.10.7/lib/python3.10/collections/__init__.py)
> This is trivial to fix and should be
>   from collections.abc import Mapping
> which seems to be the only change in attrdict3, see 
> https://github.com/pirofti/AttrDict3/commit/f6678b627b469c9aeddca2a9e4ba4e1ee9e3ccbb

Great, I will replace the package then.

Andreas




Re: Python (was: Merging core-updates?)

2023-02-19 Thread Andreas Enge
Am Sun, Feb 19, 2023 at 12:02:15PM +0100 schrieb Andreas Enge:
>Then we have:
>   Building the following 6 packages would ensure 9 dependent packages are 
> rebuilt: python-miio@0.5.11 ledger-agent@0.9.0 electrum@4.3.2 eolie@0.9.101 
> jrnl@1.9.7 poezio@0.13.2

Concerning poezio, it depends on python-potr (and is its only dependent),
which in turn depends on python-pycrypto.

Concerning python-potr, I am a bit at a loss. There is
   https://github.com/python-otr/pure-python-otr
with their latest release 1.0.2 in 2018 and a big bold comment
"This software is experimental and potentially insecure. Do not rely on it".

Pypi has this:
   https://pypi.org/project/python-otr/
which I suppose is a different project.

Would it make sense to remove python-potr and poezio?
I am not confident with crypto libraries that call themselves insecure...

Andreas




Re: Python (was: Merging core-updates?)

2023-02-19 Thread Lars-Dominik Braun
Hi Andreas,

> ***   File 
> "/gnu/store/5i3yqwaqd8mayl2vr9lmrihxwv8203b1-python-pycrypto-2.6.1/lib/python3.10/site-packages/Crypto/Util/number.py",
>  line 139
> value |= 2L ** (N-1)# Ensure high bit is set
>  ^
> SyntaxError: invalid decimal literal
> error: in phase 'install': uncaught exception:
> %exception #<&invoke-error program: "python" arguments: ("-m" "compileall" 
> "--invalidation-mode=unchecked-hash" 
> "/gnu/store/5i3yqwaqd8mayl2vr9lmrihxwv8203b1-python-pycrypto-2.6.1") 
> exit-status: 1 term-signal: #f stop-signal: #f>
> phase `install' failed after 0.5 seconds
> command "python" "-m" "compileall" "--invalidation-mode=unchecked-hash" 
> "/gnu/store/5i3yqwaqd8mayl2vr9lmrihxwv8203b1-python-pycrypto-2.6.1" failed 
> with status 1
this particular line looks different with Python 3.9, since the package
is built with an automated Python 2 to Python 3 converter, which does
not seems to work correctly on 3.10 (build_py_2to3 in setup.py). Not
sure why though. Given the warning on their homepage it’s probably
safe to drop the package.

> from collections import Mapping
> ImportError: cannot import name 'Mapping' from 'collections' 
> (/gnu/store/blals34ar25fiifvm17m2b504waxzys0-python-3.10.7/lib/python3.10/collections/__init__.py)
This is trivial to fix and should be

from collections.abc import Mapping

which seems to be the only change in attrdict3, see 
https://github.com/pirofti/AttrDict3/commit/f6678b627b469c9aeddca2a9e4ba4e1ee9e3ccbb

Cheers,
Lars




Re: Python (was: Merging core-updates?)

2023-02-19 Thread Andreas Enge
And another one: python-ecdsa

I tried to update it from 0.17.0 to 0.18.0, but it still fails its tests
with this message:
src/ecdsa/test_jacobi.py:393: TypeError
=== warnings summary ===
src/ecdsa/test_der.py::TestEncodeBitstring::test_implicit_unused_bits
src/ecdsa/test_der.py::TestEncodeBitstring::test_new_call_convention
src/ecdsa/test_der.py::TestRemoveBitstring::test_implicit_unexpected_unused
src/ecdsa/test_der.py::TestRemoveBitstring::test_new_call_convention
  
/gnu/store/blals34ar25fiifvm17m2b504waxzys0-python-3.10.7/lib/python3.10/unittest/case.py:549:
 PytestRemovedIn8Warning: Passing None has been deprecated.
  See 
https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests
 for alternatives in common use cases.
method()

Andreas




Re: Python (was: Merging core-updates?)

2023-02-19 Thread Andreas Enge
Am Sun, Feb 19, 2023 at 12:15:59PM +0100 schrieb Andreas Enge:
> I am looking at these packages. One of them, ledger-agent, dates from 2017
> and has seen 25 releases in the meantime.

Well, maybe, maybe not. The version in Pypi has not changed,
but it is somehow in the same git repository as trezor-agent,
and I do not totally understand how these are related. Taking
back my rant and acknowledging my ignorance.

Andreas




Re: Python (was: Merging core-updates?)

2023-02-19 Thread Andreas Enge
Am Sun, Feb 19, 2023 at 12:02:15PM +0100 schrieb Andreas Enge:
> PPS: On the first issue, the homepage says:
>PyCrypto 2.x is unmaintained, obsolete, and contains security 
> vulnerabilities.
>   Building the following 6 packages would ensure 9 dependent packages are 
> rebuilt: python-miio@0.5.11 ledger-agent@0.9.0 electrum@4.3.2 eolie@0.9.101 
> jrnl@1.9.7 poezio@0.13.2

I am looking at these packages. One of them, ledger-agent, dates from 2017
and has seen 25 releases in the meantime. I can of course try to update it
(in main? core-updates?), but I am also wondering whether we have a
deprecation policy. This feels like a package nobody is interested in, and
it is demotivating to spend time fixing it... (Well, it is entirely possible
that flocks of users are still clinging on to a perfectly working old
version, but well!)

Andreas




Python (was: Merging core-updates?)

2023-02-19 Thread Andreas Enge
Hello,

I am having problems with at least two python packages in core-updates:

***   File 
"/gnu/store/5i3yqwaqd8mayl2vr9lmrihxwv8203b1-python-pycrypto-2.6.1/lib/python3.10/site-packages/Crypto/Util/number.py",
 line 139
value |= 2L ** (N-1)# Ensure high bit is set
 ^
SyntaxError: invalid decimal literal
error: in phase 'install': uncaught exception:
%exception #<&invoke-error program: "python" arguments: ("-m" "compileall" 
"--invalidation-mode=unchecked-hash" 
"/gnu/store/5i3yqwaqd8mayl2vr9lmrihxwv8203b1-python-pycrypto-2.6.1") 
exit-status: 1 term-signal: #f stop-signal: #f>
phase `install' failed after 0.5 seconds
command "python" "-m" "compileall" "--invalidation-mode=unchecked-hash" 
"/gnu/store/5i3yqwaqd8mayl2vr9lmrihxwv8203b1-python-pycrypto-2.6.1" failed with 
status 1


starting phase `sanity-check'
validating 'attrdict' 
/gnu/store/lvy1fmmf1dsr3fjw82zal2aaisf3d47k-python-attrdict-2.0.1/lib/python3.10/site-pac
kages
...checking requirements: OK
...trying to load module attrdict: ERROR:
Traceback (most recent call last):
  File "/gnu/store/35ix1m6m8a5s21j02ajhdyqxb2xkshfb-sanity-check.py", line 69, 
in 
importlib.import_module(name)
  File 
"/gnu/store/blals34ar25fiifvm17m2b504waxzys0-python-3.10.7/lib/python3.10/importlib/__init__.py",
 line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1050, in _gcd_import
  File "", line 1027, in _find_and_load
  File "", line 1006, in _find_and_load_unlocked
  File "", line 688, in _load_unlocked
  File "", line 883, in exec_module
  File "", line 241, in _call_with_frames_removed
  File 
"/gnu/store/lvy1fmmf1dsr3fjw82zal2aaisf3d47k-python-attrdict-2.0.1/lib/python3.10/site-packages/attrdict/__init__.py",
 line 5, in 
from attrdict.mapping import AttrMap
  File 
"/gnu/store/lvy1fmmf1dsr3fjw82zal2aaisf3d47k-python-attrdict-2.0.1/lib/python3.10/site-packages/attrdict/mapping.py",
 line 4, in 
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' 
(/gnu/store/blals34ar25fiifvm17m2b504waxzys0-python-3.10.7/lib/python3.10/collections/__init__.py)
error: in phase 'sanity-check': uncaught exception:
%exception #<&invoke-error program: "python" arguments: 
("/gnu/store/35ix1m6m8a5s21j02ajhdyqxb2xkshfb-sanity-check.py" 
"/gnu/store/lvy1fmmf1dsr3fjw82zal2aaisf3d47k-python-attrdict-2.0.1/lib/python3.10/site-packages")
 exit-status: 1 term-signal: #f stop-signal: #f>
phase `sanity-check' failed after 0.2 seconds
command "python" "/gnu/store/35ix1m6m8a5s21j02ajhdyqxb2xkshfb-sanity-check.py" 
"/gnu/store/lvy1fmmf1dsr3fjw82zal2aaisf3d47k-python-attrdict-2.0.1/lib/python3.10/site-packages"
 failed with status 1
for python-attrdict.

Both are at their latest version from Pypi.

Have there been some incompatible changes in Python 3.10? Should we revert
the Python update or try to backport patches? (I have no idea about Python,
and probably need it only for calibre.)

Andreas


PS: On the second issue: The latest commit is this:
v2.0.1  2019/02/01 -- Haven't used or looked at this in years so updating 
tests to the current version of python and then marking it inactive.
This would rather make me thing we should drop it, but here we go:
Building the following 160 packages would ensure 366 dependent packages are 
rebuilt: kicad@6.0.10 ...

There is something called attrdict3:
https://pypi.org/project/attrdict3/
at the same version +0.0.1; maybe we should use this?


PPS: On the first issue, the homepage says:
   PyCrypto 2.x is unmaintained, obsolete, and contains security 
vulnerabilities.
   Please choose one of the following alternatives:
   Cryptography
 Recommended for new applications.
 Newer API with fewer gotchas.
 API docs
 GitHub
 PyPI
   PyCryptodome
 Recommended for existing software that depends on PyCrypto.
 Fork of PyCrypto. Most applications should run unmodified.
 API docs
 GitHub
 PyPI

   Then we have:
  Building the following 6 packages would ensure 9 dependent packages are 
rebuilt: python-miio@0.5.11 ledger-agent@0.9.0 electrum@4.3.2 eolie@0.9.101 
jrnl@1.9.7 poezio@0.13.2
   We already have python-pycryptodome and python-pycryptodomex.
   Maybe we should try rebuilding the 9 dependent packages with one of them?
   Do the specialists have a preference as to which one to use?
   Both have a similar number of dependents currently.




Re: Ocaml (was: Merging core-updates?)

2023-02-19 Thread Julien Lepiller
ocaml-4.14 and ocaml-5 don't have this issue. I just pushed a fix for
ocaml-4.09. I'll also have to fix ocaml-4.07 since it fails to build as
early as camlboot. It'll take a while to test. Thanks for pointing me
to that patch!

Le Sat, 18 Feb 2023 12:38:55 +0100,
Andreas Enge  a écrit :

> Am Sat, Feb 18, 2023 at 12:03:31PM +0100 schrieb Andreas Enge:
> > this looks exactly like the line that posed problems for openjdk.
> > Maybe there is a patch? Could someone familiar with ocaml have a
> > look?  
> 
> It looks like this:
>https://github.com/ocaml/ocaml/pull/10266
> 
> Andreas
>