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

17.1.0 breaks passing default to Attribute by keyword #194

Closed
exarkun opened this issue May 18, 2017 · 7 comments
Closed

17.1.0 breaks passing default to Attribute by keyword #194

exarkun opened this issue May 18, 2017 · 7 comments

Comments

@exarkun
Copy link

exarkun commented May 18, 2017

txaws has some code that constructs Attribute directly (it is public, after all). It does so by passing a value for the default parameter by keyword (it is public, after all).

https://github.com/twisted/txaws/blob/8127b45978aa7b91e65eae15546a63440932b57f/txaws/client/_validators.py#L46-L54

This worked prior to 17.1.0 but no longer does.

@Tinche
Copy link
Member

Tinche commented May 18, 2017

Hm, I think this can be reverted.

@Tinche
Copy link
Member

Tinche commented May 18, 2017

I pushed a fix for this into #193.

@hynek
Copy link
Member

hynek commented May 18, 2017

In our defense, the docs excplitly says you should never instantiate it yourself. :-|

But yeah we'll fix it.

@exarkun
Copy link
Author

exarkun commented May 18, 2017

Please don't make me read a big pile of docs just to find out that x.Y in your package isn't actually public even though it follows the public naming convention. :/ If I did that I wouldn't have any time left in my life to do any other things.

@hynek
Copy link
Member

hynek commented May 19, 2017

Serious question: how do you designate something to be public to read/inspect but private to create/write in an other way than docs?

@exarkun
Copy link
Author

exarkun commented May 19, 2017

Make the constructor private. So, for example, have IAttribute (self-evidently public) telling people what they can read from a thing and have an _Attribute (self-evidently private) type that implements it.

@hynek
Copy link
Member

hynek commented May 22, 2017

fixed in #193

@hynek hynek closed this as completed May 22, 2017
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

No branches or pull requests

3 participants