This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author openalmeida
Recipients JelleZijlstra, eric.araujo, maggyero, matrixise, openalmeida
Date 2022-01-27.07:32:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643268779.16.0.530698409058.issue46285@roundup.psfhosted.org>
In-reply-to
Content
Hi Éric, thank you so much.

I know only a little usage of closure and functools.partial but not the historical/relative knowledge of their design/feature, I mean this issue have 2 visual, the partical object not working as it expected or we are not calling the partical as it expected:

1) partial is not working as its feature or design said, assume I guessed right, thus partial object behaviors should be totally equal to its wrapper/inside class called with properties applied in a standalone/outside way which we usually used, the use of partical at http.server.test should be okey.

"""
import functools

class Obj:
    pass

obj = Obj(); obj.foo = bar  # usually used
jbo = functools.partial(Obj, foo=bar)

# if jbo totally equal to obj in anywhere
# (the so called Duck Type or
# maybe the LSP rule, Liskov
# Substitution Principle)
# the use of partical in http.server
# should also be ok
#
# I used the partical times the same
# as http.server's author did
# and I told myself I know its usage
# but now I do not think so
"""

2) solve this issue itself, to pass handler class directly to ignore partial object caused problem, this is a coding logic shelter/fixing because the way we used functools.partical is not as it expected. This is what cpython@github PR30701 already done. (so the use of partical in http.server is not ok, not welcome at least, so based what I said above, the feature/design of partical now confused me, unless its a bug of partical itself which I am not sure.)
History
Date User Action Args
2022-01-27 07:32:59openalmeidasetrecipients: + openalmeida, eric.araujo, matrixise, JelleZijlstra, maggyero
2022-01-27 07:32:59openalmeidasetmessageid: <1643268779.16.0.530698409058.issue46285@roundup.psfhosted.org>
2022-01-27 07:32:59openalmeidalinkissue46285 messages
2022-01-27 07:32:58openalmeidacreate