[Python-Dev] Re: Is "%zd" format is portable now?

2019-08-01 Thread Inada Naoki
On Thu, Aug 1, 2019 at 10:21 PM Victor Stinner  wrote:
>
> Hi INADA-san,
>
> Is it supported on macOS, FreeBSD, AIX, Android, etc.?
>
> My notes on platforms supported by Python:
> https://pythondev.readthedocs.io/platforms.html
>
> For example, xlc C compiler seems to be commonly used on AIX. I don't
> know how is its C99 support.
>
> Can we write an unit test somewhere to ensure that %zd works as expected?
>
> Victor
>

I don't know about AIX too.  I googled, but I can not find even man manual for
snprintf(3) on AIX.

I'm frustrated I wasted a few hours to read some PDFs and searching
but I can not
find any official document about snprintf(3).
I feel it's impossible to support such platforms...

Except AIX, I believe all platforms supports size_t and %zd because
it's very basic
C99 feature.

Regards,
--
Inada Naoki  
___
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/O7H4FBLDQBHSKGSEJQ2TU7IRNKUAPJDV/


[Python-Dev] Re: Is "%zd" format is portable now?

2019-08-01 Thread Cameron Simpson

On 01Aug2019 15:14, Victor Stinner  wrote:

Is it supported on macOS, FreeBSD, AIX, Android, etc.?


Looks like it is supported on MacOS 10.11.6 (El Capitan) here. "man 3 
snprintf" lists the "z" modifier and says:


 The z modifier, when applied to a d or i conversion, indicates that the
 argument is of a signed type equivalent in size to a size_t.

I know this is only one data point of many.

Cheers,
Cameron Simpson 
___
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/FB4JYXZE4KFN5JRQMB2FCRPTBJOWZEJL/


[Python-Dev] Collecting stories about beginning contribution

2019-08-01 Thread Tal Einat
 Hi everyone,

(FYI, I'm cross-posting this from core-mentorship. If you'd like to reply,
please do so there.)

Following the recent discussion on core-mentorship about beginning
contribution, the difficulties it entails and how to improve the situation,
I'd like to start a process of improving the situation.

As a first step, I'd like to collect as many stories about beginning to
contribute to Python. This includes stories about failures to do so; in
fact, those would be most useful!

I'm intentionally leaving this very open; I'd like to hear anything people
have to tell about their experiences, with as little guidance as possible.
Specifically, at this point, I'm not (yet) looking for specific suggestions
for how to improve the situation.

So, following Guido's call (on core-mentorship) to publicly post such
stories, please help us collect as many such accounts as possible! Post
your own stories, and more importantly, reach out to others who could share
their own stories and ask them to do so!

Those who feel that posting publicly would require too much work, or just
don't feel comfortable doing so, are invited to write to me personally;
I'll use the information anonymously if asked to.

Regards,
- Tal Einat
___
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/BPORL4SFXSYXQEBPM7FWXOF7E7BUFW4I/


[Python-Dev] Re: Is "%zd" format is portable now?

2019-08-01 Thread Victor Stinner

Hi INADA-san,

Is it supported on macOS, FreeBSD, AIX, Android, etc.?

My notes on platforms supported by Python:
https://pythondev.readthedocs.io/platforms.html

For example, xlc C compiler seems to be commonly used on AIX. I don't 
know how is its C99 support.


Can we write an unit test somewhere to ensure that %zd works as expected?

Victor

Le 01/08/2019 à 14:01, Inada Naoki a écrit :

Hi,

snprintf() in VC 2010 had not supported "%zd" format.
So we can not use it in PyOS_snprintf, PySys_WriteStdout, etc...

But VC supports "%zd" format since (at least) VC 2015.
See 
https://docs.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=vs-2015

"%zd" is standard C99 feature.  Can we assume it is portable for now?

Regards,



--
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/QVSBYYICHYC3IFITF4QNMGIOLOGAQS6I/


[Python-Dev] Is "%zd" format is portable now?

2019-08-01 Thread Inada Naoki
Hi,

snprintf() in VC 2010 had not supported "%zd" format.
So we can not use it in PyOS_snprintf, PySys_WriteStdout, etc...

But VC supports "%zd" format since (at least) VC 2015.
See 
https://docs.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=vs-2015

"%zd" is standard C99 feature.  Can we assume it is portable for now?

Regards,
-- 
Inada Naoki  
___
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/CAXKWESUIWJNJFLLXXWTQDUWTN3F7KOU/