Skip to content

Conversation

@NewSoupVi
Copy link
Member

@NewSoupVi NewSoupVi commented Apr 5, 2025

The deprecation of Utils.get_options is long overdue.

Worlds can take the easy route and just switch to settings.get_settings(), but in a lot of cases, there may also be a more proper way to use the new settings API.
There is MyWorld.settings (or self.settings from inside a world instance), and also settings can be accessed via .setting_name now, rather than ["setting_name"]
https://github.com/ArchipelagoMW/Archipelago/blob/main/docs/settings%20api.md

Proper migration to this API is encouraged to avoid another round of deprecation in the future.

Either way, worlds who still call Utils.get_options must switch over one way or another.

From a quick "find usages" in PyCharm, these are the worlds using it:

Additionally, there are some worlds/places that do Utils.get_settings(), which only works because Utils imports settings.get_settings(). These kinds of transitive imports are very much discouraged, so let's get rid of them here too.

I would ask these maintainers of these worlds to open the appropriate PRs by July 31st.

@github-actions github-actions bot added affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Apr 5, 2025
@NewSoupVi NewSoupVi added waiting-on: world-maintainer Issue/PR is waiting for feedback or approval by the maintainer of a world. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Apr 5, 2025
@NewSoupVi
Copy link
Member Author

@PoryGone (I noticed lx isn't a maintainer for SMW btw, idk if that's correct, feel free to ignore I just noticed it)
@threeandthreee
@digiholic
@Alchav
@lordlou
@black-sliver
@FlySniper
@t3hf1gm3nt

FF1, Minecraft (kind of) and OoT are unmaintained, so that responsibility lies with core, although help is appreciated of course. :)

@FlySniper
Copy link
Collaborator

@qwint
Copy link
Collaborator

qwint commented Apr 5, 2025

add to the list Adventure, BizHawk Client, Multiserver, SNIClient, factorio, and alttp because they use Utils.get_settings() which only exists because Utils.get_options needs to import settings.get_settings

@t3hf1gm3nt
Copy link
Collaborator

Looks like TLOZ uses the old method exactly once to find the filepath for our baserom (line 74 of Rom.py)

@Rosalie-A knowing that you have the Z1 update out there, how do you wanna proceed with this? (looks like it would be on line 144 of Rom.py on your beta branch)

@Exempt-Medic Exempt-Medic added the is: maintenance Regular updates to requirements and utilities that do not fix bugs or change/add features. label Apr 5, 2025
@NewSoupVi
Copy link
Member Author

add to the list Adventure, BizHawk Client, Multiserver, SNIClient, factorio, and alttp because they use Utils.get_settings() which only exists because Utils.get_options needs to import settings.get_settings

Thanks for pointing that out.
I added it to the PR.

With it, we get a couple more pings.
@JusticePS
@Berserker66

@Rosalie-A
Copy link
Contributor

Looks like TLOZ uses the old method exactly once to find the filepath for our baserom (line 74 of Rom.py)

@Rosalie-A knowing that you have the Z1 update out there, how do you wanna proceed with this? (looks like it would be on line 144 of Rom.py on your beta branch)

I'll just bundle this one into the update, since I'll be submitting that sometime in the near future.

@t3hf1gm3nt
Copy link
Collaborator

t3hf1gm3nt commented Apr 7, 2025

#4832 will update TLOZ to use the new API (along with everything else that PR does)

@Rosalie-A
Copy link
Contributor

Just double checked and #4448 no longer has Utils.get_options in the new client for FF1.

FlitPix added a commit to FlitPix/Archipelago that referenced this pull request Apr 14, 2025
FlitPix added a commit to FlitPix/Archipelago that referenced this pull request Apr 15, 2025
@qwint
Copy link
Collaborator

qwint commented Apr 30, 2025

FYI for tracking, MMBN3 got this fix added to #4575 based on review

@black-sliver black-sliver reopened this May 22, 2025
@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label May 22, 2025
@Alchav
Copy link
Contributor

Alchav commented May 23, 2025

I don't see where this is being used in pokemon_rb

@qwint
Copy link
Collaborator

qwint commented May 23, 2025

I don't see where this is being used in pokemon_rb

looks like it was fixed in #4801
https://github.com/ArchipelagoMW/Archipelago/pull/4801/files#diff-7723e9776c2924a9599153f2992533ee31b576cc56beb9c98d7fec7327238e07L697

@NewSoupVi
Copy link
Member Author

Oh nice, I missed that. Clicked the checkbox now :3

@NewSoupVi
Copy link
Member Author

@t3hf1gm3nt Y'all have opened a PR, but it's in draft... I appreciate the effort, but obviously I can't really "count that". How close is that PR from being ready?

@PoryGone DKC3 and SMW still have Utils.get_options
@lordlou SM and SMZ3 still have Utils.get_options

ALTTP, BizhawkClient, and SNIClient also still need to remove their use of Utils.get_settings(). In case of BHC and SNIC, this is on core. In case of ALTTP, @Berserker66

@NewSoupVi
Copy link
Member Author

If I missed something, let me know. I did a quick CTRL+Shift+F and saw that MMBN3 was actually fixed in an unrelated PR, yay :) But I still could have misidentified things.

@t3hf1gm3nt
Copy link
Collaborator

@t3hf1gm3nt Y'all have opened a PR, but it's in draft... I appreciate the effort, but obviously I can't really "count that". How close is that PR from being ready?

TBH I have no idea. Been mostly hands off of v2 outside the one test game I ran. That'd be a question for @Rosalie-A

@NewSoupVi
Copy link
Member Author

@Rosalie-A there is also a Utils.get_options() in your client.

@Exempt-Medic
Copy link
Contributor

OptionsType = Settings # TODO: remove when removing get_options

@NewSoupVi NewSoupVi added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: world-maintainer Issue/PR is waiting for feedback or approval by the maintainer of a world. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Sep 13, 2025
@NewSoupVi
Copy link
Member Author

Merging start of next cycle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

affects: core Issues/PRs that touch core and may need additional validation. is: maintenance Regular updates to requirements and utilities that do not fix bugs or change/add features. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants