#microformats 2018-03-04
2018-03-04 UTC
# [kevinmarks] Html5lib always feels like you're arguing with java programmers somehow
# KartikPrabhu lol
# KartikPrabhu sknebel: yes. I was trying to see if it is trivial
# KartikPrabhu does not seem like it
# [kevinmarks] BeautifulSoup is a bit like jquery, in that it's been fighting this battle a long time, and it has scars, but it learned a lot about tactics along the way.
[eddie] joined the channel
# KartikPrabhu why does php mf2 insert spaces for e-* value when removing closing tags? http://pin13.net/mf2/?id=20180304010305799
# KartikPrabhu gRegorLove: ^
# KartikPrabhu aaronpk: you definitely don't expect that ^^ right?
# KartikPrabhu not critical just asking so I can change the tests in mf2py
# KartikPrabhu e-content value has extra spaces before the "\r\n"
# KartikPrabhu it only seems to happen when the closing tag is rremoved not the opening one
# KartikPrabhu no not leading spaces. Spaces are inserted in the middle see between </p>\r\n in content[html] and the corresponding text in content[value]
# KartikPrabhu hmmm to be more clear "<p>Blah.</p>\r\n" get turned into "Blah. \r\n" notice space where "</p>" was but no space where "<p>" was
# KartikPrabhu sorry for the blah-wall not my tests :P
# KartikPrabhu that is definitely incorrect right?
# KartikPrabhu ok
# KartikPrabhu in any case, leading "\n" expectations would also be nice
# KartikPrabhu mf2py and phpmf2 both get rid of those
# KartikPrabhu yes it does
# KartikPrabhu yeah, for value I think it is good since it is preserved in html
# KartikPrabhu yeah unknown
# KartikPrabhu right now mf2py only does "OneTwo"
# KartikPrabhu it is tricky to take into account "visual styling"
# KartikPrabhu yeah possibly
# KartikPrabhu but not in current spec at least so this goes with the whole <br> stuff
# KartikPrabhu cool
# KartikPrabhu wait why id mf2py not doing it?
# KartikPrabhu oh yeah 1.0.5 version
# KartikPrabhu mine should not do that
# KartikPrabhu yup my new one works try here : https://kartikprabhu.com/connection/mfparser
# aaronpk try with the HTML from #4 https://pin13.net/mf2/whitespace.html
# KartikPrabhu yeah it works as expected the value is only "Hello World"
# KartikPrabhu oh yeah no stripping is done in HTML for now
# KartikPrabhu since that isn't specified in the spec
# KartikPrabhu aaha ok good
# KartikPrabhu will need to fix that then
# KartikPrabhu aaronpk++ for writing whitespace tests
apb and chrisaldrich joined the channel
# apb aaronpk++
# apb tee hee
KartikPrabhu, ben_thatmustbeme, [eddie] and tantek joined the channel
tantek, Kyle-K and [kevinmarks] joined the channel
# [kevinmarks] Aaronpk++
# [kevinmarks] Tests++
nitot and barpthewire joined the channel
barpthewire and [gerwitz] joined the channel
# KartikPrabhu wait are these whitespace rules already being written into parsers?
[kevinmarks] joined the channel
# [kevinmarks] There is already variation.
# aaronpk oh hey look what I did a while ago https://github.com/indieweb/php-mf2/pull/139
# KartikPrabhu goes to do that in mf2py
# [kevinmarks] That's why it would be good to have programming language independent tests integrated into the parsers
# KartikPrabhu lol
# [kevinmarks] I did it with python before, but doing it with a github subproject was seen as bad and got removed.
# KartikPrabhu aaronpk: e-*[html] parsing refers to some serialisation algo that I don't understand. since you are in tests writing mode do you want to write a small one for that?
# [kevinmarks] Now they're in the same organisation it may be easier, but I want advice on good practice.
# KartikPrabhu now that I know how the current mf2py tests work I am updating them with the code
# KartikPrabhu sknebel++ for help
# [kevinmarks] The original multi parser testing site was very cool, but apparently hard to maintain.
# [kevinmarks] https://github.com/microformats/mf2py/blob/master/test/test_suite.py was what looked for the test suite subproject and ran them all.
# [kevinmarks] We could change that so the path it searches is adjacent to the mf2py root and check out both projects.
[miklb] joined the channel
# [kevinmarks] I'll have a look at that later on (I'm currently planting trees)
# KartikPrabhu yay! mf2py also strips leading/trialing space from e-*[html] now!
# [kevinmarks] Excellent.
# Zegnat I still do not know what a good set-up for tests would be in the first place. We have https://github.com/microformats/tests but I find that really confusing.
# Zegnat KartikPrabhu, the new whitespace idea isn’t in any parser yet, but there is https://wiki.zegnat.net/media/textparsing.html if you want to test some HTML blobs (like aaronpk’s tests)
# KartikPrabhu aahh ok
# KartikPrabhu I was just checking if there is any consensus on those or intention to implement
barpthewire joined the channel
# KartikPrabhu Zegnat: no rush of course. Enjoy the trip instead :P
# KartikPrabhu oh ok then :)
j12t_ joined the channel
# KartikPrabhu if the test repo is confusing then would be good to start filing issues against it
# KartikPrabhu mf2py tests are more organised by "what we want to do" https://github.com/microformats/mf2py/tree/master/test/examples
# KartikPrabhu they don't have the 2 files thing though
# KartikPrabhu yeah those are hard-coded into python testing which is pretty awkward
# KartikPrabhu aaronpk: see example https://github.com/microformats/mf2py/blob/master/test/test_parser.py#L82
# [kevinmarks] A new folder for each test kind makes sense to me.
# [kevinmarks] Especially as that shows evolution of parser thinking
# KartikPrabhu I would rather have the 2 files thing
# [kevinmarks] Yes, I agree
# KartikPrabhu ok if I now send a PR to the mf2py main repo who's in charge of that?
# [kevinmarks] We can keep the folders per class for mf1 backcompat
# [kevinmarks] And adds new folders as we add new tests
# [kevinmarks] So a whitespace folder would make sense
# [kevinmarks] Well, we'll need to update them as we change whitespace interpretation
# [kevinmarks] And if we change the implied name rules
# KartikPrabhu maybe also a "experimental" folder for tests like "stopping the implied name parsing" for things that are not in spec yet?
# [kevinmarks] The structure helps with that
# KartikPrabhu aaronpk: yeah some of the tests are wrong
# KartikPrabhu ha!
# KartikPrabhu sknebel++
# KartikPrabhu what's the recommended way to send PRs when there are many commits?
# KartikPrabhu squash them?
# [kevinmarks] Are there lurking PRs on the tests?
# KartikPrabhu ok so who manages microformats/mf2py now?
# Zegnat Who are on the mf org anyway? Surely not only the three listed? https://github.com/orgs/microformats/people
# KartikPrabhu Zegnat: apparently members are private by default
tantek joined the channel
# KartikPrabhu sknebel: yeah that would be great, I really don't want to be admin on this alone because if I step away for a bit mf2py might start lagging again
# [kevinmarks] I was apparently a private owner of microformats. Now public.
# [kevinmarks] I can approve PRs to tests and mf2py
# [kevinmarks] there are a bunch of other private members
# KartikPrabhu [kevinmarks]: do you want individual commits or one squashed one for new version 1.0.6
# [kevinmarks] aaron, kartik woudl you liek to be in the org?
# KartikPrabhu sure
# [kevinmarks] done
# KartikPrabhu i don't think everyone has write acces
# KartikPrabhu yeah I can't change issue labels on mf2py even though I'm a member
# aaronpk gRegorLove: I sent a PR to your PR :P https://github.com/gRegorLove/php-mf2/pull/1
# KartikPrabhu lolol
# KartikPrabhu because that is in your email client :P
# KartikPrabhu but I agree would be good to have github notifications in github
# KartikPrabhu yup
# [kevinmarks] tnatek and I are owners along with Frances and some others who are private (not sure why - I didn't know i was private)
# [kevinmarks] OK, I remembered how to do this.
# [kevinmarks] I suspect they may have changed things a lot since we set this up - owners was a group, it's now a role and so on
[cleverdevil] joined the channel
# aaronpk alright, another PR for php-mf2 https://github.com/indieweb/php-mf2/pull/141
# KartikPrabhu weird that phpmf2 is in "indieweb" but mf2py is in "microformats" :P
# [kevinmarks] Hi Frances BTW - sorry if I pinged you accidentally
# [kevinmarks] that was ambiguous- you're publicly an owner - others are private
# [kevinmarks] have a look at that and see if it makes sense, if so I can push it up to mf2py
tantek joined the channel
# KartikPrabhu [kevinmarks]: most tests will fail though since the test suite has incorrect daata
# [kevinmarks] if that directory isn't there, it doesn't find any, and so just runs the explicit one
# [kevinmarks] I know, this is my way of making myself fix the test suite
# KartikPrabhu [kevinmarks]: will take a look
# KartikPrabhu in the mean time https://github.com/microformats/mf2py/pull/88
# KartikPrabhu v1.0.6
# KartikPrabhu has no idea what this travis CI stuff is
# aaronpk it's really convenient. you can go click in and see which tests failed too https://travis-ci.org/microformats/mf2py/jobs/348970028
# KartikPrabhu weird, none of the tests failed on my machine
# [kevinmarks] it's dying on the exclude I just mentioned
# KartikPrabhu [kevinmarks]: I don't understand
# KartikPrabhu oh maybe requirements also need to be updated with what I am using
# [kevinmarks] https://travis-ci.org/microformats/mf2py/jobs/348970029: The command "nosetests --exclude=test_suite" exited with 1.
# [kevinmarks] oh wait, that isn't the exclude failing, it's the tests
# KartikPrabhu yeah all tests work with my system. but I have updated libs in my venv
# KartikPrabhu wait will close that PR and resend with updated reqs
# KartikPrabhu <sigh> why is Flask required!
# KartikPrabhu ok https://github.com/microformats/mf2py/pull/89 if tests fail here then I don't know! :P
# [kevinmarks] reads diffs while CI runs
# KartikPrabhu the tests are working in python 2.7 but not others!
# KartikPrabhu python 3 fails on things I didn't even change!
# KartikPrabhu what is this!!
# KartikPrabhu yeah but it is failing on something else entirely
# KartikPrabhu some change between python2.7 and python3
# KartikPrabhu which should have failed in existing code
# [kevinmarks] some lib incomaptibility? The 2.6 fail is no html5lib
# KartikPrabhu aah yeah there it is using html.parser
# KartikPrabhu I don't think we should care about python2.6 anymore
# [kevinmarks] dom_helpers.py has an explicit check for python 3
# [kevinmarks] which doesn't define basestring
# KartikPrabhu yeah but that stuff was already there and I never changed it. if you know how to fix it feel free [kevinmarks]
# KartikPrabhu Zegnat: lol
# Zegnat If anyone feels like fighting over minutiæ: https://github.com/microformats/microformats2-parsing/issues/23
[jeremycherfas] and KartikPrabhu joined the channel
# KartikPrabhu so has mf2py been just broken in python3 all this time!?
# [kevinmarks] looks like you deleted the basestring = str line by accident
# KartikPrabhu oh!
# [kevinmarks] which is how you make 3 happy
# KartikPrabhu oh yeah woops!
# KartikPrabhu KartikPrabhu--
# KartikPrabhu thanks Loqi
# [kevinmarks] ci++
# KartikPrabhu [kevinmarks]: should I fix it or are you on it?
# [kevinmarks] add it to your PR
# KartikPrabhu how does one add to a PR without making anew one?
# [kevinmarks] then the CI will be happy
# KartikPrabhu oh an that works?
# KartikPrabhu oh yeah it did!
# KartikPrabhu oh hey this is nice :)
# KartikPrabhu didn't know this :P
# KartikPrabhu oh hey all pass except python2.6 which I think we should ignore
[eddie] joined the channel
# [kevinmarks] is 2.6 unable to run html5lib?
# KartikPrabhu i think so
# [kevinmarks] what happens if it tries lxml instead of html_parser ?
# KartikPrabhu it doesn't
# KartikPrabhu because currently mf2py preference is html5lib > lxml > html.parser
# KartikPrabhu so it goes directly to the bad one
# KartikPrabhu i think we should recommend using 2.7 or higher
# KartikPrabhu html_parser is basically garbage
# [kevinmarks] right, so could your fallback try lxml before default
# [kevinmarks] in the except: FeatureNotFound case ?
[miklb] joined the channel
# KartikPrabhu [kevinmarks]: that will try lxml first because BS pref is lxml > html5lib > html_parser
# KartikPrabhu so it already is doing that
# KartikPrabhu the CI tests don't have lxml installed I am guessing since it is not a requirement
# [kevinmarks] hm. I thought html5lib worked better with lxml too, but maybe I'm mixed up
# [kevinmarks] looks like html5lib 1.0.1 explictly drops 2.6 support
# KartikPrabhu it does work better, but BS defaults to lxml first for speed things
# KartikPrabhu we should too
# KartikPrabhu I mean even 2.7 is going to phased out in a few months
# [kevinmarks] I'm not sure why dropping support si a feature
# [kevinmarks] this feels likw breaking things for the sake of it https://github.com/html5lib/html5lib-python/pull/356/files
# [kevinmarks] anyway, it's not your fault, so I'll take it
# [kevinmarks] we shoudl probably add more python versions
# KartikPrabhu this probably is some setting in the code right?
# [kevinmarks] the only other change that makes me a bit nervous is copy vs deepcopy - does the struct you're modifying not have references?
# KartikPrabhu [kevinmarks]: it does have references but we don't need them at that point
# KartikPrabhu also BS4 added explicit support for the copy method on Tags
# [kevinmarks] OK
# KartikPrabhu [kevinmarks]: should I add more python versions in travis.yml? and remove 2.6 ?
# [kevinmarks] that sounds like a sensible separate change
# KartikPrabhu so new PR?
# KartikPrabhu how do I find a list of python versions? :P
# [kevinmarks] I just merged your PR
# KartikPrabhu yeah saw that! thanks
# KartikPrabhu I guess add all python versions up to 3.6?
# [kevinmarks] Seems reasonable
# KartikPrabhu done sent PR travis is travising
# KartikPrabhu \o\
# KartikPrabhu \o/
tantek joined the channel
# [kevinmarks] I still think that deliberately breaking html5lib on python 2.6 is bloody minded
# KartikPrabhu yeah I don't like it but we either have to use older html5lib or go directly to html.parser
# gRegorLove aaronpk, I don't think I understand pull requests well enough to understand PRs to PRs (hashtag gitception)
# gRegorLove Was my PR on an older commit? Do I need to rebase my PR?
# KartikPrabhu is gitconfused
# gRegorLove Ditto
# KartikPrabhu gitto
tantek joined the channel
# KartikPrabhu [kevinmarks]: do you know how to push 1.0.6 to pypi?
# KartikPrabhu tantek: I don't think mf2py does anything other than what is in the current spec so no new proposals
# tantek !tell aaronpk re: https://chat.indieweb.org/microformats/2018-03-03/1520091808431400 browsers do not agree on text that is copied, so much so that it is one of the underspecified areas of HTML
# [kevinmarks] Last time we looked there were proposals for converging it
[snarfed] joined the channel
# Zegnat tantek, sounds about right. Both the JS and PHP parsers have something that is not textContent that they (optionally?) use for plain text values. This got implemented because of people filing issues against the parsers, as in practice textContent didn’t match their expected output. But it was never brought up as a problem against the spec. It has now been filed as https://github.com/microformats/microformats2-parsing/issues/15
# gRegorLove !tell aaronpk merged https://github.com/gRegorLove/php-mf2/pull/1 and looks like it's automatically updated my PR to indieweb/php-mf2. Let me know if I need to do anything else.
# Loqi aaronpk: tantek left you a message 21 minutes ago: re: https://chat.indieweb.org/microformats/2018-03-03/1520091808431400 browsers do not agree on text that is copied, so much so that it is one of the underspecified areas of HTML
# Loqi aaronpk: gRegorLove left you a message 11 minutes ago: merged https://github.com/gRegorLove/php-mf2/pull/1 and looks like it's automatically updated my PR to indieweb/php-mf2. Let me know if I need to do anything else.
# KartikPrabhu that still sounds gitconfusing
# gRegorLove Mostly gitmagic, thankfully. Just clicked a couple buttons.
# gRegorLove Woo, down to 7 open issues on php-mf2.
# gRegorLove I'll continue working on https://github.com/microformats/microformats2-parsing/issues/6 in php-mf2 now.
# gRegorLove I've got it about halfway done.
# gRegorLove We should figure out when we want to release a new version
# KartikPrabhu wait you guys are already releasing the new implied-name rules even though they are not in the spec?
# KartikPrabhu hmmm maybe mf2py should do that?
# gRegorLove I thought consensus + one proof of implementation was enough to update the spec. https://github.com/microformats/microformats2-parsing/issues/6#issuecomment-355632808
# KartikPrabhu yes, but it hasn't been updated
# gRegorLove Right, we don't have the one implementation.
# KartikPrabhu we do I put it in mf2py experimental version a whole while ago
# gRegorLove Ohh
# gRegorLove Nice
# KartikPrabhu tantek: we do but it hasn't "officially" made it into the spec yet
# KartikPrabhu tantek: wait actually launch the experimental spec change into production!?
# tantek KartikPrabhu: see http://microformats.org/wiki/microformats2-parsing#change_control
# KartikPrabhu hmm that is weird since it might confuse people when they read the spec and see the output
# KartikPrabhu anyway, I much prefer that mf2py launch this as normal feature when the spec gets updated
# KartikPrabhu now microformats
# KartikPrabhu I have no idea how to find owners on github
# KartikPrabhu well it just got moved and [kevinmarks] helped merge changes so [kevinmarks]?
# KartikPrabhu aaronpk: right, not sure about that part yet
# KartikPrabhu nothing
# KartikPrabhu particularly, to release it into pypi wild
# KartikPrabhu ok coowner is fine with me
# KartikPrabhu I suppose we are the only 2 authors who are currently active
# KartikPrabhu [kevinmarks]: ^^
# KartikPrabhu best to figure this out along with releasing to package index
# KartikPrabhu in any case, if I am co-owner or something how does that help with changing the spec for implied name :P
# KartikPrabhu oh boy! you guys really want to make my weekends busy don't you!
vivus joined the channel
# KartikPrabhu ha! Zegnat this is me YELLING AT YOU
# KartikPrabhu apparently we have CONSENSUS!
# gRegorLove aaronpk: Done merges on indieweb/php-mf2 master? If so I'll branch off that for parsing issue 6.
# gRegorLove KartikPrabhu: Is this SPARTA?!
# gRegorLove Loqi, do you concur?
# KartikPrabhu no, THIS IS MICROFORMATS! <kicks gRegorLove down a rabbithole>
# gRegorLove lol
# KartikPrabhu we might need a #microformats-chat ;)
# zegnat edited /microformats2-parsing (+89) "/* parsing for implied properties */ Add further limitations to implying a name value per https://github.com/microformats/microformats2-parsing/issues/6" (view diff)
# KartikPrabhu Zegnat: dang! alright will PR that to actual repo this evening
# Zegnat Can someone close https://github.com/microformats/microformats2-parsing/issues/6 as resolved and put into spec?
# KartikPrabhu Zegnat: maybe leave a comment that it has been put into spec
[manton], tantek and [kevinmarks] joined the channel
# [kevinmarks] 2 implementations agreeing on the changes is a good way to change the spec.
# [kevinmarks] If we can get the tests repository to agree too that's even better
[eddie] joined the channel
# [kevinmarks] Ok.
# [kevinmarks] How many implementations to change the tests?
# [kevinmarks] Ok. I'll have a chew through the tests
# [kevinmarks] There is a backlog of issues and PRs there too
tomwolf joined the channel
# gRegorLove Hm, weird. I ran composer install with the latest php-mf2 and now a few tests are failing for me, like testBrWhitespaceIssue69 in ParserPTest.
# KartikPrabhu [kevinmarks]: you know a way of getting the mew code to pypi?
# gRegorLove "Failed asserting that null matches expected 'Street Name 9
# gRegorLove \n12345 NY, USA'."
# KartikPrabhu new*
# KartikPrabhu lol
# gRegorLove Debugging the parser results, it's definitely not a null value in that assertion. Odd.
# gRegorLove 4.8.35, php56
# [kevinmarks] I don't know how to update pypi
# gRegorLove Hah, oops. Forgot I had in-progress code in Parser.php. That would do it.
# [kevinmarks] Tests++
# gRegorLove Woo, should have #6 working shortly in php-mf2
[jeremycherfas] joined the channel
# gRegorLove Hmm, Travis CI shows a different number of phpunit assertions than I do locally? Also weird it's showing failed tests in php56 that don't fail for me locally.
# gRegorLove "Mf2\Parser\Test\ClassicMicroformatsTest::testMf2ChildrenOnBackcompatProperties
# gRegorLove Undefined index: name" That test doesn't have an assertion for 'name' currently. Could it be using an older version of that file somehow?
# gRegorLove Ohh. Let me turn on error_reporting(E_ALL). Probably missing some notices/warnings.
# aaronpk this is the line it's coming from https://github.com/gRegorLove/php-mf2/blob/parsing-issue6/Mf2/Parser.php#L1414
# gRegorLove Yep, now I'm getting the exceptions
# gRegorLove Hm, maybe
# gRegorLove Or would the value of an implied name be more useful?
# gRegorLove Yeah, probably. I'll update accordingly. Can discuss if any objections come up during review.
# gRegorLove Good to go! https://github.com/indieweb/php-mf2/pull/142
tantek and [snarfed] joined the channel
[kevinmarks] joined the channel
# aaronpk launched the current master branch at https://pin13.net/mf2-dev/ !
# KartikPrabhu damn! php is winning!
# KartikPrabhu must step it up
# KartikPrabhu oh its on a dev side channel I already did that last week
# KartikPrabhu must write new tests for stop-implied-name
# aaronpk there's even an explicit note about removing the colon... hmm https://github.com/indieweb/php-mf2/pull/131
# aaronpk gRegorLove: looks like it's completely lost child h-entrys now! http://pin13.net/mf2-dev/?id=20180304230015034
# KartikPrabhu so python wins! ;)
[eddie] joined the channel
# gRegorLove Lolwoops
# gRegorLove Interesting edge case with the new recursion method. Finds the children if none of them are also properties, so removing the p-author h-card makes it find the child h-entries. Will debug and fix.
chrisaldrich and [snarfed] joined the channel