[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-28 Thread Steve Dower
On 23Feb2022 2240, h.vetin...@gmx.com wrote: On top of that, I think the formulation you chose does not map correctly to actual compiler capabilities. C99 (minus C11 optionals) only arrived in VS2019, there were still gaps in VS2017. Additionally, Visual Studio version doesn't directly map to

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-24 Thread Gregory P. Smith
On Thu, Feb 24, 2022 at 3:27 PM Victor Stinner wrote: > On Thu, Feb 24, 2022 at 11:10 PM Barry wrote: > > > "Python 3.11 and newer versions use C11 without optional features. The > > > public C API should be compatible with C++." > > > https://github.com/python/peps/pull/2309/files > > > >

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-24 Thread Victor Stinner
On Thu, Feb 24, 2022 at 11:10 PM Barry wrote: > > "Python 3.11 and newer versions use C11 without optional features. The > > public C API should be compatible with C++." > > https://github.com/python/peps/pull/2309/files > > Should is often read as meaning optional when writing specs. > Can you

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-24 Thread Barry
> On 24 Feb 2022, at 11:45, Victor Stinner wrote: > > Ok, let me try something simpler: > > "Python 3.11 and newer versions use C11 without optional features. The > public C API should be compatible with C++." > https://github.com/python/peps/pull/2309/files Should is often read as meaning

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-24 Thread Victor Stinner
Ok, let me try something simpler: "Python 3.11 and newer versions use C11 without optional features. The public C API should be compatible with C++." https://github.com/python/peps/pull/2309/files Victor ___ Python-Dev mailing list --

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-23 Thread h . vetinari
> And it seems like we still care about support Visual Studio 2017, even > if Visual Studio 2019 and 2022 are available. Can we make this more concrete? Do we know of affected parties? Numbers of affected users? Or are we just conservatively guesstimating the thickness of the long tail of

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-23 Thread Victor Stinner
Hi, I updated my PEP 7 PR to use C99 in the public C API and "a subset of" C11 in Python internals: "Python 3.11 and newer versions use C99 in the public C API and use a subset of C11 in Python internals. The public C API should be compatible with C++. The C11 subset are features supported by

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-14 Thread Antoine Pitrou
On Wed, 09 Feb 2022 03:39:42 - h.vetin...@gmx.com wrote: > > That is becoming dated quickly, as Microsoft has deprecated, and is removing, > that version quite rapidly from their CI services (azure/GHA), i.e. mid > March, see: > https://github.com/actions/virtual-environments/issues/4312. >

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-11 Thread Victor Stinner
IMO we need to distinguish the public C API which should be as much compatible as possible, target the oldest C standard, and the Python internals can require a more recent C standard. For example, today maybe it's reasonable to requires C99 for Include/ headers (public .h files) and support C11

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-11 Thread Inada Naoki
On Thu, Feb 10, 2022 at 6:31 PM Petr Viktorin wrote: > > > > > I like it. I want to use anonymous union. It makes complex structure > > like PyDictKeysObject simple a little. > > > > I confirmed that XLC supports it. > >

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-10 Thread Victor Stinner
On Thu, Feb 10, 2022 at 10:28 AM Petr Viktorin wrote: > Ah, I've also wanted anonymous unions in the past! > There's a little problem in that they're not valid in C++, so we can't > have them in public headers. > > We'll need to mention C++ if we update the standard. IMO we only have to care

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-10 Thread Petr Viktorin
On 10. 02. 22 0:30, Inada Naoki wrote: On Thu, Feb 10, 2022 at 3:49 AM Brett Cannon wrote: On Wed, Feb 9, 2022 at 4:19 AM Petr Viktorin wrote: On 09. 02. 22 4:39, h.vetin...@gmx.com wrote: That's an interesting idea -- what's keeping us from C11? No one asking before, probably because

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-09 Thread Inada Naoki
On Thu, Feb 10, 2022 at 3:49 AM Brett Cannon wrote: > On Wed, Feb 9, 2022 at 4:19 AM Petr Viktorin wrote: >> On 09. 02. 22 4:39, h.vetin...@gmx.com wrote: >> >> That's an interesting idea -- what's keeping us from C11? > > No one asking before, probably because we have been trying to get to C99

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-09 Thread Brett Cannon
On Wed, Feb 9, 2022 at 4:19 AM Petr Viktorin wrote: > > > On 09. 02. 22 4:39, h.vetin...@gmx.com wrote: > >> Maybe a more practical approach would be to use C99 "except of > > features not supported by MSVC of Visual Studio 2019"? > > > > This could be formulated in a more neutral way by saying

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-09 Thread Petr Viktorin
On 09. 02. 22 4:39, h.vetin...@gmx.com wrote: Maybe a more practical approach would be to use C99 "except of features not supported by MSVC of Visual Studio 2019"? This could be formulated in a more neutral way by saying "C99 without the things that became optional in C11", or perhaps

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-08 Thread h . vetinari
> Maybe a more practical approach would be to use C99 "except of features not supported by MSVC of Visual Studio 2019"? This could be formulated in a more neutral way by saying "C99 without the things that became optional in C11", or perhaps "C11 without optional features" (at least from the POV

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-08 Thread Victor Stinner
On Tue, Feb 8, 2022 at 2:02 PM Steve Dower wrote: > All the C99 library is supposedly supported, but there are (big?) gaps > in the compiler support. Some Visual Studio 2019 updates on the Microsoft blog. March 2020: C99 _Pragma

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-08 Thread Erlend Aasland
According to the docs[^1], MSVC does _not_ support all of C99. OTOH they claim conformance with both C11 and C17, using the /std:c11 and /std:c17 compiler flags. [^1]: https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=msvc-170 > On 8 Feb 2022, at

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-08 Thread Steve Dower
On 2/8/2022 9:52 AM, Petr Viktorin wrote: On 07. 02. 22 18:09, Victor Stinner wrote: In 2022, C99 is now well supported by C compilers supported by Python: GCC, clang, MSVC. Does MSVC support all of C99? I haven't found any documentation claiming that... but I'm also not familiar with MSVC.

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-08 Thread Petr Viktorin
On 07. 02. 22 18:09, Victor Stinner wrote: Hi, I made a change to require C99 "NAN" constant and I'm was asked to update the PEP 7 to clarify the C subset is needed to build Python 3.11. Python 3.6 requires a subset of the C99 standard to build defined by the PEP 7:

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-08 Thread Serhiy Storchaka
07.02.22 19:09, Victor Stinner пише: > After my NAN change (bpo-46640), Petr Viktorin asked me to update the > PEP 7. I proposed a change to simply say that "Python 3.11 and newer > versions use C99": But public headers should be compatible with C++, and not all C99 features are compatible with

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-07 Thread Inada Naoki
https://www.ibm.com/docs/en/SSGH3R_16.1.0/pdf/getstart.pdf As far as reading page 3, xlclang fully supports C89/C99/C11. xlc fully supports C89/C99, and partially supports C11. On Tue, Feb 8, 2022 at 8:57 AM Brett Cannon wrote: > > > > On Mon, Feb 7, 2022 at 9:12 AM Victor Stinner wrote: >> >>

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-07 Thread Brett Cannon
On Mon, Feb 7, 2022 at 9:12 AM Victor Stinner wrote: > Hi, > > I made a change to require C99 "NAN" constant and I'm was > asked to update the PEP 7 to clarify the C subset is needed to build > Python 3.11. > > Python 3.6 requires a subset of the C99 standard to build defined by the > PEP 7: >

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-07 Thread Jeremiah Vivian
On Mon, Feb 7, 2022 at 5:11 PM Victor Stinner vstin...@python.org wrote: > I made a change to require C99 "NAN" constant and I'm was > asked to update the PEP 7 to clarify the C subset is needed to build > Python 3.11. What if it was built with MSVC which is usually just C90?