Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQ constants in one namespace #203

Merged
merged 4 commits into from
Jul 1, 2020
Merged

MQ constants in one namespace #203

merged 4 commits into from
Jul 1, 2020

Conversation

JochemGit
Copy link
Contributor

As discussed in this issue I created a file mqconstants.py to provide all MQ constants in namespace pymqi.mqconstants.
Additionally I added an import in __init__.py. It works for me. It should not affect anything else.

@SeyfSV SeyfSV linked an issue Jun 19, 2020 that may be closed by this pull request
@AlexandreYang
Copy link
Contributor

AlexandreYang commented Jun 25, 2020

I just wanted to rename that module to const or mqconst from mqconstants, otherwise, it looks good to me.

From: https://github.com/dsuch/pymqi/issues/204#issuecomment-649025659

@dsuch @JochemGit Shall we just import all the constants in __init__.py directly, it seems there is no risk of collision. That will avoid some typing.

@dsuch
Copy link
Owner

dsuch commented Jun 25, 2020

I would rather keep them separate - this will amount to hundreds of names in the namespace, making code completion more cumbersome.

@JochemGit
Copy link
Contributor Author

Do it as @dsuch likes it. I am fine with it.

@AlexandreYang
Copy link
Contributor

@JochemGit Do you mind making the change mqconstants to const ?

@JochemGit
Copy link
Contributor Author

@AlexandreYang I chose the name in analogy to the java class MQConstants, which implements the interfaces CMQC, CMQCFC, CMQXC, CMQZC and some others.
Why don't you like it?

@dsuch
Copy link
Owner

dsuch commented Jun 25, 2020

Dear PyMQI champions, I ask, let it be const without discussing it further - there is no real difference between all these names, I just chose it in compliance with my own programming conventions. Thanks a lot.

Copy link
Contributor

@AlexandreYang AlexandreYang left a comment

Choose a reason for hiding this comment

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

Looks good to me. It will be indeed more convenient to use constants within a single namespace.

@dsuch
Copy link
Owner

dsuch commented Jul 1, 2020

@AlexandreYang There is nothing that I can think of to prevent a new release, I will do it soon.

@dsuch dsuch merged commit df756de into dsuch:master Jul 1, 2020
@AlexandreYang
Copy link
Contributor

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants