Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in app-store-connect on Python 3.11 #282

Closed
aetherealtech opened this issue Nov 2, 2022 · 2 comments · Fixed by #284
Closed

Crash in app-store-connect on Python 3.11 #282

aetherealtech opened this issue Nov 2, 2022 · 2 comments · Fixed by #284
Assignees
Labels
bug Something isn't working

Comments

@aetherealtech
Copy link

aetherealtech commented Nov 2, 2022

We have a GitHub action that uses app-store-connect. A few days ago, the macOS 12 runner was upgraded from Python 3.10 to Python 3.11. There's apparently a problem with the paths after this update, which led me to file this bug against the runner. A workaround for that is to invoke the tool from its full path inside the Python framework:

/Library/Frameworks/Python.framework/Versions/3.11/bin/app-store-connect

When we do so, the following happens:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/bin/app-store-connect", line 5, in <module>
    from codemagic.tools import AppStoreConnect
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/codemagic/tools/__init__.py", line 1, in <module>
    from .android_app_bundle import AndroidAppBundle
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/codemagic/tools/android_app_bundle.py", line 12, in <module>
    from codemagic.models import AndroidSigningInfo
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/codemagic/models/__init__.py", line 12, in <module>
    from .keystore import Keystore
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/codemagic/models/keystore.py", line 7, in <module>
    @dataclass
     ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 1221, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 1211, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 959, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line [81](https://github.com/movehq/hq-driver-ios/actions/runs/3379570935/jobs/5611305106#step:8:82)6, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'codemagic.models.certificate_attributes.CertificateAttributes'> for field certificate_attributes is not allowed: use default_factory

I'm not sure if this is a problem with the script (incompatibility with Python 3.11?), or a problem with the fact that I'm trying to invoke it from inside the framework.

@priitlatt priitlatt added the bug Something isn't working label Nov 4, 2022
@priitlatt priitlatt self-assigned this Nov 4, 2022
@priitlatt
Copy link
Contributor

@aetherealtech, thanks for reporting this. We'll get it resolved ASAP.

@priitlatt
Copy link
Contributor

@aetherealtech fix is available with version 0.36.2:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants