robotframework 6.1.1__zip → 7.0a1__zip

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. {robotframework-6.1.1/src/robotframework.egg-info → robotframework-7.0a1}/PKG-INFO +3 -6
  2. {robotframework-6.1.1 → robotframework-7.0a1}/setup.py +2 -5
  3. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/interfaces.py +35 -48
  4. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/parsing.py +4 -2
  5. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/conf/gatherfailed.py +2 -2
  6. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/conf/languages.py +0 -9
  7. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/conf/settings.py +8 -5
  8. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.css +4 -0
  9. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.html +9 -1
  10. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/model.js +2 -4
  11. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/testdata.js +10 -3
  12. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/template.py +3 -3
  13. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/builder.py +0 -8
  14. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/datatypes.py +9 -10
  15. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlutils.py +4 -7
  16. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonbuilder.py +14 -10
  17. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/model.py +13 -25
  18. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/robotbuilder.py +13 -3
  19. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlbuilder.py +8 -8
  20. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlwriter.py +12 -38
  21. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/BuiltIn.py +215 -189
  22. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Collections.py +2 -9
  23. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/DateTime.py +1 -1
  24. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/OperatingSystem.py +4 -3
  25. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Process.py +26 -27
  26. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Remote.py +40 -36
  27. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/String.py +4 -4
  28. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/XML.py +7 -8
  29. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/__init__.py +2 -2
  30. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/__init__.py +4 -4
  31. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/body.py +14 -6
  32. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/configurer.py +15 -11
  33. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/control.py +151 -81
  34. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/filter.py +31 -25
  35. robotframework-7.0a1/src/robot/model/keyword.py +70 -0
  36. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/message.py +19 -10
  37. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/namepatterns.py +3 -25
  38. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/stats.py +9 -15
  39. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/tags.py +1 -1
  40. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/testcase.py +12 -21
  41. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/testsuite.py +16 -22
  42. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/visitor.py +35 -8
  43. robotframework-7.0a1/src/robot/output/console/dotted.py +90 -0
  44. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/console/quiet.py +3 -2
  45. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/console/verbose.py +60 -60
  46. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/debugfile.py +36 -23
  47. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/filelogger.py +16 -13
  48. robotframework-7.0a1/src/robot/output/listeners.py +586 -0
  49. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/logger.py +164 -77
  50. robotframework-7.0a1/src/robot/output/loggerapi.py +152 -0
  51. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/loggerhelper.py +23 -56
  52. robotframework-7.0a1/src/robot/output/output.py +158 -0
  53. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/stdoutlogsplitter.py +8 -5
  54. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/xmllogger.py +163 -109
  55. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/blocklexers.py +17 -13
  56. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/context.py +12 -2
  57. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/lexer.py +1 -1
  58. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/settings.py +6 -3
  59. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/statementlexers.py +39 -10
  60. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokens.py +27 -29
  61. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/model/blocks.py +19 -6
  62. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/model/statements.py +184 -84
  63. robotframework-7.0a1/src/robot/parsing/model/visitor.py +102 -0
  64. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/expandkeywordmatcher.py +1 -1
  65. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/jsbuildingcontext.py +8 -6
  66. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/jsmodelbuilders.py +88 -61
  67. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/stringcache.py +4 -3
  68. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/xunitwriter.py +15 -21
  69. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/__init__.py +3 -2
  70. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/configurer.py +12 -9
  71. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/flattenkeywordmatcher.py +8 -8
  72. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/keywordremover.py +71 -54
  73. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/merger.py +1 -1
  74. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/model.py +400 -316
  75. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/modeldeprecation.py +9 -3
  76. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/resultbuilder.py +21 -23
  77. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/xmlelementhandlers.py +76 -40
  78. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/__init__.py +1 -1
  79. robotframework-7.0a1/src/robot/running/arguments/argumentconverter.py +101 -0
  80. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentmapper.py +16 -14
  81. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentresolver.py +41 -33
  82. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentspec.py +24 -90
  83. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentvalidator.py +34 -27
  84. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/customconverters.py +14 -11
  85. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/embedded.py +23 -26
  86. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/typeconverters.py +175 -213
  87. robotframework-7.0a1/src/robot/running/arguments/typeinfo.py +367 -0
  88. robotframework-7.0a1/src/robot/running/arguments/typevalidator.py +62 -0
  89. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/bodyrunner.py +83 -68
  90. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/parsers.py +8 -10
  91. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/settings.py +9 -17
  92. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/transformers.py +166 -308
  93. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/context.py +80 -25
  94. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/handlers.py +11 -16
  95. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/handlerstore.py +1 -1
  96. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/librarykeywordrunner.py +9 -17
  97. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/model.py +109 -32
  98. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/namespace.py +18 -19
  99. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/statusreporter.py +13 -12
  100. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/suiterunner.py +15 -17
  101. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/testlibraries.py +33 -40
  102. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/usererrorhandler.py +8 -8
  103. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/userkeyword.py +13 -8
  104. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/userkeywordrunner.py +18 -21
  105. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/testdoc.py +18 -13
  106. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/__init__.py +50 -35
  107. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/connectioncache.py +64 -59
  108. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/encodingsniffer.py +1 -1
  109. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/escaping.py +11 -9
  110. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/markupwriters.py +20 -13
  111. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/normalizing.py +9 -24
  112. robotframework-7.0a1/src/robot/utils/notset.py +33 -0
  113. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/platform.py +15 -5
  114. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robotpath.py +1 -0
  115. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robottime.py +120 -88
  116. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robottypes.py +16 -31
  117. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/setter.py +0 -5
  118. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/text.py +7 -4
  119. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/unic.py +2 -2
  120. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/__init__.py +2 -2
  121. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/assigner.py +17 -19
  122. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/evaluation.py +20 -17
  123. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/filesetter.py +80 -80
  124. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/replacer.py +33 -36
  125. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/scopes.py +3 -3
  126. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/search.py +66 -41
  127. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/store.py +14 -16
  128. robotframework-7.0a1/src/robot/variables/tablesetter.py +164 -0
  129. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/variables.py +1 -1
  130. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/version.py +1 -1
  131. {robotframework-6.1.1 → robotframework-7.0a1/src/robotframework.egg-info}/PKG-INFO +3 -6
  132. {robotframework-6.1.1 → robotframework-7.0a1}/src/robotframework.egg-info/SOURCES.txt +3 -4
  133. {robotframework-6.1.1 → robotframework-7.0a1}/tasks.py +6 -6
  134. robotframework-6.1.1/src/robot/libraries/Reserved.py +0 -48
  135. robotframework-6.1.1/src/robot/model/keyword.py +0 -173
  136. robotframework-6.1.1/src/robot/output/console/dotted.py +0 -90
  137. robotframework-6.1.1/src/robot/output/listenerarguments.py +0 -165
  138. robotframework-6.1.1/src/robot/output/listenermethods.py +0 -113
  139. robotframework-6.1.1/src/robot/output/listeners.py +0 -174
  140. robotframework-6.1.1/src/robot/output/output.py +0 -95
  141. robotframework-6.1.1/src/robot/parsing/model/visitor.py +0 -67
  142. robotframework-6.1.1/src/robot/running/arguments/argumentconverter.py +0 -79
  143. robotframework-6.1.1/src/robot/running/arguments/typevalidator.py +0 -56
  144. robotframework-6.1.1/src/robot/running/modelcombiner.py +0 -32
  145. robotframework-6.1.1/src/robot/variables/tablesetter.py +0 -156
  146. {robotframework-6.1.1 → robotframework-7.0a1}/AUTHORS.rst +0 -0
  147. {robotframework-6.1.1 → robotframework-7.0a1}/BUILD.rst +0 -0
  148. {robotframework-6.1.1 → robotframework-7.0a1}/CONTRIBUTING.rst +0 -0
  149. {robotframework-6.1.1 → robotframework-7.0a1}/COPYRIGHT.txt +0 -0
  150. {robotframework-6.1.1 → robotframework-7.0a1}/INSTALL.rst +0 -0
  151. {robotframework-6.1.1 → robotframework-7.0a1}/LICENSE.txt +0 -0
  152. {robotframework-6.1.1 → robotframework-7.0a1}/MANIFEST.in +0 -0
  153. {robotframework-6.1.1 → robotframework-7.0a1}/README.rst +0 -0
  154. {robotframework-6.1.1 → robotframework-7.0a1}/setup.cfg +0 -0
  155. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/__init__.py +0 -0
  156. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/__main__.py +0 -0
  157. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/__init__.py +0 -0
  158. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/deco.py +0 -0
  159. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/exceptions.py +0 -0
  160. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/logger.py +0 -0
  161. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/conf/__init__.py +0 -0
  162. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/errors.py +0 -0
  163. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/__init__.py +0 -0
  164. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/common/__init__.py +0 -0
  165. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/common/js_disabled.css +0 -0
  166. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/common/storage.js +0 -0
  167. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/htmlfilewriter.py +0 -0
  168. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/jsonwriter.py +0 -0
  169. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/__init__.py +0 -0
  170. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.highlight.min.js +0 -0
  171. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.min.js +0 -0
  172. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tablesorter.min.js +0 -0
  173. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tmpl.min.js +0 -0
  174. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jsxcompressor.min.js +0 -0
  175. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/__init__.py +0 -0
  176. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/doc_formatting.css +0 -0
  177. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.css +0 -0
  178. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.html +0 -0
  179. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/print.css +0 -0
  180. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/pygments.css +0 -0
  181. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/__init__.py +0 -0
  182. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/common.css +0 -0
  183. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/doc_formatting.css +0 -0
  184. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/fileloading.js +0 -0
  185. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.js +0 -0
  186. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/print.css +0 -0
  187. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.css +0 -0
  188. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.html +0 -0
  189. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/util.js +0 -0
  190. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/view.js +0 -0
  191. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/__init__.py +0 -0
  192. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.css +0 -0
  193. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.html +0 -0
  194. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdoc.py +0 -0
  195. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/__init__.py +0 -0
  196. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/consoleviewer.py +0 -0
  197. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlwriter.py +0 -0
  198. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonwriter.py +0 -0
  199. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/output.py +0 -0
  200. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/standardtypes.py +0 -0
  201. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/writer.py +0 -0
  202. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Dialogs.py +0 -0
  203. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Easter.py +0 -0
  204. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Screenshot.py +0 -0
  205. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Telnet.py +0 -0
  206. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/dialogs_py.py +0 -0
  207. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/fixture.py +0 -0
  208. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/itemlist.py +0 -0
  209. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/metadata.py +0 -0
  210. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/modelobject.py +0 -0
  211. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/modifier.py +0 -0
  212. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/statistics.py +0 -0
  213. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/suitestatistics.py +0 -0
  214. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/tagsetter.py +0 -0
  215. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/tagstatistics.py +0 -0
  216. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/totalstatistics.py +0 -0
  217. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/__init__.py +0 -0
  218. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/console/__init__.py +0 -0
  219. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/console/highlighting.py +0 -0
  220. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/librarylogger.py +0 -0
  221. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/pyloggingconf.py +0 -0
  222. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/__init__.py +0 -0
  223. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/__init__.py +0 -0
  224. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokenizer.py +0 -0
  225. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/model/__init__.py +0 -0
  226. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/parser/__init__.py +0 -0
  227. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/parser/blockparsers.py +0 -0
  228. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/parser/fileparser.py +0 -0
  229. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/parser/parser.py +0 -0
  230. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/suitestructure.py +0 -0
  231. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/pythonpathsetter.py +0 -0
  232. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/rebot.py +0 -0
  233. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/__init__.py +0 -0
  234. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/jsexecutionresult.py +0 -0
  235. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/jswriter.py +0 -0
  236. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/logreportwriters.py +0 -0
  237. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/outputwriter.py +0 -0
  238. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/resultwriter.py +0 -0
  239. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/executionerrors.py +0 -0
  240. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/executionresult.py +0 -0
  241. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/messagefilter.py +0 -0
  242. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/suiteteardownfailed.py +0 -0
  243. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/visitor.py +0 -0
  244. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/run.py +0 -0
  245. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/__init__.py +0 -0
  246. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentparser.py +0 -0
  247. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/__init__.py +0 -0
  248. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/builders.py +0 -0
  249. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/dynamicmethods.py +0 -0
  250. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/importer.py +0 -0
  251. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/libraryscopes.py +0 -0
  252. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/outputcapture.py +0 -0
  253. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/randomizer.py +0 -0
  254. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/runkwregister.py +0 -0
  255. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/signalhandler.py +0 -0
  256. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/status.py +0 -0
  257. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/timeouts/__init__.py +0 -0
  258. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/timeouts/posix.py +0 -0
  259. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/timeouts/windows.py +0 -0
  260. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/application.py +0 -0
  261. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/argumentparser.py +0 -0
  262. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/asserts.py +0 -0
  263. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/charwidth.py +0 -0
  264. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/compress.py +0 -0
  265. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/dotdict.py +0 -0
  266. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/encoding.py +0 -0
  267. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/error.py +0 -0
  268. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/etreewrapper.py +0 -0
  269. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/filereader.py +0 -0
  270. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/frange.py +0 -0
  271. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/htmlformatters.py +0 -0
  272. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/importer.py +0 -0
  273. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/markuputils.py +0 -0
  274. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/match.py +0 -0
  275. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/misc.py +0 -0
  276. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/recommendations.py +0 -0
  277. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/restreader.py +0 -0
  278. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robotenv.py +0 -0
  279. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robotinspect.py +0 -0
  280. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robotio.py +0 -0
  281. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/sortable.py +0 -0
  282. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/typehints.py +0 -0
  283. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/finders.py +0 -0
  284. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/notfound.py +0 -0
  285. {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/resolvable.py +0 -0
  286. {robotframework-6.1.1 → robotframework-7.0a1}/src/robotframework.egg-info/dependency_links.txt +0 -0
  287. {robotframework-6.1.1 → robotframework-7.0a1}/src/robotframework.egg-info/entry_points.txt +0 -0
  288. {robotframework-6.1.1 → robotframework-7.0a1}/src/robotframework.egg-info/top_level.txt +0 -0
@@ -18,19 +18,12 @@ from ast import literal_eval
18
18
 
19
19
  from robot.api import logger
20
20
  from robot.utils import (get_error_message, is_dict_like, is_list_like, is_truthy,
21
- Matcher, plural_or_not as s, seq2str, seq2str2, type_name)
21
+ Matcher, NOT_SET, plural_or_not as s, seq2str, seq2str2,
22
+ type_name)
22
23
  from robot.utils.asserts import assert_equal
