Skip to content

Add package alias with new name#541

Closed
msullivan wants to merge 1 commit intomasterfrom
gel
Closed

Add package alias with new name#541
msullivan wants to merge 1 commit intomasterfrom
gel

Conversation

@msullivan
Copy link
Member

Add a gel alias that does import * from edgedb.

Note that this will not provide any submodules.
Doing from gel import errors won't work.

But we also never documented anything internal, and it will all keep
working with an edgedb import, so nothing will break.

If we feel strongly about providing all the internal modules under the
gel name also, we have options, but as far as I can tell they are
all annoying in some way:

  • Generate a parallel tree of modules under gel that all do import *
    from an appropriate edgedb module. This is kind of ugly and also
    we need to regenerate when anything changes.
  • Something involving hooking the python import system. I think this
    would work but also I think involves modifying global python interpreter
    state when gel is imported, which is dodgy.

I'd probably go with option 1 if we care, but not caring seems fine?

Add a `gel` alias that does `import *` from `edgedb`.

Note that this will *not* provide any submodules.
Doing `from gel import errors` won't work.

But we also never documented anything internal, and it will all keep
working with an `edgedb` import, so nothing will break.

If we feel strongly about providing all the internal modules under the
`gel` name also, we have options, but as far as I can tell they are
all annoying in some way:
 - Generate a parallel tree of modules under `gel` that all do `import *`
   from an appropriate `edgedb` module. This is kind of ugly and also
   we need to regenerate when anything changes.
 - Something involving hooking the python import system. I think this
   would work but also I think involves modifying global python interpreter
   state when `gel` is imported, which is dodgy.

I'd probably go with option 1 if we care, but not caring seems fine?
@msullivan msullivan requested review from 1st1, elprans and fantix November 16, 2024 00:28
Copy link
Member

@1st1 1st1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should just rename and tell to people to start using "gel" if they want new stuff.

@msullivan msullivan closed this Nov 18, 2024
@msullivan msullivan deleted the gel branch November 18, 2024 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants