#beets

/

      • sampsyo
        Indeed. :/
      • NOTICE: [beets] sampsyo pushed 2 new commits to master: https://github.com/beetbox/beets/compare/ae7990322abe...d5f4c80894f2
      • NOTICE: beets/master 6c661c4 Johnny Robeson: Replace __cmp__ with rich comparisons for Distance
      • NOTICE: beets/master d5f4c80 Adrian Sampson: Merge pull request #2034 from jrobeson/replace-__cmp__-with-rich-comparisons...
      • jackwilsdon
        AppVeyor is so slow compared to Travis
      • 2 of the builds haven't even started yet for me
      • sampsyo
        Yeah, it stays "queued" for a really long time.
      • jrobeson
        good work so far on the windows tests sampsyo
      • sampsyo
        We're getting close!
      • jrobeson
        are you gonna be around later?
      • sampsyo
        Maybe a little, but not too much later, alas—I've got some plans later on
      • jrobeson
        so everythong from say somelibraryentry.path shouldbe a bytestring right?
      • sampsyo
        Yes.
      • jrobeson
        after py3 is merged, the first thing to do is reverse most of the work i'm doing right now.. with pathlib
      • sampsyo
        Yes, I suppose so. Also a good chunk of work.
      • jrobeson
        well the more i work with the codebase, the easier it'll be
      • sampsyo
        True!
      • jrobeson
        btw.. sqlite won't accept bytestrings
      • sampsyo
        :(
      • jrobeson
        err i mean the sqlite connect method
      • sampsyo
        Oh! That's better.
      • (But still bad.)
      • jrobeson
        but at least we'll mostly be ok with that.. compared to the library directory
      • so mediafile properties.. are we doing an unnecessary decode now on py2 (it's certainly not possible on py3)
      • py2 propertes can't be unicode can they?
      • sampsyo
        Property names? No, they're bytes on python 2.
      • …but if they're being used somewhere as unicode, then yeah, they'll need decoding
      • jrobeson
        if isinstance(descriptor, MediaField):
      • - yield property.decode('utf8')
      • + yield property
      • it passes the tests without it on py2
      • yeah those aren't true properties.. it's actually dict keys specifically there
      • sampsyo
        Yeah, but it produces a dict containing bytes instead of text on Python 2, which could cause problems. :/
      • jrobeson
        oh, but they are used with getattr() later i think... so they are
      • i'm now up to like 18 commits on my py3 branch .. minus the one you just merged
      • sampsyo
        That is, we'd need to check what the clients expect: if they want "native strings" exclusively (for property lookup), then it's fine.
      • jrobeson
        so, i ran into a problem last night. where does the translation to bytes happen that mutagen expects when saving a property via mediafile?
      • jackwilsdon has left the channel
      • like say the 'customtag' example
      • jackwilsdon joined the channel
      • jackwilsdon
        What does everyone think of just running python 2.7 and 3.3 tests?
      • I can't exactly imagine anything changing between 3.3, 3.4 and 3.5
      • jackwilsdon has left the channel
      • jackwilsdon joined the channel
      • sampsyo
        jrobeson: There are lots of places where encoding happens, unfortunately. Does grepping for `.encode` in mediafile.py help?
      • jrobeson
        i just know that in sanitize it doesn't do anything for bytes there
      • sampsyo
        jackwilsdon: That seems fine for now—when we actually get Python 3 compatibility, it is nice to know we didn't run afoul of anything in the version changes.
      • jrobeson
        and we really shouldn't be turning them into bytes until we send it to mutagen should we?
      • jackwilsdon has left the channel
      • i guess that's another whole can of worms
      • but the way it is no.. it gets to try to save it.. and _none_value() doesn't send bytes
      • and none_value is what gets saved
      • mutagen expects bytes
      • nothing from here onwards https://github.com/beetbox/beets/blob/master/be... seems to send bytes if the value is none at least
      • and it doesn't look like the storage styles coerce to bytes either
      • sampsyo
        It's not always the case that Mutagen wants bytes, though—some formats want Unicode.
      • jrobeson
        ah
      • well it does when sending setting mb_trackid
      • which is where the first failure is
      • unless maybe it's the key and not the value that it's expecting to be bytes
      • i'll check that
      • N0S4A2 has quit
      • x12 joined the channel
      • opatel99 joined the channel
      • x12 is now known as jackwilsdon
      • Vacuity joined the channel
      • ah, it's 26 commits..
      • thunderrd has quit
      • jackwilsdon
        Eugh I really don't like how weird Tox is
      • I can't believe there's no other virtualenv testing systems like it though
      • Vacuity_ has quit
      • jrobeson
        seems like the problem is more with the tox configuration parsing than tox itself tho at least?
      • jackwilsdon
        It's the way they've designed the file I think
      • It's just odd
      • jrobeson
        maybe instead write a script to build a tox config manually :)
      • hah
      • jackwilsdon
        Also they seem to loosely match environment names which is silly
      • I can do something like tox -e py27-flake8-test-docs
      • And it will try and jam the commands end to end
      • And do some weird shit
      • jrobeson
        it definitely doesn't fit how other tools work
      • jackwilsdon
        Yeah
      • Ok so I seem to have got a really nice configuration now
      • Where chaining works
      • So I can do tox -e py27-test-flake8 and it will run nose and then flake8
      • I'm starting to understand tox
      • jrobeson
        didn't we want flake8 before nose? or is that too much trouble?
      • jackwilsdon
        You can just do tox -e py27-flake8-test :D
      • We're going to run them separately anyway for now
      • It's just something nice
      • jrobeson
        does it fail now?
      • jackwilsdon
        Yeah everything seems to be alright
      • just updating travis
      • And going to push it and try it
      • jrobeson
        so what about the min-version issue that sampsyo mentioned?
      • jackwilsdon
        I'm going to re-add that to the config
      • Our command line argument overrides it anyway
      • So we can keep it for support sake
      • Not entirely sure how we can abstract away the --show-skipped
      • Not sure what to call the env for it
      • NOTICE: [beets] jrobeson pushed 1 new commit to master: https://github.com/beetbox/beets/commit/7467ebaacad85d96b4153d319b423961b5d23f1b
      • NOTICE: beets/master 7467eba Johnny Robeson: check for imagemagick in command_output with b\'
      • jrobeson
        why not SHOW_SKIPPED ?
      • jackwilsdon
        For the test name?
      • AHA
      • If we export
      • NOSE_SHOW_SKIPPED
      • Nose already shows skipped
      • It's a "hidden" feature that's not documented of showskipped
      • So we can set that
      • jrobeson
        well then :)
      • add a comment mentioning that it's undocumented way to show skipped tests
      • jackwilsdon
        Yeah I will do
      • jrobeson
        you might need to pass it down through the tox env variables
      • jackwilsdon
        Hmm yeah IDK if tox forwards them
      • Good point
      • jrobeson
        it doesn't
      • jackwilsdon
        Eugh
      • jrobeson
        but you can tell it to forawrd specific ones
      • it's a whitelist
      • and now i think you've exhausted everything i know about tox
      • jackwilsdon
        Aha, passenv
      • Thanks :)
      • jrobeson
        uggh.. i feel bad about this comment that's about to show up
      • NOTICE: [beets] jrobeson pushed 1 new commit to master: https://github.com/beetbox/beets/commit/e7f70c896dc8882cef1fa698237b0897aac2f884
      • NOTICE: beets/master e7f70c8 Johnny Robeson: check imagemagick output with bytes regex too
      • not sure how i missed that one
      • jackwilsdon
        What's up with it?
      • jrobeson
        it was meant to be part of the previous commit,but since it doesn't break on py2 i iddn't notice it
      • jackwilsdon
        Ah
      • jrobeson
        at least i keep finding backportable stuff
      • i still have a few more backportable things like providing a __str__ method
      • in some places
      • i have 2 different git stashes that i keep checking things against
      • jackwilsdon
        Eugh Git Stashes confuse me :P
      • IDK why, they make me panic I'm going to lose my stuff
      • Even though it's difficult to lose stuff on Git
      • jrobeson
        i wouldn't have a problem redoing either tho at least
      • one is mostly adding b' EVERYWHERE
      • that made a ton of tests pass
      • but it's way over the top
      • jackwilsdon
        Why is it we need to do that exactly?
      • Are strings unicode by default in 3?
      • jrobeson
        yes
      • jackwilsdon
        Ah, I see how that could break things
      • jrobeson
        whati 'm trying to do is avoid any architectural refactorings
      • and all library paths and things in beets are bytestrings
      • but beets has a bunch of places where it works in py2 because bytes and strings are almost the same thing
      • jackwilsdon
        Yeah that sounds a bit wobbly haha
      • jrobeson
        so assertTrue(somebytestring, 'somesamestring') pass in py2 , but not 3