23
24
  from robot.version import get_version
24
25
 
25
26
 
26
- class NotSet:
27
- def __repr__(self):
28
- return ""
29
-
30
-
31
- NOT_SET = NotSet()
32
-
33
-
34
27
  class _List:
35
28
 
36
29
  def convert_to_list(self, item):
@@ -619,7 +619,7 @@ class Time:
619
619
  return secs_to_timestr(seconds, compact=True)
620
620
 
621
621
  def _convert_to_timer(self, seconds, millis=True):
622
- return elapsed_time_to_string(seconds * 1000, include_millis=millis)
622
+ return elapsed_time_to_string(seconds, include_millis=millis, seconds=True)
623
623
 
624
624
  def _convert_to_timedelta(self, seconds, millis=True):
625
625
  return timedelta(seconds=seconds)
@@ -21,6 +21,7 @@ import re
21
21
  import shutil
22
22
  import tempfile
23
23
  import time
24
+ from datetime import datetime
24
25
 
25
26
  from robot.version import get_version
26
27
  from robot.api import logger
@@ -28,7 +29,7 @@ from robot.api.deco import keyword
28
29
  from robot.utils import (abspath, ConnectionCache, console_decode, del_env_var,
29
30
  get_env_var, get_env_vars, get_time, is_truthy,
30
31
  is_string, normpath, parse_time, plural_or_not,
31
- safe_str, secs_to_timestamp, secs_to_timestr, seq2str,
32
+ safe_str, secs_to_timestr, seq2str,
32
33
  set_env_var, timestr_to_secs, CONSOLE_ENCODING, WINDOWS)
