06:26
heycam
should write a browser extension to prevent Cmd+R from doing anything if I've got the whatwg complete spec open
06:42
<Hixie>
heycam: your wish is my command
06:42
<heycam>
Hixie, :D
11:50
<gsnedders>
jgraham: You have something in the SourceForge PyPI issue.
12:52
<ambv>
gsnedders: oops, I broke Critic. Seems it can't handle commit --amend
13:21
<odinho>
ambv It can, but you need to tell it to get ready for a rebase.
13:22
<odinho>
It was made for rebasing. We do it all the time at Opera.
13:26
<gsnedders>
odinho: But you can only rewrite history that's already pushed, you can't push a rewrite otherwise
13:26
<gsnedders>
On the other hand, GitHub just loses all comments if you amend a commit, which isn't great. :P
13:26
<gsnedders>
jgraham: s quit [Ping timeout: 276 seconds]
13:27
<gsnedders>
jgraham: https://critic.hoppipolla.co.uk/r/100 is broken because of a non-ff commit, plz fix.
13:44
<jgraham>
Right, you *can* push a rebase, but you need to tell it that you are going to do that
13:45
<jgraham>
Which is harder to do if github is also involved, I guess
13:47
<jgraham>
Nice of sourceforge to send email
13:47
jgraham
isn't sure what the brokenness in that review is
13:47
<jgraham>
And I have to go rake up "grass"
13:48
<jgraham>
Where "grass" is actually distressingly lots of moss
13:51
<gsnedders>
jgraham: Non-fast-forward commit to tracking branch, hence it is no longer tracking.
13:51
<gsnedders>
jgraham: Or you mean at a lower level than that?
13:52
<gsnedders>
jgraham: http://stackoverflow.com/questions/16378996/python-nose-tests-from-generator-not-running-concurrently is relevant for html5lib
13:52
<gsnedders>
(FYI)
15:03
<ambv>
gsnedders: in other words, I should check whether tags are HTML or alien? HTMLSanitizerMixin has a acceptable_elements attribute which I could use for that. Seems like mixing concerns, though.
19:22
<gsnedders>
ambv: It should just be a case of outputting what is in the DOM, there shouldn't be any real magic needed?
19:22
<gsnedders>
Unless, of course, we build the DOM incorrectly. But I'd be surprised.
19:25
<ambv>
let me see
19:37
<ambv>
gsnedders: can you open treebuilders/dom.py so we can agree on what's the actual bug here?
19:38
<gsnedders>
ambv: Gimme ten minutes?
19:38
<ambv>
sure thing.
20:07
<gsnedders>
ambv: Right, okay.
20:08
<ambv>
in line 230 there's the `attributes` dict built
20:08
<ambv>
it's built from itemsNS which unfortunately returns [((None, 'lang'), 'en')]
20:09
gsnedders
wonders what this nsmap thing is
20:09
<ambv>
information is lost at that point and this is why there's the KeyError later on
20:10
<ambv>
because node.attributes.keys() returns "xml:lang" and not bare "lang"
20:12
<gsnedders>
Yay for relying on things that are totally non-standard.
20:15
<ambv>
basically the whole dom2sax will apply namespace declarations regardless of whether they're alien or pure HTML
20:15
<ambv>
and it does have a default namespace listed in the function definition which is "xml:"
20:16
<gsnedders>
Okay, I'm thinking we should do what I wanted to do for 1.1, and add a testadapters submodule that does magic~. Rewrite dom2sax as an operation going from a treewalker.
20:16
<gsnedders>
And then the existing dom2sax can handle this.
20:17
<gsnedders>
Or rather wrap this.
20:18
<ambv>
well, it's definitely good to fix it for 1.0 but this is a new feature so at that point I cannot independently help
20:18
<gsnedders>
Well, at the moment it's totally broken :)
20:19
<ambv>
why a submodule though?
20:20
<gsnedders>
The adapters used for testing the treewalkers (see test_treewalkers.py) should be moved there.
20:20
<ambv>
but you don't mean a git submodule?
20:20
<gsnedders>
A Python submodule.
20:20
<ambv>
yay for confusing terminology
20:20
<ambv>
haha
20:20
<gsnedders>
:)
20:20
<ambv>
OK, a Python module sounds great
20:21
<gsnedders>
Should I?
20:21
<ambv>
but
20:21
<ambv>
the module would need to be outside of the tests
20:23
<gsnedders>
Yes. But the treewalker tests already depend on the parser, so I'm not too bothered.
20:23
<ambv>
I'm more concerned that this is a non-trivial amount of work
20:23
<gsnedders>
It's a bit evil, because the adapters rely on the treewalkers whose tests rely on the adapters, but oh well.
20:23
<gsnedders>
Half an hour's work, I'd guess.
20:24
<ambv>
well if adapters will be outside of the tests, you'll need to document and test them too
20:26
<gsnedders>
Bah, it's not like dom2sax is documented now. :P
20:26
<gsnedders>
I'd only move dom2sax for 1.0, I expect.
20:28
<ambv>
so, what's the plan (e.g. what should I work on now)?
20:30
<gsnedders>
ambv: #16 is a simple copy/paste job from the spec, if you want.
20:31
<gsnedders>
ambv: Or you can make sure the docstrings are actually up to date.
20:32
<ambv>
OK, so I'll drop #6 for the time being
20:32
<gsnedders>
ambv: Or you can give an opinion of whether we should drop simpletree (i.e., our own custom tree format, which AFAIK nobody uses)
20:32
<ambv>
you might reuse test_treeadapters though
20:32
<gsnedders>
Indeed, I will.
20:33
<ambv>
I'll make a separate PR just for that then
20:33
<ambv>
this will make tests fail, though ;)
20:34
<gsnedders>
Nah, don't worry.
20:34
<gsnedders>
I'll just grab it from your repo. :)
20:35
<ambv>
okay
21:25
<ambv>
gsnedders: we should include SPEC.html in the repo
21:26
<gsnedders>
ambv: For what purpose?
21:26
<ambv>
so that a user can know at any point from what version the implementation was made
21:26
<ambv>
it's a living standard, last changes were put today
21:26
gsnedders
is dubious because of the different in size it'll make
21:26
<ambv>
copying and pasting paragraphs from the spec into source files isn't maintainable
21:26
<gsnedders>
I'd rather just document what SVN version we implemented.
21:27
<gsnedders>
(Size in terms of the size of the repo)
21:27
<ambv>
I wouldn't bundle the spec with the tarballs of course
21:27
<ambv>
as for the repo size, a couple of MBs here and there aren't that much of a difference nowadays, are they?
21:27
<ambv>
but the SVN revision is fine as well
21:27
<zewt>
what a waste of floppy disks
21:28
<gsnedders>
ambv: It's extra data to download when cloning the repo.
21:28
<ambv>
well git manages to compress those kinds of file pretty well while cloning
21:29
<ambv>
but as I said, SVN revision works for me too
21:30
<ambv>
HM!
21:31
<ambv>
http://svn.whatwg.org/webapps/complete.html is older than http://www.whatwg.org/specs/web-apps/current-work/
21:32
<Hixie>
oops
21:33
<Hixie>
fixed
21:40
<ambv>
Hixie: thanks!
21:41
<gsnedders>
There are advantages to using #whatwg for html5lib support. :)
21:42
<ambv>
gsnedders: https://github.com/html5lib/html5lib-python/pull/43
21:42
<ambv>
now the thing that bothers me is why is step 7 commented out
21:43
<ambv>
it doesn't look right anyway, should we just get rid of it
21:43
<gsnedders>
Step 7 isn't commented out, step 7 is line 1486 in your copy.
21:44
<gsnedders>
What that commented out code is I have no idea.
21:44
<ambv>
ah, I see
21:44
<ambv>
I'll remove the code, git will remember it for us
21:44
<gsnedders>
Indeed.
21:46
<gsnedders>
ambv: See pull #44
21:47
<ambv>
gsnedders: #43 is now rebased
21:47
<ambv>
looking at 33
21:47
<ambv>
*44
21:48
gsnedders
points out rebasing stuff breaks Critic, as well as the fact that he prefers to be able to easily see changes in pull requests (thus non-fast-forward changes are hard to work out what has changed from when I last looked at the pull request)
21:48
<ambv>
OK, will use fixup from now on
21:49
<ambv>
as for #44, +1 - this implementation makes sense to me when I read it. dom2sax didn't, confusion level: high.
21:50
<gsnedders>
:)
21:51
<gsnedders>
ambv: I think I'm against comments from the spec in general, it's just the adoption agency algorithm is sufficently complex that I think it's useful.
21:51
<ambv>
fair enough. for comments that would be longer than the implementation I simply updated the step number
21:53
<ambv>
is doctype really capitalized "Doctype"? (line 21 in treeadapters/sax.py)
21:53
<gsnedders>
Yes.
21:54
<ambv>
yikes, that looks bad.
21:54
<gsnedders>
constants.py:3081
21:54
<gsnedders>
Really all the tokens should be classes, but oh well.
21:56
<ambv>
that's for 2.0
21:56
<ambv>
;)
21:56
<gsnedders>
Indeed. :)
21:59
<ambv>
from html5lib.filters.alphabeticalattributes import Filter as AlphabeticalAttributesFilter
21:59
<ambv>
my inner Java child smiled.
22:00
<gsnedders>
Bah, we have the ModuleCacheFactoryFactory in utils.py!
22:00
<gsnedders>
It's even commented with something like, "Yes, I know this isn't Java. Yes, I did really write a factory factory in Python."
22:01
<ambv>
:)
22:02
<gsnedders>
(I may note I have never voluntarily written Java in my life.)
22:03
<ambv>
gsnedders: I've heard Richard followed up on the PyPI login issue
22:03
<gsnedders>
ambv: Yes, I know. :)
23:07
<zewt>
i wonder why no browsers have made popup windows scoped to the tab they're opened from
23:08
<zewt>
sort of like tab-modal alerts
23:09
<zewt>
might make target=_blank a bit less of an abuse
23:11
<ambv>
how would you scope them from the UX perspective?
23:12
<zewt>
not entirely sure; could be a second row of tabs, though that's a bit clunky
23:12
<ambv>
but the idea is neat
23:12
<zewt>
not too bad if it only shows up when it's actually used, though
23:14
<zewt>
drives me nuts that pages will make every external link target=_blank to try to keep you from leaving their site, so i disable opening windows (which breaks sites, but not too frequently)
23:20
<ambv>
by the way, what does WHATWG think of the HTML5 logo
23:20
<ambv>
especially now that there's no longer a 5 in HTML5
23:21
<zewt>
does anyone in here care about logos? heh
23:34
<gsnedders>
zewt: Opera basically does.
23:50
<heycam>
Hixie++