-
-
Notifications
You must be signed in to change notification settings - Fork 424
Version dependent error messages #643
Version dependent error messages #643
Conversation
Anyone knows how to handle situation where for certain test cases there are |
How many of those instances are there? I only see 20 failures in the output from BeeKeeper (no unexpected successes). |
batavia/VirtualMachine.js
Outdated
var args | ||
var extra = 0 | ||
var lo | ||
var hi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 13: (no-redeclare) 'pos' is already defined.
batavia/VirtualMachine.js
Outdated
var extra = 0 | ||
var lo | ||
var hi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 13: (no-redeclare) 'unpacked_code' is already defined.
batavia/VirtualMachine.js
Outdated
var lo | ||
var hi | ||
|
||
while (pos < code.co_code.val.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 13: (no-redeclare) 'args' is already defined.
batavia/VirtualMachine.js
Outdated
var hi | ||
|
||
while (pos < code.co_code.val.length) { | ||
var opcode_start_pos = pos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 13: (no-redeclare) 'extra' is already defined.
batavia/VirtualMachine.js
Outdated
var opcode = code.co_code.val[pos++] | ||
|
||
// next opcode has 4-byte argument effectively. | ||
if (opcode === dis.EXTENDED_ARG) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 17: (no-redeclare) 'opcode_start_pos' is already defined.
batavia/VirtualMachine.js
Outdated
// next opcode has 4-byte argument effectively. | ||
if (opcode === dis.EXTENDED_ARG) { | ||
lo = code.co_code.val[pos++] | ||
hi = code.co_code.val[pos++] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 17: (no-redeclare) 'opcode' is already defined.
batavia/VirtualMachine.js
Outdated
|
||
if (opcode in dis.hasconst) { | ||
args = [code.co_consts[intArg]] | ||
} else if (opcode in dis.hasfree) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 21: (no-redeclare) 'intArg' is already defined.
batavia/VirtualMachine.js
Outdated
} | ||
} else if (opcode in dis.hasname) { | ||
args = [code.co_names[intArg]] | ||
} else if (opcode in dis.hasjrel) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 29: (no-redeclare) 'var_idx' is already defined.
batavia/VirtualMachine.js
Outdated
this.push(dict) | ||
return | ||
} | ||
|
||
VirtualMachine.prototype.byte_STORE_MAP = function() { | ||
switch (constants.BATAVIA_MAGIC) { | ||
case constants.BATAVIA_MAGIC_35: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 5: (no-useless-return) Unnecessary return statement.
batavia/VirtualMachine.js
Outdated
var lenPos = arg % 256 | ||
for (var i = 0; i < lenKw; i++) { | ||
var items = this.popn(2) | ||
namedargs[items[0]] = items[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 13: (no-redeclare) 'namedargs' is already defined.
batavia/VirtualMachine.js
Outdated
var items = this.popn(2) | ||
namedargs[items[0]] = items[1] | ||
} | ||
if (kwargs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 13: (no-redeclare) 'lenPos' is already defined.
batavia/VirtualMachine.js
Outdated
for (let elem of args) { | ||
posargs.push(elem) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 13: (no-redeclare) 'posargs' is already defined.
batavia/VirtualMachine.js
Outdated
|
||
var retval = func(posargs, namedargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 13: (no-redeclare) 'func' is already defined.
batavia/VirtualMachine.js
Outdated
this.push(retval) | ||
var retval = func(posargs, namedargs) | ||
this.push(retval) | ||
} | ||
} | ||
|
||
VirtualMachine.prototype.byte_RETURN_VALUE = function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 13: (no-redeclare) 'retval' is already defined.
9192c4d
to
a6caeb3
Compare
Thanks lucantrop. There were some unexpected successes, they just did not appear at the bottom. And it turns out there already was a solution for this problem in |
8675062
to
808bffc
Compare
This is pretty incredible, and you've got a 🚢 from me. It's a shame we have to repeat the <3.6 cases so many times. If you felt like condensing that logic at all, that would be fascinating and most likely very helpful. |
@phildini You mean that CI task for Python 3.4 has to be run each time, even though PR regards Python 3.6? Well, I am not well-versed with Ops part of DevOps, so one thing that comes to my mind would be parsing commit/PR message by BeeKeeper, looking for some special line like "# test Python 3.6" and changing tasks based on that. This sounds like a mess though, and also note that:
|
Python 3.6+
There is an option to specify in which Python versions certain test cases would fail. Before this commit, versions would be specified as floats. This changes it from floats to strings, which seems more intuitive.
e7cd63c
to
c07cde4
Compare
Sorry, I should have been clearer! What I meant was we do
a whole lot in these changes, which seems like duplicating a lot of code? Also maybe brittle for supporting future versions. If there were some helper functions to deal with this, it would make me happy, but this whole complaint is more "nit" than "blocker", so feel free to say you don't want to action that right now and we can probably still move forward. |
@phildini Oh, sure. I have actually already started working on a module that would allow something more like this: if (version.older('3.6')) {
...
} else {
...
} I thought I'd submit it in separate patch though, I am not sure if I can finish it before Monday, since Thursday through Sunday I won't be able to do any work (and it's not super straight forward as there are some caveats with pre/postreleases). Also this too goes away once we move to one branch per version. |
Fair enough! If you get to the point where tests are passing on this branch, I'm happy to merge in and save the optimization for post-merge. |
Great! BTW I don't know what's going on with CI right now, seems like it crashed on Python lint check..? |
I'm not entirely sure what's going on either... could you try rebasing against master and pushing again? |
c07cde4
to
603c4c9
Compare
@abonie do you feel this is ready to merge? I'm happy to do so if you're ready. |
@@ -26,7 +27,19 @@ function bytes(args, kwargs) { | |||
} else if (args.length === 1) { | |||
var arg = args[0] | |||
if (arg === null) { | |||
throw new exceptions.TypeError.$pyclass("'NoneType' object is not iterable") | |||
switch (constants.BATAVIA_MAGIC) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if we could condense these cases down to a helper function, but I'm fine with that being a cleanup PR later.
603c4c9
to
82a515f
Compare
math module's docstring changed in Python 3.5. For now it's ok to mark respective tests as failing.
82a515f
to
2a6cec1
Compare
@phildini I made one last change or rather retracted one of the earlier commits, as it seems that error message in |
There are multiple discrepancies in error messages for Python 3.5+, which causes 3.5 and 3.6 test suites to fail. This tries to fix them.