33
34
 
34
35
  __version__ = get_version()
@@ -1297,8 +1298,8 @@ class OperatingSystem:
1297
1298
  if not os.path.isfile(path):
1298
1299
  self._error("Path '%s' is not a regular file." % path)
1299
1300
  os.utime(path, (mtime, mtime))
1300
- time.sleep(0.1) # Give os some time to really set these times
1301
- tstamp = secs_to_timestamp(mtime, seps=('-', ' ', ':'))
1301
+ time.sleep(0.1) # Give OS some time to really set these times.
1302
+ tstamp = datetime.fromtimestamp(mtime).isoformat(' ', timespec='seconds')
1302
1303
  self._link("Set modified time of '%%s' to %s." % tstamp, path)
1303
1304
 
1304
1305
  def get_file_size(self, path):
@@ -75,7 +75,7 @@ class Process:
75
75
  optional ``**configuration`` keyword arguments. Configuration arguments
76
76
  must be given after other arguments passed to these keywords and must
77
77
  use syntax like ``name=value``. Available configuration arguments are
78
- listed below and discussed further in sections afterwards.
78
+ listed below and discussed further in sections afterward.
79
79
 
80
80
  | = Name = | = Explanation = |
81
81
  | shell | Specifies whether to run the command in shell or not. |
