[Python-Dev] Starting CPython development w/ Docker

2015-04-20 Thread Saul Shanabrook
I started trying some CPythong development a week ago at PyCon and first
got testing working using Docker on my mac. This had the advantage of not
having to worry about installing and dependencies, and also let me test on
different Python versions easily.

If you are interested in trying it, I laid out all the steps here:
http://www.saulshanabrook.com/cpython-dev-w-docker/

Saul Shanabrook
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Starting CPython development w/ Docker

2015-04-20 Thread Saul Shanabrook
On Mon, Apr 20, 2015 at 12:13 PM Carol Willing <
willi...@willingconsulting.com> wrote:

> On 4/20/15 7:52 AM, Brett Cannon wrote:
>
>
> On Mon, Apr 20, 2015 at 10:44 AM Saul Shanabrook 
> wrote:
>
>> I started trying some CPythong development a week ago at PyCon and first
>> got testing working using Docker on my mac. This had the advantage of not
>> having to worry about installing and dependencies, and also let me test on
>> different Python versions easily.
>>
>   Saul, thanks for the steps, and I will be trying it out.
>
Let me know if you have any questions at all, I am happy to help, even if
they are just about getting docker setup.

>If you are interested in trying it, I laid out all the steps here:
>> http://www.saulshanabrook.com/cpython-dev-w-docker/
>>
>
>  Would you mind proposing this idea to core-mentors...@python.org and
> seeing if anyone else would benefit? If others do try it out and like then
> feel free to file an issue at bugs.python.org for devinabox to add your
> script.
>
> Please do share your good work with core-mentorship :)
>
> Brett, Up to date docker development containers (devinabox in the cloudy
> sky) would be helpful for new developers since there will be less
> questioning and uncertainty if the dev environment is set up correctly.
>
>
> I posted to core-mentorship and am happy to help get this workflow
integrated anywhere, if it is useful.

>
> ___
> Python-Dev mailing 
> listPython-Dev@python.orghttps://mail.python.org/mailman/listinfo/python-dev
>
> Unsubscribe: 
> https://mail.python.org/mailman/options/python-dev/willingc%40willingconsulting.com
>
>
>
> --
>  *Carol Willing*
> Developer | Willing Consulting
> https://willingconsulting.com
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Using Generic Type Constructors at Runtime

2019-06-11 Thread Saul Shanabrook
Hello all,

I am working on an expression and replacement system in Python and am trying to 
figure out if constructors for generic classes should be done with classmethods 
or with functions. I have laid out an example using each in a Github issue 
(https://github.com/Quansight-Labs/metadsl/issues/69#issuecomment-500898932) 
and wanted to open the issue up the larger community because I am unsure if 
there is an established pattern here yet.

A minimal example showing the difference is `none(int)` vs 
`Optional[int].none()`. (Note Optional here is not typing.Optional, but my own 
class).

This has implications for the language, because if we want to support 
Optional[int].none() then we need to be able to access the generic type 
arguments at runtime which is currently impossible (without monkeypatching some 
typing internals) see https://github.com/python/typing/issues/629. 

But if we think the functional approach is more appropriate then we should be 
able to pass in TypeVars to functions at runtime, so we can define replacements 
on this form (see the linked issue above for the example). This would require 
fixing https://github.com/python/mypy/issues/6964.

I would appreciate any thoughts on which is more Pythonic and more likely to 
continue being relevant as the typing conversation evolves. 

The underlying motivation is that Python is increasingly being used to build up 
computation that executes on other runtimes (TensorFlow, PyTorch, even if they 
try to hide it now) and type annotations give a nice UX for describing these 
APIs. We need to be able to inspect them at runtime to build up the right 
computation graphs, but we also want them to valid under static systems like 
MyPy, to continue using all the benefits it provides for dev productivity.
___
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/75MF2B62OGVX2BVN6N6ZZE4ZRWO4JA6F/


[Python-Dev] Re: Using Generic Type Constructors at Runtime

2019-06-12 Thread Saul Shanabrook
OK I will post this on typing-sig. I was directed to post here instead of there 
because apparently that's more about static typing not runtime typing: 
https://github.com/python/typing/issues/629#issuecomment-494028130
___
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/CK7ME3EYZPUKXMNWR4FWA5AII244ZRGR/