JJTech0130 / pypush

[being rewritten] Cross-platform iMessage POC
https://discord.gg/BVvNukmfTC
Other
3.56k stars 396 forks source link

Group chat parameters & functionality #62

Closed JustAHippo closed 4 months ago

JustAHippo commented 10 months ago

Two new fields, group_id and group_name, optional and may be none. Functionality extended to demo.py with the "group" command.

CDeLeon94 commented 10 months ago

Am I missing something on how this is supposed to work?

I've cloned your repo, switched to async branch, installed dependencies (Using python3 -m pip ... as worked for me for main) and yet I'm getting this:

PS C:\Users\chris\pypushgroup\pypush> python3 ./demo.py
Traceback (most recent call last):
  File "C:\Users\chris\pypushgroup\pypush\demo.py", line 10, in <module>
    import ids
  File "C:\Users\chris\pypushgroup\pypush\ids\__init__.py", line 7, in <module>
    from . import _helpers, identity, profile, query
  File "C:\Users\chris\pypushgroup\pypush\ids\identity.py", line 7, in <module>
    from .signing import add_auth_signature, armour_cert
  File "C:\Users\chris\pypushgroup\pypush\ids\signing.py", line 37, in <module>
    push_token: str | bytes,
TypeError: unsupported operand type(s) for |: 'type' and 'type'
Kasherpete commented 10 months ago

You need Python 3.10-3.11

CoolCat467 commented 9 months ago

Or add a from __future__ import annotations import at the top of the file. This error is a result of pep 604 unions being used for type annotations, which is a python 3.10+ feature. The future annotations import makes the python byte code compiler read annotations as strings instead of attempting to parse them, meaning we can use pep 604 style type annotations in older python versions with no side effects other than the __annotations__ attribute being a string instead of typing module objects, which isn't used except for a few niche projects.

JJTech0130 commented 4 months ago

Closing for now, will reimplement once the rewrite is complete