@@ -96,7 +96,7 @@ class Process:
96
96
  == Running processes in shell ==
97
97
 
98
98
  The ``shell`` argument specifies whether to run the process in a shell or
99
- not. By default shell is not used, which means that shell specific commands,
99
+ not. By default, shell is not used, which means that shell specific commands,
100
100
  like ``copy`` and ``dir`` on Windows, are not available. You can, however,
101
101
  run shell scripts and batch files without using a shell.
102
102
 
@@ -129,8 +129,8 @@ class Process:
129
129
 
130
130
  == Environment variables ==
131
131
 
132
- By default the child process will get a copy of the parent process's
133
- environment variables. The ``env`` argument can be used to give the
132
+ The child process will get a copy of the parent process's environment
133
+ variables by default. The ``env`` argument can be used to give the
134
134
  child a custom environment as a Python dictionary. If there is a need
135
135
  to specify only certain environment variable, it is possible to use the
136
136
  ``env:<name>=<value>`` format to set or override only that named variables.
@@ -143,12 +143,12 @@ class Process:
143
143
 
144
144
  == Standard output and error streams ==
145
145
 
146
- By default processes are run so that their standard output and standard
146
+ By default, processes are run so that their standard output and standard
147
147
  error streams are kept in the memory. This works fine normally,
148
148
  but if there is a lot of output, the output buffers may get full and
149
149
  the program can hang.
150
150
 
151
- To avoid the above mentioned problems, it is possible to use ``stdout``
151
+ To avoid the above-mentioned problems, it is possible to use ``stdout``
152
152
  and ``stderr`` arguments to specify files on the file system where to
153
153
  redirect the outputs. This can also be useful if other processes or
154
154
  other keywords need to read or manipulate the outputs somehow.
@@ -172,8 +172,6 @@ class Process:
172
172
  This way the process will not hang even if there would be a lot of output,
173
173
  but naturally output is not available after execution either.
174
174
 
175
- Support for the special value ``DEVNULL`` is new in Robot Framework 3.2.
176
-
177
175
  Examples:
178
176
  | ${result} = | `Run Process` | program | stdout=${TEMPDIR}/stdout.txt | stderr=${TEMPDIR}/stderr.txt |
179
177
  | `Log Many` | stdout: ${result.stdout} | stderr: ${result.stderr} |
@@ -191,25 +189,23 @@ class Process:
191
189
  explained in the table below.
192
190
 
193
191
  | = Value = | = Explanation = |
194
- | String ``PIPE`` | Make stdin a pipe that can be written to. This is the default. |
195
- | String ``NONE`` | Inherit stdin from the parent process. This value is case-insensitive. |
192
+ | String ``NONE`` | Inherit stdin from the parent process. This is the default. |
193
+ | String ``PIPE`` | Make stdin a pipe that can be written to. |
196
194
  | Path to a file | Open the specified file and use it as the stdin. |
197
195
  | Any other string | Create a temporary file with the text as its content and use it as the stdin. |
198
196
  | Any non-string value | Used as-is. Could be a file descriptor, stdout of another process, etc. |
199
197
 
200
- Values ``PIPE`` and ``NONE`` are internally mapped directly to
198
+ Values ``PIPE`` and ``NONE`` are case-insensitive and internally mapped to
201
199
  ``subprocess.PIPE`` and ``None``, respectively, when calling
