Re: What's the public API alternative to _PyObject_GC_IS_TRACKED()?

2021-12-27 Thread Marco Sulla
I need it since I'm developing an immutable dict. And in dict that
function is used.

I do not understand why there's no public API for that function. It
seems very useful.

On Sun, 26 Dec 2021 at 17:28, Barry Scott  wrote:
>
>
>
> > On 26 Dec 2021, at 13:48, Marco Sulla  wrote:
> >
> > I have to use _PyObject_GC_IS_TRACKED(). It can't be used unless you
> > define Py_BUILD_CORE. I want to avoid this. What macro or function can
> > substitute it?
>
> Why is this needed by your code? Surely the GC does its thing as an 
> implementation detail of python.
>
> Barry
>
>
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >
>
-- 
https://mail.python.org/mailman/listinfo/python-list


PIP Certificate problem

2021-12-27 Thread Aniket
   Hi there,

   System Specs:

   Edition Windows 11 Home Single Language

   Version  21H2

   OS build22000.376

   Experience   Windows Feature Experience Pack 1000.22000.376.0



   Processor Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz   1.80 GHz

   Installed RAM  8.00 GB (7.89 GB usable)

   System type 64-bit operating system, x64-based processor





   I am repeatedly facing this issue while installing ANY pip module:



   PS D:\Documents\GitHub\mysite> pip install flask

   WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None,
   status=None)) after connection broken by
   'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
   certificate verify failed: self signed certificate in certificate chain
   (_ssl.c:997)'))': /simple/flask/

   WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None,
   status=None)) after connection broken by
   'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
   certificate verify failed: self signed certificate in certificate chain
   (_ssl.c:997)'))': /simple/flask/

   WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None,
   status=None)) after connection broken by
   'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
   certificate verify failed: self signed certificate in certificate chain
   (_ssl.c:997)'))': /simple/flask/

   WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None,
   status=None)) after connection broken by
   'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
   certificate verify failed: self signed certificate in certificate chain
   (_ssl.c:997)'))': /simple/flask/

   WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None,
   status=None)) after connection broken by
   'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
   certificate verify failed: self signed certificate in certificate chain
   (_ssl.c:997)'))': /simple/flask/

   Could not fetch URL https://pypi.org/simple/flask/: There was a problem
   confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org',
   port=443): Max retries exceeded with url: /simple/flask/ (Caused by
   SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
   certificate verify failed: self signed certificate in certificate chain
   (_ssl.c:997)'))) - skipping

   ERROR: Could not find a version that satisfies the requirement flask (from
   versions: none)

   ERROR: No matching distribution found for flask



   I have reinstalled python, and repaired but no help at all. My version of
   Python is 3.10.1



   Thank You

   Aniket Patra




-- 
https://mail.python.org/mailman/listinfo/python-list


Re: PIP Certificate problem

2021-12-27 Thread Chris Angelico
On Tue, Dec 28, 2021 at 8:00 AM Aniket  wrote:
>
>I have reinstalled python, and repaired but no help at all. My version of
>Python is 3.10.1
>

What does "pip --version" tell you?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What's the public API alternative to _PyObject_GC_IS_TRACKED()?

2021-12-27 Thread Inada Naoki
On Tue, Dec 28, 2021 at 3:31 AM Marco Sulla
 wrote:
>
> I need it since I'm developing an immutable dict. And in dict that
> function is used.
>
> I do not understand why there's no public API for that function. It
> seems very useful.
>

I think it is useful only for optimization based on *current* Python internals.
That's why it is not a public API. If we expose it as public API, it
makes harder to change Python's GC internals.


-- 
Inada Naoki  
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What's the public API alternative to _PyObject_GC_IS_TRACKED()?

2021-12-27 Thread Marco Sulla
Hi, Inada Senpai. So I do not need PyObject_GC_Track on cloning or
merging, or MAINTAIN_TRACKING on insert?

On Tue, 28 Dec 2021 at 07:58, Inada Naoki  wrote:
>
> On Tue, Dec 28, 2021 at 3:31 AM Marco Sulla
>  wrote:
> >
> > I need it since I'm developing an immutable dict. And in dict that
> > function is used.
> >
> > I do not understand why there's no public API for that function. It
> > seems very useful.
> >
>
> I think it is useful only for optimization based on *current* Python 
> internals.
> That's why it is not a public API. If we expose it as public API, it
> makes harder to change Python's GC internals.
>
>
> --
> Inada Naoki  
-- 
https://mail.python.org/mailman/listinfo/python-list