-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
appinfo.vdf
Magic Changed on Steam Client Beta (June 2024) - Needs Resolved Upstream in ValvePython/steam
#415
Comments
appinfo.vdf
magic changed again (needs resolved upstream in ValvePython/steam)appinfo.vdf
Magic Changed on Steam Client Beta (June 2024) - Needs Resolved Upstream in ValvePython/steam
A small effort by me and a much larger effort by the Protontricks maintainer have created a working implementation however changes are required for both ValvePython/steam and ValvePython/vdf. So we will need to bump both versions once updates are in place. |
It seems like the only thing we depend on from the This would allow us to cut one of the larger dependencies we have, the
So by implementing the Steam dependency ourselves we can save about 17mb - 10mb from the dependency itself, and 7 from removing the dependency on Cryptodome. The upstream license of Pros:
Cons:
Personally I think we should only consider this if:
One other thing to note is that the Steam |
A fork of the Even if we want to continue with So one possible route is to point to a patched VDF dependency from the fork above, or alternatively fork it ourselves and apply the patches as we see fit. The VDF dependency is probably the most useful to keep around, but I would like to voice that I think we should consider the In other words, there are forks available for the two dependcies as of now with the necessary patches. We can either use both of them or take this opportunity to cut out the But maybe I'm just being impatient 🙂 |
Thanks for reporting.
That isn't good. My first idea was just to ignore the magic and hope they don't break backward compatibility, but apparently, that won't work.
I saw that commit, great work!
I see the advantages of creating our own fork/adding the parser just to our code. As you pointed out, this can speed up the process of adding patches related to the I'm wondering whether the fork by Solstice Game Studios is here to stay or if it is a temporary solution. We probably need to ask @WinterPhoenix for that. Regarding the memory and performance: I think saving 20mb isn't worth the effort if we can have such a solution. Also, we can push our performance improvements to the "new upstream" Adding it to the
|
We’ve had the question proposed a couple of times now. We’re okay maintaining it for the foreseeable future. We rely on it for GModCEFCodecFix, that project isn’t going away anytime soon, and it’s the best supported/featured Python library for working with Steam currently, so there’s no appetite to replace it with something else. Do be warned that I fully intend to drop Python 2 support for it though, and probably earlier 3.x versions as well. We’re not in the business of supporting well-and-truly EOL’d stuff. |
Thanks for the quick response. That is good to know. I will create a PR that adds both the PS: I think the docstring in the >>> header, apps = parse_appinfo(open('/d/Steam/appcache/appinfo.vdf', 'rb'))
>>> header
{'magic': b'(DV\x07', 'universe': 1}
>>> next(apps)
b'(DV\x07'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "[...]/site-packages/steam/utils/appcache.py", line 138, in apps_iter
app['data'] = binary_load(fp, key_table=key_table, mapper=mapper)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[...]/site-packages/vdf/__init__.py", line 345, in binary_load
if not issubclass(mapper, Mapping):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen abc>", line 123, in __subclasscheck__
TypeError: issubclass() arg 1 must be a class
---
>>> header, apps = parse_appinfo(open('/d/Steam/appcache/appinfo.vdf', 'rb'), mapper=dict)
>>> header
{'magic': b'(DV\x07', 'universe': 1}
>>> next(apps)
b'(DV\x07'
{'appid': 5, [...]} |
That's fair, right now at least it would be a case of just copying the We have the updated Many thanks @WinterPhoenix for maintaining these forks! |
Relevant upstream PRs:
Please fill out following when reporting a new bug:
Describe the bug
The upstream magic for
appinfo.vdf
changed again on the latest Steam Client Beta, meaningparse_appinfo
from ValvePython/steam is broken. This happened before (ValvePython/steam#418) and this new issue has already been reported upstream (ValvePython/steam#462).I am making this issue for awareness for anyone who runs into this, and also for us to track this so that we can update the Steam dependency once a version with a fix is available.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
ProtonUp-Qt should be able to parse the
appinfo.vdf
, but cannot pending an upstream fix.Screenshots
N/A.
Desktop (please complete the following information):
Additional context
Took a stab at trying to submit a patch for this upstream, but no guarantees my fix will be the one that gets merged as it is still in progress 😄
Terminal output
The
parse_appinfo
gives the following output because it cannot parse the magic in the file.The fix is not as straightforward as adding the magic to the file though, as we need to skip past some parts of the file. And then there are some issues around parsing the binary VDF information in this file under
data
.The text was updated successfully, but these errors were encountered: