Re: NSCredential credentialWithIdentity:certificates:persistence:

Ronald Oussoren via Pyobjc-dev <[email protected]> Mon, 27 Jul 2020 15:53:42 +0200
Newsgroups gmane.comp.python.pyobjc.devel
Message-ID <[email protected]>
--===============7961285203812925271==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_858BEA54-6C63-4335-82CB-BD814CEBE736"


--Apple-Mail=_858BEA54-6C63-4335-82CB-BD814CEBE736
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

There=E2=80=99s an underscore at the end of the selector in the code =
below, that should be a colon.

Could you file an issue on GitHub about this? That helps me to not =
forget to work on a better fix, and will give you an update when I do =
so.

Ronald
=E2=80=94

Twitter / micro.blog: @ronaldoussoren
Blog: https://blog.ronaldoussoren.net/

> On 27 Jul 2020, at 11:49, Eric Falconnier <[email protected]> wrote:
>=20
> Hi,
>=20
> Thank you for your answer.
>=20
> I have tried to change the metadata using the following code block:
>=20
> import objc
> objc.registerMetaDataForSelector(
>    b"NSURLCredential",
>    b"credentialWithIdentity:certificates:persistence_",
>    {'arguments': {
>        2: {'null_accepted': False, 'type': b'@'},
>        3: {'_template': True, 'type': b'@'},
>        4: {'_template': True, 'type': b'Q'},
>     'classmethod': True,
>     'hidden': False,
>     'retval': {'_template': True, 'type': b'@'}}
>    }
> )
>=20
> but I didn't manage to make it work. The metadata for the method do =
not change.
>=20
> I do not really know when to call registerMetaDataForSelector, if I =
have to import the NSURLCredential class after calling it or before.
>=20
> Again, thank you for your time.
>=20
> --
> =C3=89ric
>=20
>=20
>> On 25. Jul 2020, at 17:21, Ronald Oussoren <[email protected]> =
wrote:
>>=20
>> What should work as a workaround: use registerMetaDataFor to change =
the type for argument 2 to =E2=80=9C@=E2=80=9C.
>>=20
>=20


--Apple-Mail=_858BEA54-6C63-4335-82CB-BD814CEBE736
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D"">There=E2=80=99s an underscore at the end of the selector in =
the code below, that should be a colon.<div class=3D""><br =
class=3D""></div><div class=3D"">Could you file an issue on GitHub about =
this? That helps me to not forget to work on a better fix, and will give =
you an update when I do so.<br class=3D""><div class=3D""><br =
class=3D""></div><div class=3D"">Ronald<br class=3D""><div class=3D"">
<div dir=3D"auto" style=3D"word-wrap: break-word; -webkit-nbsp-mode: =
space; line-break: after-white-space;" class=3D""><div =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: =
normal; font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;">=E2=80=94</div><div style=3D"caret-color: rgb(0, 0, 0); color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: =
normal; font-variant-caps: normal; font-weight: normal; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;"><br class=3D""></div><div style=3D"caret-color: =
rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none;">Twitter / =
micro.blog: @ronaldoussoren</div><div style=3D"caret-color: rgb(0, 0, =
0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; =
font-style: normal; font-variant-caps: normal; font-weight: normal; =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none;">Blog: <a =
href=3D"https://blog.ronaldoussoren.net/" =
class=3D"">https://blog.ronaldoussoren.net/</a></div></div>
</div>
<div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On 27 Jul 2020, at 11:49, Eric Falconnier &lt;<a =
href=3D"mailto:[email protected]" class=3D"">[email protected]</a>&gt; =
wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><div =
class=3D"">Hi,<br class=3D""><br class=3D"">Thank you for your =
answer.<br class=3D""><br class=3D"">I have tried to change the metadata =
using the following code block:<br class=3D""><br class=3D"">import =
objc<br class=3D"">objc.registerMetaDataForSelector(<br class=3D""> =
&nbsp;&nbsp;&nbsp;b"NSURLCredential",<br class=3D""> =
&nbsp;&nbsp;&nbsp;b"credentialWithIdentity:certificates:persistence_",<br =
class=3D""> &nbsp;&nbsp;&nbsp;{'arguments': {<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2: {'null_accepted': False, =
'type': b'@'},<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3: {'_template': True, 'type': =
b'@'},<br class=3D""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4: =
{'_template': True, 'type': b'Q'},<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;'classmethod': True,<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;'hidden': False,<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;'retval': {'_template': True, 'type': b'@'}}<br =
class=3D""> &nbsp;&nbsp;&nbsp;}<br class=3D"">)<br class=3D""><br =
class=3D"">but I didn't manage to make it work. The metadata for the =
method do not change.<br class=3D""><br class=3D"">I do not really know =
when to call registerMetaDataForSelector, if I have to import the =
NSURLCredential class after calling it or before.<br class=3D""><br =
class=3D"">Again, thank you for your time.<br class=3D""><br =
class=3D"">--<br class=3D"">=C3=89ric<br class=3D""><br class=3D""><br =
class=3D""><blockquote type=3D"cite" class=3D"">On 25. Jul 2020, at =
17:21, Ronald Oussoren &lt;<a href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt; wrote:<br class=3D""><br =
class=3D"">What should work as a workaround: use registerMetaDataFor to =
change the type for argument 2 to =E2=80=9C@=E2=80=9C.<br class=3D""><br =
class=3D""></blockquote><br class=3D""></div></div></blockquote></div><br =
class=3D""></div></div></body></html>=

--Apple-Mail=_858BEA54-6C63-4335-82CB-BD814CEBE736--


--===============7961285203812925271==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============7961285203812925271==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Pyobjc-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyobjc-dev

--===============7961285203812925271==--