Skip to content

Investigate requirements for removing junction/base/monkey.py #641

Open

Description

@pradyunsg

So... there's monkeypatching of Django's internals in junction/base/monkey.py.

That should stop.

Activity

  1. CruiseDevice commented on Jun 5, 2020

    @CruiseDevice
    Contributor

    @pradyunsg Hi, can you please explain more on what needs to be done here and what exactly is happening in this file?

  2. pradyunsg commented on Jun 11, 2020

    @pradyunsg
    ContributorAuthor

    https://github.com/pythonindia/junction/blob/master/junction/base/monkey.py performs monkeypatches to Django's functions. monkeypatching is usually an anti-pattern and in this case, as far as I can tell, it is something that shouldn't be necessarily needed.

    The resolution for this issue would involve:

    • investigating why this was added (possibly by looking that the git blame for that bit of code)
    • understanding what the effects of removing this code would be (what uses it!?)
    • whether there need to be changes to this code or some other code in the codebase that would work better, to allow for dropping the monkeypatching

    Assuming that goes as I'd expected it to, the next (final) step would be a PR making the relevant code changes and removing this file from the codebase.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions