Skip to content

PR: Add explicit imports to QtSvg module#55

Merged
ccordoba12 merged 2 commits intomasterfrom
feature/import-qtsvg
Aug 20, 2016
Merged

PR: Add explicit imports to QtSvg module#55
ccordoba12 merged 2 commits intomasterfrom
feature/import-qtsvg

Conversation

@goanpeca
Copy link
Copy Markdown
Contributor

@goanpeca goanpeca commented Aug 3, 2016

@ccordoba12, @Nodd should we delete PYQT4, PYQT5, PYSIDE, PythonQtError from the module at the end?

del PYQT4, PYQT5, PYSIDE, PythonQtError ?

@ccordoba12 ccordoba12 added this to the v1.2 milestone Aug 3, 2016
@ccordoba12
Copy link
Copy Markdown
Member

should we delete PYQT4, PYQT5, PYSIDE, PythonQtError

I don't think so because they don't belong to the module itself. @Nodd?

@goanpeca
Copy link
Copy Markdown
Contributor Author

goanpeca commented Aug 3, 2016

Ehh ??
precisely because they dont belong and would remain in the namespace is that I am asking if we should delete them.

@ccordoba12
Copy link
Copy Markdown
Member

I really don't see the need of it. That's normally how Python works, i.e. imported symbols remain in the namespace.

@goanpeca
Copy link
Copy Markdown
Contributor Author

goanpeca commented Aug 3, 2016

Yes, I know how it works... this not about how python works or does not, but a user would be able to import PYQT4 from QtCore module and it should not, cause those symbols live in qtpy. not int qtpy.QtCore. We should not encourage that use

@ccordoba12
Copy link
Copy Markdown
Member

I doubt anyone would confuse our constants with proper Qt objects, but I'm neutral about removing or leaving them.

Besides, this needs a rebase now ;-)

@Nodd
Copy link
Copy Markdown
Contributor

Nodd commented Aug 9, 2016

I think that deleting them is indeed cleaner. I don't hink that many users would import it from here, but for example vars(QtSvg) shouldn't show it.

@ccordoba12
Copy link
Copy Markdown
Member

@goanpeca, would you mind to rebase and finish this one so we can merge it?

I agree with @Nodd on removing the PY* constants on every qtpy module :-)

@goanpeca
Copy link
Copy Markdown
Contributor Author

ok , will do :-)

@goanpeca goanpeca self-assigned this Aug 16, 2016
@goanpeca goanpeca force-pushed the feature/import-qtsvg branch from a51049a to b748df4 Compare August 16, 2016 15:16
@goanpeca
Copy link
Copy Markdown
Contributor Author

@ccordoba12, see :-p, its the fastest by far

image

@ccordoba12
Copy link
Copy Markdown
Member

This looks good to me :-)

@ccordoba12 ccordoba12 merged commit a4cc859 into master Aug 20, 2016
@ccordoba12 ccordoba12 deleted the feature/import-qtsvg branch August 20, 2016 15:36
ccordoba12 added a commit that referenced this pull request Jan 2, 2017
Use star imports in QtSvg again instead of direct ones (reverts PR #55)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants