praw-dev / praw

PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.
http://praw.readthedocs.io/
BSD 2-Clause "Simplified" License
3.47k stars 456 forks source link

Arguments deprecation for reply and edit #1883

Closed timendum closed 1 year ago

timendum commented 2 years ago

Describe the Bug

Hi,
I agree that most of the time a keyword argument is more clear than a positional arguments, but sometimes, when the argument is only one and very clear, I think it's best to avoid deprecating it.

In particular, I don't see how ReplyableMixin.reply or EditableMixin.edit are better without positional arguments. It' obvious that i need to pass the body of the reply or the edit.

Desired Result

I would like to use submission.reply("text") without a warning or an error in PRAW 8.

Relevant Logs

No response

Code to reproduce the bug

> submission= praw.Reddit().submission(id="id")
> submission.reply(comment)

My code example does not include the Reddit() initialization to prevent credential leakage.

Yes

This code has previously worked as intended.

Yes

Operating System/Environment

Any

Python Version

4.10

PRAW Version

7.6.0

Prawcore Version

2.3.0

Anything else?

Many other case of positional arguments deprecations are ok, maybe there are more to consider.

LilSpazJoekp commented 2 years ago

The reasoning for those becoming keyword only is because they have the potential of getting new arguments in the future.