Gajim - 2018-07-16


  1. marmistrz lovetox, see the example: https://zerobin.net/?bf4bc23d6d3cacc9#FuyQBjaUrcAsjoCIxV8PBQfnPcTx9Mf3lUkIjsolwYc=
  2. marmistrz lint with `mypy --strict test.py`
  3. pep. lovetox, https://dev.gajim.org/gajim/python-nbxmpp/commit/7bccbcbac5b5cb9f1f124cc284a18fe89a893fe7#8f08fde207d8e83dd2d932438470d441c0c7a845_449_447 For the other log.debug calls you passed (xmlns, name) as parameter but not here
  4. nin hi, has anyone lese the issue that the image preview plugin can not be installed in the flatpak version?
  5. Daniel nin, did you install via flathub? Then it will be possible when Gajim 1.1 is released
  6. nin Daniel‎: yes I did. Ok, so I'll have to wait a bit? That is fine.
  7. Daniel Yes, a bit
  8. lovetox yes pep, but i pass the whole stanza
  9. lovetox thanks marmistrz, i look at it in the evening
  10. lovetox marmistrz, i look into maybe we can use it for return values only or if the arguments of a method have a standard type (str, int, etc)
  11. lovetox the problem that has only been fixed with python 3.7 is, that if you want to say that arg: CustomObjectType, then you have to import that type into the scope of the module first
  12. lovetox which makes it even more blow up
  13. lovetox and for no gain at all, because i dont need that type importet in the module
  14. marmistrz lovetox: and how else do you want to clarify, which of the possibly many Foo types you want to use?
  15. marmistrz other than using the full path?
  16. lovetox hm this has not been fixed in python 3.7
  17. lovetox its seems what they fixed is forward reference
  18. lovetox https://docs.python.org/3/whatsnew/3.7.html#whatsnew37-pep563
  19. marmistrz In Rust e.g. I always import the type even if it's only used for the input arg
  20. lovetox i dont know rust, but the thing is this is not needed for python
  21. lovetox and to do it only for a mypy test that you run in dev
  22. lovetox and it does not have any value at runtime makes it meh
  23. marmistrz lovetox: why do you want that in runtime when you have CI which validates it statically with every commit?
  24. lovetox i dont want it at runtime, but if the language evaluates it at runtime, and that is how the language works, then its a MUST that you import these types and thats just it
  25. lovetox but python was build on, easy to understand, easy readable code
  26. lovetox if you import now X types and even have to structure the code so the types are defined before beeing used in a annotation, and all that you do only because of mypy, not because it has any influence on the code
  27. lovetox seems to me, like you would want to use a different language
  28. lovetox and all these examples are little methods with 1 or 2 args, in the wild we have some with 10, in my opinion makes the whole thing less readable
  29. lovetox and im not saying that there is not something to gain from it
  30. lovetox but the question is, does it weigh out the costs
  31. lovetox but as i said i will try to use it in some modules, lets see how much i have to bend things to make it work
  32. lovetox but importing types into a namespace where i dont use them, seems like a nogo for me
  33. marmistrz bbl
  34. bot Mosh Shood created an issue in _gajim_ < https://dev.gajim.org/gajim/gajim/issues/9247 >: #9247: < Help >
  35. marmistrz lovetox, you can see how it looks like in this project I worked in last summer: https://github.com/golemfactory/golem/pull/1382/files#diff-17005c20ead538ff2c65469227ebfb42R62
  36. marmistrz that's a very long constructor, which got fully annotated
  37. lovetox hm so mypy checks also what i do with vars annoted afterwards
  38. lovetox so if i do x: list
  39. lovetox and later in the method do x.blabla()
  40. lovetox it would give an error?
  41. bot mareking closed an issue in _gajim_ < https://dev.gajim.org/gajim/gajim/issues/9232 >: #9232: < Neither Gajim.app nor executing launch.py work >
  42. bot Daniel Brötzmann modified an issue in _gajim_ < https://dev.gajim.org/gajim/gajim/issues/9247 >: #9247: < Help >
  43. marmistrz lovetox, yes: [16:30:37] $ cat > test.py x = [1, 2, 3] x.blabla() marcin@arch /tmp [0] [16:30:46] $ mypy test.py test.py:2: error: "List[int]" has no attribute "blabla"
  44. marmistrz lovetox, let me stress this: mypy is all about *static analysis*. If you want runtime checks based on the pep 484 type annotations, then use the enforce module (but you probably don't want to do this, since 1. this inflicts a large performance penatly 2. it may crash the code where it doesn't matter. The enforce module may be more suitable for unit tests. The goal of mypy and pep484 is *not to alter* the program semantics, to keep correct python programs working.
  45. pep. "correct" is too much here :P
  46. pep. But I agree with using static analysis
  47. pep. FTFY: s/correct/working/
  48. Zash I want better static analysis too
  49. marmistrz Re: imports. First of all, most of the python linters want you to keep all your imports at the beginning of the file. That's pylint for sure, maybe something else, I don't remember. You said that you don't want to import the types you're using for type annotation only. Now, please tell me, if mypy sees the following definition: `def foo(x: Path) -> None` then which of those paths should it assume? https://zerobin.net/?bafebe489d8c616e#DSh0twkvX/BKsRFjvZQ/+H9fhlQQtFXwP3Z5lpjfoDI=
  50. bot Sophie Herold updated a merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/295 >: Rework Bookmarks Dialog
  51. lovetox marmistrz, i know that mypy needs that
  52. lovetox im not saying it should work without it
  53. lovetox but this brings greater problems, because now you have to check what to import where at what time
  54. lovetox there is something like a loading order of modules
  55. lovetox one module may depend on another module etc
  56. lovetox you get fast into situations like, helper module needs type Contacts, but module Contacts depends on another method from helper module
  57. marmistrz If you have circular dependencies in your modules, it may simply mean that the module hierarchy needs a small refactor :)
  58. lovetox yeah .. see one leads to another :)
  59. lovetox but lets stop this discussion now, you have intruiged me enough so i will try it out in some parts of Gajim
  60. bot Sophie Herold updated a merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/296 >: Rework Plugins Dialog
  61. rom1dep lovetox: crap, now that there is a favourites/Active/Conversations grouping for MUCs, I want to make my own groups :)
  62. lovetox ...
  63. lovetox is favourite not enough ^^
  64. rom1dep nope
  65. lovetox yeah but how is this supposed to interact with active
  66. rom1dep I want favourites, really favourites, favourites I like the most, big favourites
  67. rom1dep you name it!
  68. rom1dep honestly, if we go there, it should be in both categories [X,Active if applicable]
  69. bot Philipp Hörist updated a merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/295 >: Rework Bookmarks Dialog
  70. rom1dep that's timely :)
  71. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < https://dev.gajim.org/gajim/gajim >: *67d9b7a7* < https://dev.gajim.org/gajim/gajim/commit/67d9b7a7eaa318945afede4bd4c82981131f8a6c > Rework Bookmarks Dialog
  72. bot Philipp Hörist merged a merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/295 >: Rework Bookmarks Dialog
  73. bot Sophie Herold updated a merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/296 >: Rework Plugins Dialog
  74. bot kev stanz created an issue in _gajim_ < https://dev.gajim.org/gajim/gajim/issues/9248 >: #9248: < MUC history fetch from server >
  75. bot Philipp Hörist updated a merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/296 >: Rework Plugins Dialog
  76. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < https://dev.gajim.org/gajim/gajim >: *f8916951* < https://dev.gajim.org/gajim/gajim/commit/f89169517e2ab6a061518962cf3ffb8cbe9956f6 > Rework Plugins Dialog
  77. bot Philipp Hörist merged a merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/296 >: Rework Plugins Dialog
  78. bot Daniel Brötzmann modified an issue in _gajim_ < https://dev.gajim.org/gajim/gajim/issues/9248 >: #9248: < Dynamically fetch MUC history from server >
  79. bot Daniel Brötzmann modified an issue in _gajim_ < https://dev.gajim.org/gajim/gajim/issues/9248 >: #9248: < Dynamically fetch MUC history from server >
  80. bot Daniel Brötzmann modified an issue in _gajim_ < https://dev.gajim.org/gajim/gajim/issues/9060 >: #9060: < Meta: Message/conversation appearance >
  81. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < https://dev.gajim.org/gajim/gajim >: *6c70b63e* < https://dev.gajim.org/gajim/gajim/commit/6c70b63e34c6bb49365d8df707e9ab8d0588c167 > Fix parsing jid from roster set event