-
ronnix joined the channel
-
Flewloon joined the channel
-
DanielHolth joined the channel
-
gustavofonseca joined the channel
-
fabiobatalha joined the channel
-
Flewloon has quit
-
frkout_ has quit
-
wiggy has quit
-
Flewloon joined the channel
-
mr_jolly has quit
-
Flewloon has quit
-
Flewloon joined the channel
-
themsay joined the channel
-
driti has quit
-
rodfersou joined the channel
-
Flewloon has quit
-
Flewloon joined the channel
-
otter768 joined the channel
-
otter768 has quit
-
Flewloon has left the channel
-
crooksey has quit
-
yvl has quit
-
rocky_ joined the channel
-
driti joined the channel
-
bkuberek joined the channel
-
wiggy joined the channel
-
blaflamme
Charlie_X: haha... we really should start PyFarts :)
-
Charlie_X
See if Felix can whip up a logo.
-
frkout joined the channel
-
It would be nice to have the SubstanceD logo in it somewhere.
-
blaflamme
pills makes you fart!
-
Charlie_X
certainly seems to work for stevepiercy_away
-
frkout has quit
-
We could have our own code of conduct: you have to fart before you can talk
-
garbas has quit
-
mr_jolly joined the channel
-
blaflamme
sure we need a CoC
-
jpenny
Given Charlie_X's declaration of bromance above, I hope that is not a typo.
-
Charlie_X
nomen est omen
-
We love CoC's
-
A nice juicy CoC shows you mean business.
-
Charlie_X thinks he should leave
-
blaflamme
-
but thats just between you and me :P
-
DanielHolth has quit
-
DanielHolth joined the channel
-
carl- has quit
-
agroszer has quit
-
Charlie_X
how true
-
wiggy has quit
-
wiggy joined the channel
-
chrisrossi has quit
-
whit joined the channel
-
slav0nic joined the channel
-
slav0nic has quit
-
slav0nic joined the channel
-
MGiberius34 has quit
-
chrisrossi joined the channel
-
digitalsatori joined the channel
-
dowwie
[redacted]
-
[redacted]
-
conan_the_destro joined the channel
-
rocky_ is now known as rocky
-
blaflamme has quit
-
hvelarde joined the channel
-
blaflamme joined the channel
-
conan_the_destro has quit
-
conan_the_destro joined the channel
-
supton joined the channel
-
fxhp has quit
-
markm_ joined the channel
-
otter768 joined the channel
-
17SAB8NFB joined the channel
-
MGiberius34 joined the channel
-
fxhp joined the channel
-
hagen has quit
-
DingoSaar joined the channel
-
chrisgeorge joined the channel
-
chrisrossi has quit
-
Charlie_X
Can we have the link without the tracker code? ;-)
-
stevepiercy_away is now known as stevepiercy
-
hadr joined the channel
-
hadr
Hi there!
-
To use adapters or not to use adapters? That is my question.
-
Charlie_X
adapters are great, use them and love them
-
hadr
:-D
-
blaflamme
but you must be part of the PyFarts group
-
hadr
1 - A pyramid app A use an addon X.
-
2- X provides BasicAuthentication
-
c0le has quit
-
3- X Basic auth deserialize username: username == "{consumer_type__consumer_id}"
-
(reason for having an addon used by lots of services)
-
deuxpi
lots = 2 ;-P
-
hadr
4- A provides verification on DB
-
So I though, we adapt A and X
-
Does that make sense?
-
@deuxpi I am ambitious
-
deuxpi: ^
-
digitalsatori has quit
-
Charlie_X
hadr: it doesn't really make sense.
-
hadr
:'(
-
Charlie_X
Adapters work at the object level
-
digitalsatori joined the channel
-
hadr
Charlie_X: sure, I meant:
-
Charlie_X
Just like putting an adapter on a headphone plug.
-
El_Rolando has quit
-
pastebin might make more sense
-
TheCowboy has quit
-
wiggy has quit
-
hadr
-
but you get the idea
-
(or not) :-/
-
digitalsatori has quit
-
erasmas joined the channel
-
Charlie_X
Strictly, that's a service rather than a straight adapter but looks okay except for the return None's
-
wiggy joined the channel
-
As usual raydeo has a gist on using an authentication service
-
hadr
Charlie_X: note that there are 3 other adapter queries for the 3 others consumer types but, I removed them for clarity
-
Charlie_X
I don't really see the problem you're attempting to solve.
-
hadr
Charlie_X: Keep the addon unaware of db when verifying API consumers credentials.
-
Charlie_X
That's the whole point of a service.
-
Ergo
i was wondering, wouldn't it make sense for the request.json_body to raise something like JsonNotFound(ValueError) instead raising just ValueError?
-
Charlie_X
I guess I just don't understand the add-on thing.
-
Ergo
seems to make sense for writing rest api's
-
Charlie_X
Ergo: why a more specific exception if it is a ValueError?
-
markm_ has quit
-
Ergo
Charlie_X: in my case for example is you have empty forms in angular - it will make "empty" post, without values
-
hadr
Charlie_X: Thank you for your support, will you be at PyCon?
-
Ergo
so you will end up with exception instead getting your json validated
-
Charlie_X
hadr: yes, but I'm not really the guy to ask about this.
-
Ergo
Charlie_X: which is a bit annoying
-
Charlie_X
Then NotFound
-
I find you very rarely need to invent new exceptions
-
travisfischer joined the channel
-
Ergo
Charlie_X: yeah but you have to handle this in every place you use that
-
and with custom exception you could handle globally
-
Charlie_X
Paste some code
-
Ergo
i guess i could make a property in request object instead
-
hadr
Charlie_X: if we ever meet at pyramid booth, I can advice for good microbreweries in town ;-)
-
Charlie_X
hadr: you'll have to whisper so the other's don't here.
-
Ergo
ehh.... im not coming this year, and i wanted too
-
we would have a beer together
-
hadr
We would even have 2
-
Charlie_X
We spent a whole afternoon and evening in one fine place on Shrewsbury? last yeart.
-
hadr
Shrewsbury?
-
Do you mean Sherbrooke?
-
Charlie_X
yeah
-
hadr
-
Charlie_X
That's the one.
-
hadr
Montreal Python Headquarters