202
200
  [https://docs.python.org/3/library/subprocess.html#subprocess.Popen|subprocess.Popen].
203
- The default behavior may change from ``PIPE`` to ``NONE`` in future
204
- releases. If you depend on the ``PIPE`` behavior, it is a good idea to use
205
- it explicitly.
206
201
 
207
202
  Examples:
208
- | `Run Process` | command | stdin=NONE |
203
+ | `Run Process` | command | stdin=PIPE |
209
204
  | `Run Process` | command | stdin=${CURDIR}/stdin.txt |
210
205
  | `Run Process` | command | stdin=Stdin as text. |
211
206
 
212
- The support to configure ``stdin`` is new in Robot Framework 4.1.2.
207
+ The support to configure ``stdin`` is new in Robot Framework 4.1.2. Its default
208
+ value used to be ``PIPE`` until Robot Framework 7.0.
213
209
 
214
210
  == Output encoding ==
215
211
 
@@ -298,8 +294,6 @@ class Process:
298
294
  | `Terminate Process` | kill=${EMPTY} | # Empty string is false. |
299
295
  | `Terminate Process` | kill=${FALSE} | # Python ``False`` is false. |
300
296
 
301
- Considering ``OFF`` and ``0`` false is new in Robot Framework 3.1.
302
-
303
297
  = Example =
304
298
 
305
299
  | ***** Settings *****
@@ -337,9 +331,15 @@ class Process:
337
331
  configuration` for more details about configuration related to starting
338
332
  processes. Configuration related to waiting for processes consists of
339
333
  ``timeout`` and ``on_timeout`` arguments that have same semantics as
340
- with `Wait For Process` keyword. By default there is no timeout, and
334
+ with `Wait For Process` keyword. By default, there is no timeout, and
341
335
  if timeout is defined the default action on timeout is ``terminate``.
342
336
 
337
+ Process outputs are, by default, written into in-memory buffers.
338
+ If there is a lot of output, these buffers may get full causing
339
+ the process to hang. To avoid that, process outputs can be redirected
340
+ using the ``stdout`` and ``stderr`` configuration parameters. For more
341
+ information see the `Standard output and error streams` section.
342
+
343
343
  Returns a `result object` containing information about the execution.
344
344
 
345
345
  Note that possible equal signs in ``*arguments`` must be escaped
@@ -349,7 +349,7 @@ class Process:
349
349
  Examples:
350
350
  | ${result} = | Run Process | python | -c | print('Hello, world!') |
351
351
  | Should Be Equal | ${result.stdout} | Hello, world! |
352
- | ${result} = | Run Process | ${command} | stderr=STDOUT | timeout=10s |
352
+ | ${result} = | Run Process | ${command} | stdout=${CURDIR}/stdout.txt | stderr=STDOUT |
353
353
  | ${result} = | Run Process | ${command} | timeout=1min | on_timeout=continue |
354
354
  | ${result} = | Run Process | java -Dname\\=value Example | shell=True | cwd=${EXAMPLE} |
355
355
 
@@ -369,11 +369,13 @@ class Process:
369
369
 
370
370
  See `Specifying command and arguments` and `Process configuration`
371
371
  for more information about the arguments, and `Run Process` keyword
372
- for related examples.
372
+ for related examples. This includes information about redirecting
373
+ process outputs to avoid process handing due to output buffers getting
374
+ full.
373
375
 
374
376
  Makes the started process new `active process`. Returns the created
375
377
  [https://docs.python.org/3/library/subprocess.html#popen-constructor |
376
- subprocess.Popen] object which can be be used later to active this
378
+ subprocess.Popen] object which can be used later to activate this
377
379
  process. ``Popen`` attributes like ``pid`` can also be accessed directly.
378
380
 
379
381
  Processes are started so that they create a new process group. This
@@ -381,7 +383,7 @@ class Process:
381
383
 
382
384
  Examples:
383
385
 
384
- Start process and wait for it to end later using alias:
386
+ Start process and wait for it to end later using an alias:
385
387
  | `Start Process` | ${command} | alias=example |
386
388
  | # Other keywords |
387
389
  | ${result} = | `Wait For Process` | example |
@@ -492,9 +494,6 @@ class Process:
492
494
  | ${result} = | Wait For Process | timeout=1min 30s | on_timeout=kill |
493
495
  | Process Should Be Stopped | | |
494
496
  | Should Be Equal As Integers | ${result.rc} | -9 |
495
-
496
- Ignoring timeout if it is string ``NONE``, zero, or negative is new
497
- in Robot Framework 3.2.
498
497
  """
499
498
  process = self._processes[handle]
500
499
  logger.info('Waiting for process to complete.')
@@ -882,7 +881,7 @@ class ExecutionResult:
882
881
 
883
882
  class ProcessConfiguration:
884
883
 
885
- def __init__(self, cwd=None, shell=False, stdout=None, stderr=None, stdin='PIPE',
884
+ def __init__(self, cwd=None, shell=False, stdout=None, stderr=None, stdin=None,
886
885
  output_encoding='CONSOLE', alias=None, env=None, **rest):
887
886
  self.cwd = os.path.normpath(cwd) if cwd else os.path.abspath('.')
888
887
  self.shell = is_truthy(shell)
@@ -20,6 +20,7 @@ import re
20
20
  import socket
21
21
  import sys
22
22
  import xmlrpc.client
23
+ from datetime import date, datetime, timedelta
23
24
  from xml.parsers.expat import ExpatError
24
25
 
25
26
  from robot.errors import RemoteError
@@ -59,8 +60,8 @@ class Remote:
59
60
  try:
60
61
  return self._client.get_keyword_names()
61
62
  except TypeError as error:
62
- raise RuntimeError('Connecting remote server at %s failed: %s'
63
- % (self._uri, error))
63
+ raise RuntimeError(f'Connecting remote server at {self._uri} '
64
+ f'failed: {error}')
64
65
 
65
66
  def _is_lib_info_available(self):
66
67
  if not self._lib_info_initialized:
@@ -107,47 +108,53 @@ class Remote:
107
108
 
108
109
  class ArgumentCoercer:
109
110
  binary = re.compile('[\x00-\x08\x0B\x0C\x0E-\x1F]')
110
- non_ascii = re.compile('[\x80-\xff]')
111
111
 
112
112
  def coerce(self, argument):
113
113
  for handles, handler in [(is_string, self._handle_string),
114
- (is_bytes, self._handle_bytes),
115
- (is_number, self._pass_through),
114
+ (self._no_conversion_needed, self._pass_through),
115
+ (self._is_date, self._handle_date),
116
+ (self._is_timedelta, self._handle_timedelta),
116
117
  (is_dict_like, self._coerce_dict),
117
- (is_list_like, self._coerce_list),
118
- (lambda arg: True, self._to_string)]:
118
+ (is_list_like, self._coerce_list)]:
119
119
  if handles(argument):
120
120
  return handler(argument)
121
+ return self._to_string(argument)
122
+
123
+ def _no_conversion_needed(self, arg):
124
+ return is_number(arg) or is_bytes(arg) or isinstance(arg, datetime)
121
125
 
122
126
  def _handle_string(self, arg):
123
- if self._string_contains_binary(arg):
127
+ if self.binary.search(arg):
124
128
  return self._handle_binary_in_string(arg)
125
129
  return arg
126
130
 
127
- def _string_contains_binary(self, arg):
128
- return (self.binary.search(arg) or
129
- is_bytes(arg) and self.non_ascii.search(arg))
130
-
131
131
  def _handle_binary_in_string(self, arg):
132
132
  try:
133
- if not is_bytes(arg):
134
- # Map Unicode code points to bytes directly
135
- arg = arg.encode('latin-1')
133
+ # Map Unicode code points to bytes directly
134
+ return arg.encode('latin-1')
136
135
  except UnicodeError:
137
- raise ValueError('Cannot represent %r as binary.' % arg)
138
- return xmlrpc.client.Binary(arg)
139
-
140
- def _handle_bytes(self, arg):
141
- return xmlrpc.client.Binary(arg)
136
+ raise ValueError(f'Cannot represent {arg!r} as binary.')
142
137
 
143
138
  def _pass_through(self, arg):
144
139
  return arg
145
140
 
141
+ def _is_date(self, arg):
142
+ return isinstance(arg, date)
143
+
144
+ def _handle_date(self, arg):
145
+ return datetime(arg.year, arg.month, arg.day)
146
+
147
+ def _is_timedelta(self, arg):
148
+ return isinstance(arg, timedelta)
149
+
150
+ def _handle_timedelta(self, arg):
151
+ return arg.total_seconds()
152
+
146
153
  def _coerce_list(self, arg):
147
154
  return [self.coerce(item) for item in arg]
148
155
 
149
156
  def _coerce_dict(self, arg):
150
- return dict((self._to_key(key), self.coerce(arg[key])) for key in arg)
157
+ return {self._to_key(key): self.coerce(arg[key]) for key in arg}
151
158
 
152
159
  def _to_key(self, item):
153
160
  item = self._to_string(item)
@@ -159,15 +166,15 @@ class ArgumentCoercer:
159
166
  return self._handle_string(item)
160
167
 
161
168
  def _validate_key(self, key):
162
- if isinstance(key, xmlrpc.client.Binary):
163
- raise ValueError('Dictionary keys cannot be binary. Got %r.' % (key.data,))
169
+ if isinstance(key, bytes):
170
+ raise ValueError(f'Dictionary keys cannot be binary. Got {key!r}.')
164
171
 
165
172
 
166
173
  class RemoteResult:
167
174
 
168
175
  def __init__(self, result):
169
176
  if not (is_dict_like(result) and 'status' in result):
170
- raise RuntimeError('Invalid remote result dictionary: %s' % result)
177
+ raise RuntimeError(f'Invalid remote result dictionary: {result!r}')
171
178
  self.status = result['status']
172
179
  self.output = safe_str(self._get(result, 'output'))
173
180
  self.return_ = self._get(result, 'return')
@@ -181,8 +188,6 @@ class RemoteResult:
181
188
  return self._convert(value)
182
189
 
183
190
  def _convert(self, value):
184
- if isinstance(value, xmlrpc.client.Binary):
185
- return bytes(value.data)
186
191
  if is_dict_like(value):
187
192
  return DotDict((k, self._convert(v)) for k, v in value.items())
188
193
  if is_list_like(value):
@@ -204,6 +209,7 @@ class XmlRpcRemoteClient:
204
209
  else:
205
210
  transport = TimeoutHTTPTransport(timeout=self.timeout)
206
211
  server = xmlrpc.client.ServerProxy(self.uri, encoding='UTF-8',
212
+ use_builtin_types=True,
207
213
  transport=transport)
208
214
  try:
209
215
  yield server
@@ -244,12 +250,12 @@ class XmlRpcRemoteClient:
244
250
  except xmlrpc.client.Fault as err:
245
251
  message = err.faultString
246
252
  except socket.error as err:
247
- message = 'Connection to remote server broken: %s' % err
253
+ message = f'Connection to remote server broken: {err}'
248
254
  except ExpatError as err:
249
- message = ('Processing XML-RPC return value failed. '
250
- 'Most often this happens when the return value '
251
- 'contains characters that are not valid in XML. '
252
- 'Original error was: ExpatError: %s' % err)
255
+ message = (f'Processing XML-RPC return value failed. '
256
+ f'Most often this happens when the return value '
257
+ f'contains characters that are not valid in XML. '
258
+ f'Original error was: ExpatError: {err}')
253
259
  raise RuntimeError(message)
254
260
 
255
261
 
@@ -259,11 +265,9 @@ class XmlRpcRemoteClient:
259
265
  class TimeoutHTTPTransport(xmlrpc.client.Transport):
260
266
  _connection_class = http.client.HTTPConnection
261
267
 
262
- def __init__(self, use_datetime=0, timeout=None):
263
- xmlrpc.client.Transport.__init__(self, use_datetime)
264
- if not timeout:
265
- timeout = socket._GLOBAL_DEFAULT_TIMEOUT
266
- self.timeout = timeout
268
+ def __init__(self, timeout=None):
269
+ super().__init__(use_builtin_types=True)
270
+ self.timeout = timeout or socket._GLOBAL_DEFAULT_TIMEOUT
267
271
 
268
272
  def make_connection(self, host):
269
273
  if self._connection and host == self._connection[0]:
@@ -293,8 +293,8 @@ class String:
293
293
  if you need more complex pattern matching.
294
294
  """
295
295
  if is_truthy(case_insensitive):
296
- pattern = pattern.lower()
297
- contains = lambda line: pattern in line.lower()
296
+ pattern = pattern.casefold()
297
+ contains = lambda line: pattern in line.casefold()
298
298
  else:
299
299
  contains = lambda line: pattern in line
300
300
  return self._get_matching_lines(string, contains)
@@ -329,8 +329,8 @@ class String:
329
329
  literal strings is enough.
330
330
  """
331
331
  if is_truthy(case_insensitive):
332
- pattern = pattern.lower()
333
- matches = lambda line: fnmatchcase(line.lower(), pattern)
332
+ pattern = pattern.casefold()
333
+ matches = lambda line: fnmatchcase(line.casefold(), pattern)
334
334
  else:
335
335
  matches = lambda line: fnmatchcase(line, pattern)
336
336
  return self._get_matching_lines(string, matches)
@@ -34,8 +34,7 @@ else:
34
34
  from robot.api import logger
35
35
  from robot.api.deco import keyword
36
36
  from robot.libraries.BuiltIn import BuiltIn
37
- from robot.utils import (asserts, ET, ETSource, is_bytes, is_falsy, is_string,
38
- is_truthy, plural_or_not as s)
37
+ from robot.utils import asserts, ET, ETSource, is_falsy, is_truthy, plural_or_not as s
39
38
  from robot.version import get_version
40
39
 
41
40
 
@@ -53,7 +52,7 @@ class XML:
53
52
  The library has the following main usages:
54
53
 
55
54
  - Parsing an XML file, or a string containing XML, into an XML element
56
- structure and finding certain elements from it for for further analysis
55
+ structure and finding certain elements from it for further analysis
57
56
  (e.g. `Parse XML` and `Get Element` keywords).
58
57
  - Getting text or attributes of elements
59
58
  (e.g. `Get Element Text` and `Get Element Attribute`).
@@ -75,10 +74,10 @@ class XML:
75
74
  children and their children. Possible comments and processing instructions
76
75
  in the source XML are removed.
77
76
 
78
- XML is not validated during parsing even if has a schema defined. How
77
+ XML is not validated during parsing even if it has a schema defined. How
79
78
  possible doctype elements are handled otherwise depends on the used XML
80
79
  module and on the platform. The standard ElementTree strips doctypes
81
- altogether but when `using lxml` they are preserved when XML is saved.
80
+ altogether, but when `using lxml` they are preserved when XML is saved.
82
81
 
83
82
  The element structure returned by `Parse XML`, as well as elements
84
83
  returned by keywords such as `Get Element`, can be used as the ``source``
@@ -168,7 +167,7 @@ class XML:
168
167
 
169
168
  If lxml support is enabled when `importing` the library, the whole
170
169
  [http://www.w3.org/TR/xpath/|xpath 1.0 standard] is supported.
171
- That includes everything listed below but also lot of other useful
170
+ That includes everything listed below but also a lot of other useful
172
171
  constructs.
173
172
 
174
173
  == Tag names ==
@@ -304,7 +303,7 @@ class XML:
304
303
  = Handling XML namespaces =
305
304
 
306
305
  ElementTree and lxml handle possible namespaces in XML documents by adding
307
- the namespace URI to tag names in so called Clark Notation. That is
306
+ the namespace URI to tag names in so-called Clark Notation. That is
308
307
  inconvenient especially with xpaths, and by default this library strips
309
308
  those namespaces away and moves them to ``xmlns`` attribute instead. That
310
309
  can be avoided by passing ``keep_clark_notation`` argument to `Parse XML`
@@ -1279,7 +1278,7 @@ class XML:
1279
1278
  The element to copy is specified using ``source`` and ``xpath``. They
1280
1279
  have exactly the same semantics as with `Get Element` keyword.
1281
1280
 
1282
- If the copy or the original element is modified afterwards, the changes
1281
+ If the copy or the original element is modified afterward, the changes
1283
1282
  have no effect on the other.
1284
1283
 
1285
1284
  Examples using ``${XML}`` structure from `Example`:
@@ -27,5 +27,5 @@ the http://robotframework.org web site.
27
27
  """
28
28
 
29
29
  STDLIBS = frozenset(('BuiltIn', 'Collections', 'DateTime', 'Dialogs', 'Easter',
30
- 'OperatingSystem', 'Process', 'Remote', 'Reserved',
31
- 'Screenshot', 'String', 'Telnet', 'XML'))
30
+ 'OperatingSystem', 'Process', 'Remote', 'Screenshot',
31
+ 'String', 'Telnet', 'XML'))
@@ -27,14 +27,14 @@ This package is considered stable.
27
27
 
28
28
  from .body import BaseBody, Body, BodyItem, BaseBranches
29
29
  from .configurer import SuiteConfigurer
30
- from .control import Break, Continue, Error, For, If, IfBranch, Return, Try, TryBranch, While
30
+ from .control import (Break, Continue, Error, For, If, IfBranch, Return, Try,
31
+ TryBranch, Var, While)
31
32
  from .fixture import create_fixture
32
33
  from .itemlist import ItemList
33
- from .keyword import Keyword, Keywords
34
- from .message import Message, Messages
34
+ from .keyword import Keyword
35
+ from .message import Message, MessageLevel, Messages
35
36
  from .modelobject import DataDict, ModelObject
36
37
  from .modifier import ModelModifier
37
- from .namepatterns import SuiteNamePatterns, TestNamePatterns
38
38
  from .statistics import Statistics
39
39
  from .tags import Tags, TagPattern, TagPatterns
40
40
  from .testcase import TestCase, TestCases
@@ -26,7 +26,7 @@ if TYPE_CHECKING:
26
26
  from robot.result.model import ForIteration, WhileIteration
27
27
  from robot.running.model import UserKeyword, ResourceFile
28
28
  from .control import (Break, Continue, Error, For, If, IfBranch, Return,
29
- Try, TryBranch, While)
29
+ Try, TryBranch, Var, While)
30
30
  from .keyword import Keyword
31
31
  from .message import Message
32
32
  from .testcase import TestCase
@@ -35,13 +35,14 @@ if TYPE_CHECKING:
35
35
 
36
36
  BodyItemParent = Union['TestSuite', 'TestCase', 'UserKeyword', 'For', 'ForIteration',
37
37
  'If', 'IfBranch', 'Try', 'TryBranch', 'While', 'WhileIteration',
38
- 'Keyword', 'Return', 'Continue', 'Break', 'Error', None]
38
+ 'Keyword', 'Var', 'Return', 'Continue', 'Break', 'Error', None]
39
39
  BI = TypeVar('BI', bound='BodyItem')
40
40
  KW = TypeVar('KW', bound='Keyword')
41
41
  F = TypeVar('F', bound='For')
42
42
  W = TypeVar('W', bound='While')
43
43
  I = TypeVar('I', bound='If')
44
44
  T = TypeVar('T', bound='Try')
45
+ V = TypeVar('V', bound='Var')
45
46
  R = TypeVar('R', bound='Return')
46
47
  C = TypeVar('C', bound='Continue')
47
48
  B = TypeVar('B', bound='Break')
@@ -65,11 +66,13 @@ class BodyItem(ModelObject):
65
66
  EXCEPT = 'EXCEPT'
66
67
  FINALLY = 'FINALLY'
67
68
  WHILE = 'WHILE'
69
+ VAR = 'VAR'
68
70
  RETURN = 'RETURN'
69
71
  CONTINUE = 'CONTINUE'
70
72
  BREAK = 'BREAK'
71
73
  ERROR = 'ERROR'
72
74
  MESSAGE = 'MESSAGE'
75
+ KEYWORD_TYPES = (KEYWORD, SETUP, TEARDOWN)
73
76
  type = None
74
77
  __slots__ = ['parent']
75
78
 
@@ -111,7 +114,7 @@ class BodyItem(ModelObject):
111
114
  raise NotImplementedError
112
115
 
113
116
 
114
- class BaseBody(ItemList[BodyItem], Generic[KW, F, W, I, T, R, C, B, M, E]):
117
+ class BaseBody(ItemList[BodyItem], Generic[KW, F, W, I, T, V, R, C, B, M, E]):
115
118
  """Base class for Body and Branches objects."""
116
119
  __slots__ = []
117
120
  # Set using 'BaseBody.register' when these classes are created.
@@ -120,6 +123,7 @@ class BaseBody(ItemList[BodyItem], Generic[KW, F, W, I, T, R, C, B, M, E]):
120
123
  while_class: Type[W] = KnownAtRuntime
121
124
  if_class: Type[I] = KnownAtRuntime
122
125
  try_class: Type[T] = KnownAtRuntime
126
+ var_class: Type[V] = KnownAtRuntime
123
127
  return_class: Type[R] = KnownAtRuntime
124
128
  continue_class: Type[C] = KnownAtRuntime
125
129
  break_class: Type[B] = KnownAtRuntime
@@ -185,6 +189,10 @@ class BaseBody(ItemList[BodyItem], Generic[KW, F, W, I, T, R, C, B, M, E]):
185
189
  def create_while(self, *args, **kwargs) -> while_class:
186
190
  return self._create(self.while_class, 'create_while', args, kwargs)
187
191
 
192
+ @copy_signature(var_class)
193
+ def create_var(self, *args, **kwargs) -> var_class:
194
+ return self._create(self.var_class, 'create_var', args, kwargs)
195
+
188
196
  @copy_signature(return_class)
189
197
  def create_return(self, *args, **kwargs) -> return_class:
190
198
  return self._create(self.return_class, 'create_return', args, kwargs)
@@ -267,8 +275,8 @@ class BaseBody(ItemList[BodyItem], Generic[KW, F, W, I, T, R, C, B, M, E]):
267
275
  return steps
268
276
 
269
277
 
270
- class Body(BaseBody['Keyword', 'For', 'While', 'If', 'Try', 'Return', 'Continue',
271
- 'Break', 'Message', 'Error']):
278
+ class Body(BaseBody['Keyword', 'For', 'While', 'If', 'Try', 'Var', 'Return',
279
+ 'Continue', 'Break', 'Message', 'Error']):
272
280
  """A list-like object representing a body of a test, keyword, etc.
273
281
 
274
282
  Body contains the keywords and other structures such as FOR loops.
@@ -281,7 +289,7 @@ class BranchType(Generic[IT]):
281
289
  pass
282
290
 
283
291
 
284
- class BaseBranches(BaseBody[KW, F, W, I, T, R, C, B, M, E], BranchType[IT]):
292
+ class BaseBranches(BaseBody[KW, F, W, I, T, V, R, C, B, M, E], BranchType[IT]):
285
293
  """A list-like object representing IF and TRY branches."""
286
294
  __slots__ = ['branch_class']
287
295
  branch_type: Type[IT] = KnownAtRuntime
@@ -66,22 +66,26 @@ class SuiteConfigurer(SuiteVisitor):
66
66
  parts = [{False: 'tests', True: 'tasks', None: 'tests or tasks'}[rpa],
67
67
  self._get_test_selector_msgs(),
68
68
  self._get_suite_selector_msg()]
69
- raise DataError("Suite '%s' contains no %s."
70
- % (name, ' '.join(p for p in parts if p)))
69
+ raise DataError(f"Suite '{name}' contains no "
70
+ f"{' '.join(p for p in parts if p)}.")
71
71
 
72
72
  def _get_test_selector_msgs(self):
73
73
  parts = []
74
- for explanation, selector in [('matching tags', self.include_tags),
75
- ('not matching tags', self.exclude_tags),
76
- ('matching name', self.include_tests)]:
77
- if selector:
78
- parts.append(self._format_selector_msg(explanation, selector))
79
- return seq2str(parts, quote='')
74
+ for separator, explanation, selectors in [
75
+ (None, 'matching name', self.include_tests),
76
+ ('or', 'matching tags', self.include_tags),
77
+ ('and', 'not matching tags', self.exclude_tags)
78
+ ]:
79
+ if selectors:
80
+ if parts:
81
+ parts.append(separator)
82
+ parts.append(self._format_selector_msg(explanation, selectors))
83
+ return ' '.join(parts)
80
84
 
81
- def _format_selector_msg(self, explanation, selector):
82
- if len(selector) == 1 and explanation[-1] == 's':
85
+ def _format_selector_msg(self, explanation, selectors):
86
+ if len(selectors) == 1 and explanation[-1] == 's':
83
87
  explanation = explanation[:-1]
84
- return '%s %s' % (explanation, seq2str(selector, lastsep=' or '))
88
+ return f"{explanation} {seq2str(selectors, lastsep=' or ')}"
85
89
 
86
90
  def _get_suite_selector_msg(self):
87
91
  if not self.include_suites: