falcon icon indicating copy to clipboard operation
falcon copied to clipboard

Privatize helpers, etc. that really should only be used internally by the framework

Open kgriffs opened this issue 6 years ago • 9 comments

Falcon modules import a number of helper functions that do not begin with an underscore, although such functions are not meant to be part of the public API. Remedy this in the next major version of the framework (as it would be a breaking change).

kgriffs avatar Feb 22 '19 22:02 kgriffs

(See also: https://github.com/falconry/falcon/issues/1176 )

vytas7 avatar Feb 23 '19 14:02 vytas7

Hey, I would like to take this issue if it's still open.

Vorashil avatar May 20 '20 22:05 Vorashil

Hi @Vorashil ! Yeah, you are very welcome to! Let us know if you are still interested in working on this though so that we do not duplicate efforts.

vytas7 avatar Jul 01 '20 18:07 vytas7

Hi @vytas7 . Yes, I am still keen to do it. Please assign it to me. Thanks in advance.

Vorashil avatar Jul 01 '20 22:07 Vorashil

We don't assign in any particular way :slightly_smiling_face: Your confirmation here is enough. Looking forward to your PR!

vytas7 avatar Jul 02 '20 12:07 vytas7

@vytas7 @kgriffs do the helper functions include those shown here? https://github.com/falconry/falcon/blob/105c56db6a727da7231512c43fd4974a53fc960c/falcon/util/sync.py

If so, I'd like to fix these specifically.

bradleydamato avatar Oct 02 '20 15:10 bradleydamato

Hi @bradleydamato ! Do you have any specific function from sync.py in mind? Most of these functions are meant to be available as utilites in the public API by design: https://falcon.readthedocs.io/en/latest/api/util.html#async . Furthermore, all this sync-async stuff is not a part of any stable release, as it was introduced only as part of the 3.0.0 release cycle, and we are, at the time of writing, at 3.0.0a2; so we can still make adjustments semi-freely.

As I understand this issue is mostly about functions that are already "public" (i.e., not prefixed with an underscore) in Falcon 2.0, but are not documented, and not meant to be a part of the public API. I would let @kgriffs confirm, but IMHO falcon.app_helpers.prepare_middleware could serve as an illustration. Despite having a decent docstring, it does look to be too deeply tied to internal interfaces and implementation details (returning a tuple of three tuples of methods :slightly_smiling_face: ).

vytas7 avatar Oct 02 '20 16:10 vytas7

Hello I can take this up. What exactly needs to be done here? and how should i go about it.

abidahmadq avatar Jun 28 '21 18:06 abidahmadq