# Can Collection make it to Galaxy if it doesn't support Python 2?

**URL:** <https://forum.ansible.com/t/can-collection-make-it-to-galaxy-if-it-doesnt-support-python-2/37612>\
**Category:** Ansible Developer\
**Tags:** galaxy-ng\
**Created:** [February 2, 2023, 1:33pm UTC](https://forum.ansible.com/t/can-collection-make-it-to-galaxy-if-it-doesnt-support-python-2/37612 "2023-02-02T13:33:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas\_Karasek](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Tomas\_Karasek](https://forum.ansible.com/u/Tomas_Karasek)\
**Post date:** [February 2, 2023, 1:33pm UTC](https://forum.ansible.com/t/can-collection-make-it-to-galaxy-if-it-doesnt-support-python-2/37612/1 "2023-02-02T13:33:14Z")

</div>

Hey, I’m working on a new collection for an infrastructure provider (Equnix cloud). We’d like to move the collection to Galaxy at some point. There is only controller environment code, in other words, the code only runs on the same host as the ansible core, there’s no remote host execution.

I’m wondering if I need to do Python2 support. I read the Python requirements for collections [0], and it says that a collection must support Python 2.7. Python2.7 has not been supported for 3 years IIRC and that makes a lot of things harder for me.

Thanks for answering.

Cheers,  
Tomas Karasek

PS. Are there any Ansible developers here at RedHat in Brno, CZ?

[0] [https://github.com/ansible-collections/overview/blob/main/collection\_requirements.rst#python-requirements](https://github.com/ansible-collections/overview/blob/main/collection_requirements.rst#python-requirements)

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [February 2, 2023, 7:20pm UTC](https://forum.ansible.com/t/can-collection-make-it-to-galaxy-if-it-doesnt-support-python-2/37612/2 "2023-02-02T19:20:51Z")

</div>

Hi Thomas,

> Hey, I'm working on a new collection for an infrastructure provider  
> (Equnix cloud). We'd like to move the collection to Galaxy at some  
> point. There is only controller environment code, in other words, the  
> code only runs on the same host as the ansible core, there's no  
> remote host execution.
> 
> I'm wondering if I need to do Python2 support. I read the Python  
> requirements for collections [0], and it says that a collection must  
> support Python 2.7. Python2.7 has not been supported for 3 years IIRC  
> and that makes a lot of things harder for me.

this got already answered on IRC: the requirements you cite are for  
collections included in the Ansible package (the ones listed here:  
[https://docs.ansible.com/ansible/devel/collections/](https://docs.ansible.com/ansible/devel/collections/)). Ansible Galaxy  
does not care whether your collection supports Python 2 or not.

Cheers,  
Felix
