[Python-Dev] Re: Summary of Python tracker Issues

2022-06-17 Thread Patrick Reader
As a "temporary" solution to this problem, could the moderators just ban 
sta...@bugs.python.org from the list?


On 17/06/2022 19:08, Python tracker wrote:

ACTIVITY SUMMARY (2022-06-10 - 2022-06-17)
Python tracker at https://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
   open7146 ( +0)
   closed 51841 ( +0)
   total  58987 ( +0)

Open issues with patches: 2890


Most recent 15 issues with no replies (15)
==

#47258: Python 3.10 hang at exit in drop_gil() (due to resource warnin
https://bugs.python.org/issue47258

#47256: re: limit the maximum capturing group to 1,073,741,823, reduce
https://bugs.python.org/issue47256

#47253: LOAD_GLOBAL instruction with wrong source position
https://bugs.python.org/issue47253

#47252: socket.makefile documentation is missing data regarding the 'b
https://bugs.python.org/issue47252

#47251: Merge BINARY_SUBSCR_LIST_INT with BINARY_SUBSCR_LIST_TUPLE
https://bugs.python.org/issue47251

#47244: email.utils.formataddr does not respect double spaces
https://bugs.python.org/issue47244

#47242: Annoying white bar in IDLE (line 457 in sidebar.py)
https://bugs.python.org/issue47242

#47241: [C API] Move the PyCodeObject structure to the internal C API
https://bugs.python.org/issue47241

#47238: Python threading.Event().wait() depends on the system time
https://bugs.python.org/issue47238

#47236: Document types.CodeType.replace() changes about co_exceptionta
https://bugs.python.org/issue47236

#47228: Document that na??ve datetime objects represent local time
https://bugs.python.org/issue47228

#47222: subprocess.Popen() should allow capturing output and sending i
https://bugs.python.org/issue47222

#47219: asyncio with two interpreter instances
https://bugs.python.org/issue47219

#47218: adding name to lzmafile
https://bugs.python.org/issue47218

#47217: adding name to BZ2File
https://bugs.python.org/issue47217



Most recent 15 issues waiting for review (15)
=

#47256: re: limit the maximum capturing group to 1,073,741,823, reduce
https://bugs.python.org/issue47256

#47255: Many broken :meth: roles in the docs
https://bugs.python.org/issue47255

#47254: enhanced dir?
https://bugs.python.org/issue47254

#47251: Merge BINARY_SUBSCR_LIST_INT with BINARY_SUBSCR_LIST_TUPLE
https://bugs.python.org/issue47251

#47243: Duplicate entry in 'Objects/unicodetype_db.h'
https://bugs.python.org/issue47243

#47233: show_caches option affects code positions reported by dis.get_
https://bugs.python.org/issue47233

#47222: subprocess.Popen() should allow capturing output and sending i
https://bugs.python.org/issue47222

#47218: adding name to lzmafile
https://bugs.python.org/issue47218

#47217: adding name to BZ2File
https://bugs.python.org/issue47217

#47216: adding mtime option to gzip open()
https://bugs.python.org/issue47216

#47215: Add "unstable" frame stack api
https://bugs.python.org/issue47215

#47208: Support libffi implementations that cannot support invocations
https://bugs.python.org/issue47208

#47205: posix.sched_{get|set}affinity(-1) no longer returns ProcessLoo
https://bugs.python.org/issue47205

#47200: Add ZipInfo.mode property
https://bugs.python.org/issue47200

#47199: multiprocessing: micro-optimize Connection.send_bytes() method
https://bugs.python.org/issue47199

___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/PNMW3MJ2K6FWBD3EOZOXF6QWEVWARHYM/
Code of Conduct: http://python.org/psf/codeofconduct/

___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/FEJXQMZMRLJDKL2W2YYFE46C7FIPSMC4/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: [Python-Help] Unable to bootstrap Python 3 install

2022-06-17 Thread Nathan Cline
Step one: build a GCC cross compiler which is linked to a newer glibc than what 
your build system is running, or a different version of musl if that's what 
you're using.

Step two: cross-compile Python against the new libc exactly the same way you 
would cross-compile any other program, using the same triple for 
build/host/target, such as x86_64-linux-gnu.

Step three: watch the build almost complete, then enjoy the fireworks at the 
end when Python attempts to load freshly compiled .so objects into the host 
system Python, crashing and burning.

Step four: apply Xavier's patch, fix the problem, and then move on with your 
life.


On Fri, 17 Jun 2022 13:10:28 +0200
Victor Stinner  wrote:

> On Thu, Jun 16, 2022 at 7:54 PM Christian Heimes  wrote:
> > What Victor means that we would like to have clear instructions how to
> > reproduce the problem ourselves. Could you please provide step by step
> > instructions how I could set up a build environment on a X86_64 PC with
> > a standard Linux distro (Fedora, Debian/Ubuntu)?
> >
> > What packages have to be installed? Do I have to download any extra
> > packages? How do I have to set up my build environment? Which commands
> > do I have to execute? Is there a container image available that comes
> > with everything pre-installed?
> 
> I don't know if it helps, but I managed to build Python linked to the
> musl libc using musl-gcc.
> 
> The build and the built Python just work on Fedora 36. It doesn't seem
> to reproduce the discussed build issue.
> 
> Commands:
> ---
> sudo dnf install musl-libc musl-gcc
> git clean -fdx
> ./configure --with-pydebug CC=musl-gcc LD=musl-gcc
> make
> ---
> 
> Interesting part of the build:
> ---
> Platform "x86_64-pc-linux-musl" with compiler "gcc" is not supported by the
> CPython core team, see https://peps.python.org/pep-0011/ for more information.
> ---
> 
> The executable is linked to ld-musl-x86_64.so.1:
> ---
> $ ldd ./python
> linux-vdso.so.1 (0x7fffbd6b6000)
> ld-musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f5253669000)
> ---
> 
> Python works as expected:
> ---
> $ ./python
> Python 3.12.0a0 (heads/main:4beee0c7b0, Jun 17 2022, 12:23:58) [GCC
> 12.1.1 20220507 (Red Hat 12.1.1-1)] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> 1+1
> 2
> ---
> 
> The  _struct extension works as expected and is linked to musl:
> ---
> $ ./python
> >>> import _struct
> >>> _struct.pack('I', 4)
> b'\x04\x00\x00\x00'
> >>> _struct
>  '/home/vstinner/python/main/build/lib.linux-x86_64-3.12-pydebug/_struct.cpython-312d-x86_64-linux-musl.so'>
> 
> $ ldd 
> /home/vstinner/python/main/build/lib.linux-x86_64-3.12-pydebug/_struct.cpython-312d-x86_64-linux-musl.so
> linux-vdso.so.1 (0x7ffedb5fd000)
> ld-musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f4be8cd)
> ---
> 
> 
> There are some compiler warnings and build errors, but I didn't pay
> attention to them since I was interested by the discussed build issue.
> 
> 
> ---
> 
> 
> I also tried something closer to "cross-compiler", but I got it wrong,
> since Python is still linked to the glibc, not to musl. Again, I don't
> reproduce the issue.
> 
> By the way, what is the issue? Is it a build error?
> 
> bpo-39399 mentions the error "ImportError: libc.so: cannot open shared
> object file" on "import struct".
> 
> 
> Get Python 3.12 on the host (installed in /opt/py3.12):
> ---
> git clean -fdx
> ./configure --prefix=/opt/py3.12
> make
> make install
> ---
> 
> Fake buildchain:
> ---
> $ mkdir cross-build
> $ cd cross-build/
> $ ln -s /usr/bin/readelf x86_64-pc-linux-musl-readelf
> $ cd ..
> ---
> 
> Build:
> ---
> $ sudo dnf install musl-libc  # install musl
> 
> $ cat config-musl
> ac_cv_file__dev_ptmx=no
> ac_cv_file__dev_ptc=no
> 
> $ cat build.sh
> set -e -x
> PATH=$PATH:cross-build/ \
> CONFIG_SITE=config-musl \
> ./configure \
> --with-build-python=/opt/py3.12/bin/python3.12 \
> --build=x86_64-pc-linux-gnu \
> --host=x86_64-pc-linux-musl \
> --with-pydebug \
> --disable-ipv6 \
> --cache-file=../configure-musl.cache
> 
> $ ./build.sh
> $ make
> ---
> 
> Sadly, the built executable is linked to the glibc:
> ---
> $ ldd ./python
> linux-vdso.so.1 (0x7ffcd89d)
> libm.so.6 => /lib64/libm.so.6 (0x7f54d2a6)
> libc.so.6 => /lib64/libc.so.6 (0x7f54d285f000)
> /lib64/ld-linux-x86-64.so.2 (0x7f54d2b62000)
> ---
> 
> 
> Well, since glibc and musl are available and just work on my system,
> I'm not sure if my test makes any sense :-) Should the target libc not
> work on the host to reproduce the issue?
> 
> Victor
> --
> Night gathers, and now my watch begins. It shall not end until my death.


-- 
Nathan Cline 
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 

[Python-Dev] Re: [Python-Help] Unable to bootstrap Python 3 install

2022-06-17 Thread Xavier de Gaye
Hi Christian,
Some of the answers to your questions may possibly be found in PR 1629:
bpo-30386: Add a build infrastructure for Android
https://github.com/python/cpython/pull/1629
Please note that the purpose of this PR was not to give clear instructions
on how to cross-compile android, but to add an android buildbot to the
Python buildbots, hence its relative complexity.

The README created by this PR provide some of the links that you are
looking for:
https://github.com/python/cpython/blob/0a51515a634872275aaeafb2e8a198289e6cf3d3/Android/README.rst

> we would like to have clear instructions how to
> reproduce the problem ourselves
It is difficult to miss the irony in this sentence because at the time of
this PR I was a Python core developer and the 'we' in your sentence would
have included me then. So at this time 'we' had all the knowledge to
fulfill your requests. The irony is that the reason why I resigned from
being a core developer was because of the handling of this PR.

Xavier de Gaye


On Thu, Jun 16, 2022 at 7:54 PM Christian Heimes 
wrote:

> On 16/06/2022 16.29, Xavier de Gaye wrote:
> > Victor Stinner wrote:
> >  > https://github.com/python/cpython/issues/66913
> >  doesn't explain how to
> > reproduce the issue, it only gives some info about what doesn't work.
> >  > I don't know how to reproduce the issue.
> >
> > Yes this issue does explain how to reproduce the problem. It even shows
> > the backtrace printed when attempting to cross-build Android x86_64 on a
> > linux x86_64.
> > To reproduce the issue, just cross-build python for android x86_64
> > following the well documented process by the Android team.
> > It is not clear how this backtrace can be missed when reading the issue !
> >
> > There is also a patch provided in this issue that is straightforward and
> > that does not involve any change on distutils, only the Makefile and
> > configure.
>
> What Victor means that we would like to have clear instructions how to
> reproduce the problem ourselves. Could you please provide step by step
> instructions how I could set up a build environment on a X86_64 PC with
> a standard Linux distro (Fedora, Debian/Ubuntu)?
>
> What packages have to be installed? Do I have to download any extra
> packages? How do I have to set up my build environment? Which commands
> do I have to execute? Is there a container image available that comes
> with everything pre-installed?
>
> You mentioned well-documented process by the Android team. Could you
> please provide links to the relevant documents?
>
> Christian
>
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/EKJ2PFUFUCV3DOP55UAIRFYECX4NYLIU/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Summary of Python tracker Issues

2022-06-17 Thread Python tracker

ACTIVITY SUMMARY (2022-06-10 - 2022-06-17)
Python tracker at https://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open7146 ( +0)
  closed 51841 ( +0)
  total  58987 ( +0)

Open issues with patches: 2890 


Most recent 15 issues with no replies (15)
==

#47258: Python 3.10 hang at exit in drop_gil() (due to resource warnin
https://bugs.python.org/issue47258

#47256: re: limit the maximum capturing group to 1,073,741,823, reduce
https://bugs.python.org/issue47256

#47253: LOAD_GLOBAL instruction with wrong source position
https://bugs.python.org/issue47253

#47252: socket.makefile documentation is missing data regarding the 'b
https://bugs.python.org/issue47252

#47251: Merge BINARY_SUBSCR_LIST_INT with BINARY_SUBSCR_LIST_TUPLE
https://bugs.python.org/issue47251

#47244: email.utils.formataddr does not respect double spaces
https://bugs.python.org/issue47244

#47242: Annoying white bar in IDLE (line 457 in sidebar.py)
https://bugs.python.org/issue47242

#47241: [C API] Move the PyCodeObject structure to the internal C API 
https://bugs.python.org/issue47241

#47238: Python threading.Event().wait() depends on the system time
https://bugs.python.org/issue47238

#47236: Document types.CodeType.replace() changes about co_exceptionta
https://bugs.python.org/issue47236

#47228: Document that na??ve datetime objects represent local time
https://bugs.python.org/issue47228

#47222: subprocess.Popen() should allow capturing output and sending i
https://bugs.python.org/issue47222

#47219: asyncio with two interpreter instances
https://bugs.python.org/issue47219

#47218: adding name to lzmafile
https://bugs.python.org/issue47218

#47217: adding name to BZ2File
https://bugs.python.org/issue47217



Most recent 15 issues waiting for review (15)
=

#47256: re: limit the maximum capturing group to 1,073,741,823, reduce
https://bugs.python.org/issue47256

#47255: Many broken :meth: roles in the docs
https://bugs.python.org/issue47255

#47254: enhanced dir?
https://bugs.python.org/issue47254

#47251: Merge BINARY_SUBSCR_LIST_INT with BINARY_SUBSCR_LIST_TUPLE
https://bugs.python.org/issue47251

#47243: Duplicate entry in 'Objects/unicodetype_db.h'
https://bugs.python.org/issue47243

#47233: show_caches option affects code positions reported by dis.get_
https://bugs.python.org/issue47233

#47222: subprocess.Popen() should allow capturing output and sending i
https://bugs.python.org/issue47222

#47218: adding name to lzmafile
https://bugs.python.org/issue47218

#47217: adding name to BZ2File
https://bugs.python.org/issue47217

#47216: adding mtime option to gzip open()
https://bugs.python.org/issue47216

#47215: Add "unstable" frame stack api
https://bugs.python.org/issue47215

#47208: Support libffi implementations that cannot support invocations
https://bugs.python.org/issue47208

#47205: posix.sched_{get|set}affinity(-1) no longer returns ProcessLoo
https://bugs.python.org/issue47205

#47200: Add ZipInfo.mode property
https://bugs.python.org/issue47200

#47199: multiprocessing: micro-optimize Connection.send_bytes() method
https://bugs.python.org/issue47199
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/PNMW3MJ2K6FWBD3EOZOXF6QWEVWARHYM/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: [Python-Help] Unable to bootstrap Python 3 install

2022-06-17 Thread Victor Stinner
On Thu, Jun 16, 2022 at 7:54 PM Christian Heimes  wrote:
> What Victor means that we would like to have clear instructions how to
> reproduce the problem ourselves. Could you please provide step by step
> instructions how I could set up a build environment on a X86_64 PC with
> a standard Linux distro (Fedora, Debian/Ubuntu)?
>
> What packages have to be installed? Do I have to download any extra
> packages? How do I have to set up my build environment? Which commands
> do I have to execute? Is there a container image available that comes
> with everything pre-installed?

I don't know if it helps, but I managed to build Python linked to the
musl libc using musl-gcc.

The build and the built Python just work on Fedora 36. It doesn't seem
to reproduce the discussed build issue.

Commands:
---
sudo dnf install musl-libc musl-gcc
git clean -fdx
./configure --with-pydebug CC=musl-gcc LD=musl-gcc
make
---

Interesting part of the build:
---
Platform "x86_64-pc-linux-musl" with compiler "gcc" is not supported by the
CPython core team, see https://peps.python.org/pep-0011/ for more information.
---

The executable is linked to ld-musl-x86_64.so.1:
---
$ ldd ./python
linux-vdso.so.1 (0x7fffbd6b6000)
ld-musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f5253669000)
---

Python works as expected:
---
$ ./python
Python 3.12.0a0 (heads/main:4beee0c7b0, Jun 17 2022, 12:23:58) [GCC
12.1.1 20220507 (Red Hat 12.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 1+1
2
---

The  _struct extension works as expected and is linked to musl:
---
$ ./python
>>> import _struct
>>> _struct.pack('I', 4)
b'\x04\x00\x00\x00'
>>> _struct


$ ldd 
/home/vstinner/python/main/build/lib.linux-x86_64-3.12-pydebug/_struct.cpython-312d-x86_64-linux-musl.so
linux-vdso.so.1 (0x7ffedb5fd000)
ld-musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f4be8cd)
---


There are some compiler warnings and build errors, but I didn't pay
attention to them since I was interested by the discussed build issue.


---


I also tried something closer to "cross-compiler", but I got it wrong,
since Python is still linked to the glibc, not to musl. Again, I don't
reproduce the issue.

By the way, what is the issue? Is it a build error?

bpo-39399 mentions the error "ImportError: libc.so: cannot open shared
object file" on "import struct".


Get Python 3.12 on the host (installed in /opt/py3.12):
---
git clean -fdx
./configure --prefix=/opt/py3.12
make
make install
---

Fake buildchain:
---
$ mkdir cross-build
$ cd cross-build/
$ ln -s /usr/bin/readelf x86_64-pc-linux-musl-readelf
$ cd ..
---

Build:
---
$ sudo dnf install musl-libc  # install musl

$ cat config-musl
ac_cv_file__dev_ptmx=no
ac_cv_file__dev_ptc=no

$ cat build.sh
set -e -x
PATH=$PATH:cross-build/ \
CONFIG_SITE=config-musl \
./configure \
--with-build-python=/opt/py3.12/bin/python3.12 \
--build=x86_64-pc-linux-gnu \
--host=x86_64-pc-linux-musl \
--with-pydebug \
--disable-ipv6 \
--cache-file=../configure-musl.cache

$ ./build.sh
$ make
---

Sadly, the built executable is linked to the glibc:
---
$ ldd ./python
linux-vdso.so.1 (0x7ffcd89d)
libm.so.6 => /lib64/libm.so.6 (0x7f54d2a6)
libc.so.6 => /lib64/libc.so.6 (0x7f54d285f000)
/lib64/ld-linux-x86-64.so.2 (0x7f54d2b62000)
---


Well, since glibc and musl are available and just work on my system,
I'm not sure if my test makes any sense :-) Should the target libc not
work on the host to reproduce the issue?

Victor
--
Night gathers, and now my watch begins. It shall not end until my death.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/3AKU5VJ5OBFZ7MVS4UWYLUAW5ZGGACIS/
Code of Conduct: http://python.org/psf/codeofconduct/