These are chat archives for pybee/general

6th
Mar 2017
Elias Dorneles
@eliasdorneles
Mar 06 2017 00:32
hey @dibyadas, I'm online now
Chris Jarvis
@JarvisScript_twitter
Mar 06 2017 03:21
Hi I'm a Jr Dev in Nashville. I'm looking for an OSS project to join.
Russell Keith-Magee
@freakboy3742
Mar 06 2017 03:22
@JarvisScript_twitter Hey! What a coincidence! We’re an OSS project looking for people who want to join! :-)
Elias Dorneles
@eliasdorneles
Mar 06 2017 03:23
Haha! Yeaah, welcome Chris! :)
Chris Jarvis
@JarvisScript_twitter
Mar 06 2017 03:25
Thanks
Russell Keith-Magee
@freakboy3742
Mar 06 2017 03:26
@JarvisScript_twitter So - what’s your area of expertise/interest? What brings you to BeeWare?
Chris Jarvis
@JarvisScript_twitter
Mar 06 2017 03:30
Mainly frontend but I've been leaning Python. I found by following a Python event on twitter.
Russell Keith-Magee
@freakboy3742
Mar 06 2017 03:32
So you’re looking to contribute to an OSS project? From the sound of it Batavia might be a place to start: http://pybee.org/contributing/how/first-time/what/batavia/
Chris Jarvis
@JarvisScript_twitter
Mar 06 2017 03:38
At one point I was working on the tutorial for Batavia. Then life got in the way. I'm going see if I can tell where I left off.
Russell Keith-Magee
@freakboy3742
Mar 06 2017 03:38
No worries! Let us know if there’s anything we can do to help!
JACK_1729
@jack17529
Mar 06 2017 10:08
hi new here need help in starting contributing in VOC
Deepankar Agrawal
@deep110
Mar 06 2017 10:09
@jack17529 what help do you need. Have u seen this http://pybee.org/contributing/how/first-time/what/voc/
Deepankar Agrawal
@deep110
Mar 06 2017 11:38

@freakboy3742 @eliasdorneles Hi, I was trying to implement dict.fromkeys(org.python.Object), but was getting error when trying to run.

Exception in thread "main" TypeError: fromkeys() takes 0 positional arguments but 1 was given
at org.python.types.Function.throwUnexpectedPositionalArgumentsError(Function.java:220)
at org.python.types.Function.adjustArguments(Function.java:260)

I checked adjustArguments and it had variable argcount which gets value from Code class. So I am thinking, this Code class would be filling its params from reflection, so why is it giving argcount=0 for fromkeys() which has params defined here.
Any help regarding this? Or any suggestion how to debug.

Chiang Fong Lee
@cflee
Mar 06 2017 12:13

@freakboy3742 will VOC continue testing against python 3.4.2 for long?

context: I think I just ran into a bug in CPython’s implementation of __ne__() (http://bugs.python.org/issue21408) because some test cases are failing on travis on 3.4.2 but passing on 3.4.5. trying to see if I should add a special case for it or not

sdoshi96
@sdoshi96
Mar 06 2017 15:58
Hello everyone! My name is Shyam. I am interested in GSOC 2017 and want to contribute to VOC project. Based on the details provided on first time contribution page, I followed the instructions and downloaded python, jdk and apache ant succesfully. But I am still facing problem in running the VOC enviornment. As soon as, I run the voc command it says that command not found.
Please let me know where i am making a mistake :)
Deepankar Agrawal
@deep110
Mar 06 2017 16:00
have you ran setup.py of voc
Dibya Prakash Das
@dibyadas
Mar 06 2017 16:21
Hi! @sdoshi96 you should first activate virtualenv and the use pip install -e . inside the voc directory
after that you have to use ant java
Elias Dorneles
@eliasdorneles
Mar 06 2017 16:27
@deep110 hi! So, the error you're seeing about the positional arguments is because the fromkeys() Java method is missing the proper Python signature that tells VOC which arguments are supported in Python side (see here: http://voc.readthedocs.io/en/latest/internals/signatures.html)
Deepankar Agrawal
@deep110
Mar 06 2017 16:34
@eliasdorneles Thanks, I totally forgot to match signatures, I thought it would be just matching number of args with python function, since type of args is same org.python.Object. Thanks.
Abhidnya Andraskar
@gEt-rIgHt-jR
Mar 06 2017 17:54
How to test the changes ?
Deepankar Agrawal
@deep110
Mar 06 2017 17:56
@gEt-rIgHt-jR you will need to generate modified jar using ant java and then follow the same steps you did for running a .py file.
Abhidnya Andraskar
@gEt-rIgHt-jR
Mar 06 2017 17:56
ohk, thanks
Deepankar Agrawal
@deep110
Mar 06 2017 17:57
you should also check if your tests has passed using pytest
Abhidnya Andraskar
@gEt-rIgHt-jR
Mar 06 2017 17:57
:+1:
Deepankar Agrawal
@deep110
Mar 06 2017 18:38
@eliasdorneles I wanted to make a method both accessed from object and as static, but making a method static in Java, and calling the method from object maps the first argument to self, any way to solve this.
Deepankar Agrawal
@deep110
Mar 06 2017 18:59
@eliasdorneles means I need a method to be python static
Sudhanshu Shekhar
@SudShekhar
Mar 06 2017 20:06
Hi! I am looking to get started with an OSS project ... am proficient in python and java. Also, have a working knowledge of C++ and javascript.
First heard of pybee in @freakboy3742's (side not: I am a big fan of you!) talk, was interested in helping out but then got busy with work and forgot to connect.
*note
not a gsoc candidate but am interest in VOC, should I also pick up some beginner tasks and help out? or focus on something else first?
Elias Dorneles
@eliasdorneles
Mar 06 2017 21:01
@deep110 hey, sorry, I'm not following, can you ellaborate? what exactly are you trying to do?
Deepankar Agrawal
@deep110
Mar 06 2017 21:27

@eliasdorneles sure, for example, there is method fromkeys() in dict which can be accessed in two ways,

dict.fromkeys() --> statically
{}.fromkeys() --> from a object

now, if I make method static in Java, I can access it both ways but when accessing from object the first argument that is passed is self. So I was asking how to handle python static methods.
I also tried to make a static method in python class to analyze the function calls it would make, but voc was unable to run it. For example:-

class Foo:
    def static_method():
        pass

Exception in thread "main" java.lang.ClassFormatError: Arguments can't fit into locals in class file python/example/Foo

I was trying understand python/types/klass.py, as I think it is converting python class code to javaOpcode. But couldn't find any help there regarding static methods.

Russell Keith-Magee
@freakboy3742
Mar 06 2017 22:38
@cflee I’m not sure what the strategy for old Python versions should be. My original thought was that we would maintain a branch for each Python version (3.4, 3.5, 3.6,…) and keep each branch up to date with the most recent release… but I’m open to other suggestions.
I’m also aware that getting the bulk of Python working first is our priority, rather than getting bogged down in minor (or micro) version discrepancies
Elias Dorneles
@eliasdorneles
Mar 06 2017 22:40
@deep110 Hmm, I see what you mean, yeah, I don't have a solution for that at the moment
Deepankar Agrawal
@deep110
Mar 06 2017 22:47
@eliasdorneles Oh! No problem. Then I would like to fix this issue. Can you provide any tips or starting points on its implementation.
So, should me make @static decorators like @method in java. Or more likely add static property to org.python.Method