{ // 获取包含Hugging Face文本的span元素 const spans = link.querySelectorAll('span.whitespace-nowrap, span.hidden.whitespace-nowrap'); spans.forEach(span => { if (span.textContent && span.textContent.trim().match(/Hugging\s*Face/i)) { span.textContent = 'AI快站'; } }); }); // 替换logo图片的alt属性 document.querySelectorAll('img[alt*="Hugging"], img[alt*="Face"]').forEach(img => { if (img.alt.match(/Hugging\s*Face/i)) { img.alt = 'AI快站 logo'; } }); } // 替换导航栏中的链接 function replaceNavigationLinks() { // 已替换标记,防止重复运行 if (window._navLinksReplaced) { return; } // 已经替换过的链接集合,防止重复替换 const replacedLinks = new Set(); // 只在导航栏区域查找和替换链接 const headerArea = document.querySelector('header') || document.querySelector('nav'); if (!headerArea) { return; } // 在导航区域内查找链接 const navLinks = headerArea.querySelectorAll('a'); navLinks.forEach(link => { // 如果已经替换过,跳过 if (replacedLinks.has(link)) return; const linkText = link.textContent.trim(); const linkHref = link.getAttribute('href') || ''; // 替换Spaces链接 - 仅替换一次 if ( (linkHref.includes('/spaces') || linkHref === '/spaces' || linkText === 'Spaces' || linkText.match(/^s*Spacess*$/i)) && linkText !== 'PDF TO Markdown' && linkText !== 'PDF TO Markdown' ) { link.textContent = 'PDF TO Markdown'; link.href = 'https://fast360.xyz'; link.setAttribute('target', '_blank'); link.setAttribute('rel', 'noopener noreferrer'); replacedLinks.add(link); } // 删除Posts链接 else if ( (linkHref.includes('/posts') || linkHref === '/posts' || linkText === 'Posts' || linkText.match(/^s*Postss*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } // 替换Docs链接 - 仅替换一次 else if ( (linkHref.includes('/docs') || linkHref === '/docs' || linkText === 'Docs' || linkText.match(/^s*Docss*$/i)) && linkText !== 'Voice Cloning' ) { link.textContent = 'Voice Cloning'; link.href = 'https://vibevoice.info/'; replacedLinks.add(link); } // 删除Enterprise链接 else if ( (linkHref.includes('/enterprise') || linkHref === '/enterprise' || linkText === 'Enterprise' || linkText.match(/^s*Enterprises*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } }); // 查找可能嵌套的Spaces和Posts文本 const textNodes = []; function findTextNodes(element) { if (element.nodeType === Node.TEXT_NODE) { const text = element.textContent.trim(); if (text === 'Spaces' || text === 'Posts' || text === 'Enterprise') { textNodes.push(element); } } else { for (const child of element.childNodes) { findTextNodes(child); } } } // 只在导航区域内查找文本节点 findTextNodes(headerArea); // 替换找到的文本节点 textNodes.forEach(node => { const text = node.textContent.trim(); if (text === 'Spaces') { node.textContent = node.textContent.replace(/Spaces/g, 'PDF TO Markdown'); } else if (text === 'Posts') { // 删除Posts文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } else if (text === 'Enterprise') { // 删除Enterprise文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } }); // 标记已替换完成 window._navLinksReplaced = true; } // 替换代码区域中的域名 function replaceCodeDomains() { // 特别处理span.hljs-string和span.njs-string元素 document.querySelectorAll('span.hljs-string, span.njs-string, span[class*="hljs-string"], span[class*="njs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换hljs-string类的span中的域名(移除多余的转义符号) document.querySelectorAll('span.hljs-string, span[class*="hljs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换pre和code标签中包含git clone命令的域名 document.querySelectorAll('pre, code').forEach(element => { if (element.textContent && element.textContent.includes('git clone')) { const text = element.innerHTML; if (text.includes('huggingface.co')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 处理特定的命令行示例 document.querySelectorAll('pre, code').forEach(element => { const text = element.innerHTML; if (text.includes('huggingface.co')) { // 针对git clone命令的专门处理 if (text.includes('git clone') || text.includes('GIT_LFS_SKIP_SMUDGE=1')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 特别处理模型下载页面上的代码片段 document.querySelectorAll('.flex.border-t, .svelte_hydrator, .inline-block').forEach(container => { const content = container.innerHTML; if (content && content.includes('huggingface.co')) { container.innerHTML = content.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 特别处理模型仓库克隆对话框中的代码片段 try { // 查找包含"Clone this model repository"标题的对话框 const cloneDialog = document.querySelector('.svelte_hydration_boundary, [data-target="MainHeader"]'); if (cloneDialog) { // 查找对话框中所有的代码片段和命令示例 const codeElements = cloneDialog.querySelectorAll('pre, code, span'); codeElements.forEach(element => { if (element.textContent && element.textContent.includes('huggingface.co')) { if (element.innerHTML.includes('huggingface.co')) { element.innerHTML = element.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { element.textContent = element.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); } // 更精确地定位克隆命令中的域名 document.querySelectorAll('[data-target]').forEach(container => { const codeBlocks = container.querySelectorAll('pre, code, span.hljs-string'); codeBlocks.forEach(block => { if (block.textContent && block.textContent.includes('huggingface.co')) { if (block.innerHTML.includes('huggingface.co')) { block.innerHTML = block.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { block.textContent = block.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); }); } catch (e) { // 错误处理但不打印日志 } } // 当DOM加载完成后执行替换 if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', () => { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); }); } else { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); } // 增加一个MutationObserver来处理可能的动态元素加载 const observer = new MutationObserver(mutations => { // 检查是否导航区域有变化 const hasNavChanges = mutations.some(mutation => { // 检查是否存在header或nav元素变化 return Array.from(mutation.addedNodes).some(node => { if (node.nodeType === Node.ELEMENT_NODE) { // 检查是否是导航元素或其子元素 if (node.tagName === 'HEADER' || node.tagName === 'NAV' || node.querySelector('header, nav')) { return true; } // 检查是否在导航元素内部 let parent = node.parentElement; while (parent) { if (parent.tagName === 'HEADER' || parent.tagName === 'NAV') { return true; } parent = parent.parentElement; } } return false; }); }); // 只在导航区域有变化时执行替换 if (hasNavChanges) { // 重置替换状态,允许再次替换 window._navLinksReplaced = false; replaceHeaderBranding(); replaceNavigationLinks(); } }); // 开始观察document.body的变化,包括子节点 if (document.body) { observer.observe(document.body, { childList: true, subtree: true }); } else { document.addEventListener('DOMContentLoaded', () => { observer.observe(document.body, { childList: true, subtree: true }); }); } })(); \n '''\n \n- p = Premailer(html, base_url='http://kungfupeople.com/base',\n+ p = Premailer(html, base_url='http://kungfupeople.com/base/',\n preserve_internal_links=True)\n result_html = p.transform()\n \n@@ -2302,3 +2300,36 @@ sheet\" type=\"text/css\">\n result_html = p.transform()\n \n compare_html(expect_html, result_html)\n+\n+ def test_links_without_protocol(self):\n+ \"\"\"If you the base URL is set to https://example.com and your html\n+ contains ... then the URL to point to\n+ is \"https://otherdomain.com/\" not \"https://example.com/file.css\"\n+ \"\"\"\n+ html = \"\"\"\n+ \n+ \n+ \n+ \n+ \n+ \"\"\"\n+\n+ expect_html = \"\"\"\n+ \n+ \n+ \n+ \n+ \n+ \"\"\"\n+\n+ p = Premailer(html, base_url='https://www.peterbe.com')\n+ result_html = p.transform()\n+ compare_html(expect_html.format(protocol=\"https\"), result_html)\n+\n+ p = Premailer(html, base_url='http://www.peterbe.com')\n+ result_html = p.transform()\n+ compare_html(expect_html.format(protocol=\"http\"), result_html)\n+\n+ # Because you can't set a base_url without a full protocol\n+ p = Premailer(html, base_url='www.peterbe.com')\n+ assert_raises(ValueError, p.transform)\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_hyperlinks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 2\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"unknown"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"lxml cssselect cssutils nose mock\",\n \"pip_packages\": [\n \"nose\",\n \"mock\",\n \"pytest\"\n ],\n \"pre_install\": null,\n \"python\": \"3.9\",\n \"reqs_path\": null,\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"cssselect @ file:///croot/cssselect_1707339882883/work\ncssutils @ file:///home/conda/feedstock_root/build_artifacts/cssutils_1734884840740/work\nexceptiongroup==1.2.2\niniconfig==2.1.0\nlxml @ file:///croot/lxml_1737039601731/work\nmock @ file:///tmp/build/80754af9/mock_1607622725907/work\nnose @ file:///opt/conda/conda-bld/nose_1642704612149/work\npackaging==24.2\npluggy==1.5.0\n-e git+https://github.com/peterbe/premailer.git@f211f3f1bcfc87dc0318f056d319bb5575f62a72#egg=premailer\npytest==8.3.5\ntomli==2.2.1\n"},"environment":{"kind":"string","value":"name: premailer\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - cssselect=1.2.0=py39h06a4308_0\n - cssutils=2.11.0=pyhd8ed1ab_1\n - icu=73.1=h6a678d5_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - libxml2=2.13.5=hfdd30dd_0\n - libxslt=1.1.41=h097e994_0\n - lxml=5.3.0=py39h57af460_1\n - mock=4.0.3=pyhd3eb1b0_0\n - ncurses=6.4=h6a678d5_0\n - nose=1.3.7=pyhd3eb1b0_1008\n - openssl=3.0.16=h5eee18b_0\n - pip=25.0=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - exceptiongroup==1.2.2\n - iniconfig==2.1.0\n - packaging==24.2\n - pluggy==1.5.0\n - pytest==8.3.5\n - tomli==2.2.1\nprefix: /opt/conda/envs/premailer\n"},"FAIL_TO_PASS":{"kind":"list like","value":["premailer/tests/test_premailer.py::Tests::test_base_url_with_path","premailer/tests/test_premailer.py::Tests::test_links_without_protocol"],"string":"[\n \"premailer/tests/test_premailer.py::Tests::test_base_url_with_path\",\n \"premailer/tests/test_premailer.py::Tests::test_links_without_protocol\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["premailer/tests/test_premailer.py::Tests::test_apple_newsletter_example","premailer/tests/test_premailer.py::Tests::test_base_url_fixer","premailer/tests/test_premailer.py::Tests::test_basic_html","premailer/tests/test_premailer.py::Tests::test_basic_html_shortcut_function","premailer/tests/test_premailer.py::Tests::test_basic_html_with_pseudo_selector","premailer/tests/test_premailer.py::Tests::test_basic_xml","premailer/tests/test_premailer.py::Tests::test_broken_xml","premailer/tests/test_premailer.py::Tests::test_child_selector","premailer/tests/test_premailer.py::Tests::test_command_line_fileinput_from_argument","premailer/tests/test_premailer.py::Tests::test_command_line_fileinput_from_stdin","premailer/tests/test_premailer.py::Tests::test_command_line_preserve_style_tags","premailer/tests/test_premailer.py::Tests::test_comments_in_media_queries","premailer/tests/test_premailer.py::Tests::test_css_disable_basic_html_attributes","premailer/tests/test_premailer.py::Tests::test_css_text","premailer/tests/test_premailer.py::Tests::test_css_text_with_only_body_present","premailer/tests/test_premailer.py::Tests::test_css_with_html_attributes","premailer/tests/test_premailer.py::Tests::test_css_with_pseudoclasses_excluded","premailer/tests/test_premailer.py::Tests::test_css_with_pseudoclasses_included","premailer/tests/test_premailer.py::Tests::test_disabled_validator","premailer/tests/test_premailer.py::Tests::test_doctype","premailer/tests/test_premailer.py::Tests::test_empty_style_tag","premailer/tests/test_premailer.py::Tests::test_external_links","premailer/tests/test_premailer.py::Tests::test_external_links_unfindable","premailer/tests/test_premailer.py::Tests::test_external_styles_and_links","premailer/tests/test_premailer.py::Tests::test_external_styles_on_http","premailer/tests/test_premailer.py::Tests::test_external_styles_on_https","premailer/tests/test_premailer.py::Tests::test_external_styles_with_base_url","premailer/tests/test_premailer.py::Tests::test_favour_rule_with_class_over_generic","premailer/tests/test_premailer.py::Tests::test_favour_rule_with_element_over_generic","premailer/tests/test_premailer.py::Tests::test_favour_rule_with_id_over_others","premailer/tests/test_premailer.py::Tests::test_favour_rule_with_important_over_others","premailer/tests/test_premailer.py::Tests::test_fontface_selectors_with_no_selectortext","premailer/tests/test_premailer.py::Tests::test_ignore_some_external_stylesheets","premailer/tests/test_premailer.py::Tests::test_ignore_some_incorrectly","premailer/tests/test_premailer.py::Tests::test_ignore_some_inline_stylesheets","premailer/tests/test_premailer.py::Tests::test_ignore_style_elements_with_media_attribute","premailer/tests/test_premailer.py::Tests::test_include_star_selector","premailer/tests/test_premailer.py::Tests::test_inline_wins_over_external","premailer/tests/test_premailer.py::Tests::test_keyframe_selectors","premailer/tests/test_premailer.py::Tests::test_last_child","premailer/tests/test_premailer.py::Tests::test_last_child_exclude_pseudo","premailer/tests/test_premailer.py::Tests::test_leftover_important","premailer/tests/test_premailer.py::Tests::test_load_external_url","premailer/tests/test_premailer.py::Tests::test_load_external_url_gzip","premailer/tests/test_premailer.py::Tests::test_mailto_url","premailer/tests/test_premailer.py::Tests::test_mediaquery","premailer/tests/test_premailer.py::Tests::test_merge_styles_basic","premailer/tests/test_premailer.py::Tests::test_merge_styles_non_trivial","premailer/tests/test_premailer.py::Tests::test_merge_styles_with_class","premailer/tests/test_premailer.py::Tests::test_mixed_pseudo_selectors","premailer/tests/test_premailer.py::Tests::test_multiple_style_elements","premailer/tests/test_premailer.py::Tests::test_multithreading","premailer/tests/test_premailer.py::Tests::test_parse_style_rules","premailer/tests/test_premailer.py::Tests::test_precedence_comparison","premailer/tests/test_premailer.py::Tests::test_prefer_inline_to_class","premailer/tests/test_premailer.py::Tests::test_shortcut_function","premailer/tests/test_premailer.py::Tests::test_strip_important","premailer/tests/test_premailer.py::Tests::test_style_attribute_specificity","premailer/tests/test_premailer.py::Tests::test_style_block_with_external_urls","premailer/tests/test_premailer.py::Tests::test_turnoff_cache_works_as_expected","premailer/tests/test_premailer.py::Tests::test_type_test","premailer/tests/test_premailer.py::Tests::test_xml_cdata"],"string":"[\n \"premailer/tests/test_premailer.py::Tests::test_apple_newsletter_example\",\n \"premailer/tests/test_premailer.py::Tests::test_base_url_fixer\",\n \"premailer/tests/test_premailer.py::Tests::test_basic_html\",\n \"premailer/tests/test_premailer.py::Tests::test_basic_html_shortcut_function\",\n \"premailer/tests/test_premailer.py::Tests::test_basic_html_with_pseudo_selector\",\n \"premailer/tests/test_premailer.py::Tests::test_basic_xml\",\n \"premailer/tests/test_premailer.py::Tests::test_broken_xml\",\n \"premailer/tests/test_premailer.py::Tests::test_child_selector\",\n \"premailer/tests/test_premailer.py::Tests::test_command_line_fileinput_from_argument\",\n \"premailer/tests/test_premailer.py::Tests::test_command_line_fileinput_from_stdin\",\n \"premailer/tests/test_premailer.py::Tests::test_command_line_preserve_style_tags\",\n \"premailer/tests/test_premailer.py::Tests::test_comments_in_media_queries\",\n \"premailer/tests/test_premailer.py::Tests::test_css_disable_basic_html_attributes\",\n \"premailer/tests/test_premailer.py::Tests::test_css_text\",\n \"premailer/tests/test_premailer.py::Tests::test_css_text_with_only_body_present\",\n \"premailer/tests/test_premailer.py::Tests::test_css_with_html_attributes\",\n \"premailer/tests/test_premailer.py::Tests::test_css_with_pseudoclasses_excluded\",\n \"premailer/tests/test_premailer.py::Tests::test_css_with_pseudoclasses_included\",\n \"premailer/tests/test_premailer.py::Tests::test_disabled_validator\",\n \"premailer/tests/test_premailer.py::Tests::test_doctype\",\n \"premailer/tests/test_premailer.py::Tests::test_empty_style_tag\",\n \"premailer/tests/test_premailer.py::Tests::test_external_links\",\n \"premailer/tests/test_premailer.py::Tests::test_external_links_unfindable\",\n \"premailer/tests/test_premailer.py::Tests::test_external_styles_and_links\",\n \"premailer/tests/test_premailer.py::Tests::test_external_styles_on_http\",\n \"premailer/tests/test_premailer.py::Tests::test_external_styles_on_https\",\n \"premailer/tests/test_premailer.py::Tests::test_external_styles_with_base_url\",\n \"premailer/tests/test_premailer.py::Tests::test_favour_rule_with_class_over_generic\",\n \"premailer/tests/test_premailer.py::Tests::test_favour_rule_with_element_over_generic\",\n \"premailer/tests/test_premailer.py::Tests::test_favour_rule_with_id_over_others\",\n \"premailer/tests/test_premailer.py::Tests::test_favour_rule_with_important_over_others\",\n \"premailer/tests/test_premailer.py::Tests::test_fontface_selectors_with_no_selectortext\",\n \"premailer/tests/test_premailer.py::Tests::test_ignore_some_external_stylesheets\",\n \"premailer/tests/test_premailer.py::Tests::test_ignore_some_incorrectly\",\n \"premailer/tests/test_premailer.py::Tests::test_ignore_some_inline_stylesheets\",\n \"premailer/tests/test_premailer.py::Tests::test_ignore_style_elements_with_media_attribute\",\n \"premailer/tests/test_premailer.py::Tests::test_include_star_selector\",\n \"premailer/tests/test_premailer.py::Tests::test_inline_wins_over_external\",\n \"premailer/tests/test_premailer.py::Tests::test_keyframe_selectors\",\n \"premailer/tests/test_premailer.py::Tests::test_last_child\",\n \"premailer/tests/test_premailer.py::Tests::test_last_child_exclude_pseudo\",\n \"premailer/tests/test_premailer.py::Tests::test_leftover_important\",\n \"premailer/tests/test_premailer.py::Tests::test_load_external_url\",\n \"premailer/tests/test_premailer.py::Tests::test_load_external_url_gzip\",\n \"premailer/tests/test_premailer.py::Tests::test_mailto_url\",\n \"premailer/tests/test_premailer.py::Tests::test_mediaquery\",\n \"premailer/tests/test_premailer.py::Tests::test_merge_styles_basic\",\n \"premailer/tests/test_premailer.py::Tests::test_merge_styles_non_trivial\",\n \"premailer/tests/test_premailer.py::Tests::test_merge_styles_with_class\",\n \"premailer/tests/test_premailer.py::Tests::test_mixed_pseudo_selectors\",\n \"premailer/tests/test_premailer.py::Tests::test_multiple_style_elements\",\n \"premailer/tests/test_premailer.py::Tests::test_multithreading\",\n \"premailer/tests/test_premailer.py::Tests::test_parse_style_rules\",\n \"premailer/tests/test_premailer.py::Tests::test_precedence_comparison\",\n \"premailer/tests/test_premailer.py::Tests::test_prefer_inline_to_class\",\n \"premailer/tests/test_premailer.py::Tests::test_shortcut_function\",\n \"premailer/tests/test_premailer.py::Tests::test_strip_important\",\n \"premailer/tests/test_premailer.py::Tests::test_style_attribute_specificity\",\n \"premailer/tests/test_premailer.py::Tests::test_style_block_with_external_urls\",\n \"premailer/tests/test_premailer.py::Tests::test_turnoff_cache_works_as_expected\",\n \"premailer/tests/test_premailer.py::Tests::test_type_test\",\n \"premailer/tests/test_premailer.py::Tests::test_xml_cdata\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"BSD 3-Clause \"New\" or \"Revised\" License"},"__index_level_0__":{"kind":"number","value":129,"string":"129"},"num_tokens_patch":{"kind":"number","value":467,"string":"467"},"before_filepaths":{"kind":"list like","value":["premailer/premailer.py"],"string":"[\n \"premailer/premailer.py\"\n]"}}},{"rowIdx":29,"cells":{"instance_id":{"kind":"string","value":"typesafehub__conductr-cli-57"},"base_commit":{"kind":"string","value":"357be15356b14f09069cf542e8a4765edd6a0d0a"},"created_at":{"kind":"string","value":"2015-05-13 17:22:23"},"environment_setup_commit":{"kind":"string","value":"357be15356b14f09069cf542e8a4765edd6a0d0a"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/conductr_cli/conduct_load.py b/conductr_cli/conduct_load.py\nindex 38bc3d8..982965d 100644\n--- a/conductr_cli/conduct_load.py\n+++ b/conductr_cli/conduct_load.py\n@@ -19,11 +19,14 @@ def load(args):\n \"\"\"`conduct load` command\"\"\"\n \n print('Retrieving bundle...')\n- bundle_file, bundle_headers = urlretrieve(get_url(args.bundle))\n+ bundle_name, bundle_url = get_url(args.bundle)\n+ bundle_file, bundle_headers = urlretrieve(bundle_url)\n+\n+ configuration_file, configuration_headers, configuration_name = (None, None, None)\n if args.configuration is not None:\n print('Retrieving configuration...')\n- configuration_file, configuration_headers = urlretrieve(get_url(args.configuration)) \\\n- if args.configuration is not None else (None, None)\n+ configuration_name, configuration_url = get_url(args.configuration)\n+ configuration_file, configuration_headers = urlretrieve(configuration_url)\n \n bundle_conf = ConfigFactory.parse_string(bundle_utils.conf(bundle_file))\n overlay_bundle_conf = None if configuration_file is None else \\\n@@ -39,10 +42,10 @@ def load(args):\n ('roles', ' '.join(with_bundle_configurations(ConfigTree.get_list, 'roles'))),\n ('bundleName', with_bundle_configurations(ConfigTree.get_string, 'name')),\n ('system', with_bundle_configurations(ConfigTree.get_string, 'system')),\n- ('bundle', open(bundle_file, 'rb'))\n+ ('bundle', (bundle_name, open(bundle_file, 'rb')))\n ]\n if configuration_file is not None:\n- files.append(('configuration', open(configuration_file, 'rb')))\n+ files.append(('configuration', (configuration_name, open(configuration_file, 'rb'))))\n \n print('Loading bundle to ConductR...')\n response = requests.post(url, files=files)\n@@ -74,4 +77,5 @@ def get_url(uri):\n parsed = urlparse(uri, scheme='file')\n op = Path(uri)\n np = str(op.cwd() / op if parsed.scheme == 'file' and op.root == '' else parsed.path)\n- return urlunparse(ParseResult(parsed.scheme, parsed.netloc, np, parsed.params, parsed.query, parsed.fragment))\n+ url = urlunparse(ParseResult(parsed.scheme, parsed.netloc, np, parsed.params, parsed.query, parsed.fragment))\n+ return (url.split('/')[-1], url)\n"},"problem_statement":{"kind":"string","value":"Unable to load bundle from https \nConductR RC1, CLI 0.15\r\n\r\nLoading a bundle via https hangs. The cli must be terminated.\r\n\r\n```bash\r\n> conduct load https://github.com/typesafehub/project-doc/releases/download/1.0/project-doc-1.0-SNAPSHOT-e78ed07d4a895e14595a21aef1bf616b1b0e4d886f3265bc7b152acf93d259b5.zip\r\nRetrieving bundle...\r\nRetrieving configuration...\r\nLoading bundle to ConductR...\r\n```\r\nIf I wget the bundle to the local file system, the bundle loads successfully."},"repo":{"kind":"string","value":"typesafehub/conductr-cli"},"test_patch":{"kind":"string","value":"diff --git a/conductr_cli/test/test_conduct_load.py b/conductr_cli/test/test_conduct_load.py\nindex b5503cb..93ee6f7 100644\n--- a/conductr_cli/test/test_conduct_load.py\n+++ b/conductr_cli/test/test_conduct_load.py\n@@ -2,6 +2,7 @@ from unittest import TestCase\n from conductr_cli.test.cli_test_case import CliTestCase, create_temp_bundle, create_temp_bundle_with_contents, strip_margin\n from conductr_cli import conduct_load\n from urllib.error import URLError\n+import os\n import shutil\n \n try:\n@@ -54,7 +55,7 @@ class TestConductLoadCommand(TestCase, CliTestCase):\n ('roles', ' '.join(roles)),\n ('bundleName', bundleName),\n ('system', system),\n- ('bundle', 1)\n+ ('bundle', ('bundle.zip', 1))\n ]\n \n output_template = \"\"\"|Retrieving bundle...\n@@ -177,7 +178,7 @@ class TestConductLoadCommand(TestCase, CliTestCase):\n [call(self.bundle_file, 'rb'), call(config_file, 'rb')]\n )\n \n- expected_files = self.default_files + [('configuration', 1)]\n+ expected_files = self.default_files + [('configuration', ('bundle.zip', 1))]\n expected_files[4] = ('bundleName', 'overlaid-name')\n http_method.assert_called_with(self.default_url, files=expected_files)\n \n@@ -361,3 +362,16 @@ class TestConductLoadCommand(TestCase, CliTestCase):\n strip_margin(\"\"\"|ERROR: File not found: no_such.conf\n |\"\"\"),\n self.output(stderr))\n+\n+\n+class TestGetUrl(TestCase):\n+\n+ def test_url(self):\n+ filename, url = conduct_load.get_url('https://site.com/bundle-1.0-e78ed07d4a895e14595a21aef1bf616b1b0e4d886f3265bc7b152acf93d259b5.zip')\n+ self.assertEqual('bundle-1.0-e78ed07d4a895e14595a21aef1bf616b1b0e4d886f3265bc7b152acf93d259b5.zip', filename)\n+ self.assertEqual('https://site.com/bundle-1.0-e78ed07d4a895e14595a21aef1bf616b1b0e4d886f3265bc7b152acf93d259b5.zip', url)\n+\n+ def test_file(self):\n+ filename, url = conduct_load.get_url('bundle-1.0-e78ed07d4a895e14595a21aef1bf616b1b0e4d886f3265bc7b152acf93d259b5.zip')\n+ self.assertEqual('bundle-1.0-e78ed07d4a895e14595a21aef1bf616b1b0e4d886f3265bc7b152acf93d259b5.zip', filename)\n+ self.assertEqual('file://' + os.getcwd() + '/bundle-1.0-e78ed07d4a895e14595a21aef1bf616b1b0e4d886f3265bc7b152acf93d259b5.zip', url)\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_hyperlinks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 3\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"0.15"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"pytest\",\n \"pip_packages\": [\n \"nose\",\n \"flake8\",\n \"pep8-naming\",\n \"git+https://github.com/zheller/flake8-quotes#aef86c4f8388e790332757e5921047ad53160a75\",\n \"pytest\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.9\",\n \"reqs_path\": null,\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"argcomplete==3.6.1\ncertifi==2025.1.31\ncharset-normalizer==3.4.1\n-e git+https://github.com/typesafehub/conductr-cli.git@357be15356b14f09069cf542e8a4765edd6a0d0a#egg=conductr_cli\nexceptiongroup @ file:///croot/exceptiongroup_1706031385326/work\nflake8==7.2.0\nflake8-quotes @ git+https://github.com/zheller/flake8-quotes@e75accbd40f0e1fa1e8f0e746b93c9766db8f106\nidna==3.10\niniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work\nmccabe==0.7.0\nnose==1.3.7\npackaging @ file:///croot/packaging_1734472117206/work\npep8-naming==0.14.1\npluggy @ file:///croot/pluggy_1733169602837/work\npycodestyle==2.13.0\npyflakes==3.3.1\npyhocon==0.2.1\npyparsing==2.0.3\npytest @ file:///croot/pytest_1738938843180/work\nrequests==2.32.3\ntomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work\nurllib3==2.3.0\n"},"environment":{"kind":"string","value":"name: conductr-cli\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - exceptiongroup=1.2.0=py39h06a4308_0\n - iniconfig=1.1.1=pyhd3eb1b0_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - packaging=24.2=py39h06a4308_0\n - pip=25.0=py39h06a4308_0\n - pluggy=1.5.0=py39h06a4308_0\n - pytest=8.3.4=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tomli=2.0.1=py39h06a4308_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - argcomplete==3.6.1\n - certifi==2025.1.31\n - charset-normalizer==3.4.1\n - flake8==7.2.0\n - flake8-quotes==3.4.0\n - idna==3.10\n - mccabe==0.7.0\n - nose==1.3.7\n - pep8-naming==0.14.1\n - pycodestyle==2.13.0\n - pyflakes==3.3.1\n - pyhocon==0.2.1\n - pyparsing==2.0.3\n - requests==2.32.3\n - urllib3==2.3.0\nprefix: /opt/conda/envs/conductr-cli\n"},"FAIL_TO_PASS":{"kind":"list like","value":["conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure","conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_invalid_address","conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_success","conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_success_custom_ip_port","conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_success_long_ids","conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_success_verbose","conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_success_with_configuration","conductr_cli/test/test_conduct_load.py::TestGetUrl::test_file","conductr_cli/test/test_conduct_load.py::TestGetUrl::test_url"],"string":"[\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure\",\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_invalid_address\",\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_success\",\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_success_custom_ip_port\",\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_success_long_ids\",\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_success_verbose\",\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_success_with_configuration\",\n \"conductr_cli/test/test_conduct_load.py::TestGetUrl::test_file\",\n \"conductr_cli/test/test_conduct_load.py::TestGetUrl::test_url\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_no_bundle","conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_no_configuration","conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_no_disk_space","conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_no_memory","conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_no_nr_of_cpus","conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_no_roles","conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_roles_not_a_list"],"string":"[\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_no_bundle\",\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_no_configuration\",\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_no_disk_space\",\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_no_memory\",\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_no_nr_of_cpus\",\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_no_roles\",\n \"conductr_cli/test/test_conduct_load.py::TestConductLoadCommand::test_failure_roles_not_a_list\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"Apache License 2.0"},"__index_level_0__":{"kind":"number","value":135,"string":"135"},"num_tokens_patch":{"kind":"number","value":546,"string":"546"},"before_filepaths":{"kind":"list like","value":["conductr_cli/conduct_load.py"],"string":"[\n \"conductr_cli/conduct_load.py\"\n]"}}},{"rowIdx":30,"cells":{"instance_id":{"kind":"string","value":"pysmt__pysmt-114"},"base_commit":{"kind":"string","value":"4fd83af49e7784a874f57620809404d530929366"},"created_at":{"kind":"string","value":"2015-05-17 17:12:04"},"environment_setup_commit":{"kind":"string","value":"689cc79ff2731837903b14daa266afc99b4feb21"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/pysmt/simplifier.py b/pysmt/simplifier.py\nindex 418bc0d..3303577 100644\n--- a/pysmt/simplifier.py\n+++ b/pysmt/simplifier.py\n@@ -445,7 +445,7 @@ class Simplifier(walkers.DagWalker):\n res = args[0].bv_unsigned_value() // args[1].bv_unsigned_value()\n res = res % 2**formula.bv_width()\n return self.manager.BV(res, width=formula.bv_width())\n- return self.manager.BVUdiv(*args)\n+ return self.manager.BVUDiv(*args)\n \n def walk_bv_urem(self, formula, args):\n if args[0].is_bv_constant() and args[1].is_bv_constant:\n@@ -454,7 +454,7 @@ class Simplifier(walkers.DagWalker):\n else:\n res = args[0].bv_unsigned_value() % args[1].bv_unsigned_value()\n return self.manager.BV(res, width=formula.bv_width())\n- return self.manager.BVUrem(*args)\n+ return self.manager.BVURem(*args)\n \n def walk_bv_ult(self, formula, args):\n if args[0].is_bv_constant() and args[1].is_bv_constant:\n@@ -506,7 +506,7 @@ class Simplifier(walkers.DagWalker):\n filler = bitstr[0]\n res = filler*formula.bv_extend_step() + bitstr\n return self.manager.BV(res, width=formula.bv_width())\n- return self.manager.BVSext(args[0], formula.bv_extend_step())\n+ return self.manager.BVSExt(args[0], formula.bv_extend_step())\n \n def walk_bv_zext(self, formula, args):\n if args[0].is_bv_constant():\n@@ -517,7 +517,7 @@ class Simplifier(walkers.DagWalker):\n return self.manager.BVZExt(args[0], formula.bv_extend_step())\n \n def walk_bv_concat(self, formula, args):\n- if args[0].is_bv_constant() and args[1].is_bv_constant:\n+ if args[0].is_bv_constant() and args[1].is_bv_constant():\n w0 = args[0].bv_width()\n w1 = args[1].bv_width()\n res = (2**w1) * args[0].bv_unsigned_value() + \\\n@@ -526,14 +526,14 @@ class Simplifier(walkers.DagWalker):\n return self.manager.BVConcat(*args)\n \n def walk_bv_lshl(self, formula, args):\n- if args[0].is_bv_constant() and args[1].is_bv_constant:\n+ if args[0].is_bv_constant() and args[1].is_bv_constant():\n res = args[0].bv_unsigned_value() << args[1].bv_unsigned_value()\n w = args[0].bv_width()\n return self.manager.BV(res % (2 ** w), w)\n return self.manager.BVLShl(*args)\n \n def walk_bv_lshr(self, formula, args):\n- if args[0].is_bv_constant() and args[1].is_bv_constant:\n+ if args[0].is_bv_constant() and args[1].is_bv_constant():\n res = args[0].bv_unsigned_value() >> args[1].bv_unsigned_value()\n w = args[0].bv_width()\n return self.manager.BV(res % (2 ** w), w)\ndiff --git a/pysmt/walkers/identitydag.py b/pysmt/walkers/identitydag.py\nindex 1fc1915..b422926 100644\n--- a/pysmt/walkers/identitydag.py\n+++ b/pysmt/walkers/identitydag.py\n@@ -31,72 +31,135 @@ class IdentityDagWalker(DagWalker):\n DagWalker.__init__(self,\n env=env,\n invalidate_memoization=invalidate_memoization)\n+ self.mgr = self.env.formula_manager\n \n def walk_symbol(self, formula, args):\n- return self.env.formula_manager.Symbol(formula.symbol_name(),\n+ return self.mgr.Symbol(formula.symbol_name(),\n formula.symbol_type())\n \n def walk_real_constant(self, formula, args):\n- return self.env.formula_manager.Real(formula.constant_value())\n+ return self.mgr.Real(formula.constant_value())\n \n def walk_int_constant(self, formula, args):\n- return self.env.formula_manager.Int(formula.constant_value())\n+ return self.mgr.Int(formula.constant_value())\n \n def walk_bool_constant(self, formula, args):\n- return self.env.formula_manager.Bool(formula.constant_value())\n+ return self.mgr.Bool(formula.constant_value())\n \n def walk_and(self, formula, args):\n- return self.env.formula_manager.And(args)\n+ return self.mgr.And(args)\n \n def walk_or(self, formula, args):\n- return self.env.formula_manager.Or(args)\n+ return self.mgr.Or(args)\n \n def walk_not(self, formula, args):\n- return self.env.formula_manager.Not(args[0])\n+ return self.mgr.Not(*args)\n \n def walk_iff(self, formula, args):\n- return self.env.formula_manager.Iff(args[0], args[1])\n+ return self.mgr.Iff(*args)\n \n def walk_implies(self, formula, args):\n- return self.env.formula_manager.Implies(args[0], args[1])\n+ return self.mgr.Implies(*args)\n \n def walk_equals(self, formula, args):\n- return self.env.formula_manager.Equals(args[0], args[1])\n+ return self.mgr.Equals(*args)\n \n def walk_ite(self, formula, args):\n- return self.env.formula_manager.Ite(args[0], args[1], args[2])\n+ return self.mgr.Ite(*args)\n \n def walk_ge(self, formula, args):\n- return self.env.formula_manager.GE(args[0], args[1])\n+ return self.mgr.GE(*args)\n \n def walk_le(self, formula, args):\n- return self.env.formula_manager.LE(args[0], args[1])\n+ return self.mgr.LE(*args)\n \n def walk_gt(self, formula, args):\n- return self.env.formula_manager.GT(args[0], args[1])\n+ return self.mgr.GT(*args)\n \n def walk_lt(self, formula, args):\n- return self.env.formula_manager.LT(args[0], args[1])\n+ return self.mgr.LT(*args)\n \n def walk_forall(self, formula, args):\n qvars = [self.walk_symbol(v, None) for v in formula.quantifier_vars()]\n- return self.env.formula_manager.ForAll(qvars,args[0])\n+ return self.mgr.ForAll(qvars, *args)\n \n def walk_exists(self, formula, args):\n qvars = [self.walk_symbol(v, None) for v in formula.quantifier_vars()]\n- return self.env.formula_manager.Exists(qvars,args[0])\n+ return self.mgr.Exists(qvars, *args)\n \n def walk_plus(self, formula, args):\n- return self.env.formula_manager.Plus(args)\n+ return self.mgr.Plus(args)\n \n def walk_times(self, formula, args):\n- return self.env.formula_manager.Times(args[0], args[1])\n+ return self.mgr.Times(*args)\n \n def walk_minus(self, formula, args):\n- return self.env.formula_manager.Minus(args[0], args[1])\n+ return self.mgr.Minus(*args)\n \n def walk_function(self, formula, args):\n- return self.env.formula_manager.Function(formula.function_name(), args)\n+ return self.mgr.Function(formula.function_name(), args)\n \n def walk_toreal(self, formula, args):\n- return self.env.formula_manager.ToReal(args[0])\n+ return self.mgr.ToReal(*args)\n+\n+ def walk_bv_constant(self, formula, args):\n+ return self.mgr.BV(formula.constant_value(), formula.bv_width())\n+\n+ def walk_bv_and(self, formula, args):\n+ return self.mgr.BVAnd(*args)\n+\n+ def walk_bv_not(self, formula, args):\n+ return self.mgr.BVNot(*args)\n+\n+ def walk_bv_neg(self, formula, args):\n+ return self.mgr.BVNeg(*args)\n+\n+ def walk_bv_or(self, formula, args):\n+ return self.mgr.BVOr(*args)\n+\n+ def walk_bv_xor(self, formula, args):\n+ return self.mgr.BVXor(*args)\n+\n+ def walk_bv_add(self, formula, args):\n+ return self.mgr.BVAdd(*args)\n+\n+ def walk_bv_mul(self, formula, args):\n+ return self.mgr.BVMul(*args)\n+\n+ def walk_bv_udiv(self, formula, args):\n+ return self.mgr.BVUDiv(*args)\n+\n+ def walk_bv_urem(self, formula, args):\n+ return self.mgr.BVURem(*args)\n+\n+ def walk_bv_ult(self, formula, args):\n+ return self.mgr.BVULT(*args)\n+\n+ def walk_bv_ule(self, formula, args):\n+ return self.mgr.BVULE(*args)\n+\n+ def walk_bv_extract(self, formula, args):\n+ return self.mgr.BVExtract(args[0],\n+ start=formula.bv_extract_start(),\n+ end=formula.bv_extract_end())\n+\n+ def walk_bv_ror(self, formula, args):\n+ return self.mgr.BVRor(args[0], formula.bv_rotation_step())\n+\n+ def walk_bv_rol(self, formula, args):\n+ return self.mgr.BVRol(args[0], formula.bv_rotation_step())\n+\n+ def walk_bv_sext(self, formula, args):\n+ return self.mgr.BVSExt(args[0], formula.bv_extend_step())\n+\n+ def walk_bv_zext(self, formula, args):\n+ return self.mgr.BVZExt(args[0], formula.bv_extend_step())\n+\n+ def walk_bv_concat(self, formula, args):\n+ return self.mgr.BVConcat(*args)\n+\n+ def walk_bv_lshl(self, formula, args):\n+ return self.mgr.BVLShl(*args)\n+\n+ def walk_bv_lshr(self, formula, args):\n+ return self.mgr.BVLShr(*args)\n"},"problem_statement":{"kind":"string","value":"IdentityDagWalker lacks BV support"},"repo":{"kind":"string","value":"pysmt/pysmt"},"test_patch":{"kind":"string","value":"diff --git a/pysmt/test/test_walkers.py b/pysmt/test/test_walkers.py\nindex 22a96c7..6defb39 100644\n--- a/pysmt/test/test_walkers.py\n+++ b/pysmt/test/test_walkers.py\n@@ -25,6 +25,7 @@ from pysmt.typing import INT, BOOL, REAL, FunctionType\n from pysmt.walkers import TreeWalker, DagWalker, IdentityDagWalker\n from pysmt.test import TestCase\n from pysmt.formula import FormulaManager\n+from pysmt.test.examples import get_example_formulae\n \n from six.moves import xrange\n \n@@ -100,7 +101,7 @@ class TestWalkers(TestCase):\n self.assertFalse(tree_walker.is_complete())\n \n \n- def test_identity_walker(self):\n+ def test_identity_walker_simple(self):\n \n def walk_and_to_or(formula, args, **kwargs):\n return Or(args)\n@@ -125,6 +126,11 @@ class TestWalkers(TestCase):\n result = walker.walk(alternation)\n self.assertEqual(result, expected)\n \n+ def test_identity_dag_walker(self):\n+ idw = IdentityDagWalker()\n+ for (f, _, _, _) in get_example_formulae():\n+ rebuilt = idw.walk(f)\n+ self.assertTrue(rebuilt == f, \"Rebuilt formula is not identical\")\n \n def test_substitution_on_quantifiers(self):\n x, y = FreshSymbol(), FreshSymbol()\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_short_problem_statement\",\n \"has_many_modified_files\",\n \"has_many_hunks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 3,\n \"test_score\": 0\n },\n \"num_modified_files\": 2\n}"},"version":{"kind":"string","value":"0.3"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .[dev]\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"nose\",\n \"pytest\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.9\",\n \"reqs_path\": [\n \"requirements/base.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"exceptiongroup==1.2.2\niniconfig==2.1.0\nnose==1.3.7\npackaging==24.2\npluggy==1.5.0\n-e git+https://github.com/pysmt/pysmt.git@4fd83af49e7784a874f57620809404d530929366#egg=PySMT\npytest==8.3.5\nsix==1.17.0\ntomli==2.2.1\n"},"environment":{"kind":"string","value":"name: pysmt\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - pip=25.0=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - exceptiongroup==1.2.2\n - iniconfig==2.1.0\n - nose==1.3.7\n - packaging==24.2\n - pluggy==1.5.0\n - pytest==8.3.5\n - six==1.17.0\n - tomli==2.2.1\nprefix: /opt/conda/envs/pysmt\n"},"FAIL_TO_PASS":{"kind":"list like","value":["pysmt/test/test_walkers.py::TestWalkers::test_identity_dag_walker"],"string":"[\n \"pysmt/test/test_walkers.py::TestWalkers::test_identity_dag_walker\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["pysmt/test/test_walkers.py::TestWalkers::test_identity_walker_simple","pysmt/test/test_walkers.py::TestWalkers::test_iterative_get_free_variables","pysmt/test/test_walkers.py::TestWalkers::test_subst","pysmt/test/test_walkers.py::TestWalkers::test_substituter_conditions","pysmt/test/test_walkers.py::TestWalkers::test_substitution_complex","pysmt/test/test_walkers.py::TestWalkers::test_substitution_on_functions","pysmt/test/test_walkers.py::TestWalkers::test_substitution_on_quantifiers","pysmt/test/test_walkers.py::TestWalkers::test_substitution_term","pysmt/test/test_walkers.py::TestWalkers::test_undefined_node","pysmt/test/test_walkers.py::TestWalkers::test_walker_is_complete"],"string":"[\n \"pysmt/test/test_walkers.py::TestWalkers::test_identity_walker_simple\",\n \"pysmt/test/test_walkers.py::TestWalkers::test_iterative_get_free_variables\",\n \"pysmt/test/test_walkers.py::TestWalkers::test_subst\",\n \"pysmt/test/test_walkers.py::TestWalkers::test_substituter_conditions\",\n \"pysmt/test/test_walkers.py::TestWalkers::test_substitution_complex\",\n \"pysmt/test/test_walkers.py::TestWalkers::test_substitution_on_functions\",\n \"pysmt/test/test_walkers.py::TestWalkers::test_substitution_on_quantifiers\",\n \"pysmt/test/test_walkers.py::TestWalkers::test_substitution_term\",\n \"pysmt/test/test_walkers.py::TestWalkers::test_undefined_node\",\n \"pysmt/test/test_walkers.py::TestWalkers::test_walker_is_complete\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"Apache License 2.0"},"__index_level_0__":{"kind":"number","value":142,"string":"142"},"num_tokens_patch":{"kind":"number","value":2449,"string":"2,449"},"before_filepaths":{"kind":"list like","value":["pysmt/simplifier.py","pysmt/walkers/identitydag.py"],"string":"[\n \"pysmt/simplifier.py\",\n \"pysmt/walkers/identitydag.py\"\n]"}}},{"rowIdx":31,"cells":{"instance_id":{"kind":"string","value":"pre-commit__pre-commit-231"},"base_commit":{"kind":"string","value":"9515ca06378d74f1e4f8013db2b5230c1f15edaa"},"created_at":{"kind":"string","value":"2015-05-18 19:48:14"},"environment_setup_commit":{"kind":"string","value":"9515ca06378d74f1e4f8013db2b5230c1f15edaa"},"hints_text":{"kind":"string","value":"asottile: @Lucas-C look correct?\ncoveralls: \n[![Coverage Status](https://coveralls.io/builds/2591860/badge)](https://coveralls.io/builds/2591860)\n\nCoverage decreased (-0.04%) to 99.96% when pulling **b140f92cd7e20368b27d19ea01227402e71c294a on no_defaults_in_config_227** into **9515ca06378d74f1e4f8013db2b5230c1f15edaa on master**.\n"},"patch":{"kind":"string","value":"diff --git a/pre_commit/clientlib/validate_config.py b/pre_commit/clientlib/validate_config.py\nindex bdd0e2c..e4a90a6 100644\n--- a/pre_commit/clientlib/validate_config.py\n+++ b/pre_commit/clientlib/validate_config.py\n@@ -33,7 +33,7 @@ CONFIG_JSON_SCHEMA = {\n 'properties': {\n 'id': {'type': 'string'},\n 'files': {'type': 'string'},\n- 'exclude': {'type': 'string', 'default': '^$'},\n+ 'exclude': {'type': 'string'},\n 'language_version': {'type': 'string'},\n 'args': {\n 'type': 'array',\n@@ -71,7 +71,7 @@ def validate_config_extra(config):\n )\n for hook in repo['hooks']:\n try_regex(repo, hook['id'], hook.get('files', ''), 'files')\n- try_regex(repo, hook['id'], hook['exclude'], 'exclude')\n+ try_regex(repo, hook['id'], hook.get('exclude', ''), 'exclude')\n \n \n load_config = get_validator(\ndiff --git a/pre_commit/clientlib/validate_manifest.py b/pre_commit/clientlib/validate_manifest.py\nindex 283d7c4..4295014 100644\n--- a/pre_commit/clientlib/validate_manifest.py\n+++ b/pre_commit/clientlib/validate_manifest.py\n@@ -20,6 +20,7 @@ MANIFEST_JSON_SCHEMA = {\n 'name': {'type': 'string'},\n 'description': {'type': 'string', 'default': ''},\n 'entry': {'type': 'string'},\n+ 'exclude': {'type': 'string', 'default': '^$'},\n 'language': {'type': 'string'},\n 'language_version': {'type': 'string', 'default': 'default'},\n 'files': {'type': 'string'},\n@@ -52,8 +53,14 @@ def validate_files(hook_config):\n if not is_regex_valid(hook_config['files']):\n raise InvalidManifestError(\n 'Invalid files regex at {0}: {1}'.format(\n- hook_config['id'],\n- hook_config['files'],\n+ hook_config['id'], hook_config['files'],\n+ )\n+ )\n+\n+ if not is_regex_valid(hook_config.get('exclude', '')):\n+ raise InvalidManifestError(\n+ 'Invalid exclude regex at {0}: {1}'.format(\n+ hook_config['id'], hook_config['exclude'],\n )\n )\n \n"},"problem_statement":{"kind":"string","value":"Bug: base manifest value for 'exclude' is always ignored\nI stumbled upon this bug while working on #226: the culprit is [`Repository.hooks`](https://github.com/pre-commit/pre-commit/blob/master/pre_commit/repository.py#L48).\r\n\r\nA quick fix for this would be to simply remove the default value from `pre_commit/clientlib/validate_config.py`, but the root cause is that any default value defined for a field in this file will make the corresponding manifest field useless.\r\n\r\nBasically here is what happens in `Repository.hooks`:\r\n- all the hooks defined in the current repository are enumerated\r\n- at this stage, a `hook` is a dict closely matching the Yaml the config file content, **plus** default values for fields not defined in the Yaml but having a JSON schema 'default'\r\n- when doing the dict merge, **every** (key,value) pair in `hook` overrides the corresponding manifest entry. This includes default config value like `exclude: '$^'` overriding a base manifest value like `exclude: '.bak$'`\r\n\r\nHence I suggest either adding a test ensuring there will never be any 'default' defined in `CONFIG_JSON_SCHEMA`, or improving the merge logic."},"repo":{"kind":"string","value":"pre-commit/pre-commit"},"test_patch":{"kind":"string","value":"diff --git a/tests/clientlib/validate_config_test.py b/tests/clientlib/validate_config_test.py\nindex c507f28..b474f1b 100644\n--- a/tests/clientlib/validate_config_test.py\n+++ b/tests/clientlib/validate_config_test.py\n@@ -174,3 +174,23 @@ def test_config_with_local_hooks_definition_passes(config_obj):\n jsonschema.validate(config_obj, CONFIG_JSON_SCHEMA)\n config = apply_defaults(config_obj, CONFIG_JSON_SCHEMA)\n validate_config_extra(config)\n+\n+\n+def test_does_not_contain_defaults():\n+ \"\"\"Due to the way our merging works, if this schema has any defaults they\n+ will clobber potentially useful values in the backing manifest. #227\n+ \"\"\"\n+ to_process = [(CONFIG_JSON_SCHEMA, ())]\n+ while to_process:\n+ schema, route = to_process.pop()\n+ # Check this value\n+ if isinstance(schema, dict):\n+ if 'default' in schema:\n+ raise AssertionError(\n+ 'Unexpected default in schema at {0}'.format(\n+ ' => '.join(route),\n+ )\n+ )\n+\n+ for key, value in schema.items():\n+ to_process.append((value, route + (key,)))\ndiff --git a/tests/clientlib/validate_manifest_test.py b/tests/clientlib/validate_manifest_test.py\nindex 5e5690e..937f432 100644\n--- a/tests/clientlib/validate_manifest_test.py\n+++ b/tests/clientlib/validate_manifest_test.py\n@@ -46,6 +46,9 @@ def test_additional_manifest_check_passing(obj):\n [{'id': 'a', 'language': 'not a language', 'files': ''}],\n [{'id': 'a', 'language': 'python3', 'files': ''}],\n [{'id': 'a', 'language': 'python', 'files': 'invalid regex('}],\n+ [{'id': 'a', 'language': 'not a language', 'files': ''}],\n+ [{'id': 'a', 'language': 'python3', 'files': ''}],\n+ [{'id': 'a', 'language': 'python', 'files': '', 'exclude': '('}],\n ),\n )\n def test_additional_manifest_failing(obj):\ndiff --git a/tests/manifest_test.py b/tests/manifest_test.py\nindex ba30d42..39ecc74 100644\n--- a/tests/manifest_test.py\n+++ b/tests/manifest_test.py\n@@ -22,6 +22,7 @@ def test_manifest_contents(manifest):\n 'args': [],\n 'description': '',\n 'entry': 'bin/hook.sh',\n+ 'exclude': '^$',\n 'expected_return_value': 0,\n 'files': '',\n 'id': 'bash_hook',\n@@ -36,6 +37,7 @@ def test_hooks(manifest):\n 'args': [],\n 'description': '',\n 'entry': 'bin/hook.sh',\n+ 'exclude': '^$',\n 'expected_return_value': 0,\n 'files': '',\n 'id': 'bash_hook',\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_many_modified_files\",\n \"has_many_hunks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 0\n },\n \"num_modified_files\": 2\n}"},"version":{"kind":"string","value":"0.4"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .[dev]\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.5\",\n \"reqs_path\": [\n \"requirements-dev.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"aspy.yaml==1.3.0\nastroid==1.3.2\nattrs==22.2.0\ncached-property==1.5.2\ncertifi==2021.5.30\ncoverage==6.2\ndistlib==0.3.9\nfilelock==3.4.1\nflake8==5.0.4\nimportlib-metadata==4.8.3\nimportlib-resources==5.4.0\niniconfig==1.1.1\njsonschema==3.2.0\nlogilab-common==1.9.7\nmccabe==0.7.0\nmock==5.2.0\nmypy-extensions==1.0.0\nnodeenv==1.6.0\nordereddict==1.1\npackaging==21.3\nplatformdirs==2.4.0\npluggy==1.0.0\n-e git+https://github.com/pre-commit/pre-commit.git@9515ca06378d74f1e4f8013db2b5230c1f15edaa#egg=pre_commit\npy==1.11.0\npycodestyle==2.9.1\npyflakes==2.5.0\npylint==1.3.1\npyparsing==3.1.4\npyrsistent==0.18.0\npytest==7.0.1\nPyYAML==6.0.1\nsimplejson==3.20.1\nsix==1.17.0\ntomli==1.2.3\ntyping_extensions==4.1.1\nvirtualenv==20.17.1\nzipp==3.6.0\n"},"environment":{"kind":"string","value":"name: pre-commit\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - certifi=2021.5.30=py36h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.3=he6710b0_2\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=1.1.1w=h7f8727e_0\n - pip=21.2.2=py36h06a4308_0\n - python=3.6.13=h12debd9_1\n - readline=8.2=h5eee18b_0\n - setuptools=58.0.4=py36h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - wheel=0.37.1=pyhd3eb1b0_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - argparse==1.4.0\n - aspy-yaml==1.3.0\n - astroid==1.3.2\n - attrs==22.2.0\n - cached-property==1.5.2\n - coverage==6.2\n - distlib==0.3.9\n - filelock==3.4.1\n - flake8==5.0.4\n - importlib-metadata==4.8.3\n - importlib-resources==5.4.0\n - iniconfig==1.1.1\n - jsonschema==3.2.0\n - logilab-common==1.9.7\n - mccabe==0.7.0\n - mock==5.2.0\n - mypy-extensions==1.0.0\n - nodeenv==1.6.0\n - ordereddict==1.1\n - packaging==21.3\n - platformdirs==2.4.0\n - pluggy==1.0.0\n - py==1.11.0\n - pycodestyle==2.9.1\n - pyflakes==2.5.0\n - pylint==1.3.1\n - pyparsing==3.1.4\n - pyrsistent==0.18.0\n - pytest==7.0.1\n - pyyaml==6.0.1\n - simplejson==3.20.1\n - six==1.17.0\n - tomli==1.2.3\n - typing-extensions==4.1.1\n - virtualenv==20.17.1\n - zipp==3.6.0\nprefix: /opt/conda/envs/pre-commit\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/clientlib/validate_config_test.py::test_does_not_contain_defaults","tests/clientlib/validate_manifest_test.py::test_additional_manifest_failing[obj5]"],"string":"[\n \"tests/clientlib/validate_config_test.py::test_does_not_contain_defaults\",\n \"tests/clientlib/validate_manifest_test.py::test_additional_manifest_failing[obj5]\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":["tests/clientlib/validate_config_test.py::test_run[input0-0]","tests/clientlib/validate_config_test.py::test_run[input1-0]","tests/clientlib/validate_manifest_test.py::test_run[input0-0]","tests/clientlib/validate_manifest_test.py::test_run[input1-0]","tests/manifest_test.py::test_manifest_contents","tests/manifest_test.py::test_hooks"],"string":"[\n \"tests/clientlib/validate_config_test.py::test_run[input0-0]\",\n \"tests/clientlib/validate_config_test.py::test_run[input1-0]\",\n \"tests/clientlib/validate_manifest_test.py::test_run[input0-0]\",\n \"tests/clientlib/validate_manifest_test.py::test_run[input1-0]\",\n \"tests/manifest_test.py::test_manifest_contents\",\n \"tests/manifest_test.py::test_hooks\"\n]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/clientlib/validate_config_test.py::test_run[input2-1]","tests/clientlib/validate_config_test.py::test_run[input3-1]","tests/clientlib/validate_config_test.py::test_run[input4-1]","tests/clientlib/validate_config_test.py::test_is_valid_according_to_schema[config_obj0-False]","tests/clientlib/validate_config_test.py::test_is_valid_according_to_schema[config_obj1-True]","tests/clientlib/validate_config_test.py::test_is_valid_according_to_schema[config_obj2-True]","tests/clientlib/validate_config_test.py::test_is_valid_according_to_schema[config_obj3-False]","tests/clientlib/validate_config_test.py::test_config_with_failing_regexes_fails","tests/clientlib/validate_config_test.py::test_config_with_ok_regexes_passes","tests/clientlib/validate_config_test.py::test_config_with_invalid_exclude_regex_fails","tests/clientlib/validate_config_test.py::test_config_with_ok_exclude_regex_passes","tests/clientlib/validate_config_test.py::test_config_with_local_hooks_definition_fails[config_obj0]","tests/clientlib/validate_config_test.py::test_config_with_local_hooks_definition_passes[config_obj0]","tests/clientlib/validate_config_test.py::test_config_with_local_hooks_definition_passes[config_obj1]","tests/clientlib/validate_manifest_test.py::test_run[input2-1]","tests/clientlib/validate_manifest_test.py::test_run[input3-1]","tests/clientlib/validate_manifest_test.py::test_run[input4-1]","tests/clientlib/validate_manifest_test.py::test_additional_manifest_check_raises_for_bad_language","tests/clientlib/validate_manifest_test.py::test_additional_manifest_check_passing[obj0]","tests/clientlib/validate_manifest_test.py::test_additional_manifest_check_passing[obj1]","tests/clientlib/validate_manifest_test.py::test_additional_manifest_failing[obj0]","tests/clientlib/validate_manifest_test.py::test_additional_manifest_failing[obj1]","tests/clientlib/validate_manifest_test.py::test_additional_manifest_failing[obj2]","tests/clientlib/validate_manifest_test.py::test_additional_manifest_failing[obj3]","tests/clientlib/validate_manifest_test.py::test_additional_manifest_failing[obj4]","tests/clientlib/validate_manifest_test.py::test_is_valid_according_to_schema[manifest_obj0-False]","tests/clientlib/validate_manifest_test.py::test_is_valid_according_to_schema[manifest_obj1-True]","tests/clientlib/validate_manifest_test.py::test_is_valid_according_to_schema[manifest_obj2-True]"],"string":"[\n \"tests/clientlib/validate_config_test.py::test_run[input2-1]\",\n \"tests/clientlib/validate_config_test.py::test_run[input3-1]\",\n \"tests/clientlib/validate_config_test.py::test_run[input4-1]\",\n \"tests/clientlib/validate_config_test.py::test_is_valid_according_to_schema[config_obj0-False]\",\n \"tests/clientlib/validate_config_test.py::test_is_valid_according_to_schema[config_obj1-True]\",\n \"tests/clientlib/validate_config_test.py::test_is_valid_according_to_schema[config_obj2-True]\",\n \"tests/clientlib/validate_config_test.py::test_is_valid_according_to_schema[config_obj3-False]\",\n \"tests/clientlib/validate_config_test.py::test_config_with_failing_regexes_fails\",\n \"tests/clientlib/validate_config_test.py::test_config_with_ok_regexes_passes\",\n \"tests/clientlib/validate_config_test.py::test_config_with_invalid_exclude_regex_fails\",\n \"tests/clientlib/validate_config_test.py::test_config_with_ok_exclude_regex_passes\",\n \"tests/clientlib/validate_config_test.py::test_config_with_local_hooks_definition_fails[config_obj0]\",\n \"tests/clientlib/validate_config_test.py::test_config_with_local_hooks_definition_passes[config_obj0]\",\n \"tests/clientlib/validate_config_test.py::test_config_with_local_hooks_definition_passes[config_obj1]\",\n \"tests/clientlib/validate_manifest_test.py::test_run[input2-1]\",\n \"tests/clientlib/validate_manifest_test.py::test_run[input3-1]\",\n \"tests/clientlib/validate_manifest_test.py::test_run[input4-1]\",\n \"tests/clientlib/validate_manifest_test.py::test_additional_manifest_check_raises_for_bad_language\",\n \"tests/clientlib/validate_manifest_test.py::test_additional_manifest_check_passing[obj0]\",\n \"tests/clientlib/validate_manifest_test.py::test_additional_manifest_check_passing[obj1]\",\n \"tests/clientlib/validate_manifest_test.py::test_additional_manifest_failing[obj0]\",\n \"tests/clientlib/validate_manifest_test.py::test_additional_manifest_failing[obj1]\",\n \"tests/clientlib/validate_manifest_test.py::test_additional_manifest_failing[obj2]\",\n \"tests/clientlib/validate_manifest_test.py::test_additional_manifest_failing[obj3]\",\n \"tests/clientlib/validate_manifest_test.py::test_additional_manifest_failing[obj4]\",\n \"tests/clientlib/validate_manifest_test.py::test_is_valid_according_to_schema[manifest_obj0-False]\",\n \"tests/clientlib/validate_manifest_test.py::test_is_valid_according_to_schema[manifest_obj1-True]\",\n \"tests/clientlib/validate_manifest_test.py::test_is_valid_according_to_schema[manifest_obj2-True]\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"MIT License"},"__index_level_0__":{"kind":"number","value":143,"string":"143"},"num_tokens_patch":{"kind":"number","value":565,"string":"565"},"before_filepaths":{"kind":"list like","value":["pre_commit/clientlib/validate_config.py","pre_commit/clientlib/validate_manifest.py"],"string":"[\n \"pre_commit/clientlib/validate_config.py\",\n \"pre_commit/clientlib/validate_manifest.py\"\n]"}}},{"rowIdx":32,"cells":{"instance_id":{"kind":"string","value":"pre-commit__pre-commit-235"},"base_commit":{"kind":"string","value":"b4bc5e47423635e187d50d8730584d2c8ff06772"},"created_at":{"kind":"string","value":"2015-05-24 03:03:11"},"environment_setup_commit":{"kind":"string","value":"5791d84236d82f8aa8609c3ff1c69a991d8c6607"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/pre_commit/commands/install_uninstall.py b/pre_commit/commands/install_uninstall.py\nindex c84d29b..47c9484 100644\n--- a/pre_commit/commands/install_uninstall.py\n+++ b/pre_commit/commands/install_uninstall.py\n@@ -48,6 +48,9 @@ def install(runner, overwrite=False, hooks=False, hook_type='pre-commit'):\n hook_path = runner.get_hook_path(hook_type)\n legacy_path = hook_path + '.legacy'\n \n+ if not os.path.exists(os.path.dirname(hook_path)):\n+ os.makedirs(os.path.dirname(hook_path))\n+\n # If we have an existing hook, move it to pre-commit.legacy\n if (\n os.path.exists(hook_path) and\n"},"problem_statement":{"kind":"string","value":"Some versions of git don't create .git/hooks directory\nNoticed here: https://github.com/victorlin/bugbuzz-python/pull/1#issuecomment-104971132"},"repo":{"kind":"string","value":"pre-commit/pre-commit"},"test_patch":{"kind":"string","value":"diff --git a/tests/commands/install_uninstall_test.py b/tests/commands/install_uninstall_test.py\nindex 9e1806e..ca82c06 100644\n--- a/tests/commands/install_uninstall_test.py\n+++ b/tests/commands/install_uninstall_test.py\n@@ -5,6 +5,7 @@ import io\n import os\n import os.path\n import re\n+import shutil\n import subprocess\n import sys\n \n@@ -78,6 +79,15 @@ def test_install_pre_commit(tmpdir_factory):\n assert pre_push_contents == expected_contents\n \n \n+def test_install_hooks_directory_not_present(tmpdir_factory):\n+ path = git_dir(tmpdir_factory)\n+ # Simulate some git clients which don't make .git/hooks #234\n+ shutil.rmtree(os.path.join(path, '.git', 'hooks'))\n+ runner = Runner(path)\n+ install(runner)\n+ assert os.path.exists(runner.pre_commit_path)\n+\n+\n def test_uninstall_does_not_blow_up_when_not_there(tmpdir_factory):\n path = git_dir(tmpdir_factory)\n runner = Runner(path)\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_short_problem_statement\",\n \"has_hyperlinks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 2,\n \"test_score\": 2\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"0.5"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .[dev]\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.5\",\n \"reqs_path\": [\n \"requirements-dev.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"aspy.yaml==1.3.0\nastroid==1.3.2\nattrs==22.2.0\ncached-property==1.5.2\ncertifi==2021.5.30\ncoverage==6.2\ndistlib==0.3.9\nfilelock==3.4.1\nflake8==5.0.4\nimportlib-metadata==4.8.3\nimportlib-resources==5.4.0\niniconfig==1.1.1\njsonschema==3.2.0\nlogilab-common==1.9.7\nmccabe==0.7.0\nmock==5.2.0\nmypy-extensions==1.0.0\nnodeenv==1.6.0\nordereddict==1.1\npackaging==21.3\nplatformdirs==2.4.0\npluggy==1.0.0\n-e git+https://github.com/pre-commit/pre-commit.git@b4bc5e47423635e187d50d8730584d2c8ff06772#egg=pre_commit\npy==1.11.0\npycodestyle==2.9.1\npyflakes==2.5.0\npylint==1.3.1\npyparsing==3.1.4\npyrsistent==0.18.0\npytest==7.0.1\nPyYAML==6.0.1\nsimplejson==3.20.1\nsix==1.17.0\ntomli==1.2.3\ntyping_extensions==4.1.1\nvirtualenv==20.17.1\nzipp==3.6.0\n"},"environment":{"kind":"string","value":"name: pre-commit\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - certifi=2021.5.30=py36h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.3=he6710b0_2\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=1.1.1w=h7f8727e_0\n - pip=21.2.2=py36h06a4308_0\n - python=3.6.13=h12debd9_1\n - readline=8.2=h5eee18b_0\n - setuptools=58.0.4=py36h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - wheel=0.37.1=pyhd3eb1b0_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - argparse==1.4.0\n - aspy-yaml==1.3.0\n - astroid==1.3.2\n - attrs==22.2.0\n - cached-property==1.5.2\n - coverage==6.2\n - distlib==0.3.9\n - filelock==3.4.1\n - flake8==5.0.4\n - importlib-metadata==4.8.3\n - importlib-resources==5.4.0\n - iniconfig==1.1.1\n - jsonschema==3.2.0\n - logilab-common==1.9.7\n - mccabe==0.7.0\n - mock==5.2.0\n - mypy-extensions==1.0.0\n - nodeenv==1.6.0\n - ordereddict==1.1\n - packaging==21.3\n - platformdirs==2.4.0\n - pluggy==1.0.0\n - py==1.11.0\n - pycodestyle==2.9.1\n - pyflakes==2.5.0\n - pylint==1.3.1\n - pyparsing==3.1.4\n - pyrsistent==0.18.0\n - pytest==7.0.1\n - pyyaml==6.0.1\n - simplejson==3.20.1\n - six==1.17.0\n - tomli==1.2.3\n - typing-extensions==4.1.1\n - virtualenv==20.17.1\n - zipp==3.6.0\nprefix: /opt/conda/envs/pre-commit\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/commands/install_uninstall_test.py::test_install_hooks_directory_not_present"],"string":"[\n \"tests/commands/install_uninstall_test.py::test_install_hooks_directory_not_present\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":["tests/commands/install_uninstall_test.py::test_install_pre_commit_and_run","tests/commands/install_uninstall_test.py::test_install_idempotent","tests/commands/install_uninstall_test.py::test_environment_not_sourced","tests/commands/install_uninstall_test.py::test_failing_hooks_returns_nonzero","tests/commands/install_uninstall_test.py::test_install_existing_hooks_no_overwrite","tests/commands/install_uninstall_test.py::test_install_existing_hook_no_overwrite_idempotent","tests/commands/install_uninstall_test.py::test_failing_existing_hook_returns_1","tests/commands/install_uninstall_test.py::test_install_overwrite_no_existing_hooks","tests/commands/install_uninstall_test.py::test_install_overwrite","tests/commands/install_uninstall_test.py::test_uninstall_restores_legacy_hooks","tests/commands/install_uninstall_test.py::test_replace_old_commit_script","tests/commands/install_uninstall_test.py::test_installs_hooks_with_hooks_True","tests/commands/install_uninstall_test.py::test_installed_from_venv","tests/commands/install_uninstall_test.py::test_pre_push_integration_failing","tests/commands/install_uninstall_test.py::test_pre_push_integration_accepted"],"string":"[\n \"tests/commands/install_uninstall_test.py::test_install_pre_commit_and_run\",\n \"tests/commands/install_uninstall_test.py::test_install_idempotent\",\n \"tests/commands/install_uninstall_test.py::test_environment_not_sourced\",\n \"tests/commands/install_uninstall_test.py::test_failing_hooks_returns_nonzero\",\n \"tests/commands/install_uninstall_test.py::test_install_existing_hooks_no_overwrite\",\n \"tests/commands/install_uninstall_test.py::test_install_existing_hook_no_overwrite_idempotent\",\n \"tests/commands/install_uninstall_test.py::test_failing_existing_hook_returns_1\",\n \"tests/commands/install_uninstall_test.py::test_install_overwrite_no_existing_hooks\",\n \"tests/commands/install_uninstall_test.py::test_install_overwrite\",\n \"tests/commands/install_uninstall_test.py::test_uninstall_restores_legacy_hooks\",\n \"tests/commands/install_uninstall_test.py::test_replace_old_commit_script\",\n \"tests/commands/install_uninstall_test.py::test_installs_hooks_with_hooks_True\",\n \"tests/commands/install_uninstall_test.py::test_installed_from_venv\",\n \"tests/commands/install_uninstall_test.py::test_pre_push_integration_failing\",\n \"tests/commands/install_uninstall_test.py::test_pre_push_integration_accepted\"\n]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/commands/install_uninstall_test.py::test_is_not_our_pre_commit","tests/commands/install_uninstall_test.py::test_is_our_pre_commit","tests/commands/install_uninstall_test.py::test_is_not_previous_pre_commit","tests/commands/install_uninstall_test.py::test_is_also_not_previous_pre_commit","tests/commands/install_uninstall_test.py::test_is_previous_pre_commit","tests/commands/install_uninstall_test.py::test_install_pre_commit","tests/commands/install_uninstall_test.py::test_uninstall_does_not_blow_up_when_not_there","tests/commands/install_uninstall_test.py::test_uninstall","tests/commands/install_uninstall_test.py::test_uninstall_doesnt_remove_not_our_hooks"],"string":"[\n \"tests/commands/install_uninstall_test.py::test_is_not_our_pre_commit\",\n \"tests/commands/install_uninstall_test.py::test_is_our_pre_commit\",\n \"tests/commands/install_uninstall_test.py::test_is_not_previous_pre_commit\",\n \"tests/commands/install_uninstall_test.py::test_is_also_not_previous_pre_commit\",\n \"tests/commands/install_uninstall_test.py::test_is_previous_pre_commit\",\n \"tests/commands/install_uninstall_test.py::test_install_pre_commit\",\n \"tests/commands/install_uninstall_test.py::test_uninstall_does_not_blow_up_when_not_there\",\n \"tests/commands/install_uninstall_test.py::test_uninstall\",\n \"tests/commands/install_uninstall_test.py::test_uninstall_doesnt_remove_not_our_hooks\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"MIT License"},"__index_level_0__":{"kind":"number","value":148,"string":"148"},"num_tokens_patch":{"kind":"number","value":176,"string":"176"},"before_filepaths":{"kind":"list like","value":["pre_commit/commands/install_uninstall.py"],"string":"[\n \"pre_commit/commands/install_uninstall.py\"\n]"}}},{"rowIdx":33,"cells":{"instance_id":{"kind":"string","value":"nose-devs__nose2-245"},"base_commit":{"kind":"string","value":"bf9945309d5118ad4723619452c486593964d1b8"},"created_at":{"kind":"string","value":"2015-05-27 19:59:26"},"environment_setup_commit":{"kind":"string","value":"bbf5897eb1aa224100e86ba594042e4399fd2f5f"},"hints_text":{"kind":"string","value":"landscape-bot: [![Code Health](https://landscape.io/badge/175759/landscape.svg?style=flat)](https://landscape.io/diff/163690)\nRepository health decreased by 0.00% when pulling **[28cda3a](https://github.com/dlax/nose2/commit/28cda3abf4d51b58fd686b0b6c0ff5c46c38f51b) on dlax:generator-exception** into **[bf99453](https://github.com/nose-devs/nose2/commit/bf9945309d5118ad4723619452c486593964d1b8) on nose-devs:master**.\n\n * [1 new problem was found](https://landscape.io/diff/163690) (including 0 errors and 1 code smell).\n * [1 problem was fixed](https://landscape.io/diff/163690/fixed) (including 0 errors and 1 code smell).\ncoveralls: \n[![Coverage Status](https://coveralls.io/builds/2664738/badge)](https://coveralls.io/builds/2664738)\n\nCoverage decreased (-0.06%) to 84.25% when pulling **28cda3abf4d51b58fd686b0b6c0ff5c46c38f51b on dlax:generator-exception** into **bf9945309d5118ad4723619452c486593964d1b8 on nose-devs:master**.\n\ncoveralls: \n[![Coverage Status](https://coveralls.io/builds/2664738/badge)](https://coveralls.io/builds/2664738)\n\nCoverage decreased (-0.06%) to 84.25% when pulling **28cda3abf4d51b58fd686b0b6c0ff5c46c38f51b on dlax:generator-exception** into **bf9945309d5118ad4723619452c486593964d1b8 on nose-devs:master**.\n\nlandscape-bot: [![Code Health](https://landscape.io/badge/175789/landscape.svg?style=flat)](https://landscape.io/diff/163709)\nRepository health increased by 0.07% when pulling **[ce05d05](https://github.com/dlax/nose2/commit/ce05d05f4ed1d9bb60cade4ccdb031637385585b) on dlax:generator-exception** into **[bf99453](https://github.com/nose-devs/nose2/commit/bf9945309d5118ad4723619452c486593964d1b8) on nose-devs:master**.\n\n * No new problems were introduced.\n * [1 problem was fixed](https://landscape.io/diff/163709/fixed) (including 0 errors and 1 code smell).\ncoveralls: \n[![Coverage Status](https://coveralls.io/builds/2664909/badge)](https://coveralls.io/builds/2664909)\n\nCoverage increased (+0.02%) to 84.32% when pulling **ce05d05f4ed1d9bb60cade4ccdb031637385585b on dlax:generator-exception** into **bf9945309d5118ad4723619452c486593964d1b8 on nose-devs:master**.\n\ndlax: Hmm, this does not actually fixes #48 completly since the exception context is not forwarded down to the test failure. Will work further on this...\ndlax: Pushed a new version.\ncoveralls: \n[![Coverage Status](https://coveralls.io/builds/2668668/badge)](https://coveralls.io/builds/2668668)\n\nCoverage decreased (-2.57%) to 81.73% when pulling **778265de7a289dda9ab9755ba2c08c89642b80ac on dlax:generator-exception** into **bf9945309d5118ad4723619452c486593964d1b8 on nose-devs:master**.\n\nlandscape-bot: [![Code Health](https://landscape.io/badge/176074/landscape.svg?style=flat)](https://landscape.io/diff/164010)\nCode quality remained the same when pulling **[778265d](https://github.com/dlax/nose2/commit/778265de7a289dda9ab9755ba2c08c89642b80ac) on dlax:generator-exception** into **[bf99453](https://github.com/nose-devs/nose2/commit/bf9945309d5118ad4723619452c486593964d1b8) on nose-devs:master**."},"patch":{"kind":"string","value":"diff --git a/nose2/loader.py b/nose2/loader.py\nindex 2778280..394899f 100644\n--- a/nose2/loader.py\n+++ b/nose2/loader.py\n@@ -7,6 +7,8 @@\n import logging\n import traceback\n \n+import six\n+\n from nose2 import events\n from nose2.compat import unittest\n \n@@ -114,7 +116,11 @@ class PluggableTestLoader(object):\n \n def _makeFailedTest(self, classname, methodname, exception):\n def testFailure(self):\n- raise exception\n+ if isinstance(exception, Exception):\n+ raise exception\n+ else:\n+ # exception tuple (type, value, traceback)\n+ six.reraise(*exception)\n attrs = {methodname: testFailure}\n TestClass = type(classname, (unittest.TestCase,), attrs)\n return self.suiteClass((TestClass(methodname),))\n"},"problem_statement":{"kind":"string","value":"Loader errors throw away tracebacks and exception detail\nFor instance if a generator test throws an AttributeError, the details of the attribute error are lost and the user only sees \"AttributeError\" -- not very helpful."},"repo":{"kind":"string","value":"nose-devs/nose2"},"test_patch":{"kind":"string","value":"diff --git a/nose2/tests/unit/test_loader.py b/nose2/tests/unit/test_loader.py\nindex 24114e5..8dc152c 100644\n--- a/nose2/tests/unit/test_loader.py\n+++ b/nose2/tests/unit/test_loader.py\n@@ -8,6 +8,21 @@ class TestPluggableTestLoader(TestCase):\n self.session = session.Session()\n self.loader = loader.PluggableTestLoader(self.session)\n \n+ def test_failed_load_tests_exception(self):\n+ suite = self.loader.failedLoadTests('test', RuntimeError('err'))\n+ tc = suite._tests[0]\n+ with self.assertRaises(RuntimeError) as cm:\n+ tc.test()\n+ self.assertEqual(cm.exception.args, ('err', ))\n+\n+ def test_failed_load_tests_exc_info(self):\n+ suite = self.loader.failedLoadTests(\n+ 'test', (RuntimeError, RuntimeError('err'), None))\n+ tc = suite._tests[0]\n+ with self.assertRaises(RuntimeError) as cm:\n+ tc.test()\n+ self.assertEqual(cm.exception.args, ('err', ))\n+\n def test_load_from_module_calls_hook(self):\n self.session.hooks.register('loadTestsFromModule', FakePlugin())\n evt = events.LoadFromModuleEvent(self.loader, 'some_module')\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_short_problem_statement\",\n \"has_pytest_match_arg\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 0,\n \"test_score\": 2\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"0.5"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"nose2\",\n \"pytest\"\n ],\n \"pre_install\": [],\n \"python\": \"3.7\",\n \"reqs_path\": [\n \"requirements.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"certifi @ file:///croot/certifi_1671487769961/work/certifi\ncov-core==1.15.0\ncoverage==7.2.7\nexceptiongroup==1.2.2\nimportlib-metadata==6.7.0\niniconfig==2.0.0\n-e git+https://github.com/nose-devs/nose2.git@bf9945309d5118ad4723619452c486593964d1b8#egg=nose2\npackaging==24.0\npluggy==1.2.0\npytest==7.4.4\nsix==1.17.0\ntomli==2.0.1\ntyping_extensions==4.7.1\nzipp==3.15.0\n"},"environment":{"kind":"string","value":"name: nose2\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - certifi=2022.12.7=py37h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=1.1.1w=h7f8727e_0\n - pip=22.3.1=py37h06a4308_0\n - python=3.7.16=h7a1cb2a_0\n - readline=8.2=h5eee18b_0\n - setuptools=65.6.3=py37h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - wheel=0.38.4=py37h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - cov-core==1.15.0\n - coverage==7.2.7\n - exceptiongroup==1.2.2\n - importlib-metadata==6.7.0\n - iniconfig==2.0.0\n - packaging==24.0\n - pluggy==1.2.0\n - pytest==7.4.4\n - six==1.17.0\n - tomli==2.0.1\n - typing-extensions==4.7.1\n - zipp==3.15.0\nprefix: /opt/conda/envs/nose2\n"},"FAIL_TO_PASS":{"kind":"list like","value":["nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_failed_load_tests_exc_info"],"string":"[\n \"nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_failed_load_tests_exc_info\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_failed_load_tests_exception","nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_load_from_module_calls_hook","nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_load_from_name_calls_hook","nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_load_from_names_calls_hook","nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_loader_from_names_calls_module_hook","nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_loader_from_names_calls_name_hook","nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_loader_from_names_calls_names_hook"],"string":"[\n \"nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_failed_load_tests_exception\",\n \"nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_load_from_module_calls_hook\",\n \"nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_load_from_name_calls_hook\",\n \"nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_load_from_names_calls_hook\",\n \"nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_loader_from_names_calls_module_hook\",\n \"nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_loader_from_names_calls_name_hook\",\n \"nose2/tests/unit/test_loader.py::TestPluggableTestLoader::test_loader_from_names_calls_names_hook\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"BSD"},"__index_level_0__":{"kind":"number","value":152,"string":"152"},"num_tokens_patch":{"kind":"number","value":215,"string":"215"},"before_filepaths":{"kind":"list like","value":["nose2/loader.py"],"string":"[\n \"nose2/loader.py\"\n]"}}},{"rowIdx":34,"cells":{"instance_id":{"kind":"string","value":"eve-val__evelink-212"},"base_commit":{"kind":"string","value":"db9e7bfeef9478a047f4f7db4f88324e185e4873"},"created_at":{"kind":"string","value":"2015-06-01 04:28:15"},"environment_setup_commit":{"kind":"string","value":"4061903e92787ce22eddb75b3776c407fb70837b"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/evelink/char.py b/evelink/char.py\nindex 609d76d..0514dc6 100644\n--- a/evelink/char.py\n+++ b/evelink/char.py\n@@ -137,7 +137,7 @@ class Char(object):\n \"\"\"Get a list of PI routing entries for a character's planet.\"\"\"\n return api.APIResult(parse_planetary_routes(api_result.result), api_result.timestamp, api_result.expires)\n \n- @auto_call('char/KillLog', map_params={'before_kill': 'beforeKillID'})\n+ @auto_call('char/KillMails', map_params={'before_kill': 'beforeKillID'})\n def kills(self, before_kill=None, api_result=None):\n \"\"\"Look up recent kills for a character.\n \n@@ -147,6 +147,19 @@ class Char(object):\n \n return api.APIResult(parse_kills(api_result.result), api_result.timestamp, api_result.expires)\n \n+ @auto_call('char/KillLog', map_params={'before_kill': 'beforeKillID'})\n+ def kill_log(self, before_kill=None, api_result=None):\n+ \"\"\"Look up recent kills for a character.\n+\n+ Note: this method uses the long cache version of the endpoint. If you\n+ want to use the short cache version (recommended), use kills().\n+\n+ before_kill:\n+ Optional. Only show kills before this kill id. (Used for paging.)\n+ \"\"\"\n+\n+ return api.APIResult(parse_kills(api_result.result), api_result.timestamp, api_result.expires)\n+\n @auto_call('char/Notifications')\n def notifications(self, api_result=None):\n \"\"\"Returns the message headers for notifications.\"\"\"\ndiff --git a/evelink/corp.py b/evelink/corp.py\nindex 5e98fcc..ebf1133 100644\n--- a/evelink/corp.py\n+++ b/evelink/corp.py\n@@ -136,7 +136,7 @@ class Corp(object):\n \n return api.APIResult(results, api_result.timestamp, api_result.expires)\n \n- @api.auto_call('corp/KillLog', map_params={'before_kill': 'beforeKillID'})\n+ @api.auto_call('corp/KillMails', map_params={'before_kill': 'beforeKillID'})\n def kills(self, before_kill=None, api_result=None):\n \"\"\"Look up recent kills for a corporation.\n \n@@ -146,6 +146,19 @@ class Corp(object):\n \n return api.APIResult(parse_kills(api_result.result), api_result.timestamp, api_result.expires)\n \n+ @api.auto_call('corp/KillLog', map_params={'before_kill': 'beforeKillID'})\n+ def kill_log(self, before_kill=None, api_result=None):\n+ \"\"\"Look up recent kills for a corporation.\n+\n+ Note: this method uses the long cache version of the endpoint. If you\n+ want to use the short cache version (recommended), use kills().\n+\n+ before_kill:\n+ Optional. Only show kills before this kill id. (Used for paging.)\n+ \"\"\"\n+\n+ return api.APIResult(parse_kills(api_result.result), api_result.timestamp, api_result.expires)\n+\n @api.auto_call('corp/AccountBalance')\n def wallet_info(self, api_result=None):\n \"\"\"Get information about corp wallets.\"\"\"\n"},"problem_statement":{"kind":"string","value":"kills() uses KillLog rather than KillMails\nKillLog is a long cache endpoint, so you can only query it once.\r\n\r\nKillMails isn't a long cache, so you can query it as often as you want."},"repo":{"kind":"string","value":"eve-val/evelink"},"test_patch":{"kind":"string","value":"diff --git a/tests/test_char.py b/tests/test_char.py\nindex ca37666..64e3631 100644\n--- a/tests/test_char.py\n+++ b/tests/test_char.py\n@@ -291,6 +291,23 @@ class CharTestCase(APITestCase):\n self.assertEqual(current, 12345)\n self.assertEqual(expires, 67890)\n \n+ self.assertEqual(result, mock.sentinel.kills)\n+ self.assertEqual(self.api.mock_calls, [\n+ mock.call.get('char/KillMails', params={'characterID': 1}),\n+ ])\n+ self.assertEqual(mock_parse.mock_calls, [\n+ mock.call(mock.sentinel.api_result),\n+ ])\n+\n+ @mock.patch('evelink.char.parse_kills')\n+ def test_kill_log(self, mock_parse):\n+ self.api.get.return_value = API_RESULT_SENTINEL\n+ mock_parse.return_value = mock.sentinel.kills\n+\n+ result, current, expires = self.char.kill_log()\n+ self.assertEqual(current, 12345)\n+ self.assertEqual(expires, 67890)\n+\n self.assertEqual(result, mock.sentinel.kills)\n self.assertEqual(self.api.mock_calls, [\n mock.call.get('char/KillLog', params={'characterID': 1}),\n@@ -304,7 +321,7 @@ class CharTestCase(APITestCase):\n \n self.char.kills(before_kill=12345)\n self.assertEqual(self.api.mock_calls, [\n- mock.call.get('char/KillLog', params={'characterID': 1, 'beforeKillID': 12345}),\n+ mock.call.get('char/KillMails', params={'characterID': 1, 'beforeKillID': 12345}),\n ])\n \n def test_character_sheet(self):\ndiff --git a/tests/test_corp.py b/tests/test_corp.py\nindex 0e96533..5738401 100644\n--- a/tests/test_corp.py\n+++ b/tests/test_corp.py\n@@ -165,6 +165,23 @@ class CorpTestCase(APITestCase):\n \n result, current, expires = self.corp.kills()\n \n+ self.assertEqual(result, mock.sentinel.kills)\n+ self.assertEqual(self.api.mock_calls, [\n+ mock.call.get('corp/KillMails', params={}),\n+ ])\n+ self.assertEqual(mock_parse.mock_calls, [\n+ mock.call(mock.sentinel.api_result),\n+ ])\n+ self.assertEqual(current, 12345)\n+ self.assertEqual(expires, 67890)\n+\n+ @mock.patch('evelink.corp.parse_kills')\n+ def test_kill_log(self, mock_parse):\n+ self.api.get.return_value = API_RESULT_SENTINEL\n+ mock_parse.return_value = mock.sentinel.kills\n+\n+ result, current, expires = self.corp.kill_log()\n+\n self.assertEqual(result, mock.sentinel.kills)\n self.assertEqual(self.api.mock_calls, [\n mock.call.get('corp/KillLog', params={}),\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_short_problem_statement\",\n \"has_many_modified_files\",\n \"has_many_hunks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 2\n },\n \"num_modified_files\": 2\n}"},"version":{"kind":"string","value":"0.6"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"mock\",\n \"nose\",\n \"pytest\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.9\",\n \"reqs_path\": [\n \"requirements_py3.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"certifi==2025.1.31\ncharset-normalizer==3.4.1\n-e git+https://github.com/eve-val/evelink.git@db9e7bfeef9478a047f4f7db4f88324e185e4873#egg=EVELink\nexceptiongroup==1.2.2\nidna==3.10\niniconfig==2.1.0\nmock==1.0b1\nnose==1.1.2\npackaging==24.2\npluggy==1.5.0\npytest==8.3.5\nrequests==2.32.3\nsix==1.17.0\ntomli==2.2.1\nurllib3==2.3.0\n"},"environment":{"kind":"string","value":"name: evelink\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - pip=25.0=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - argparse==1.4.0\n - certifi==2025.1.31\n - charset-normalizer==3.4.1\n - exceptiongroup==1.2.2\n - idna==3.10\n - iniconfig==2.1.0\n - mock==1.0b1\n - nose==1.1.2\n - packaging==24.2\n - pluggy==1.5.0\n - pytest==8.3.5\n - requests==2.32.3\n - six==1.17.0\n - tomli==2.2.1\n - urllib3==2.3.0\nprefix: /opt/conda/envs/evelink\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/test_char.py::CharTestCase::test_kill_log","tests/test_char.py::CharTestCase::test_kills","tests/test_char.py::CharTestCase::test_kills_paged","tests/test_corp.py::CorpTestCase::test_kill_log","tests/test_corp.py::CorpTestCase::test_kills"],"string":"[\n \"tests/test_char.py::CharTestCase::test_kill_log\",\n \"tests/test_char.py::CharTestCase::test_kills\",\n \"tests/test_char.py::CharTestCase::test_kills_paged\",\n \"tests/test_corp.py::CorpTestCase::test_kill_log\",\n \"tests/test_corp.py::CorpTestCase::test_kills\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/test_char.py::CharTestCase::test_assets","tests/test_char.py::CharTestCase::test_blueprints","tests/test_char.py::CharTestCase::test_calendar_attendees","tests/test_char.py::CharTestCase::test_calendar_events","tests/test_char.py::CharTestCase::test_character_sheet","tests/test_char.py::CharTestCase::test_contact_notifications","tests/test_char.py::CharTestCase::test_contacts","tests/test_char.py::CharTestCase::test_contract_bids","tests/test_char.py::CharTestCase::test_contract_items","tests/test_char.py::CharTestCase::test_contracts","tests/test_char.py::CharTestCase::test_current_training","tests/test_char.py::CharTestCase::test_event_attendees","tests/test_char.py::CharTestCase::test_faction_warfare_stats","tests/test_char.py::CharTestCase::test_industry_jobs","tests/test_char.py::CharTestCase::test_industry_jobs_history","tests/test_char.py::CharTestCase::test_locations","tests/test_char.py::CharTestCase::test_mailing_lists","tests/test_char.py::CharTestCase::test_medals","tests/test_char.py::CharTestCase::test_message_bodies","tests/test_char.py::CharTestCase::test_messages","tests/test_char.py::CharTestCase::test_notification_texts","tests/test_char.py::CharTestCase::test_notifications","tests/test_char.py::CharTestCase::test_orders","tests/test_char.py::CharTestCase::test_planetary_colonies","tests/test_char.py::CharTestCase::test_planetary_links","tests/test_char.py::CharTestCase::test_planetary_pins","tests/test_char.py::CharTestCase::test_planetary_routes","tests/test_char.py::CharTestCase::test_research","tests/test_char.py::CharTestCase::test_skill_queue","tests/test_char.py::CharTestCase::test_standings","tests/test_char.py::CharTestCase::test_wallet_balance","tests/test_char.py::CharTestCase::test_wallet_info","tests/test_char.py::CharTestCase::test_wallet_journal","tests/test_char.py::CharTestCase::test_wallet_limit","tests/test_char.py::CharTestCase::test_wallet_paged","tests/test_char.py::CharTestCase::test_wallet_transactions_limit","tests/test_char.py::CharTestCase::test_wallet_transactions_paged","tests/test_char.py::CharTestCase::test_wallet_transcations","tests/test_corp.py::CorpTestCase::test_assets","tests/test_corp.py::CorpTestCase::test_blueprints","tests/test_corp.py::CorpTestCase::test_contacts","tests/test_corp.py::CorpTestCase::test_container_log","tests/test_corp.py::CorpTestCase::test_contract_bids","tests/test_corp.py::CorpTestCase::test_contract_items","tests/test_corp.py::CorpTestCase::test_contracts","tests/test_corp.py::CorpTestCase::test_corporation_sheet","tests/test_corp.py::CorpTestCase::test_corporation_sheet_public","tests/test_corp.py::CorpTestCase::test_customs_offices","tests/test_corp.py::CorpTestCase::test_facilities","tests/test_corp.py::CorpTestCase::test_faction_warfare_stats","tests/test_corp.py::CorpTestCase::test_industry_jobs","tests/test_corp.py::CorpTestCase::test_industry_jobs_history","tests/test_corp.py::CorpTestCase::test_locations","tests/test_corp.py::CorpTestCase::test_medals","tests/test_corp.py::CorpTestCase::test_member_medals","tests/test_corp.py::CorpTestCase::test_members","tests/test_corp.py::CorpTestCase::test_members_not_extended","tests/test_corp.py::CorpTestCase::test_npc_standings","tests/test_corp.py::CorpTestCase::test_orders","tests/test_corp.py::CorpTestCase::test_permissions","tests/test_corp.py::CorpTestCase::test_permissions_log","tests/test_corp.py::CorpTestCase::test_shareholders","tests/test_corp.py::CorpTestCase::test_starbase_details","tests/test_corp.py::CorpTestCase::test_starbases","tests/test_corp.py::CorpTestCase::test_station_services","tests/test_corp.py::CorpTestCase::test_stations","tests/test_corp.py::CorpTestCase::test_titles","tests/test_corp.py::CorpTestCase::test_wallet_info","tests/test_corp.py::CorpTestCase::test_wallet_journal","tests/test_corp.py::CorpTestCase::test_wallet_journal_account_key","tests/test_corp.py::CorpTestCase::test_wallet_journal_limit","tests/test_corp.py::CorpTestCase::test_wallet_journal_paged","tests/test_corp.py::CorpTestCase::test_wallet_transactions_account_key","tests/test_corp.py::CorpTestCase::test_wallet_transactions_limit","tests/test_corp.py::CorpTestCase::test_wallet_transactions_paged","tests/test_corp.py::CorpTestCase::test_wallet_transcations"],"string":"[\n \"tests/test_char.py::CharTestCase::test_assets\",\n \"tests/test_char.py::CharTestCase::test_blueprints\",\n \"tests/test_char.py::CharTestCase::test_calendar_attendees\",\n \"tests/test_char.py::CharTestCase::test_calendar_events\",\n \"tests/test_char.py::CharTestCase::test_character_sheet\",\n \"tests/test_char.py::CharTestCase::test_contact_notifications\",\n \"tests/test_char.py::CharTestCase::test_contacts\",\n \"tests/test_char.py::CharTestCase::test_contract_bids\",\n \"tests/test_char.py::CharTestCase::test_contract_items\",\n \"tests/test_char.py::CharTestCase::test_contracts\",\n \"tests/test_char.py::CharTestCase::test_current_training\",\n \"tests/test_char.py::CharTestCase::test_event_attendees\",\n \"tests/test_char.py::CharTestCase::test_faction_warfare_stats\",\n \"tests/test_char.py::CharTestCase::test_industry_jobs\",\n \"tests/test_char.py::CharTestCase::test_industry_jobs_history\",\n \"tests/test_char.py::CharTestCase::test_locations\",\n \"tests/test_char.py::CharTestCase::test_mailing_lists\",\n \"tests/test_char.py::CharTestCase::test_medals\",\n \"tests/test_char.py::CharTestCase::test_message_bodies\",\n \"tests/test_char.py::CharTestCase::test_messages\",\n \"tests/test_char.py::CharTestCase::test_notification_texts\",\n \"tests/test_char.py::CharTestCase::test_notifications\",\n \"tests/test_char.py::CharTestCase::test_orders\",\n \"tests/test_char.py::CharTestCase::test_planetary_colonies\",\n \"tests/test_char.py::CharTestCase::test_planetary_links\",\n \"tests/test_char.py::CharTestCase::test_planetary_pins\",\n \"tests/test_char.py::CharTestCase::test_planetary_routes\",\n \"tests/test_char.py::CharTestCase::test_research\",\n \"tests/test_char.py::CharTestCase::test_skill_queue\",\n \"tests/test_char.py::CharTestCase::test_standings\",\n \"tests/test_char.py::CharTestCase::test_wallet_balance\",\n \"tests/test_char.py::CharTestCase::test_wallet_info\",\n \"tests/test_char.py::CharTestCase::test_wallet_journal\",\n \"tests/test_char.py::CharTestCase::test_wallet_limit\",\n \"tests/test_char.py::CharTestCase::test_wallet_paged\",\n \"tests/test_char.py::CharTestCase::test_wallet_transactions_limit\",\n \"tests/test_char.py::CharTestCase::test_wallet_transactions_paged\",\n \"tests/test_char.py::CharTestCase::test_wallet_transcations\",\n \"tests/test_corp.py::CorpTestCase::test_assets\",\n \"tests/test_corp.py::CorpTestCase::test_blueprints\",\n \"tests/test_corp.py::CorpTestCase::test_contacts\",\n \"tests/test_corp.py::CorpTestCase::test_container_log\",\n \"tests/test_corp.py::CorpTestCase::test_contract_bids\",\n \"tests/test_corp.py::CorpTestCase::test_contract_items\",\n \"tests/test_corp.py::CorpTestCase::test_contracts\",\n \"tests/test_corp.py::CorpTestCase::test_corporation_sheet\",\n \"tests/test_corp.py::CorpTestCase::test_corporation_sheet_public\",\n \"tests/test_corp.py::CorpTestCase::test_customs_offices\",\n \"tests/test_corp.py::CorpTestCase::test_facilities\",\n \"tests/test_corp.py::CorpTestCase::test_faction_warfare_stats\",\n \"tests/test_corp.py::CorpTestCase::test_industry_jobs\",\n \"tests/test_corp.py::CorpTestCase::test_industry_jobs_history\",\n \"tests/test_corp.py::CorpTestCase::test_locations\",\n \"tests/test_corp.py::CorpTestCase::test_medals\",\n \"tests/test_corp.py::CorpTestCase::test_member_medals\",\n \"tests/test_corp.py::CorpTestCase::test_members\",\n \"tests/test_corp.py::CorpTestCase::test_members_not_extended\",\n \"tests/test_corp.py::CorpTestCase::test_npc_standings\",\n \"tests/test_corp.py::CorpTestCase::test_orders\",\n \"tests/test_corp.py::CorpTestCase::test_permissions\",\n \"tests/test_corp.py::CorpTestCase::test_permissions_log\",\n \"tests/test_corp.py::CorpTestCase::test_shareholders\",\n \"tests/test_corp.py::CorpTestCase::test_starbase_details\",\n \"tests/test_corp.py::CorpTestCase::test_starbases\",\n \"tests/test_corp.py::CorpTestCase::test_station_services\",\n \"tests/test_corp.py::CorpTestCase::test_stations\",\n \"tests/test_corp.py::CorpTestCase::test_titles\",\n \"tests/test_corp.py::CorpTestCase::test_wallet_info\",\n \"tests/test_corp.py::CorpTestCase::test_wallet_journal\",\n \"tests/test_corp.py::CorpTestCase::test_wallet_journal_account_key\",\n \"tests/test_corp.py::CorpTestCase::test_wallet_journal_limit\",\n \"tests/test_corp.py::CorpTestCase::test_wallet_journal_paged\",\n \"tests/test_corp.py::CorpTestCase::test_wallet_transactions_account_key\",\n \"tests/test_corp.py::CorpTestCase::test_wallet_transactions_limit\",\n \"tests/test_corp.py::CorpTestCase::test_wallet_transactions_paged\",\n \"tests/test_corp.py::CorpTestCase::test_wallet_transcations\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"MIT License"},"__index_level_0__":{"kind":"number","value":155,"string":"155"},"num_tokens_patch":{"kind":"number","value":749,"string":"749"},"before_filepaths":{"kind":"list like","value":["evelink/char.py","evelink/corp.py"],"string":"[\n \"evelink/char.py\",\n \"evelink/corp.py\"\n]"}}},{"rowIdx":35,"cells":{"instance_id":{"kind":"string","value":"pre-commit__pre-commit-239"},"base_commit":{"kind":"string","value":"1c46446427ab0dfa6293221426b855420533ef8d"},"created_at":{"kind":"string","value":"2015-06-02 19:44:23"},"environment_setup_commit":{"kind":"string","value":"5791d84236d82f8aa8609c3ff1c69a991d8c6607"},"hints_text":{"kind":"string","value":"coveralls: \n[![Coverage Status](https://coveralls.io/builds/2711896/badge)](https://coveralls.io/builds/2711896)\n\nCoverage decreased (-0.03%) to 99.97% when pulling **971060d4b9756a9d102e5bb3ee4d04027d35011c on Lucas-C:master** into **1c46446427ab0dfa6293221426b855420533ef8d on pre-commit:master**.\n\nasottile: ++ thanks for the quick code! I was going to get to this later but you beat me to it! test-n-ship"},"patch":{"kind":"string","value":"diff --git a/pre_commit/commands/autoupdate.py b/pre_commit/commands/autoupdate.py\nindex 1a24b09..9e1e79f 100644\n--- a/pre_commit/commands/autoupdate.py\n+++ b/pre_commit/commands/autoupdate.py\n@@ -8,6 +8,7 @@ from aspy.yaml import ordered_load\n \n import pre_commit.constants as C\n from pre_commit.clientlib.validate_config import CONFIG_JSON_SCHEMA\n+from pre_commit.clientlib.validate_config import is_local_hooks\n from pre_commit.clientlib.validate_config import load_config\n from pre_commit.jsonschema_extensions import remove_defaults\n from pre_commit.ordereddict import OrderedDict\n@@ -67,6 +68,8 @@ def autoupdate(runner):\n )\n \n for repo_config in input_configs:\n+ if is_local_hooks(repo_config):\n+ continue\n sys.stdout.write('Updating {0}...'.format(repo_config['repo']))\n sys.stdout.flush()\n try:\ndiff --git a/pre_commit/repository.py b/pre_commit/repository.py\nindex 71cc356..83a3c01 100644\n--- a/pre_commit/repository.py\n+++ b/pre_commit/repository.py\n@@ -125,9 +125,8 @@ class Repository(object):\n \n \n class LocalRepository(Repository):\n- def __init__(self, repo_config, repo_path_getter=None):\n- repo_path_getter = None\n- super(LocalRepository, self).__init__(repo_config, repo_path_getter)\n+ def __init__(self, repo_config):\n+ super(LocalRepository, self).__init__(repo_config, None)\n \n @cached_property\n def hooks(self):\n"},"problem_statement":{"kind":"string","value":"pre-commit autoupdate fails on `local` hooks repos\n```\r\n$ pre-commit autoupdate\r\nUpdating git@github.com:pre-commit/pre-commit-hooks...updating 9ce45609a92f648c87b42207410386fd69a5d1e5 -> cf550fcab3f12015f8676b8278b30e1a5bc10e70.\r\nUpdating git@github.com:pre-commit/pre-commit...updating 4352d45451296934bc17494073b82bcacca3205c -> 1c46446427ab0dfa6293221426b855420533ef8d.\r\nUpdating git@github.com:asottile/reorder_python_imports...updating aeda21eb7df6af8c9f6cd990abb086375c71c953 -> 3d86483455ab5bd06cc1069fdd5ac57be5463f10.\r\nUpdating local...An unexpected error has occurred: AttributeError: 'NoneType' object has no attribute 'repo_path'\r\nCheck the log at ~/.pre-commit/pre-commit.log\r\n(venv-pre_commit)asottile@work:~/workspace/pre-commit$ cat ~/.pre-commit/pre-commit.log \r\nAn unexpected error has occurred: AttributeError: 'NoneType' object has no attribute 'repo_path'\r\nTraceback (most recent call last):\r\n File \"/home/asottile/workspace/pre-commit/pre_commit/error_handler.py\", line 34, in error_handler\r\n yield\r\n File \"/home/asottile/workspace/pre-commit/pre_commit/main.py\", line 142, in main\r\n return autoupdate(runner)\r\n File \"/home/asottile/workspace/pre-commit/pre_commit/commands/autoupdate.py\", line 73, in autoupdate\r\n new_repo_config = _update_repository(repo_config, runner)\r\n File \"/home/asottile/workspace/pre-commit/pre_commit/commands/autoupdate.py\", line 33, in _update_repository\r\n with cwd(repo.repo_path_getter.repo_path):\r\nAttributeError: 'NoneType' object has no attribute 'repo_path'\r\n\r\n(venv-pre_commit)asottile@work:~/workspace/pre-commit$ git diff\r\ndiff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml\r\nindex 397ee72..20393a7 100644\r\n--- a/.pre-commit-config.yaml\r\n+++ b/.pre-commit-config.yaml\r\n@@ -20,3 +20,10 @@\r\n sha: aeda21eb7df6af8c9f6cd990abb086375c71c953\r\n hooks:\r\n - id: reorder-python-imports\r\n+- repo: local\r\n+ hooks:\r\n+ - id: herp\r\n+ name: Herp\r\n+ entry: echo derp\r\n+ language: system\r\n+ files: ^$\r\n```"},"repo":{"kind":"string","value":"pre-commit/pre-commit"},"test_patch":{"kind":"string","value":"diff --git a/testing/fixtures.py b/testing/fixtures.py\nindex 1c0184a..820a72b 100644\n--- a/testing/fixtures.py\n+++ b/testing/fixtures.py\n@@ -35,6 +35,19 @@ def make_repo(tmpdir_factory, repo_source):\n return path\n \n \n+def config_with_local_hooks():\n+ return OrderedDict((\n+ ('repo', 'local'),\n+ ('hooks', [OrderedDict((\n+ ('id', 'do_not_commit'),\n+ ('name', 'Block if \"DO NOT COMMIT\" is found'),\n+ ('entry', 'DO NOT COMMIT'),\n+ ('language', 'pcre'),\n+ ('files', '^(.*)$'),\n+ ))])\n+ ))\n+\n+\n def make_config_from_repo(repo_path, sha=None, hooks=None, check=True):\n manifest = load_manifest(os.path.join(repo_path, C.MANIFEST_FILE))\n config = OrderedDict((\ndiff --git a/tests/commands/autoupdate_test.py b/tests/commands/autoupdate_test.py\nindex 5dbc439..771e67b 100644\n--- a/tests/commands/autoupdate_test.py\n+++ b/tests/commands/autoupdate_test.py\n@@ -13,6 +13,9 @@ from pre_commit.runner import Runner\n from pre_commit.util import cmd_output\n from pre_commit.util import cwd\n from testing.auto_namedtuple import auto_namedtuple\n+from testing.fixtures import add_config_to_repo\n+from testing.fixtures import config_with_local_hooks\n+from testing.fixtures import git_dir\n from testing.fixtures import make_config_from_repo\n from testing.fixtures import make_repo\n from testing.fixtures import write_config\n@@ -137,3 +140,10 @@ def test_autoupdate_hook_disappearing_repo(\n after = open(C.CONFIG_FILE).read()\n assert ret == 1\n assert before == after\n+\n+\n+def test_autoupdate_local_hooks(tmpdir_factory):\n+ git_path = git_dir(tmpdir_factory)\n+ config = config_with_local_hooks()\n+ path = add_config_to_repo(git_path, config)\n+ assert autoupdate(Runner(path)) == 0\ndiff --git a/tests/repository_test.py b/tests/repository_test.py\nindex f2e8850..e7ad227 100644\n--- a/tests/repository_test.py\n+++ b/tests/repository_test.py\n@@ -12,10 +12,10 @@ from pre_commit.clientlib.validate_config import CONFIG_JSON_SCHEMA\n from pre_commit.clientlib.validate_config import validate_config_extra\n from pre_commit.jsonschema_extensions import apply_defaults\n from pre_commit.languages.python import PythonEnv\n-from pre_commit.ordereddict import OrderedDict\n from pre_commit.repository import Repository\n from pre_commit.util import cmd_output\n from pre_commit.util import cwd\n+from testing.fixtures import config_with_local_hooks\n from testing.fixtures import git_dir\n from testing.fixtures import make_config_from_repo\n from testing.fixtures import make_repo\n@@ -404,16 +404,7 @@ def test_tags_on_repositories(in_tmpdir, tmpdir_factory, store):\n \n \n def test_local_repository():\n- config = OrderedDict((\n- ('repo', 'local'),\n- ('hooks', [OrderedDict((\n- ('id', 'do_not_commit'),\n- ('name', 'Block if \"DO NOT COMMIT\" is found'),\n- ('entry', 'DO NOT COMMIT'),\n- ('language', 'pcre'),\n- ('files', '^(.*)$'),\n- ))])\n- ))\n+ config = config_with_local_hooks()\n local_repo = Repository.create(config, 'dummy')\n with pytest.raises(NotImplementedError):\n local_repo.sha\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_git_commit_hash\",\n \"has_many_modified_files\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 0,\n \"test_score\": 3\n },\n \"num_modified_files\": 2\n}"},"version":{"kind":"string","value":"0.5"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .[dev]\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.5\",\n \"reqs_path\": [\n \"requirements-dev.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"aspy.yaml==1.3.0\nastroid==1.3.2\nattrs==22.2.0\ncached-property==1.5.2\ncertifi==2021.5.30\ncoverage==6.2\ndistlib==0.3.9\nfilelock==3.4.1\nflake8==5.0.4\nimportlib-metadata==4.8.3\nimportlib-resources==5.4.0\niniconfig==1.1.1\njsonschema==3.2.0\nlogilab-common==1.9.7\nmccabe==0.7.0\nmock==5.2.0\nmypy-extensions==1.0.0\nnodeenv==1.6.0\nordereddict==1.1\npackaging==21.3\nplatformdirs==2.4.0\npluggy==1.0.0\n-e git+https://github.com/pre-commit/pre-commit.git@1c46446427ab0dfa6293221426b855420533ef8d#egg=pre_commit\npy==1.11.0\npycodestyle==2.9.1\npyflakes==2.5.0\npylint==1.3.1\npyparsing==3.1.4\npyrsistent==0.18.0\npytest==7.0.1\nPyYAML==6.0.1\nsimplejson==3.20.1\nsix==1.17.0\ntomli==1.2.3\ntyping_extensions==4.1.1\nvirtualenv==20.17.1\nzipp==3.6.0\n"},"environment":{"kind":"string","value":"name: pre-commit\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - certifi=2021.5.30=py36h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.3=he6710b0_2\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=1.1.1w=h7f8727e_0\n - pip=21.2.2=py36h06a4308_0\n - python=3.6.13=h12debd9_1\n - readline=8.2=h5eee18b_0\n - setuptools=58.0.4=py36h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - wheel=0.37.1=pyhd3eb1b0_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - argparse==1.4.0\n - aspy-yaml==1.3.0\n - astroid==1.3.2\n - attrs==22.2.0\n - cached-property==1.5.2\n - coverage==6.2\n - distlib==0.3.9\n - filelock==3.4.1\n - flake8==5.0.4\n - importlib-metadata==4.8.3\n - importlib-resources==5.4.0\n - iniconfig==1.1.1\n - jsonschema==3.2.0\n - logilab-common==1.9.7\n - mccabe==0.7.0\n - mock==5.2.0\n - mypy-extensions==1.0.0\n - nodeenv==1.6.0\n - ordereddict==1.1\n - packaging==21.3\n - platformdirs==2.4.0\n - pluggy==1.0.0\n - py==1.11.0\n - pycodestyle==2.9.1\n - pyflakes==2.5.0\n - pylint==1.3.1\n - pyparsing==3.1.4\n - pyrsistent==0.18.0\n - pytest==7.0.1\n - pyyaml==6.0.1\n - simplejson==3.20.1\n - six==1.17.0\n - tomli==1.2.3\n - typing-extensions==4.1.1\n - virtualenv==20.17.1\n - zipp==3.6.0\nprefix: /opt/conda/envs/pre-commit\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/commands/autoupdate_test.py::test_autoupdate_local_hooks"],"string":"[\n \"tests/commands/autoupdate_test.py::test_autoupdate_local_hooks\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":["tests/commands/autoupdate_test.py::test_up_to_date_repo","tests/commands/autoupdate_test.py::test_autoupdate_up_to_date_repo","tests/commands/autoupdate_test.py::test_out_of_date_repo","tests/commands/autoupdate_test.py::test_autoupdate_out_of_date_repo","tests/commands/autoupdate_test.py::test_hook_disppearing_repo_raises","tests/commands/autoupdate_test.py::test_autoupdate_hook_disappearing_repo","tests/repository_test.py::test_python_hook","tests/repository_test.py::test_python_hook_args_with_spaces","tests/repository_test.py::test_switch_language_versions_doesnt_clobber","tests/repository_test.py::test_versioned_python_hook","tests/repository_test.py::test_run_a_node_hook","tests/repository_test.py::test_run_versioned_node_hook","tests/repository_test.py::test_run_a_ruby_hook","tests/repository_test.py::test_run_versioned_ruby_hook","tests/repository_test.py::test_system_hook_with_spaces","tests/repository_test.py::test_run_a_script_hook","tests/repository_test.py::test_run_hook_with_spaced_args","tests/repository_test.py::test_pcre_hook_no_match","tests/repository_test.py::test_pcre_hook_matching","tests/repository_test.py::test_pcre_many_files","tests/repository_test.py::test_cwd_of_hook","tests/repository_test.py::test_lots_of_files","tests/repository_test.py::test_languages","tests/repository_test.py::test_reinstall","tests/repository_test.py::test_control_c_control_c_on_install","tests/repository_test.py::test_really_long_file_paths","tests/repository_test.py::test_config_overrides_repo_specifics","tests/repository_test.py::test_tags_on_repositories"],"string":"[\n \"tests/commands/autoupdate_test.py::test_up_to_date_repo\",\n \"tests/commands/autoupdate_test.py::test_autoupdate_up_to_date_repo\",\n \"tests/commands/autoupdate_test.py::test_out_of_date_repo\",\n \"tests/commands/autoupdate_test.py::test_autoupdate_out_of_date_repo\",\n \"tests/commands/autoupdate_test.py::test_hook_disppearing_repo_raises\",\n \"tests/commands/autoupdate_test.py::test_autoupdate_hook_disappearing_repo\",\n \"tests/repository_test.py::test_python_hook\",\n \"tests/repository_test.py::test_python_hook_args_with_spaces\",\n \"tests/repository_test.py::test_switch_language_versions_doesnt_clobber\",\n \"tests/repository_test.py::test_versioned_python_hook\",\n \"tests/repository_test.py::test_run_a_node_hook\",\n \"tests/repository_test.py::test_run_versioned_node_hook\",\n \"tests/repository_test.py::test_run_a_ruby_hook\",\n \"tests/repository_test.py::test_run_versioned_ruby_hook\",\n \"tests/repository_test.py::test_system_hook_with_spaces\",\n \"tests/repository_test.py::test_run_a_script_hook\",\n \"tests/repository_test.py::test_run_hook_with_spaced_args\",\n \"tests/repository_test.py::test_pcre_hook_no_match\",\n \"tests/repository_test.py::test_pcre_hook_matching\",\n \"tests/repository_test.py::test_pcre_many_files\",\n \"tests/repository_test.py::test_cwd_of_hook\",\n \"tests/repository_test.py::test_lots_of_files\",\n \"tests/repository_test.py::test_languages\",\n \"tests/repository_test.py::test_reinstall\",\n \"tests/repository_test.py::test_control_c_control_c_on_install\",\n \"tests/repository_test.py::test_really_long_file_paths\",\n \"tests/repository_test.py::test_config_overrides_repo_specifics\",\n \"tests/repository_test.py::test_tags_on_repositories\"\n]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/repository_test.py::test_repo_url","tests/repository_test.py::test_sha","tests/repository_test.py::test_local_repository"],"string":"[\n \"tests/repository_test.py::test_repo_url\",\n \"tests/repository_test.py::test_sha\",\n \"tests/repository_test.py::test_local_repository\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"MIT License"},"__index_level_0__":{"kind":"number","value":156,"string":"156"},"num_tokens_patch":{"kind":"number","value":379,"string":"379"},"before_filepaths":{"kind":"list like","value":["pre_commit/commands/autoupdate.py","pre_commit/repository.py"],"string":"[\n \"pre_commit/commands/autoupdate.py\",\n \"pre_commit/repository.py\"\n]"}}},{"rowIdx":36,"cells":{"instance_id":{"kind":"string","value":"pydoit__doit-58"},"base_commit":{"kind":"string","value":"dcefd2159bca7fa80e236fc3fec91688a39ba7c4"},"created_at":{"kind":"string","value":"2015-06-07 18:22:26"},"environment_setup_commit":{"kind":"string","value":"e551006a0a5a93a197d413b663bd455061e3f74d"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/doit/cmd_run.py b/doit/cmd_run.py\nindex 8a3693a..50e34b9 100644\n--- a/doit/cmd_run.py\n+++ b/doit/cmd_run.py\n@@ -116,6 +116,18 @@ opt_pdb = {\n }\n \n \n+# use \".*\" as default regex for delayed tasks without explicitly specified regex\n+opt_auto_delayed_regex = {\n+ 'name': 'auto_delayed_regex',\n+ 'short': '',\n+ 'long': 'auto-delayed-regex',\n+ 'type': bool,\n+ 'default': False,\n+ 'help':\n+\"\"\"Uses the default regex \".*\" for every delayed task loader for which no regex was explicitly defined\"\"\"\n+}\n+\n+\n class Run(DoitCmdBase):\n doc_purpose = \"run tasks\"\n doc_usage = \"[TASK/TARGET...]\"\n@@ -124,7 +136,8 @@ class Run(DoitCmdBase):\n \n cmd_options = (opt_always, opt_continue, opt_verbosity,\n opt_reporter, opt_outfile, opt_num_process,\n- opt_parallel_type, opt_pdb, opt_single)\n+ opt_parallel_type, opt_pdb, opt_single,\n+ opt_auto_delayed_regex)\n \n \n def __init__(self, **kwargs):\n@@ -162,7 +175,7 @@ class Run(DoitCmdBase):\n def _execute(self, outfile,\n verbosity=None, always=False, continue_=False,\n reporter='console', num_process=0, par_type='process',\n- single=False):\n+ single=False, auto_delayed_regex=False):\n \"\"\"\n @param reporter:\n (str) one of provided reporters or ...\n@@ -172,7 +185,7 @@ class Run(DoitCmdBase):\n \"\"\"\n # get tasks to be executed\n # self.control is saved on instance to be used by 'auto' command\n- self.control = TaskControl(self.task_list)\n+ self.control = TaskControl(self.task_list, auto_delayed_regex=auto_delayed_regex)\n self.control.process(self.sel_tasks)\n \n if single:\ndiff --git a/doit/control.py b/doit/control.py\nindex 6350b99..c60d688 100644\n--- a/doit/control.py\n+++ b/doit/control.py\n@@ -26,9 +26,10 @@ class TaskControl(object):\n Value: task_name\n \"\"\"\n \n- def __init__(self, task_list):\n+ def __init__(self, task_list, auto_delayed_regex=False):\n self.tasks = {}\n self.targets = {}\n+ self.auto_delayed_regex = auto_delayed_regex\n \n # name of task in order to be executed\n # this the order as in the dodo file. the real execution\n@@ -174,22 +175,51 @@ class TaskControl(object):\n # by task name\n if filter_ in self.tasks:\n selected_task.append(filter_)\n+ continue\n+\n # by target\n- elif filter_ in self.targets:\n+ if filter_ in self.targets:\n selected_task.append(self.targets[filter_])\n- else:\n- # if can not find name check if it is a sub-task of a delayed\n- basename = filter_.split(':', 1)[0]\n- if basename in self.tasks:\n- loader = self.tasks[basename].loader\n- loader.basename = basename\n- self.tasks[filter_] = Task(filter_, None, loader=loader)\n- selected_task.append(filter_)\n+ continue\n+\n+ # if can not find name check if it is a sub-task of a delayed\n+ basename = filter_.split(':', 1)[0]\n+ if basename in self.tasks:\n+ loader = self.tasks[basename].loader\n+ loader.basename = basename\n+ self.tasks[filter_] = Task(filter_, None, loader=loader)\n+ selected_task.append(filter_)\n+ continue\n+\n+ # check if target matches any regex\n+ import re\n+ tasks = []\n+ for task in list(self.tasks.values()):\n+ if task.loader and (task.loader.target_regex or self.auto_delayed_regex):\n+ if re.match(task.loader.target_regex if task.loader.target_regex else '.*', filter_):\n+ tasks.append(task)\n+ if len(tasks) > 0:\n+ if len(tasks) == 1:\n+ task = tasks[0]\n+ loader = task.loader\n+ loader.basename = task.name\n+ name = '_regex_target_' + filter_\n+ self.tasks[name] = Task(name, None,\n+ loader=loader,\n+ file_dep=[filter_])\n+ selected_task.append(name)\n else:\n- msg = ('cmd `run` invalid parameter: \"%s\".' +\n- ' Must be a task, or a target.\\n' +\n- 'Type \"doit list\" to see available tasks')\n- raise InvalidCommand(msg % filter_)\n+ name = '_regex_target_' + filter_\n+ self.tasks[name] = Task(name, None,\n+ task_dep=[task.name for task in tasks],\n+ file_dep=[filter_])\n+ selected_task.append(name)\n+ else:\n+ # not found\n+ msg = ('cmd `run` invalid parameter: \"%s\".' +\n+ ' Must be a task, or a target.\\n' +\n+ 'Type \"doit list\" to see available tasks')\n+ raise InvalidCommand(msg % filter_)\n return selected_task\n \n \n@@ -416,6 +446,9 @@ class TaskDispatcher(object):\n basename = this_task.loader.basename or this_task.name\n new_tasks = generate_tasks(basename, ref(), ref.__doc__)\n TaskControl.set_implicit_deps(self.targets, new_tasks)\n+ # check itself for implicit dep (used by regex_target)\n+ TaskControl.add_implicit_task_dep(\n+ self.targets, this_task, this_task.file_dep)\n for nt in new_tasks:\n if not nt.loader:\n nt.loader = DelayedLoaded\ndiff --git a/doit/loader.py b/doit/loader.py\nindex 1f3bcd4..123d0f4 100644\n--- a/doit/loader.py\n+++ b/doit/loader.py\n@@ -98,10 +98,11 @@ def get_module(dodo_file, cwd=None, seek_parent=False):\n \n \n \n-def create_after(executed=None):\n+def create_after(executed=None, target_regex=None):\n \"\"\"Annotate a task-creator function with delayed loader info\"\"\"\n def decorated(func):\n- func.doit_create_after = DelayedLoader(func, executed=executed)\n+ func.doit_create_after = DelayedLoader(func, executed=executed,\n+ target_regex=target_regex)\n return func\n return decorated\n \ndiff --git a/doit/reporter.py b/doit/reporter.py\nindex 4f5cbe3..18df356 100644\n--- a/doit/reporter.py\n+++ b/doit/reporter.py\n@@ -53,7 +53,8 @@ class ConsoleReporter(object):\n \n def skip_uptodate(self, task):\n \"\"\"skipped up-to-date task\"\"\"\n- self.write(\"-- %s\\n\" % task.title())\n+ if task.actions and (task.name[0] != '_'):\n+ self.write(\"-- %s\\n\" % task.title())\n \n def skip_ignore(self, task):\n \"\"\"skipped ignored task\"\"\"\ndiff --git a/doit/task.py b/doit/task.py\nindex 7595877..3440123 100644\n--- a/doit/task.py\n+++ b/doit/task.py\n@@ -31,9 +31,10 @@ class DelayedLoader(object):\n the loader call the creator function\n :ivar basename: (str) basename used when creating tasks\n \"\"\"\n- def __init__(self, creator, executed=None):\n+ def __init__(self, creator, executed=None, target_regex=None):\n self.creator = creator\n self.task_dep = executed\n+ self.target_regex = target_regex\n self.basename = None\n self.created = False\n \n"},"problem_statement":{"kind":"string","value":"specify target of a DelayedTask on command line\nSince not all tasks are created before execution starts, it is required some special handling for target names of targets that have not been created yet.\r\n\r\nSee discussion on https://github.com/getnikola/nikola/issues/1562#issuecomment-70836094\r\n\r\nGeneral idea is that if a target is not found, before raising an error to the user try to load DelayedTasks (as done by command list) to look for the given `target` name.\r\n\r\nSome considerations:\r\n\r\n 1) as of now a DelayedTask creates an implicit `task_dep` for the task given in it's `executed` param. But this `task_dep` is not preserved when the DelayedTask is re-created. It should not only be preserved but all created tasks should include this `task_dep` because the guarantee that the dependent task was already executed wont exist anymore!\r\n\r\n2) if the selected tasks for execution includes know tasks and targets they should be executed **before**, any DelayedTask is loaded to look for an unknown `target`. This will ensure that same command line will work nicely even if it is on its first execution.\r\n\r\n\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7952756-specify-target-of-a-delayedtask-on-command-line?utm_campaign=plugin&utm_content=tracker%2F1885485&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1885485&utm_medium=issues&utm_source=github).\r\n"},"repo":{"kind":"string","value":"pydoit/doit"},"test_patch":{"kind":"string","value":"diff --git a/tests/test_control.py b/tests/test_control.py\nindex 4237acb..734b449 100644\n--- a/tests/test_control.py\n+++ b/tests/test_control.py\n@@ -111,6 +111,43 @@ class TestTaskControlCmdOptions(object):\n assert control.tasks['taskY:foo'].loader.basename == 'taskY'\n assert control.tasks['taskY:foo'].loader is t2.loader\n \n+ def test_filter_delayed_regex_single(self):\n+ t1 = Task(\"taskX\", None)\n+ t2 = Task(\"taskY\", None, loader=DelayedLoader(lambda: None, target_regex='a.*'))\n+ t3 = Task(\"taskZ\", None, loader=DelayedLoader(lambda: None, target_regex='b.*'))\n+ t4 = Task(\"taskW\", None, loader=DelayedLoader(lambda: None))\n+ control = TaskControl([t1, t2, t3, t4], auto_delayed_regex=False)\n+ l = control._filter_tasks(['abc'])\n+ assert isinstance(t2.loader, DelayedLoader)\n+ assert len(l) == 1\n+ assert l[0] == '_regex_target_abc'\n+ assert control.tasks[l[0]].file_dep == {'abc'}\n+ assert control.tasks[l[0]].loader.basename == 'taskY'\n+ assert control.tasks[l[0]].loader is t2.loader\n+\n+ def test_filter_delayed_regex_multiple(self):\n+ t1 = Task(\"taskX\", None)\n+ t2 = Task(\"taskY\", None, loader=DelayedLoader(lambda: None, target_regex='a.*'))\n+ t3 = Task(\"taskZ\", None, loader=DelayedLoader(lambda: None, target_regex='ab.'))\n+ t4 = Task(\"taskW\", None, loader=DelayedLoader(lambda: None))\n+ control = TaskControl([t1, t2, t3, t4], auto_delayed_regex=False)\n+ l = control._filter_tasks(['abc'])\n+ assert len(l) == 1\n+ assert l[0] == '_regex_target_abc'\n+ assert control.tasks[l[0]].file_dep == {'abc'}\n+ assert set(control.tasks[l[0]].task_dep) == {t2.name, t3.name}\n+\n+ def test_filter_delayed_regex_auto(self):\n+ t1 = Task(\"taskX\", None)\n+ t2 = Task(\"taskY\", None, loader=DelayedLoader(lambda: None, target_regex='a.*'))\n+ t3 = Task(\"taskZ\", None, loader=DelayedLoader(lambda: None))\n+ control = TaskControl([t1, t2, t3], auto_delayed_regex=True)\n+ l = control._filter_tasks(['abc'])\n+ assert len(l) == 1\n+ assert l[0] == '_regex_target_abc'\n+ assert control.tasks[l[0]].file_dep == {'abc'}\n+ assert set(control.tasks[l[0]].task_dep) == {t2.name, t3.name}\n+\n # filter a non-existent task raises an error\n def testFilterWrongName(self):\n tc = TaskControl(TASKS_SAMPLE)\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_hyperlinks\",\n \"has_many_modified_files\",\n \"has_many_hunks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 0,\n \"test_score\": 2\n },\n \"num_modified_files\": 5\n}"},"version":{"kind":"string","value":"0.28"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .[test]\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"numpy>=1.10 pytest\",\n \"pip_packages\": [\n \"pytest\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y libgeos-dev\"\n ],\n \"python\": \"3.7\",\n \"reqs_path\": null,\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"attrs @ file:///croot/attrs_1668696182826/work\ncertifi @ file:///croot/certifi_1671487769961/work/certifi\n-e git+https://github.com/pydoit/doit.git@dcefd2159bca7fa80e236fc3fec91688a39ba7c4#egg=doit\nflit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core\nimportlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1648562407465/work\niniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work\nnumpy @ file:///opt/conda/conda-bld/numpy_and_numpy_base_1653915516269/work\npackaging @ file:///croot/packaging_1671697413597/work\npluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work\npy @ file:///opt/conda/conda-bld/py_1644396412707/work\npyinotify==0.9.6\npytest==7.1.2\nsix==1.17.0\ntomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work\ntyping_extensions @ file:///croot/typing_extensions_1669924550328/work\nzipp @ file:///croot/zipp_1672387121353/work\n"},"environment":{"kind":"string","value":"name: doit\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - attrs=22.1.0=py37h06a4308_0\n - blas=1.0=openblas\n - ca-certificates=2025.2.25=h06a4308_0\n - certifi=2022.12.7=py37h06a4308_0\n - flit-core=3.6.0=pyhd3eb1b0_0\n - importlib-metadata=4.11.3=py37h06a4308_0\n - importlib_metadata=4.11.3=hd3eb1b0_0\n - iniconfig=1.1.1=pyhd3eb1b0_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgfortran-ng=11.2.0=h00389a5_1\n - libgfortran5=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libopenblas=0.3.21=h043d6bf_0\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - numpy=1.21.5=py37hf838250_3\n - numpy-base=1.21.5=py37h1e6e340_3\n - openssl=1.1.1w=h7f8727e_0\n - packaging=22.0=py37h06a4308_0\n - pip=22.3.1=py37h06a4308_0\n - pluggy=1.0.0=py37h06a4308_1\n - py=1.11.0=pyhd3eb1b0_0\n - pytest=7.1.2=py37h06a4308_0\n - python=3.7.16=h7a1cb2a_0\n - readline=8.2=h5eee18b_0\n - setuptools=65.6.3=py37h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tomli=2.0.1=py37h06a4308_0\n - typing_extensions=4.4.0=py37h06a4308_0\n - wheel=0.38.4=py37h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zipp=3.11.0=py37h06a4308_0\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - pyinotify==0.9.6\n - six==1.17.0\nprefix: /opt/conda/envs/doit\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/test_control.py::TestTaskControlCmdOptions::test_filter_delayed_regex_single","tests/test_control.py::TestTaskControlCmdOptions::test_filter_delayed_regex_multiple","tests/test_control.py::TestTaskControlCmdOptions::test_filter_delayed_regex_auto"],"string":"[\n \"tests/test_control.py::TestTaskControlCmdOptions::test_filter_delayed_regex_single\",\n \"tests/test_control.py::TestTaskControlCmdOptions::test_filter_delayed_regex_multiple\",\n \"tests/test_control.py::TestTaskControlCmdOptions::test_filter_delayed_regex_auto\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/test_control.py::TestTaskControlInit::test_addTask","tests/test_control.py::TestTaskControlInit::test_targetDependency","tests/test_control.py::TestTaskControlInit::test_addTaskSameName","tests/test_control.py::TestTaskControlInit::test_addInvalidTask","tests/test_control.py::TestTaskControlInit::test_userErrorTaskDependency","tests/test_control.py::TestTaskControlInit::test_userErrorSetupTask","tests/test_control.py::TestTaskControlInit::test_sameTarget","tests/test_control.py::TestTaskControlInit::test_wild","tests/test_control.py::TestTaskControlInit::test_bug770150_task_dependency_from_target","tests/test_control.py::TestTaskControlCmdOptions::testFilter","tests/test_control.py::TestTaskControlCmdOptions::testProcessSelection","tests/test_control.py::TestTaskControlCmdOptions::testProcessAll","tests/test_control.py::TestTaskControlCmdOptions::testFilterPattern","tests/test_control.py::TestTaskControlCmdOptions::testFilterSubtask","tests/test_control.py::TestTaskControlCmdOptions::testFilterTarget","tests/test_control.py::TestTaskControlCmdOptions::test_filter_delayed_subtask","tests/test_control.py::TestTaskControlCmdOptions::testFilterWrongName","tests/test_control.py::TestTaskControlCmdOptions::testFilterEmptyList","tests/test_control.py::TestTaskControlCmdOptions::testOptions","tests/test_control.py::TestTaskControlCmdOptions::testPosParam","tests/test_control.py::TestExecNode::test_repr","tests/test_control.py::TestExecNode::test_ready_select__not_waiting","tests/test_control.py::TestExecNode::test_parent_status_failure","tests/test_control.py::TestExecNode::test_parent_status_ignore","tests/test_control.py::TestExecNode::test_step","tests/test_control.py::TestDecoratorNoNone::test_filtering","tests/test_control.py::TestTaskDispatcher_GenNone::test_create","tests/test_control.py::TestTaskDispatcher_GenNone::test_already_created","tests/test_control.py::TestTaskDispatcher_GenNone::test_cyclic","tests/test_control.py::TestTaskDispatcher_node_add_wait_run::test_wait","tests/test_control.py::TestTaskDispatcher_node_add_wait_run::test_none","tests/test_control.py::TestTaskDispatcher_node_add_wait_run::test_deps_not_ok","tests/test_control.py::TestTaskDispatcher_node_add_wait_run::test_calc_dep_already_executed","tests/test_control.py::TestTaskDispatcher_add_task::test_no_deps","tests/test_control.py::TestTaskDispatcher_add_task::test_task_deps","tests/test_control.py::TestTaskDispatcher_add_task::test_task_deps_already_created","tests/test_control.py::TestTaskDispatcher_add_task::test_task_deps_no_wait","tests/test_control.py::TestTaskDispatcher_add_task::test_calc_dep","tests/test_control.py::TestTaskDispatcher_add_task::test_calc_dep_already_executed","tests/test_control.py::TestTaskDispatcher_add_task::test_setup_task__run","tests/test_control.py::TestTaskDispatcher_add_task::test_delayed_creation","tests/test_control.py::TestTaskDispatcher_add_task::test_delayed_creation_sub_task","tests/test_control.py::TestTaskDispatcher_get_next_node::test_none","tests/test_control.py::TestTaskDispatcher_get_next_node::test_ready","tests/test_control.py::TestTaskDispatcher_get_next_node::test_to_run","tests/test_control.py::TestTaskDispatcher_get_next_node::test_to_run_none","tests/test_control.py::TestTaskDispatcher_update_waiting::test_wait_select","tests/test_control.py::TestTaskDispatcher_update_waiting::test_wait_run","tests/test_control.py::TestTaskDispatcher_update_waiting::test_wait_run_deps_not_ok","tests/test_control.py::TestTaskDispatcher_update_waiting::test_waiting_node_updated","tests/test_control.py::TestTaskDispatcher_dispatcher_generator::test_normal","tests/test_control.py::TestTaskDispatcher_dispatcher_generator::test_delayed_creation"],"string":"[\n \"tests/test_control.py::TestTaskControlInit::test_addTask\",\n \"tests/test_control.py::TestTaskControlInit::test_targetDependency\",\n \"tests/test_control.py::TestTaskControlInit::test_addTaskSameName\",\n \"tests/test_control.py::TestTaskControlInit::test_addInvalidTask\",\n \"tests/test_control.py::TestTaskControlInit::test_userErrorTaskDependency\",\n \"tests/test_control.py::TestTaskControlInit::test_userErrorSetupTask\",\n \"tests/test_control.py::TestTaskControlInit::test_sameTarget\",\n \"tests/test_control.py::TestTaskControlInit::test_wild\",\n \"tests/test_control.py::TestTaskControlInit::test_bug770150_task_dependency_from_target\",\n \"tests/test_control.py::TestTaskControlCmdOptions::testFilter\",\n \"tests/test_control.py::TestTaskControlCmdOptions::testProcessSelection\",\n \"tests/test_control.py::TestTaskControlCmdOptions::testProcessAll\",\n \"tests/test_control.py::TestTaskControlCmdOptions::testFilterPattern\",\n \"tests/test_control.py::TestTaskControlCmdOptions::testFilterSubtask\",\n \"tests/test_control.py::TestTaskControlCmdOptions::testFilterTarget\",\n \"tests/test_control.py::TestTaskControlCmdOptions::test_filter_delayed_subtask\",\n \"tests/test_control.py::TestTaskControlCmdOptions::testFilterWrongName\",\n \"tests/test_control.py::TestTaskControlCmdOptions::testFilterEmptyList\",\n \"tests/test_control.py::TestTaskControlCmdOptions::testOptions\",\n \"tests/test_control.py::TestTaskControlCmdOptions::testPosParam\",\n \"tests/test_control.py::TestExecNode::test_repr\",\n \"tests/test_control.py::TestExecNode::test_ready_select__not_waiting\",\n \"tests/test_control.py::TestExecNode::test_parent_status_failure\",\n \"tests/test_control.py::TestExecNode::test_parent_status_ignore\",\n \"tests/test_control.py::TestExecNode::test_step\",\n \"tests/test_control.py::TestDecoratorNoNone::test_filtering\",\n \"tests/test_control.py::TestTaskDispatcher_GenNone::test_create\",\n \"tests/test_control.py::TestTaskDispatcher_GenNone::test_already_created\",\n \"tests/test_control.py::TestTaskDispatcher_GenNone::test_cyclic\",\n \"tests/test_control.py::TestTaskDispatcher_node_add_wait_run::test_wait\",\n \"tests/test_control.py::TestTaskDispatcher_node_add_wait_run::test_none\",\n \"tests/test_control.py::TestTaskDispatcher_node_add_wait_run::test_deps_not_ok\",\n \"tests/test_control.py::TestTaskDispatcher_node_add_wait_run::test_calc_dep_already_executed\",\n \"tests/test_control.py::TestTaskDispatcher_add_task::test_no_deps\",\n \"tests/test_control.py::TestTaskDispatcher_add_task::test_task_deps\",\n \"tests/test_control.py::TestTaskDispatcher_add_task::test_task_deps_already_created\",\n \"tests/test_control.py::TestTaskDispatcher_add_task::test_task_deps_no_wait\",\n \"tests/test_control.py::TestTaskDispatcher_add_task::test_calc_dep\",\n \"tests/test_control.py::TestTaskDispatcher_add_task::test_calc_dep_already_executed\",\n \"tests/test_control.py::TestTaskDispatcher_add_task::test_setup_task__run\",\n \"tests/test_control.py::TestTaskDispatcher_add_task::test_delayed_creation\",\n \"tests/test_control.py::TestTaskDispatcher_add_task::test_delayed_creation_sub_task\",\n \"tests/test_control.py::TestTaskDispatcher_get_next_node::test_none\",\n \"tests/test_control.py::TestTaskDispatcher_get_next_node::test_ready\",\n \"tests/test_control.py::TestTaskDispatcher_get_next_node::test_to_run\",\n \"tests/test_control.py::TestTaskDispatcher_get_next_node::test_to_run_none\",\n \"tests/test_control.py::TestTaskDispatcher_update_waiting::test_wait_select\",\n \"tests/test_control.py::TestTaskDispatcher_update_waiting::test_wait_run\",\n \"tests/test_control.py::TestTaskDispatcher_update_waiting::test_wait_run_deps_not_ok\",\n \"tests/test_control.py::TestTaskDispatcher_update_waiting::test_waiting_node_updated\",\n \"tests/test_control.py::TestTaskDispatcher_dispatcher_generator::test_normal\",\n \"tests/test_control.py::TestTaskDispatcher_dispatcher_generator::test_delayed_creation\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"MIT License"},"__index_level_0__":{"kind":"number","value":160,"string":"160"},"num_tokens_patch":{"kind":"number","value":1838,"string":"1,838"},"before_filepaths":{"kind":"list like","value":["doit/cmd_run.py","doit/control.py","doit/loader.py","doit/reporter.py","doit/task.py"],"string":"[\n \"doit/cmd_run.py\",\n \"doit/control.py\",\n \"doit/loader.py\",\n \"doit/reporter.py\",\n \"doit/task.py\"\n]"}}},{"rowIdx":37,"cells":{"instance_id":{"kind":"string","value":"scieloorg__xylose-77"},"base_commit":{"kind":"string","value":"35ee660d381ec682445b2014aadc4b1fa96e414a"},"created_at":{"kind":"string","value":"2015-06-12 18:46:22"},"environment_setup_commit":{"kind":"string","value":"c0be8f42edd0a64900280c871c76b856c2a191f7"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/setup.py b/setup.py\nindex 0193a00..bb78b72 100755\n--- a/setup.py\n+++ b/setup.py\n@@ -7,7 +7,7 @@ except ImportError:\n \n setup(\n name=\"xylose\",\n- version='0.10b',\n+ version='0.11b',\n description=\"A SciELO library to abstract a JSON data structure that is a product of the ISIS2JSON conversion using the ISIS2JSON type 3 data model.\",\n author=\"SciELO\",\n author_email=\"scielo-dev@googlegroups.com\",\ndiff --git a/xylose/scielodocument.py b/xylose/scielodocument.py\nindex 5e7c073..59a6a86 100644\n--- a/xylose/scielodocument.py\n+++ b/xylose/scielodocument.py\n@@ -25,8 +25,8 @@ else:\n html_parser = unescape\n # --------------\n \n-LICENSE_REGEX = re.compile(r'a.+href=\"(.+)\"')\n-LICENSE_CREATIVE_COMMONS = re.compile(r'licenses/(.*?)/.') # Extracts the creative commons id from the url.\n+LICENSE_REGEX = re.compile(r'a.+?href=\"(.+?)\"')\n+LICENSE_CREATIVE_COMMONS = re.compile(r'licenses/(.*?/\\d\\.\\d)') # Extracts the creative commons id from the url.\n DOI_REGEX = re.compile(r'\\d{2}\\.\\d+/.*$')\n \n def html_decode(string):\n@@ -90,6 +90,7 @@ class Journal(object):\n for dlicense in self.data['v540']:\n if not 't' in dlicense:\n continue\n+\n license_url = LICENSE_REGEX.findall(dlicense['t'])\n if len(license_url) == 0:\n continue\n@@ -400,6 +401,7 @@ class Article(object):\n for dlicense in self.data['v540']:\n if not 't' in dlicense:\n continue\n+\n license_url = LICENSE_REGEX.findall(dlicense['t'])\n if len(license_url) == 0:\n continue\n"},"problem_statement":{"kind":"string","value":"Ajustar identificação de licença\nA identificação de licença coleta atualmente apenas o tipo da licença, ex:\r\nby, by-nc.....\r\n\r\nÉ importante também considerar a versão ex:\r\nby/3.0\r\nby/4.0\r\nby-nc/3.0"},"repo":{"kind":"string","value":"scieloorg/xylose"},"test_patch":{"kind":"string","value":"diff --git a/tests/test_document.py b/tests/test_document.py\nindex 745859f..db84c57 100644\n--- a/tests/test_document.py\n+++ b/tests/test_document.py\n@@ -351,13 +351,13 @@ class JournalTests(unittest.TestCase):\n \n journal = Journal(self.fulldoc['title'])\n \n- self.assertEqual(journal.permissions['id'], 'by')\n+ self.assertEqual(journal.permissions['id'], 'by/3.0')\n \n def test_permission_id(self):\n \n journal = Journal(self.fulldoc['title'])\n \n- self.assertEqual(journal.permissions['id'], 'by-nc')\n+ self.assertEqual(journal.permissions['id'], 'by-nc/3.0')\n \n \n def test_permission_url(self):\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_short_problem_statement\",\n \"has_many_modified_files\",\n \"has_many_hunks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 2,\n \"test_score\": 0\n },\n \"num_modified_files\": 2\n}"},"version":{"kind":"string","value":"0.10"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"\",\n \"pip_packages\": [\n \"nose\",\n \"coverage\",\n \"mocker\",\n \"pytest\"\n ],\n \"pre_install\": null,\n \"python\": \"3.9\",\n \"reqs_path\": null,\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"coverage==7.8.0\nexceptiongroup==1.2.2\niniconfig==2.1.0\nmocker==1.1.1\nnose==1.3.7\npackaging==24.2\npluggy==1.5.0\npytest==8.3.5\ntomli==2.2.1\n-e git+https://github.com/scieloorg/xylose.git@35ee660d381ec682445b2014aadc4b1fa96e414a#egg=xylose\n"},"environment":{"kind":"string","value":"name: xylose\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - pip=25.0=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - coverage==7.8.0\n - exceptiongroup==1.2.2\n - iniconfig==2.1.0\n - mocker==1.1.1\n - nose==1.3.7\n - packaging==24.2\n - pluggy==1.5.0\n - pytest==8.3.5\n - tomli==2.2.1\nprefix: /opt/conda/envs/xylose\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/test_document.py::JournalTests::test_permission_id","tests/test_document.py::JournalTests::test_permission_t1"],"string":"[\n \"tests/test_document.py::JournalTests::test_permission_id\",\n \"tests/test_document.py::JournalTests::test_permission_t1\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/test_document.py::ToolsTests::test_get_language_iso639_1_defined","tests/test_document.py::ToolsTests::test_get_language_iso639_1_undefined","tests/test_document.py::ToolsTests::test_get_language_iso639_2_defined","tests/test_document.py::ToolsTests::test_get_language_iso639_2_undefined","tests/test_document.py::ToolsTests::test_get_language_without_iso_format","tests/test_document.py::ToolsTests::test_get_publication_date_wrong_day","tests/test_document.py::ToolsTests::test_get_publication_date_wrong_day_month","tests/test_document.py::ToolsTests::test_get_publication_date_wrong_day_month_not_int","tests/test_document.py::ToolsTests::test_get_publication_date_wrong_day_not_int","tests/test_document.py::ToolsTests::test_get_publication_date_wrong_month_not_int","tests/test_document.py::ToolsTests::test_get_publication_date_year","tests/test_document.py::ToolsTests::test_get_publication_date_year_day","tests/test_document.py::ToolsTests::test_get_publication_date_year_month","tests/test_document.py::ToolsTests::test_get_publication_date_year_month_day","tests/test_document.py::JournalTests::test_any_issn_priority_electronic","tests/test_document.py::JournalTests::test_any_issn_priority_electronic_without_electronic","tests/test_document.py::JournalTests::test_any_issn_priority_print","tests/test_document.py::JournalTests::test_any_issn_priority_print_without_print","tests/test_document.py::JournalTests::test_collection_acronym","tests/test_document.py::JournalTests::test_creation_date","tests/test_document.py::JournalTests::test_current_status","tests/test_document.py::JournalTests::test_current_status_lots_of_changes_study_case_1","tests/test_document.py::JournalTests::test_current_status_some_changes","tests/test_document.py::JournalTests::test_current_without_v51","tests/test_document.py::JournalTests::test_journal","tests/test_document.py::JournalTests::test_journal_abbreviated_title","tests/test_document.py::JournalTests::test_journal_acronym","tests/test_document.py::JournalTests::test_journal_title","tests/test_document.py::JournalTests::test_journal_title_nlm","tests/test_document.py::JournalTests::test_journal_url","tests/test_document.py::JournalTests::test_languages","tests/test_document.py::JournalTests::test_languages_without_v350","tests/test_document.py::JournalTests::test_load_issn_with_v935_and_v35_ONLINE","tests/test_document.py::JournalTests::test_load_issn_with_v935_and_v35_PRINT","tests/test_document.py::JournalTests::test_load_issn_with_v935_equal_v400_and_v35_ONLINE","tests/test_document.py::JournalTests::test_load_issn_with_v935_equal_v400_and_v35_PRINT","tests/test_document.py::JournalTests::test_load_issn_with_v935_without_v35","tests/test_document.py::JournalTests::test_load_issn_without_v935_and_v35_ONLINE","tests/test_document.py::JournalTests::test_load_issn_without_v935_and_v35_PRINT","tests/test_document.py::JournalTests::test_load_issn_without_v935_without_v35","tests/test_document.py::JournalTests::test_permission_text","tests/test_document.py::JournalTests::test_permission_url","tests/test_document.py::JournalTests::test_permission_without_v540","tests/test_document.py::JournalTests::test_permission_without_v540_t","tests/test_document.py::JournalTests::test_publisher_loc","tests/test_document.py::JournalTests::test_publisher_name","tests/test_document.py::JournalTests::test_scielo_issn","tests/test_document.py::JournalTests::test_status","tests/test_document.py::JournalTests::test_status_lots_of_changes","tests/test_document.py::JournalTests::test_status_lots_of_changes_study_case_1","tests/test_document.py::JournalTests::test_status_some_changes","tests/test_document.py::JournalTests::test_status_without_v51","tests/test_document.py::JournalTests::test_subject_areas","tests/test_document.py::JournalTests::test_update_date","tests/test_document.py::JournalTests::test_without_journal_abbreviated_title","tests/test_document.py::JournalTests::test_without_journal_acronym","tests/test_document.py::JournalTests::test_without_journal_title","tests/test_document.py::JournalTests::test_without_journal_title_nlm","tests/test_document.py::JournalTests::test_without_journal_url","tests/test_document.py::JournalTests::test_without_publisher_loc","tests/test_document.py::JournalTests::test_without_publisher_name","tests/test_document.py::JournalTests::test_without_scielo_domain","tests/test_document.py::JournalTests::test_without_scielo_domain_title_v690","tests/test_document.py::JournalTests::test_without_subject_areas","tests/test_document.py::JournalTests::test_without_wos_citation_indexes","tests/test_document.py::JournalTests::test_without_wos_subject_areas","tests/test_document.py::JournalTests::test_wos_citation_indexes","tests/test_document.py::JournalTests::test_wos_subject_areas","tests/test_document.py::ArticleTests::test_acceptance_date","tests/test_document.py::ArticleTests::test_affiliation_just_with_affiliation_name","tests/test_document.py::ArticleTests::test_affiliation_without_affiliation_name","tests/test_document.py::ArticleTests::test_affiliations","tests/test_document.py::ArticleTests::test_ahead_publication_date","tests/test_document.py::ArticleTests::test_article","tests/test_document.py::ArticleTests::test_author_with_two_affiliations","tests/test_document.py::ArticleTests::test_author_with_two_role","tests/test_document.py::ArticleTests::test_author_without_affiliations","tests/test_document.py::ArticleTests::test_author_without_surname_and_given_names","tests/test_document.py::ArticleTests::test_authors","tests/test_document.py::ArticleTests::test_collection_acronym","tests/test_document.py::ArticleTests::test_collection_acronym_priorizing_collection","tests/test_document.py::ArticleTests::test_collection_acronym_retrieving_v992","tests/test_document.py::ArticleTests::test_collection_name_brazil","tests/test_document.py::ArticleTests::test_collection_name_undefined","tests/test_document.py::ArticleTests::test_corporative_authors","tests/test_document.py::ArticleTests::test_document_type","tests/test_document.py::ArticleTests::test_doi","tests/test_document.py::ArticleTests::test_doi_clean_1","tests/test_document.py::ArticleTests::test_doi_clean_2","tests/test_document.py::ArticleTests::test_doi_v237","tests/test_document.py::ArticleTests::test_end_page_loaded_crazy_legacy_way_1","tests/test_document.py::ArticleTests::test_end_page_loaded_crazy_legacy_way_2","tests/test_document.py::ArticleTests::test_end_page_loaded_through_xml","tests/test_document.py::ArticleTests::test_file_code","tests/test_document.py::ArticleTests::test_file_code_crazy_slashs_1","tests/test_document.py::ArticleTests::test_file_code_crazy_slashs_2","tests/test_document.py::ArticleTests::test_first_author","tests/test_document.py::ArticleTests::test_first_author_without_author","tests/test_document.py::ArticleTests::test_fulltexts_field_fulltexts","tests/test_document.py::ArticleTests::test_fulltexts_without_field_fulltexts","tests/test_document.py::ArticleTests::test_html_url","tests/test_document.py::ArticleTests::test_invalid_document_type","tests/test_document.py::ArticleTests::test_issue","tests/test_document.py::ArticleTests::test_issue_label_field_v4","tests/test_document.py::ArticleTests::test_issue_label_without_field_v4","tests/test_document.py::ArticleTests::test_issue_url","tests/test_document.py::ArticleTests::test_journal_abbreviated_title","tests/test_document.py::ArticleTests::test_journal_acronym","tests/test_document.py::ArticleTests::test_journal_title","tests/test_document.py::ArticleTests::test_keywords","tests/test_document.py::ArticleTests::test_keywords_iso639_2","tests/test_document.py::ArticleTests::test_keywords_with_undefined_language","tests/test_document.py::ArticleTests::test_keywords_without_subfield_k","tests/test_document.py::ArticleTests::test_keywords_without_subfield_l","tests/test_document.py::ArticleTests::test_languages_field_fulltexts","tests/test_document.py::ArticleTests::test_languages_field_v40","tests/test_document.py::ArticleTests::test_last_page","tests/test_document.py::ArticleTests::test_mixed_affiliations","tests/test_document.py::ArticleTests::test_normalized_affiliations","tests/test_document.py::ArticleTests::test_normalized_affiliations_undefined_ISO_3166_CODE","tests/test_document.py::ArticleTests::test_normalized_affiliations_without_p","tests/test_document.py::ArticleTests::test_original_abstract_with_just_one_language_defined","tests/test_document.py::ArticleTests::test_original_abstract_with_language_defined","tests/test_document.py::ArticleTests::test_original_abstract_with_language_defined_but_different_of_the_article_original_language","tests/test_document.py::ArticleTests::test_original_abstract_without_language_defined","tests/test_document.py::ArticleTests::test_original_language_invalid_iso639_2","tests/test_document.py::ArticleTests::test_original_language_iso639_2","tests/test_document.py::ArticleTests::test_original_language_original","tests/test_document.py::ArticleTests::test_original_title_with_just_one_language_defined","tests/test_document.py::ArticleTests::test_original_title_with_language_defined","tests/test_document.py::ArticleTests::test_original_title_with_language_defined_but_different_of_the_article_original_language","tests/test_document.py::ArticleTests::test_original_title_without_language_defined","tests/test_document.py::ArticleTests::test_pdf_url","tests/test_document.py::ArticleTests::test_processing_date","tests/test_document.py::ArticleTests::test_project_name","tests/test_document.py::ArticleTests::test_project_sponsors","tests/test_document.py::ArticleTests::test_publication_contract","tests/test_document.py::ArticleTests::test_publication_date","tests/test_document.py::ArticleTests::test_publisher_id","tests/test_document.py::ArticleTests::test_publisher_loc","tests/test_document.py::ArticleTests::test_publisher_name","tests/test_document.py::ArticleTests::test_receive_date","tests/test_document.py::ArticleTests::test_review_date","tests/test_document.py::ArticleTests::test_start_page","tests/test_document.py::ArticleTests::test_start_page_loaded_crazy_legacy_way_1","tests/test_document.py::ArticleTests::test_start_page_loaded_crazy_legacy_way_2","tests/test_document.py::ArticleTests::test_start_page_loaded_through_xml","tests/test_document.py::ArticleTests::test_subject_areas","tests/test_document.py::ArticleTests::test_supplement_issue","tests/test_document.py::ArticleTests::test_supplement_volume","tests/test_document.py::ArticleTests::test_thesis_degree","tests/test_document.py::ArticleTests::test_thesis_organization","tests/test_document.py::ArticleTests::test_thesis_organization_and_division","tests/test_document.py::ArticleTests::test_thesis_organization_without_name","tests/test_document.py::ArticleTests::test_translated_abstracts","tests/test_document.py::ArticleTests::test_translated_abstracts_without_v83","tests/test_document.py::ArticleTests::test_translated_abtracts_iso639_2","tests/test_document.py::ArticleTests::test_translated_titles","tests/test_document.py::ArticleTests::test_translated_titles_iso639_2","tests/test_document.py::ArticleTests::test_translated_titles_without_v12","tests/test_document.py::ArticleTests::test_volume","tests/test_document.py::ArticleTests::test_whitwout_acceptance_date","tests/test_document.py::ArticleTests::test_whitwout_ahead_publication_date","tests/test_document.py::ArticleTests::test_whitwout_receive_date","tests/test_document.py::ArticleTests::test_whitwout_review_date","tests/test_document.py::ArticleTests::test_without_affiliations","tests/test_document.py::ArticleTests::test_without_authors","tests/test_document.py::ArticleTests::test_without_citations","tests/test_document.py::ArticleTests::test_without_collection_acronym","tests/test_document.py::ArticleTests::test_without_corporative_authors","tests/test_document.py::ArticleTests::test_without_document_type","tests/test_document.py::ArticleTests::test_without_doi","tests/test_document.py::ArticleTests::test_without_html_url","tests/test_document.py::ArticleTests::test_without_issue","tests/test_document.py::ArticleTests::test_without_issue_url","tests/test_document.py::ArticleTests::test_without_journal_abbreviated_title","tests/test_document.py::ArticleTests::test_without_journal_acronym","tests/test_document.py::ArticleTests::test_without_journal_title","tests/test_document.py::ArticleTests::test_without_keywords","tests/test_document.py::ArticleTests::test_without_last_page","tests/test_document.py::ArticleTests::test_without_normalized_affiliations","tests/test_document.py::ArticleTests::test_without_original_abstract","tests/test_document.py::ArticleTests::test_without_original_title","tests/test_document.py::ArticleTests::test_without_pages","tests/test_document.py::ArticleTests::test_without_pdf_url","tests/test_document.py::ArticleTests::test_without_processing_date","tests/test_document.py::ArticleTests::test_without_project_name","tests/test_document.py::ArticleTests::test_without_project_sponsor","tests/test_document.py::ArticleTests::test_without_publication_contract","tests/test_document.py::ArticleTests::test_without_publication_date","tests/test_document.py::ArticleTests::test_without_publisher_id","tests/test_document.py::ArticleTests::test_without_publisher_loc","tests/test_document.py::ArticleTests::test_without_publisher_name","tests/test_document.py::ArticleTests::test_without_scielo_domain","tests/test_document.py::ArticleTests::test_without_scielo_domain_article_v69","tests/test_document.py::ArticleTests::test_without_scielo_domain_article_v69_and_with_title_v690","tests/test_document.py::ArticleTests::test_without_scielo_domain_title_v690","tests/test_document.py::ArticleTests::test_without_start_page","tests/test_document.py::ArticleTests::test_without_subject_areas","tests/test_document.py::ArticleTests::test_without_suplement_issue","tests/test_document.py::ArticleTests::test_without_supplement_volume","tests/test_document.py::ArticleTests::test_without_thesis_degree","tests/test_document.py::ArticleTests::test_without_thesis_organization","tests/test_document.py::ArticleTests::test_without_volume","tests/test_document.py::ArticleTests::test_without_wos_citation_indexes","tests/test_document.py::ArticleTests::test_without_wos_subject_areas","tests/test_document.py::ArticleTests::test_wos_citation_indexes","tests/test_document.py::ArticleTests::test_wos_subject_areas","tests/test_document.py::CitationTest::test_a_link_access_date","tests/test_document.py::CitationTest::test_analytic_institution_for_a_article_citation","tests/test_document.py::CitationTest::test_analytic_institution_for_a_book_citation","tests/test_document.py::CitationTest::test_article_title","tests/test_document.py::CitationTest::test_article_without_title","tests/test_document.py::CitationTest::test_authors_article","tests/test_document.py::CitationTest::test_authors_book","tests/test_document.py::CitationTest::test_authors_link","tests/test_document.py::CitationTest::test_authors_thesis","tests/test_document.py::CitationTest::test_book_chapter_title","tests/test_document.py::CitationTest::test_book_edition","tests/test_document.py::CitationTest::test_book_volume","tests/test_document.py::CitationTest::test_book_without_chapter_title","tests/test_document.py::CitationTest::test_citation_sample_congress","tests/test_document.py::CitationTest::test_citation_sample_link","tests/test_document.py::CitationTest::test_citation_sample_link_without_comment","tests/test_document.py::CitationTest::test_conference_edition","tests/test_document.py::CitationTest::test_conference_name","tests/test_document.py::CitationTest::test_conference_sponsor","tests/test_document.py::CitationTest::test_conference_without_name","tests/test_document.py::CitationTest::test_conference_without_sponsor","tests/test_document.py::CitationTest::test_date","tests/test_document.py::CitationTest::test_doi","tests/test_document.py::CitationTest::test_editor","tests/test_document.py::CitationTest::test_end_page_14","tests/test_document.py::CitationTest::test_end_page_514","tests/test_document.py::CitationTest::test_end_page_withdout_data","tests/test_document.py::CitationTest::test_first_author_article","tests/test_document.py::CitationTest::test_first_author_book","tests/test_document.py::CitationTest::test_first_author_link","tests/test_document.py::CitationTest::test_first_author_thesis","tests/test_document.py::CitationTest::test_first_author_without_monographic_authors","tests/test_document.py::CitationTest::test_first_author_without_monographic_authors_but_not_a_book_citation","tests/test_document.py::CitationTest::test_index_number","tests/test_document.py::CitationTest::test_institutions_all_fields","tests/test_document.py::CitationTest::test_institutions_v11","tests/test_document.py::CitationTest::test_institutions_v17","tests/test_document.py::CitationTest::test_institutions_v29","tests/test_document.py::CitationTest::test_institutions_v50","tests/test_document.py::CitationTest::test_institutions_v58","tests/test_document.py::CitationTest::test_invalid_edition","tests/test_document.py::CitationTest::test_isbn","tests/test_document.py::CitationTest::test_isbn_but_not_a_book","tests/test_document.py::CitationTest::test_issn","tests/test_document.py::CitationTest::test_issn_but_not_an_article","tests/test_document.py::CitationTest::test_issue_part","tests/test_document.py::CitationTest::test_issue_title","tests/test_document.py::CitationTest::test_journal_issue","tests/test_document.py::CitationTest::test_journal_volume","tests/test_document.py::CitationTest::test_link","tests/test_document.py::CitationTest::test_link_title","tests/test_document.py::CitationTest::test_link_without_title","tests/test_document.py::CitationTest::test_monographic_authors","tests/test_document.py::CitationTest::test_monographic_first_author","tests/test_document.py::CitationTest::test_pages_14","tests/test_document.py::CitationTest::test_pages_514","tests/test_document.py::CitationTest::test_pages_withdout_data","tests/test_document.py::CitationTest::test_publication_type_article","tests/test_document.py::CitationTest::test_publication_type_book","tests/test_document.py::CitationTest::test_publication_type_conference","tests/test_document.py::CitationTest::test_publication_type_link","tests/test_document.py::CitationTest::test_publication_type_thesis","tests/test_document.py::CitationTest::test_publication_type_undefined","tests/test_document.py::CitationTest::test_publisher","tests/test_document.py::CitationTest::test_publisher_address","tests/test_document.py::CitationTest::test_publisher_address_without_e","tests/test_document.py::CitationTest::test_series_book","tests/test_document.py::CitationTest::test_series_but_neither_journal_book_or_conference_citation","tests/test_document.py::CitationTest::test_series_conference","tests/test_document.py::CitationTest::test_series_journal","tests/test_document.py::CitationTest::test_source_book_title","tests/test_document.py::CitationTest::test_source_journal","tests/test_document.py::CitationTest::test_source_journal_without_journal_title","tests/test_document.py::CitationTest::test_sponsor","tests/test_document.py::CitationTest::test_start_page_14","tests/test_document.py::CitationTest::test_start_page_514","tests/test_document.py::CitationTest::test_start_page_withdout_data","tests/test_document.py::CitationTest::test_thesis_institution","tests/test_document.py::CitationTest::test_thesis_title","tests/test_document.py::CitationTest::test_thesis_without_title","tests/test_document.py::CitationTest::test_title_when_article_citation","tests/test_document.py::CitationTest::test_title_when_conference_citation","tests/test_document.py::CitationTest::test_title_when_link_citation","tests/test_document.py::CitationTest::test_title_when_thesis_citation","tests/test_document.py::CitationTest::test_with_volume_but_not_a_journal_article_neither_a_book","tests/test_document.py::CitationTest::test_without_analytic_institution","tests/test_document.py::CitationTest::test_without_authors","tests/test_document.py::CitationTest::test_without_date","tests/test_document.py::CitationTest::test_without_doi","tests/test_document.py::CitationTest::test_without_edition","tests/test_document.py::CitationTest::test_without_editor","tests/test_document.py::CitationTest::test_without_first_author","tests/test_document.py::CitationTest::test_without_index_number","tests/test_document.py::CitationTest::test_without_institutions","tests/test_document.py::CitationTest::test_without_issue","tests/test_document.py::CitationTest::test_without_issue_part","tests/test_document.py::CitationTest::test_without_issue_title","tests/test_document.py::CitationTest::test_without_link","tests/test_document.py::CitationTest::test_without_monographic_authors","tests/test_document.py::CitationTest::test_without_monographic_authors_but_not_a_book_citation","tests/test_document.py::CitationTest::test_without_publisher","tests/test_document.py::CitationTest::test_without_publisher_address","tests/test_document.py::CitationTest::test_without_series","tests/test_document.py::CitationTest::test_without_sponsor","tests/test_document.py::CitationTest::test_without_thesis_institution","tests/test_document.py::CitationTest::test_without_volume"],"string":"[\n \"tests/test_document.py::ToolsTests::test_get_language_iso639_1_defined\",\n \"tests/test_document.py::ToolsTests::test_get_language_iso639_1_undefined\",\n \"tests/test_document.py::ToolsTests::test_get_language_iso639_2_defined\",\n \"tests/test_document.py::ToolsTests::test_get_language_iso639_2_undefined\",\n \"tests/test_document.py::ToolsTests::test_get_language_without_iso_format\",\n \"tests/test_document.py::ToolsTests::test_get_publication_date_wrong_day\",\n \"tests/test_document.py::ToolsTests::test_get_publication_date_wrong_day_month\",\n \"tests/test_document.py::ToolsTests::test_get_publication_date_wrong_day_month_not_int\",\n \"tests/test_document.py::ToolsTests::test_get_publication_date_wrong_day_not_int\",\n \"tests/test_document.py::ToolsTests::test_get_publication_date_wrong_month_not_int\",\n \"tests/test_document.py::ToolsTests::test_get_publication_date_year\",\n \"tests/test_document.py::ToolsTests::test_get_publication_date_year_day\",\n \"tests/test_document.py::ToolsTests::test_get_publication_date_year_month\",\n \"tests/test_document.py::ToolsTests::test_get_publication_date_year_month_day\",\n \"tests/test_document.py::JournalTests::test_any_issn_priority_electronic\",\n \"tests/test_document.py::JournalTests::test_any_issn_priority_electronic_without_electronic\",\n \"tests/test_document.py::JournalTests::test_any_issn_priority_print\",\n \"tests/test_document.py::JournalTests::test_any_issn_priority_print_without_print\",\n \"tests/test_document.py::JournalTests::test_collection_acronym\",\n \"tests/test_document.py::JournalTests::test_creation_date\",\n \"tests/test_document.py::JournalTests::test_current_status\",\n \"tests/test_document.py::JournalTests::test_current_status_lots_of_changes_study_case_1\",\n \"tests/test_document.py::JournalTests::test_current_status_some_changes\",\n \"tests/test_document.py::JournalTests::test_current_without_v51\",\n \"tests/test_document.py::JournalTests::test_journal\",\n \"tests/test_document.py::JournalTests::test_journal_abbreviated_title\",\n \"tests/test_document.py::JournalTests::test_journal_acronym\",\n \"tests/test_document.py::JournalTests::test_journal_title\",\n \"tests/test_document.py::JournalTests::test_journal_title_nlm\",\n \"tests/test_document.py::JournalTests::test_journal_url\",\n \"tests/test_document.py::JournalTests::test_languages\",\n \"tests/test_document.py::JournalTests::test_languages_without_v350\",\n \"tests/test_document.py::JournalTests::test_load_issn_with_v935_and_v35_ONLINE\",\n \"tests/test_document.py::JournalTests::test_load_issn_with_v935_and_v35_PRINT\",\n \"tests/test_document.py::JournalTests::test_load_issn_with_v935_equal_v400_and_v35_ONLINE\",\n \"tests/test_document.py::JournalTests::test_load_issn_with_v935_equal_v400_and_v35_PRINT\",\n \"tests/test_document.py::JournalTests::test_load_issn_with_v935_without_v35\",\n \"tests/test_document.py::JournalTests::test_load_issn_without_v935_and_v35_ONLINE\",\n \"tests/test_document.py::JournalTests::test_load_issn_without_v935_and_v35_PRINT\",\n \"tests/test_document.py::JournalTests::test_load_issn_without_v935_without_v35\",\n \"tests/test_document.py::JournalTests::test_permission_text\",\n \"tests/test_document.py::JournalTests::test_permission_url\",\n \"tests/test_document.py::JournalTests::test_permission_without_v540\",\n \"tests/test_document.py::JournalTests::test_permission_without_v540_t\",\n \"tests/test_document.py::JournalTests::test_publisher_loc\",\n \"tests/test_document.py::JournalTests::test_publisher_name\",\n \"tests/test_document.py::JournalTests::test_scielo_issn\",\n \"tests/test_document.py::JournalTests::test_status\",\n \"tests/test_document.py::JournalTests::test_status_lots_of_changes\",\n \"tests/test_document.py::JournalTests::test_status_lots_of_changes_study_case_1\",\n \"tests/test_document.py::JournalTests::test_status_some_changes\",\n \"tests/test_document.py::JournalTests::test_status_without_v51\",\n \"tests/test_document.py::JournalTests::test_subject_areas\",\n \"tests/test_document.py::JournalTests::test_update_date\",\n \"tests/test_document.py::JournalTests::test_without_journal_abbreviated_title\",\n \"tests/test_document.py::JournalTests::test_without_journal_acronym\",\n \"tests/test_document.py::JournalTests::test_without_journal_title\",\n \"tests/test_document.py::JournalTests::test_without_journal_title_nlm\",\n \"tests/test_document.py::JournalTests::test_without_journal_url\",\n \"tests/test_document.py::JournalTests::test_without_publisher_loc\",\n \"tests/test_document.py::JournalTests::test_without_publisher_name\",\n \"tests/test_document.py::JournalTests::test_without_scielo_domain\",\n \"tests/test_document.py::JournalTests::test_without_scielo_domain_title_v690\",\n \"tests/test_document.py::JournalTests::test_without_subject_areas\",\n \"tests/test_document.py::JournalTests::test_without_wos_citation_indexes\",\n \"tests/test_document.py::JournalTests::test_without_wos_subject_areas\",\n \"tests/test_document.py::JournalTests::test_wos_citation_indexes\",\n \"tests/test_document.py::JournalTests::test_wos_subject_areas\",\n \"tests/test_document.py::ArticleTests::test_acceptance_date\",\n \"tests/test_document.py::ArticleTests::test_affiliation_just_with_affiliation_name\",\n \"tests/test_document.py::ArticleTests::test_affiliation_without_affiliation_name\",\n \"tests/test_document.py::ArticleTests::test_affiliations\",\n \"tests/test_document.py::ArticleTests::test_ahead_publication_date\",\n \"tests/test_document.py::ArticleTests::test_article\",\n \"tests/test_document.py::ArticleTests::test_author_with_two_affiliations\",\n \"tests/test_document.py::ArticleTests::test_author_with_two_role\",\n \"tests/test_document.py::ArticleTests::test_author_without_affiliations\",\n \"tests/test_document.py::ArticleTests::test_author_without_surname_and_given_names\",\n \"tests/test_document.py::ArticleTests::test_authors\",\n \"tests/test_document.py::ArticleTests::test_collection_acronym\",\n \"tests/test_document.py::ArticleTests::test_collection_acronym_priorizing_collection\",\n \"tests/test_document.py::ArticleTests::test_collection_acronym_retrieving_v992\",\n \"tests/test_document.py::ArticleTests::test_collection_name_brazil\",\n \"tests/test_document.py::ArticleTests::test_collection_name_undefined\",\n \"tests/test_document.py::ArticleTests::test_corporative_authors\",\n \"tests/test_document.py::ArticleTests::test_document_type\",\n \"tests/test_document.py::ArticleTests::test_doi\",\n \"tests/test_document.py::ArticleTests::test_doi_clean_1\",\n \"tests/test_document.py::ArticleTests::test_doi_clean_2\",\n \"tests/test_document.py::ArticleTests::test_doi_v237\",\n \"tests/test_document.py::ArticleTests::test_end_page_loaded_crazy_legacy_way_1\",\n \"tests/test_document.py::ArticleTests::test_end_page_loaded_crazy_legacy_way_2\",\n \"tests/test_document.py::ArticleTests::test_end_page_loaded_through_xml\",\n \"tests/test_document.py::ArticleTests::test_file_code\",\n \"tests/test_document.py::ArticleTests::test_file_code_crazy_slashs_1\",\n \"tests/test_document.py::ArticleTests::test_file_code_crazy_slashs_2\",\n \"tests/test_document.py::ArticleTests::test_first_author\",\n \"tests/test_document.py::ArticleTests::test_first_author_without_author\",\n \"tests/test_document.py::ArticleTests::test_fulltexts_field_fulltexts\",\n \"tests/test_document.py::ArticleTests::test_fulltexts_without_field_fulltexts\",\n \"tests/test_document.py::ArticleTests::test_html_url\",\n \"tests/test_document.py::ArticleTests::test_invalid_document_type\",\n \"tests/test_document.py::ArticleTests::test_issue\",\n \"tests/test_document.py::ArticleTests::test_issue_label_field_v4\",\n \"tests/test_document.py::ArticleTests::test_issue_label_without_field_v4\",\n \"tests/test_document.py::ArticleTests::test_issue_url\",\n \"tests/test_document.py::ArticleTests::test_journal_abbreviated_title\",\n \"tests/test_document.py::ArticleTests::test_journal_acronym\",\n \"tests/test_document.py::ArticleTests::test_journal_title\",\n \"tests/test_document.py::ArticleTests::test_keywords\",\n \"tests/test_document.py::ArticleTests::test_keywords_iso639_2\",\n \"tests/test_document.py::ArticleTests::test_keywords_with_undefined_language\",\n \"tests/test_document.py::ArticleTests::test_keywords_without_subfield_k\",\n \"tests/test_document.py::ArticleTests::test_keywords_without_subfield_l\",\n \"tests/test_document.py::ArticleTests::test_languages_field_fulltexts\",\n \"tests/test_document.py::ArticleTests::test_languages_field_v40\",\n \"tests/test_document.py::ArticleTests::test_last_page\",\n \"tests/test_document.py::ArticleTests::test_mixed_affiliations\",\n \"tests/test_document.py::ArticleTests::test_normalized_affiliations\",\n \"tests/test_document.py::ArticleTests::test_normalized_affiliations_undefined_ISO_3166_CODE\",\n \"tests/test_document.py::ArticleTests::test_normalized_affiliations_without_p\",\n \"tests/test_document.py::ArticleTests::test_original_abstract_with_just_one_language_defined\",\n \"tests/test_document.py::ArticleTests::test_original_abstract_with_language_defined\",\n \"tests/test_document.py::ArticleTests::test_original_abstract_with_language_defined_but_different_of_the_article_original_language\",\n \"tests/test_document.py::ArticleTests::test_original_abstract_without_language_defined\",\n \"tests/test_document.py::ArticleTests::test_original_language_invalid_iso639_2\",\n \"tests/test_document.py::ArticleTests::test_original_language_iso639_2\",\n \"tests/test_document.py::ArticleTests::test_original_language_original\",\n \"tests/test_document.py::ArticleTests::test_original_title_with_just_one_language_defined\",\n \"tests/test_document.py::ArticleTests::test_original_title_with_language_defined\",\n \"tests/test_document.py::ArticleTests::test_original_title_with_language_defined_but_different_of_the_article_original_language\",\n \"tests/test_document.py::ArticleTests::test_original_title_without_language_defined\",\n \"tests/test_document.py::ArticleTests::test_pdf_url\",\n \"tests/test_document.py::ArticleTests::test_processing_date\",\n \"tests/test_document.py::ArticleTests::test_project_name\",\n \"tests/test_document.py::ArticleTests::test_project_sponsors\",\n \"tests/test_document.py::ArticleTests::test_publication_contract\",\n \"tests/test_document.py::ArticleTests::test_publication_date\",\n \"tests/test_document.py::ArticleTests::test_publisher_id\",\n \"tests/test_document.py::ArticleTests::test_publisher_loc\",\n \"tests/test_document.py::ArticleTests::test_publisher_name\",\n \"tests/test_document.py::ArticleTests::test_receive_date\",\n \"tests/test_document.py::ArticleTests::test_review_date\",\n \"tests/test_document.py::ArticleTests::test_start_page\",\n \"tests/test_document.py::ArticleTests::test_start_page_loaded_crazy_legacy_way_1\",\n \"tests/test_document.py::ArticleTests::test_start_page_loaded_crazy_legacy_way_2\",\n \"tests/test_document.py::ArticleTests::test_start_page_loaded_through_xml\",\n \"tests/test_document.py::ArticleTests::test_subject_areas\",\n \"tests/test_document.py::ArticleTests::test_supplement_issue\",\n \"tests/test_document.py::ArticleTests::test_supplement_volume\",\n \"tests/test_document.py::ArticleTests::test_thesis_degree\",\n \"tests/test_document.py::ArticleTests::test_thesis_organization\",\n \"tests/test_document.py::ArticleTests::test_thesis_organization_and_division\",\n \"tests/test_document.py::ArticleTests::test_thesis_organization_without_name\",\n \"tests/test_document.py::ArticleTests::test_translated_abstracts\",\n \"tests/test_document.py::ArticleTests::test_translated_abstracts_without_v83\",\n \"tests/test_document.py::ArticleTests::test_translated_abtracts_iso639_2\",\n \"tests/test_document.py::ArticleTests::test_translated_titles\",\n \"tests/test_document.py::ArticleTests::test_translated_titles_iso639_2\",\n \"tests/test_document.py::ArticleTests::test_translated_titles_without_v12\",\n \"tests/test_document.py::ArticleTests::test_volume\",\n \"tests/test_document.py::ArticleTests::test_whitwout_acceptance_date\",\n \"tests/test_document.py::ArticleTests::test_whitwout_ahead_publication_date\",\n \"tests/test_document.py::ArticleTests::test_whitwout_receive_date\",\n \"tests/test_document.py::ArticleTests::test_whitwout_review_date\",\n \"tests/test_document.py::ArticleTests::test_without_affiliations\",\n \"tests/test_document.py::ArticleTests::test_without_authors\",\n \"tests/test_document.py::ArticleTests::test_without_citations\",\n \"tests/test_document.py::ArticleTests::test_without_collection_acronym\",\n \"tests/test_document.py::ArticleTests::test_without_corporative_authors\",\n \"tests/test_document.py::ArticleTests::test_without_document_type\",\n \"tests/test_document.py::ArticleTests::test_without_doi\",\n \"tests/test_document.py::ArticleTests::test_without_html_url\",\n \"tests/test_document.py::ArticleTests::test_without_issue\",\n \"tests/test_document.py::ArticleTests::test_without_issue_url\",\n \"tests/test_document.py::ArticleTests::test_without_journal_abbreviated_title\",\n \"tests/test_document.py::ArticleTests::test_without_journal_acronym\",\n \"tests/test_document.py::ArticleTests::test_without_journal_title\",\n \"tests/test_document.py::ArticleTests::test_without_keywords\",\n \"tests/test_document.py::ArticleTests::test_without_last_page\",\n \"tests/test_document.py::ArticleTests::test_without_normalized_affiliations\",\n \"tests/test_document.py::ArticleTests::test_without_original_abstract\",\n \"tests/test_document.py::ArticleTests::test_without_original_title\",\n \"tests/test_document.py::ArticleTests::test_without_pages\",\n \"tests/test_document.py::ArticleTests::test_without_pdf_url\",\n \"tests/test_document.py::ArticleTests::test_without_processing_date\",\n \"tests/test_document.py::ArticleTests::test_without_project_name\",\n \"tests/test_document.py::ArticleTests::test_without_project_sponsor\",\n \"tests/test_document.py::ArticleTests::test_without_publication_contract\",\n \"tests/test_document.py::ArticleTests::test_without_publication_date\",\n \"tests/test_document.py::ArticleTests::test_without_publisher_id\",\n \"tests/test_document.py::ArticleTests::test_without_publisher_loc\",\n \"tests/test_document.py::ArticleTests::test_without_publisher_name\",\n \"tests/test_document.py::ArticleTests::test_without_scielo_domain\",\n \"tests/test_document.py::ArticleTests::test_without_scielo_domain_article_v69\",\n \"tests/test_document.py::ArticleTests::test_without_scielo_domain_article_v69_and_with_title_v690\",\n \"tests/test_document.py::ArticleTests::test_without_scielo_domain_title_v690\",\n \"tests/test_document.py::ArticleTests::test_without_start_page\",\n \"tests/test_document.py::ArticleTests::test_without_subject_areas\",\n \"tests/test_document.py::ArticleTests::test_without_suplement_issue\",\n \"tests/test_document.py::ArticleTests::test_without_supplement_volume\",\n \"tests/test_document.py::ArticleTests::test_without_thesis_degree\",\n \"tests/test_document.py::ArticleTests::test_without_thesis_organization\",\n \"tests/test_document.py::ArticleTests::test_without_volume\",\n \"tests/test_document.py::ArticleTests::test_without_wos_citation_indexes\",\n \"tests/test_document.py::ArticleTests::test_without_wos_subject_areas\",\n \"tests/test_document.py::ArticleTests::test_wos_citation_indexes\",\n \"tests/test_document.py::ArticleTests::test_wos_subject_areas\",\n \"tests/test_document.py::CitationTest::test_a_link_access_date\",\n \"tests/test_document.py::CitationTest::test_analytic_institution_for_a_article_citation\",\n \"tests/test_document.py::CitationTest::test_analytic_institution_for_a_book_citation\",\n \"tests/test_document.py::CitationTest::test_article_title\",\n \"tests/test_document.py::CitationTest::test_article_without_title\",\n \"tests/test_document.py::CitationTest::test_authors_article\",\n \"tests/test_document.py::CitationTest::test_authors_book\",\n \"tests/test_document.py::CitationTest::test_authors_link\",\n \"tests/test_document.py::CitationTest::test_authors_thesis\",\n \"tests/test_document.py::CitationTest::test_book_chapter_title\",\n \"tests/test_document.py::CitationTest::test_book_edition\",\n \"tests/test_document.py::CitationTest::test_book_volume\",\n \"tests/test_document.py::CitationTest::test_book_without_chapter_title\",\n \"tests/test_document.py::CitationTest::test_citation_sample_congress\",\n \"tests/test_document.py::CitationTest::test_citation_sample_link\",\n \"tests/test_document.py::CitationTest::test_citation_sample_link_without_comment\",\n \"tests/test_document.py::CitationTest::test_conference_edition\",\n \"tests/test_document.py::CitationTest::test_conference_name\",\n \"tests/test_document.py::CitationTest::test_conference_sponsor\",\n \"tests/test_document.py::CitationTest::test_conference_without_name\",\n \"tests/test_document.py::CitationTest::test_conference_without_sponsor\",\n \"tests/test_document.py::CitationTest::test_date\",\n \"tests/test_document.py::CitationTest::test_doi\",\n \"tests/test_document.py::CitationTest::test_editor\",\n \"tests/test_document.py::CitationTest::test_end_page_14\",\n \"tests/test_document.py::CitationTest::test_end_page_514\",\n \"tests/test_document.py::CitationTest::test_end_page_withdout_data\",\n \"tests/test_document.py::CitationTest::test_first_author_article\",\n \"tests/test_document.py::CitationTest::test_first_author_book\",\n \"tests/test_document.py::CitationTest::test_first_author_link\",\n \"tests/test_document.py::CitationTest::test_first_author_thesis\",\n \"tests/test_document.py::CitationTest::test_first_author_without_monographic_authors\",\n \"tests/test_document.py::CitationTest::test_first_author_without_monographic_authors_but_not_a_book_citation\",\n \"tests/test_document.py::CitationTest::test_index_number\",\n \"tests/test_document.py::CitationTest::test_institutions_all_fields\",\n \"tests/test_document.py::CitationTest::test_institutions_v11\",\n \"tests/test_document.py::CitationTest::test_institutions_v17\",\n \"tests/test_document.py::CitationTest::test_institutions_v29\",\n \"tests/test_document.py::CitationTest::test_institutions_v50\",\n \"tests/test_document.py::CitationTest::test_institutions_v58\",\n \"tests/test_document.py::CitationTest::test_invalid_edition\",\n \"tests/test_document.py::CitationTest::test_isbn\",\n \"tests/test_document.py::CitationTest::test_isbn_but_not_a_book\",\n \"tests/test_document.py::CitationTest::test_issn\",\n \"tests/test_document.py::CitationTest::test_issn_but_not_an_article\",\n \"tests/test_document.py::CitationTest::test_issue_part\",\n \"tests/test_document.py::CitationTest::test_issue_title\",\n \"tests/test_document.py::CitationTest::test_journal_issue\",\n \"tests/test_document.py::CitationTest::test_journal_volume\",\n \"tests/test_document.py::CitationTest::test_link\",\n \"tests/test_document.py::CitationTest::test_link_title\",\n \"tests/test_document.py::CitationTest::test_link_without_title\",\n \"tests/test_document.py::CitationTest::test_monographic_authors\",\n \"tests/test_document.py::CitationTest::test_monographic_first_author\",\n \"tests/test_document.py::CitationTest::test_pages_14\",\n \"tests/test_document.py::CitationTest::test_pages_514\",\n \"tests/test_document.py::CitationTest::test_pages_withdout_data\",\n \"tests/test_document.py::CitationTest::test_publication_type_article\",\n \"tests/test_document.py::CitationTest::test_publication_type_book\",\n \"tests/test_document.py::CitationTest::test_publication_type_conference\",\n \"tests/test_document.py::CitationTest::test_publication_type_link\",\n \"tests/test_document.py::CitationTest::test_publication_type_thesis\",\n \"tests/test_document.py::CitationTest::test_publication_type_undefined\",\n \"tests/test_document.py::CitationTest::test_publisher\",\n \"tests/test_document.py::CitationTest::test_publisher_address\",\n \"tests/test_document.py::CitationTest::test_publisher_address_without_e\",\n \"tests/test_document.py::CitationTest::test_series_book\",\n \"tests/test_document.py::CitationTest::test_series_but_neither_journal_book_or_conference_citation\",\n \"tests/test_document.py::CitationTest::test_series_conference\",\n \"tests/test_document.py::CitationTest::test_series_journal\",\n \"tests/test_document.py::CitationTest::test_source_book_title\",\n \"tests/test_document.py::CitationTest::test_source_journal\",\n \"tests/test_document.py::CitationTest::test_source_journal_without_journal_title\",\n \"tests/test_document.py::CitationTest::test_sponsor\",\n \"tests/test_document.py::CitationTest::test_start_page_14\",\n \"tests/test_document.py::CitationTest::test_start_page_514\",\n \"tests/test_document.py::CitationTest::test_start_page_withdout_data\",\n \"tests/test_document.py::CitationTest::test_thesis_institution\",\n \"tests/test_document.py::CitationTest::test_thesis_title\",\n \"tests/test_document.py::CitationTest::test_thesis_without_title\",\n \"tests/test_document.py::CitationTest::test_title_when_article_citation\",\n \"tests/test_document.py::CitationTest::test_title_when_conference_citation\",\n \"tests/test_document.py::CitationTest::test_title_when_link_citation\",\n \"tests/test_document.py::CitationTest::test_title_when_thesis_citation\",\n \"tests/test_document.py::CitationTest::test_with_volume_but_not_a_journal_article_neither_a_book\",\n \"tests/test_document.py::CitationTest::test_without_analytic_institution\",\n \"tests/test_document.py::CitationTest::test_without_authors\",\n \"tests/test_document.py::CitationTest::test_without_date\",\n \"tests/test_document.py::CitationTest::test_without_doi\",\n \"tests/test_document.py::CitationTest::test_without_edition\",\n \"tests/test_document.py::CitationTest::test_without_editor\",\n \"tests/test_document.py::CitationTest::test_without_first_author\",\n \"tests/test_document.py::CitationTest::test_without_index_number\",\n \"tests/test_document.py::CitationTest::test_without_institutions\",\n \"tests/test_document.py::CitationTest::test_without_issue\",\n \"tests/test_document.py::CitationTest::test_without_issue_part\",\n \"tests/test_document.py::CitationTest::test_without_issue_title\",\n \"tests/test_document.py::CitationTest::test_without_link\",\n \"tests/test_document.py::CitationTest::test_without_monographic_authors\",\n \"tests/test_document.py::CitationTest::test_without_monographic_authors_but_not_a_book_citation\",\n \"tests/test_document.py::CitationTest::test_without_publisher\",\n \"tests/test_document.py::CitationTest::test_without_publisher_address\",\n \"tests/test_document.py::CitationTest::test_without_series\",\n \"tests/test_document.py::CitationTest::test_without_sponsor\",\n \"tests/test_document.py::CitationTest::test_without_thesis_institution\",\n \"tests/test_document.py::CitationTest::test_without_volume\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"BSD 2-Clause \"Simplified\" License"},"__index_level_0__":{"kind":"number","value":166,"string":"166"},"num_tokens_patch":{"kind":"number","value":492,"string":"492"},"before_filepaths":{"kind":"list like","value":["setup.py","xylose/scielodocument.py"],"string":"[\n \"setup.py\",\n \"xylose/scielodocument.py\"\n]"}}},{"rowIdx":38,"cells":{"instance_id":{"kind":"string","value":"praw-dev__praw-426"},"base_commit":{"kind":"string","value":"eb91d191eb09d94df144589ba6561f387a3a2922"},"created_at":{"kind":"string","value":"2015-06-15 14:08:27"},"environment_setup_commit":{"kind":"string","value":"eb91d191eb09d94df144589ba6561f387a3a2922"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/praw/objects.py b/praw/objects.py\nindex df96fbf1..f4014f10 100755\n--- a/praw/objects.py\n+++ b/praw/objects.py\n@@ -75,7 +75,7 @@ class RedditContentObject(object):\n \n def __getattr__(self, attr):\n \"\"\"Return the value of the `attr` attribute.\"\"\"\n- if not self.has_fetched:\n+ if attr != '__setstate__' and not self.has_fetched:\n self.has_fetched = self._populate(None, True)\n return getattr(self, attr)\n raise AttributeError('\\'%s\\' has no attribute \\'%s\\'' % (type(self),\n"},"problem_statement":{"kind":"string","value":"Can't unpickle Comment objects (maximum recursion depth exceeded)\nHere's the stack trace:\r\n\r\n```pytb\r\n>>> import pickle\r\n>>> import praw\r\n>>> r = praw.Reddit('test')\r\n>>> comment = r.get_info(thing_id='t1_cs6woop')\r\n>>> pickled = pickle.dumps(comment)\r\n>>> pickle.loads(pickled)\r\nTraceback (most recent call last):\r\n File \"\", line 1, in \r\n File \"/usr/lib/python2.7/pickle.py\", line 1382, in loads\r\n return Unpickler(file).load()\r\n File \"/usr/lib/python2.7/pickle.py\", line 858, in load\r\n dispatch[key](self)\r\n File \"/usr/lib/python2.7/pickle.py\", line 1215, in load_build\r\n setstate = getattr(inst, \"__setstate__\", None)\r\n File \"/home/___/.virtualenvs/___/local/lib/python2.7/site-packages/praw/objects.py\", line 82, in __getattr__\r\n if not self.has_fetched:\r\n File \"/home/___/.virtualenvs/___/local/lib/python2.7/site-packages/praw/objects.py\", line 82, in __getattr__\r\n if not self.has_fetched:\r\n File \"/home/___/.virtualenvs/___/local/lib/python2.7/site-packages/praw/objects.py\", line 82, in __getattr__\r\n if not self.has_fetched:\r\n ...\r\nRuntimeError: maximum recursion depth exceeded\r\n```"},"repo":{"kind":"string","value":"praw-dev/praw"},"test_patch":{"kind":"string","value":"diff --git a/tests/cassettes/test_unpickle_comment.json b/tests/cassettes/test_unpickle_comment.json\nnew file mode 100644\nindex 00000000..ce5e4d79\n--- /dev/null\n+++ b/tests/cassettes/test_unpickle_comment.json\n@@ -0,0 +1,1 @@\n+{\"recorded_with\": \"betamax/0.4.2\", \"http_interactions\": [{\"recorded_at\": \"2015-06-15T13:50:36\", \"response\": {\"status\": {\"code\": 200, \"message\": \"OK\"}, \"headers\": {\"transfer-encoding\": [\"chunked\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"server\": [\"cloudflare-nginx\"], \"set-cookie\": [\"__cfduid=d28895e21c18fe156bbe302205f9b22ac1434376236; expires=Tue, 14-Jun-16 13:50:36 GMT; path=/; domain=.reddit.com; HttpOnly\", \"secure_session=; Domain=reddit.com; Max-Age=-1434376237; Path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT; HttpOnly\", \"reddit_session=7302867%2C2015-06-15T06%3A50%3A37%2Cc0e114b1f45a1bc763984b34c83d31df49a92fed; Domain=reddit.com; Path=/; HttpOnly\"], \"x-moose\": [\"majestic\"], \"x-xss-protection\": [\"1; mode=block\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"pragma\": [\"no-cache\"], \"x-ua-compatible\": [\"IE=edge\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"cf-ray\": [\"1f6ebeb510a504a3-CDG\"], \"date\": [\"Mon, 15 Jun 2015 13:50:37 GMT\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"x-content-type-options\": [\"nosniff\"]}, \"body\": {\"encoding\": \"UTF-8\", \"base64_string\": \"H4sIAAAAAAAAAxzLTWrDMBBA4auIWSug0c+MpXNkV0oZWaM6TRMV26GL4LuXdPs+3hO+tnGHYp6g6zrWDYp5e7cGmuzyn++q7WPZ958Xdfne1Bq4jbbItkAxcPt8CD+uv3zBPElGVidEnZPXWmtLVSmRsnOkVTwqR7AG5jGuF339HJyfiK13mE6OTpjOjkpyJbCdnSLGij0mwTozhTzFGuI8hRaw9Zgl+64NjuP4AwAA//8DABH3aj7KAAAA\"}, \"url\": \"https://api.reddit.com/api/login/.json\"}, \"request\": {\"headers\": {\"Accept-Encoding\": [\"gzip, deflate\"], \"Connection\": [\"keep-alive\"], \"Accept\": [\"*/*\"], \"Content-Length\": [\"45\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0a1 Python/2.7.8 Linux-3.16.0-37-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Content-Type\": [\"application/x-www-form-urlencoded\"]}, \"body\": {\"encoding\": \"utf-8\", \"string\": \"passwd=1111&api_type=json&user=PyAPITestUser2\"}, \"uri\": \"https://api.reddit.com/api/login/.json\", \"method\": \"POST\"}}, {\"recorded_at\": \"2015-06-15T13:50:37\", \"response\": {\"status\": {\"code\": 200, \"message\": \"OK\"}, \"headers\": {\"x-ratelimit-remaining\": [\"299\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"content-length\": [\"2574\"], \"server\": [\"cloudflare-nginx\"], \"x-content-type-options\": [\"nosniff\"], \"x-moose\": [\"majestic\"], \"x-ratelimit-used\": [\"1\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"x-sup-id\": [\"http://www.reddit.com/sup.json#e4356386a7\"], \"x-xss-protection\": [\"1; mode=block\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"pragma\": [\"no-cache\"], \"x-ua-compatible\": [\"IE=edge\"], \"x-reddit-tracking\": [\"https://pixel.redditmedia.com/pixel/of_destiny.png?v=HcLLGdCwZSCTj%2BYMBgG8Ln0%2FKHA5a%2FIoJVNJ%2Fv%2FXrv6TSUaosRpQ67%2Fyfcg6Z7i5Diz8FZevtuCHzUmagS6TUQ7G47Go4bcv\"], \"cf-ray\": [\"1f6ebeb9f0cd04a3-CDG\"], \"date\": [\"Mon, 15 Jun 2015 13:50:37 GMT\"], \"x-ratelimit-reset\": [\"563\"], \"vary\": [\"accept-encoding\"]}, \"body\": {\"encoding\": \"UTF-8\", \"base64_string\": \"H4sIAC3YflUC/+2cW2/bRhqG/4rgi6KLzcRzPqQoFotFgV1gL3rRYi/qhTAnRox1ikT5FPS/d2ZIKpTkOpJFUrLrG8cmafKd+b734Ts0oy8X1/nUXXwYXPw3Xxb59OPFu8GF04UOm75cTGZupJejuNsvVlO4yPESeWSVdAR7yz3VAmVQQwup4BZxCWVmtDeCIB7PZEf52C38NJzhty/rSxVo4yrLlVl45/JimJe72RAXbJZOMM6n18MiL8Y+7vlffp0PfpoWi/vBbDq4WkFoSfyqbDzW6OnUu6G5D4dOV+Nx2LTwk9mNHg8XXi9nUUW1PZ22uhoZEirvaLG+nF4Vo9ki7vv5/p8//+cXvyx+XfoFLg+49suwq1isfDr/fJynDRdx7yocFq41ny2KuO23/4dtS33j44UyPV7GXymvaj8vPc4f4i99DFOUjoDhB70IU7b5C+X5qiGsT/uUyLkOU76eTTQMF3P5tY67lna2iFOJ4inm88XsZmvG7CxMb9i6WOZ6nBdxT9RlZi5+e/HrNP+88oM47vsPA7mYf75Wo5vra2g4xYwb5KEWkmkBCUYs9IOiOOPcWcKQIDpp8KHUGyMsxzLMxjpfDO1yObRjvUyTeneXOmV2mwZeCxmOisk47v5uXPzg8ptBOv7Hq4uJu7r47mPxQ9w+j98cKzee6DKd6Wqavg9Xiz+lqazbNiqpGljP82ERSrGe6uEody71fz3YqZ6kXi7rUjeBDeUtJwVRArEikKP3qSGac1P4u3i1ZhOvFmkmRkUx/3B56afvb4NH5mGK9fvZ4uNl0yP/yN2PeHFLb8yDcvcCU5tB7Aj3yhAPkUDOkEwo5IThGRQ0k07wZNVK3XBV2FqhVLRSuJrH2sSGCrjY7v7patLYFA93JWdW+XKUxhsH8/vv7wZveNjGA3/peLCf/Kf5IpwCca0QM8QST53KoJRUU8yJ8t6K4DlOENMYKX81vZr+/adQ68EvsdXfnRAWh4tvwqLERfrh63h6oEnZM7s0IfDcaVIpfKNJVzRJQ+yaJs3xtQQTO5tMwhU+DDxC5AGtGJ4xawiTWglFJeXaK42QQ8YjgsL9HGbQKOY9UqcByBGC+yBEGcx3CIHluROiUvhGiE4IUUeAl0SIf4fBDJaziR+sprmdOf9h8H0sgAsHpX/d355IFFVfQaR2O79VLuwh8/TZoa7/NhkQwWx3fs6JDEJUCs+HDLH/B//SdhRKrR1llGUaxAECSsMXwxAHmDHHnIfCGX8cL9C9ZqlFe+QFD4NKmOuBF+vx9cCLDUJ0Hxn2UNS189eVbDofS8aCtfAznH97e/u+lPI+JKHLxeWWrssqHy0vy8Jexo1DG80yrL0SrRKdEo3S9MnlYwwIWinnldbzZACiBlnCDLAaOkCVRUBxYgAh0EKmncBKHMsANvnUOwNocd0HA1Kb4uWtaQMCm8t86K32nmRASmYBJThUhmICFNYUUSuJ4+mqPTLhcIHdI6Iq9C4i+HOWDQchIvR1ExG1laKTopGij5o2egIRldbzRMRrjQl0nmana0S0GRO21/FGIGQyiQHVMFiQQQi0CJXSWei7zHBHTKJ3/4w4SGIPlChr/QglXlCQqLSeJyVeaZDAhU1/ee6FEtX4jqXEHtH9yYcPZbdRuuuMVkmxh8wmGE7y8GFd/y1yUAnFcx4+HESOtvIFpZXW8yRHBhFTMLMgEjHcJjQHRjoGZMawFeFm4XQyzBHkuHsY0f7JgRLwuiZHalP4cJtWyseiYzPhC0eozUQGkFChMj4kP6kMBN5bhgWFWjC4wY7e4sUBAntARFnoXUQ8602JQxAR+7qJiNpKKVsEI0UfNW30BCLO7p2Jv0K4qB4cdI2INsPFdr5XjFPuwrKfhLsMoJxJoLTMAOYaqUw5bLKkqH9GHCSxe0pUtd6lBHtBQaLSep6UeKVBAkEh+6JEPb5jKbFHtv/mEoRSInad0Sop9pB5+iVIXf9tcjBIHlmitUqO1vIFopXWN3L0SI56VfCSyLF98zYSWw8xjX9g4KE0SIfSZAx4I32GrZHEZBvw6D9f7COxc0rUtd6lBH7OG5YnokSl9TwpwSVmQkIFsIAhR9JQZ00EjktOkWWKKlIuh59NCbx88CQp7Y8S05Wa2Gk/lPg6vmMpsceN+5v5AlH4yMP/Vkmxh8xT54uv9d8gBwotztQj75+1SI6yHZrkqB0WDRb9Fe3VdNfj5GhqfSNHr+Rgn/sgR9mm45t0sWPRsfkEkWitnacEMGs9oF6HynAoAVEeQRsWxBSe6GXtAwT2gIiy0I8gottHnO0i4pwfcb5WRFSu7RoRbYaL7XyvEKTaMgbCQtyFfM8EUAwjYJVVxlvJoD3Rm1gHSeyeElWtdykhXlCQqLSeJyWQEZYo5IDkVgPKKQMmw+FuwMOdweqwENXkWEoYlR439UkJWUyT7F4oUY3vWErske2fXoKkbmNk1xmtkmIPmadfgtT13yYHJbzbP46U7bDxx5HKYdFg0V/RXk13/Sk51lrPkxyWZZAqxwCjMuQLIzjQVEGgiPYI4bBHuWPJoa7v+ycHy/sgR9mmZjRvAx1bLzEQBDmlHkBtFKASWaA1lUBCzK1h2GJ8oiecBwjsARFloXcRQTtHROjrJiJqK0UnRSNFHzVt9AQiKq3niYhXGy5g+stE14hoM1xs53tuMJUaZUBLFOiNvANGaQE0F4IbKKGxJ3oT6yCJPVCirPUuJUjnS5D2gkSl9Twp8VqDhJU9vej9dXzHUmKPbP/NJQgl+G0J0qj/NjkIx52To618sdZ6nuQghiEmlAwRMkCDMkyA1FkWH2obmyFvnTv6ESdfrHonh7ntJV+kNhWdfB6WIZZyEyDumIOACmuBzCgCIbAaw1i4cdGU/PqPFwcI7B4RVaF3EYE6X4KEvm4iorZSdFI0UvRR00ZPIKLSep6IeK3honpw0DUi2gwX2/ke+swbRRBA3AR68wwCY6UCRuMMcoQhwklR/4w4SGIPlChrvUMJprr9H+ltBola63lS4pUGCfEJJef2QolqfMdSYo9s/80lCGGPfZxLq6TYQ+bplyB1/bfJgSl6ZH7aJUdb+WKt9TzJoUmGHQ/RAmGO438k40BRG3IklJo5IS1l6XWfI8hx9zC77Z0c+bwXcsQ2LW5uJmmOjkXHZsJXFCsBRRbyHnKAYiKAMpkHmBlnEDImY6f9jO59BHaPiKrQO4ggnYeL2NdNRNRWik6KRoo+atrozxFRaz1PRLzWcNHbp2i2Fy528j0nRGhPASc4viOnGVDCGwCxDs5kmUblZzH2z4iDJPZAid1PzKyc93KCRK31PCnxOoNEuLcX6Zp9UKIe37GU2CPbf3MJEu7mfNcZrZJiD5knX4Ks679JDi4JedancB9CjpbyRUNrK+RIfZ0VPrX15iQZn5WdWx75B7y/uSWyaAAA\"}, \"url\": \"https://api.reddit.com/user/PyAPITestUser2/comments.json?sort=new&t=all\"}, \"request\": {\"headers\": {\"Connection\": [\"keep-alive\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0a1 Python/2.7.8 Linux-3.16.0-37-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Accept\": [\"*/*\"], \"Accept-Encoding\": [\"gzip, deflate\"], \"Cookie\": [\"reddit_session=7302867%2C2015-06-15T06%3A50%3A37%2Cc0e114b1f45a1bc763984b34c83d31df49a92fed; __cfduid=d28895e21c18fe156bbe302205f9b22ac1434376236\"]}, \"body\": {\"encoding\": \"utf-8\", \"string\": \"\"}, \"uri\": \"https://api.reddit.com/user/PyAPITestUser2/comments.json?sort=new&t=all\", \"method\": \"GET\"}}, {\"recorded_at\": \"2015-06-15T13:50:38\", \"response\": {\"status\": {\"code\": 200, \"message\": \"OK\"}, \"headers\": {\"x-ratelimit-remaining\": [\"298\"], \"transfer-encoding\": [\"chunked\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"x-moose\": [\"majestic\"], \"server\": [\"cloudflare-nginx\"], \"x-ratelimit-used\": [\"2\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"x-xss-protection\": [\"1; mode=block\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"pragma\": [\"no-cache\"], \"x-ua-compatible\": [\"IE=edge\"], \"x-reddit-tracking\": [\"https://pixel.redditmedia.com/pixel/of_destiny.png?v=6qsn21tVL7go5HvVpotLbf0tnpT2hujgxe4105fEz7G1t0%2BHh25pl%2FSGghZNuAZaGB%2FJKaxz67I%3D\"], \"cf-ray\": [\"1f6ebebe912c04a3-CDG\"], \"date\": [\"Mon, 15 Jun 2015 13:50:38 GMT\"], \"x-ratelimit-reset\": [\"562\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"x-content-type-options\": [\"nosniff\"]}, \"body\": {\"encoding\": \"UTF-8\", \"base64_string\": \"H4sIAAAAAAAAA1yRwW7DIBBEfwVxtqrYxgn2rcfecmjPaANLvYqBCnCUNsq/V6AkjXodzQ5vhgs/kjd8Yjx3vGHcQAY+sQufISkHtPCJWVgSNox7cFic++/X/ds7pvyRMNYrSspGwhp0d+uIkLEobSfFth02cnjZNIzPZFDZGJyK4RByerr5DItROqIxVPVid8HMkOby8LYVLq1j+Nl1BzNYsYGulwjCgu7sCOM49LtejhalMJ0WW7krcDcQtWb9gGnFHabUDOZ/1YX8UR0hujJG25WU4Bz6/BDHhvFwwqhaySeW41rOKKlS4SmIavyfozbE8xdFyBQ8n5hfl+UGcsJIltAovOHcY+sHCU1nW9f2h3BWOqw+l42u118AAAD//wMAKxRkF8UBAAA=\"}, \"url\": \"https://api.reddit.com/user/PyAPITestUser2/about/.json\"}, \"request\": {\"headers\": {\"Connection\": [\"keep-alive\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0a1 Python/2.7.8 Linux-3.16.0-37-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Accept\": [\"*/*\"], \"Accept-Encoding\": [\"gzip, deflate\"], \"Cookie\": [\"reddit_session=7302867%2C2015-06-15T06%3A50%3A37%2Cc0e114b1f45a1bc763984b34c83d31df49a92fed; __cfduid=d28895e21c18fe156bbe302205f9b22ac1434376236\"]}, \"body\": {\"encoding\": \"utf-8\", \"string\": \"\"}, \"uri\": \"https://api.reddit.com/user/PyAPITestUser2/about/.json\", \"method\": \"GET\"}}, {\"recorded_at\": \"2015-06-15T13:50:38\", \"response\": {\"status\": {\"code\": 200, \"message\": \"OK\"}, \"headers\": {\"x-ratelimit-remaining\": [\"297\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"content-length\": [\"682\"], \"server\": [\"cloudflare-nginx\"], \"x-content-type-options\": [\"nosniff\"], \"x-moose\": [\"majestic\"], \"x-ratelimit-used\": [\"3\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"x-xss-protection\": [\"1; mode=block\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"pragma\": [\"no-cache\"], \"x-ua-compatible\": [\"IE=edge\"], \"x-reddit-tracking\": [\"https://pixel.redditmedia.com/pixel/of_destiny.png?v=AqxVkrSRF3bN55ymSSdkwfD%2FLdA4QMcYwodHHwNYU4Pccch5s1XTILSk9LACd6ER3FcO3MQmUDmhY5Rn5rzZjrp3D2F%2F%2BvsO\"], \"cf-ray\": [\"1f6ebec1714204a3-CDG\"], \"date\": [\"Mon, 15 Jun 2015 13:50:38 GMT\"], \"x-ratelimit-reset\": [\"562\"], \"vary\": [\"accept-encoding\"]}, \"body\": {\"encoding\": \"UTF-8\", \"base64_string\": \"H4sIAC7YflUC/61UyU7cQBD9FccHTsx4XwaUAyIimgOLICdC1OqlPNOZ9kJ3e2BA/Hu6G5sxHJCQcrHsqvKrV/Wq6tnf8Ib5R56vM//Q8xnW2Hw9+wQ3DUjE65V1WpfqSc010vCo0VrXwtibXgjj6ZWNVMj9Y8EqLBQYB3fIsc7a3CKMcbRttOSk1600fi17GzuBHzMyrjqBd6jBNVibBMZMCO64CVPahqwBsz3NtdbdURCQuV73NVHz1x9qYBzPaVsH0c/0PF5dIX41u87l7cU5e7g0hPqL5RKj/vIpOl1GJ7ebEHV0/rdbOQ6gqOSd5m0zVu0fCH38bTbzbk7R5dmZN5sdrPSxNTK+9ajASn2/82t254/2zr782CN5BS3ytHpI6D0UjEZZXpQQVqQK0yIvUhpnxYLQjMa0giTJwoyFFiZwOHeNeze5RviRy8VAxfLWXAvXtGvXA+/kaun9Mk3z0oeUb7aPOfRJRXLDglR5SnHF4qLMU8DVgkAZFSRMynBB8pDFFo62QuBOAWIgQAMzGtY1NFpN1O56IjhFk47Z/NOyxT3Uuo8SuSuyKCxTVuRltFiYSqO8jG3hizJb4CysGKQljUqXu92CjMpPE/1Hab7O8avScDP/SPEnK8+wQc402bVhrEcRh6hPOvv1gZqstODNBglMYLLTmNK2N/oiTDXfWhLRvvNa4qridCLJQHio6ncShoeeefx5TWJ5EpB2WOJ4n9edkg95x13XGXq7G1QC1u6wREkcZ1lYFNncJPB76UQPZPDhNASuiZwBwmw6ogMS6rUl/wFtOHnvlRlvVt2a+vC7i+Vcyqi0hhoQNJgIR3JwDxuCFG0lIEem5o1lY5OZFgyc9a5zFb/29k0Wpexcj07c7KYXdN/TsbiXl38Stiz/ywUAAA==\"}, \"url\": \"https://api.reddit.com/r/reddit_api_test/about/.json\"}, \"request\": {\"headers\": {\"Connection\": [\"keep-alive\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0a1 Python/2.7.8 Linux-3.16.0-37-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Accept\": [\"*/*\"], \"Accept-Encoding\": [\"gzip, deflate\"], \"Cookie\": [\"reddit_session=7302867%2C2015-06-15T06%3A50%3A37%2Cc0e114b1f45a1bc763984b34c83d31df49a92fed; __cfduid=d28895e21c18fe156bbe302205f9b22ac1434376236\"]}, \"body\": {\"encoding\": \"utf-8\", \"string\": \"\"}, \"uri\": \"https://api.reddit.com/r/reddit_api_test/about/.json\", \"method\": \"GET\"}}]}\n\\ No newline at end of file\ndiff --git a/tests/test_comments.py b/tests/test_comments.py\nindex 343e8dc3..2acced95 100644\n--- a/tests/test_comments.py\n+++ b/tests/test_comments.py\n@@ -1,6 +1,7 @@\n \"\"\"Tests for Comment class.\"\"\"\n \n from __future__ import print_function, unicode_literals\n+import pickle\n from praw import helpers\n from praw.objects import Comment, MoreComments\n from .helper import PRAWTest, betamax\n@@ -97,6 +98,15 @@ class CommentTest(PRAWTest):\n lambda item: isinstance(item, Comment))\n self.assertEqual(comment._replies, None)\n \n+ @betamax\n+ def test_unpickle_comment(self):\n+ item = next(self.r.user.get_comments())\n+ pkl = pickle.dumps(item)\n+ try:\n+ pickle.loads(pkl)\n+ except RuntimeError:\n+ self.fail(\"unpickling shouldn't throw a RuntimeError exception\")\n+\n \n class MoreCommentsTest(PRAWTest):\n def betamax_init(self):\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [],\n \"has_test_patch\": true,\n \"is_lite\": true,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 0\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"2.1"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .[dev]\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"pytest\",\n \"pip_packages\": [\n \"flake8\",\n \"betamax\",\n \"betamax-matchers\",\n \"mock\",\n \"pytest\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.9\",\n \"reqs_path\": null,\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"betamax==0.9.0\nbetamax-matchers==0.4.0\ncertifi==2025.1.31\ncharset-normalizer==3.4.1\nexceptiongroup @ file:///croot/exceptiongroup_1706031385326/work\nflake8==7.2.0\nidna==3.10\niniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work\nmccabe==0.7.0\nmock==5.2.0\npackaging @ file:///croot/packaging_1734472117206/work\npluggy @ file:///croot/pluggy_1733169602837/work\n-e git+https://github.com/praw-dev/praw.git@eb91d191eb09d94df144589ba6561f387a3a2922#egg=praw\npycodestyle==2.13.0\npyflakes==3.3.1\npytest @ file:///croot/pytest_1738938843180/work\nrequests==2.32.3\nrequests-toolbelt==1.0.0\nsix==1.17.0\ntomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work\nupdate-checker==0.18.0\nurllib3==2.3.0\n"},"environment":{"kind":"string","value":"name: praw\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - exceptiongroup=1.2.0=py39h06a4308_0\n - iniconfig=1.1.1=pyhd3eb1b0_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - packaging=24.2=py39h06a4308_0\n - pip=25.0=py39h06a4308_0\n - pluggy=1.5.0=py39h06a4308_0\n - pytest=8.3.4=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tomli=2.0.1=py39h06a4308_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - betamax==0.9.0\n - betamax-matchers==0.4.0\n - certifi==2025.1.31\n - charset-normalizer==3.4.1\n - flake8==7.2.0\n - idna==3.10\n - mccabe==0.7.0\n - mock==5.2.0\n - pycodestyle==2.13.0\n - pyflakes==3.3.1\n - requests==2.32.3\n - requests-toolbelt==1.0.0\n - six==1.17.0\n - update-checker==0.18.0\n - urllib3==2.3.0\nprefix: /opt/conda/envs/praw\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/test_comments.py::CommentTest::test_unpickle_comment"],"string":"[\n \"tests/test_comments.py::CommentTest::test_unpickle_comment\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/test_comments.py::CommentTest::test_add_comment","tests/test_comments.py::CommentTest::test_add_reply","tests/test_comments.py::CommentTest::test_edit","tests/test_comments.py::CommentTest::test_front_page_comment_replies_are_none","tests/test_comments.py::CommentTest::test_get_comments_permalink","tests/test_comments.py::CommentTest::test_inbox_comment_permalink","tests/test_comments.py::CommentTest::test_inbox_comment_replies_are_none","tests/test_comments.py::CommentTest::test_save_comment","tests/test_comments.py::CommentTest::test_spambox_comments_replies_are_none","tests/test_comments.py::CommentTest::test_unicode_comment","tests/test_comments.py::CommentTest::test_user_comment_permalink","tests/test_comments.py::CommentTest::test_user_comment_replies_are_none","tests/test_comments.py::MoreCommentsTest::test_all_comments","tests/test_comments.py::MoreCommentsTest::test_comments_method"],"string":"[\n \"tests/test_comments.py::CommentTest::test_add_comment\",\n \"tests/test_comments.py::CommentTest::test_add_reply\",\n \"tests/test_comments.py::CommentTest::test_edit\",\n \"tests/test_comments.py::CommentTest::test_front_page_comment_replies_are_none\",\n \"tests/test_comments.py::CommentTest::test_get_comments_permalink\",\n \"tests/test_comments.py::CommentTest::test_inbox_comment_permalink\",\n \"tests/test_comments.py::CommentTest::test_inbox_comment_replies_are_none\",\n \"tests/test_comments.py::CommentTest::test_save_comment\",\n \"tests/test_comments.py::CommentTest::test_spambox_comments_replies_are_none\",\n \"tests/test_comments.py::CommentTest::test_unicode_comment\",\n \"tests/test_comments.py::CommentTest::test_user_comment_permalink\",\n \"tests/test_comments.py::CommentTest::test_user_comment_replies_are_none\",\n \"tests/test_comments.py::MoreCommentsTest::test_all_comments\",\n \"tests/test_comments.py::MoreCommentsTest::test_comments_method\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"BSD 2-Clause \"Simplified\" License"},"__index_level_0__":{"kind":"number","value":168,"string":"168"},"num_tokens_patch":{"kind":"number","value":163,"string":"163"},"before_filepaths":{"kind":"list like","value":["praw/objects.py"],"string":"[\n \"praw/objects.py\"\n]"}}},{"rowIdx":39,"cells":{"instance_id":{"kind":"string","value":"mkdocs__mkdocs-668"},"base_commit":{"kind":"string","value":"98814de505c9d8f1849292372eff1c5ae492261c"},"created_at":{"kind":"string","value":"2015-06-27 22:50:14"},"environment_setup_commit":{"kind":"string","value":"3dfd95deae8379473714b346e61c1d63e957bb98"},"hints_text":{"kind":"string","value":"landscape-bot: [![Code Health](https://landscape.io/badge/198248/landscape.svg?style=flat)](https://landscape.io/diff/187394)\nCode quality remained the same when pulling **[a5ab2e1](https://github.com/d0ugal/mkdocs/commit/a5ab2e12e22a199617fcffd129d4762bfc6b712b) on d0ugal:symlink** into **[98814de](https://github.com/mkdocs/mkdocs/commit/98814de505c9d8f1849292372eff1c5ae492261c) on mkdocs:master**."},"patch":{"kind":"string","value":"diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py\nindex 38a61442..28ee62c8 100644\n--- a/mkdocs/config/config_options.py\n+++ b/mkdocs/config/config_options.py\n@@ -332,6 +332,13 @@ class Extras(OptionallyRequired):\n dirs.sort()\n for filename in sorted(filenames):\n fullpath = os.path.join(dirpath, filename)\n+\n+ # Some editors (namely Emacs) will create temporary symlinks\n+ # for internal magic. We can just ignore these files.\n+ if os.path.islink(fullpath):\n+ if not os.path.exists(os.readlink(fullpath)):\n+ continue\n+\n relpath = os.path.normpath(os.path.relpath(fullpath, docs_dir))\n if self.file_match(relpath):\n yield relpath\n"},"problem_statement":{"kind":"string","value":"Ignore broken symlinks in mkdocs serve.\nWhat I am experiencing:\r\n\r\n* When I am editing `index.md` in Emacs, Emacs creates files like:\r\n\r\n```\r\n➜ docs git:(master) ✗ ls -al .#* \r\nlrwxrwxrwx 1 paulproteus paulproteus 36 Jun 17 17:24 .#index.md -> paulproteus@charkha.27783:1434311808\r\n```\r\n\r\n* These files are Emacs' way of using symlinks to track which computer+process was Emacs-ing the file, so that in case of a crash, Emacs can figure out how to restore its state.\r\n\r\nWhat I expect:\r\n\r\n* When I edit `somethingelse.md` and press save, I expect the mkdocs livereload to reload the browser.\r\n\r\nWhat I see instead:\r\n\r\n```\r\nINFO - Building documentation... \r\nERROR - file not found: /home/paulproteus/projects/sandstorm/docs/.#index.md \r\nERROR - Error building page .#index.md \r\n[E 150617 17:22:21 ioloop:612] Exception in callback (3, )\r\n Traceback (most recent call last):\r\n File \"/home/paulproteus/.local/lib/python2.7/site-packages/tornado/ioloop.py\", line 866, in start\r\n handler_func(fd_obj, events)\r\n File \"/home/paulproteus/.local/lib/python2.7/site-packages/tornado/stack_context.py\", line 275, in null_wrapper\r\n return fn(*args, **kwargs)\r\n File \"/usr/lib/python2.7/dist-packages/pyinotify.py\", line 1604, in handle_read\r\n self.process_events()\r\n File \"/usr/lib/python2.7/dist-packages/pyinotify.py\", line 1321, in process_events\r\n self._default_proc_fun(revent)\r\n File \"/home/paulproteus/.local/lib/python2.7/site-packages/livereload/watcher.py\", line 152, in inotify_event\r\n self.callback()\r\n File \"/home/paulproteus/.local/lib/python2.7/site-packages/livereload/handlers.py\", line 65, in poll_tasks\r\n filepath, delay = cls.watcher.examine()\r\n File \"/home/paulproteus/.local/lib/python2.7/site-packages/livereload/watcher.py\", line 72, in examine\r\n func and func()\r\n File \"/usr/lib/python2.7/dist-packages/mkdocs/serve.py\", line 74, in builder\r\n build(config, live_server=True)\r\n File \"/usr/lib/python2.7/dist-packages/mkdocs/build.py\", line 299, in build\r\n build_pages(config)\r\n File \"/usr/lib/python2.7/dist-packages/mkdocs/build.py\", line 259, in build_pages\r\n dump_json)\r\n File \"/usr/lib/python2.7/dist-packages/mkdocs/build.py\", line 171, in _build_page\r\n input_content = io.open(input_path, 'r', encoding='utf-8').read()\r\n IOError: [Errno 2] No such file or directory: '/home/paulproteus/projects/sandstorm/docs/.#index.md'\r\n```\r\n\r\nWhat I propose:\r\n\r\n* If a \"No such file or directory\" error occurs, but the problem is a broken symlink, the `mkdocs` build should continue as if the file does not exist. Note that this arguably is a special-case to handle Emacs' own weirdness; a different way to do it would be to look at the list of git ignored files.\r\n* Perhaps in general, `mkdocs` should issue a warning (not an error) on broken symlinks, gracefully ignoring them.\r\n\r\nI'm open to a bunch of ideas. I wanted to file this in the hopes of sparking a discussion where the maintainers of mkdocs could express their opinion about the best way forward.\r\n\r\nThanks so much! Also hi! I'm twitter.com/asheeshlaroia and was chatting with a mkdocs developer earlier today. Seems like a great project! I learned about it via http://ericholscher.com/blog/2014/feb/27/how-i-judge-documentation-quality/ !"},"repo":{"kind":"string","value":"mkdocs/mkdocs"},"test_patch":{"kind":"string","value":"diff --git a/mkdocs/tests/config/config_options_tests.py b/mkdocs/tests/config/config_options_tests.py\nindex b1e7bff7..d16f675b 100644\n--- a/mkdocs/tests/config/config_options_tests.py\n+++ b/mkdocs/tests/config/config_options_tests.py\n@@ -1,6 +1,7 @@\n from __future__ import unicode_literals\n \n import os\n+import tempfile\n import unittest\n \n from mkdocs import utils\n@@ -251,6 +252,25 @@ class ExtrasTest(unittest.TestCase):\n self.assertRaises(config_options.ValidationError,\n option.validate, {})\n \n+ def test_talk(self):\n+\n+ option = config_options.Extras(utils.is_markdown_file)\n+\n+ tmp_dir = tempfile.mkdtemp()\n+\n+ f1 = os.path.join(tmp_dir, 'file1.md')\n+ f2 = os.path.join(tmp_dir, 'file2.md')\n+\n+ open(f1, 'a').close()\n+\n+ # symlink isn't available on Python 2 on Windows.\n+ if hasattr(os, 'symlink'):\n+ os.symlink('/path/that/doesnt/exist', f2)\n+\n+ files = list(option.walk_docs_dir(tmp_dir))\n+\n+ self.assertEqual(['file1.md', ], files)\n+\n \n class PagesTest(unittest.TestCase):\n \n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_hyperlinks\",\n \"has_pytest_match_arg\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 2\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"0.14"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.9\",\n \"reqs_path\": [\n \"requirements/project.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"click==8.1.8\nexceptiongroup==1.2.2\nghp-import==2.1.0\nimportlib_metadata==8.6.1\niniconfig==2.1.0\nJinja2==3.1.6\nlivereload==2.7.1\nMarkdown==3.7\nMarkupSafe==3.0.2\nmergedeep==1.3.4\n-e git+https://github.com/mkdocs/mkdocs.git@98814de505c9d8f1849292372eff1c5ae492261c#egg=mkdocs\nmkdocs-bootstrap==0.2.0\nmkdocs-bootswatch==0.5.0\nmkdocs-get-deps==0.2.0\npackaging==24.2\npathspec==0.12.1\nplatformdirs==4.3.7\npluggy==1.5.0\npytest==8.3.5\npython-dateutil==2.9.0.post0\nPyYAML==6.0.2\npyyaml_env_tag==0.1\nsix==1.17.0\ntomli==2.2.1\ntornado==6.4.2\nwatchdog==6.0.0\nzipp==3.21.0\n"},"environment":{"kind":"string","value":"name: mkdocs\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - pip=25.0=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - click==8.1.8\n - exceptiongroup==1.2.2\n - ghp-import==2.1.0\n - importlib-metadata==8.6.1\n - iniconfig==2.1.0\n - jinja2==3.1.6\n - livereload==2.7.1\n - markdown==3.7\n - markupsafe==3.0.2\n - mergedeep==1.3.4\n - mkdocs-bootstrap==0.2.0\n - mkdocs-bootswatch==0.5.0\n - mkdocs-get-deps==0.2.0\n - packaging==24.2\n - pathspec==0.12.1\n - platformdirs==4.3.7\n - pluggy==1.5.0\n - pytest==8.3.5\n - python-dateutil==2.9.0.post0\n - pyyaml==6.0.2\n - pyyaml-env-tag==0.1\n - six==1.17.0\n - tomli==2.2.1\n - tornado==6.4.2\n - watchdog==6.0.0\n - zipp==3.21.0\nprefix: /opt/conda/envs/mkdocs\n"},"FAIL_TO_PASS":{"kind":"list like","value":["mkdocs/tests/config/config_options_tests.py::ExtrasTest::test_talk"],"string":"[\n \"mkdocs/tests/config/config_options_tests.py::ExtrasTest::test_talk\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["mkdocs/tests/config/config_options_tests.py::OptionallyRequiredTest::test_default","mkdocs/tests/config/config_options_tests.py::OptionallyRequiredTest::test_empty","mkdocs/tests/config/config_options_tests.py::OptionallyRequiredTest::test_replace_default","mkdocs/tests/config/config_options_tests.py::OptionallyRequiredTest::test_required","mkdocs/tests/config/config_options_tests.py::OptionallyRequiredTest::test_required_no_default","mkdocs/tests/config/config_options_tests.py::TypeTest::test_length","mkdocs/tests/config/config_options_tests.py::TypeTest::test_multiple_types","mkdocs/tests/config/config_options_tests.py::TypeTest::test_single_type","mkdocs/tests/config/config_options_tests.py::URLTest::test_invalid","mkdocs/tests/config/config_options_tests.py::URLTest::test_invalid_url","mkdocs/tests/config/config_options_tests.py::URLTest::test_valid_url","mkdocs/tests/config/config_options_tests.py::RepoURLTest::test_repo_name_bitbucket","mkdocs/tests/config/config_options_tests.py::RepoURLTest::test_repo_name_custom","mkdocs/tests/config/config_options_tests.py::RepoURLTest::test_repo_name_github","mkdocs/tests/config/config_options_tests.py::DirTest::test_file","mkdocs/tests/config/config_options_tests.py::DirTest::test_incorrect_type_attribute_error","mkdocs/tests/config/config_options_tests.py::DirTest::test_incorrect_type_type_error","mkdocs/tests/config/config_options_tests.py::DirTest::test_missing_dir","mkdocs/tests/config/config_options_tests.py::DirTest::test_missing_dir_but_required","mkdocs/tests/config/config_options_tests.py::DirTest::test_valid_dir","mkdocs/tests/config/config_options_tests.py::SiteDirTest::test_doc_dir_in_site_dir","mkdocs/tests/config/config_options_tests.py::SiteDirTest::test_site_dir_in_docs_dir","mkdocs/tests/config/config_options_tests.py::ThemeTest::test_theme","mkdocs/tests/config/config_options_tests.py::ThemeTest::test_theme_invalid","mkdocs/tests/config/config_options_tests.py::ExtrasTest::test_empty","mkdocs/tests/config/config_options_tests.py::ExtrasTest::test_invalid","mkdocs/tests/config/config_options_tests.py::ExtrasTest::test_provided","mkdocs/tests/config/config_options_tests.py::PagesTest::test_invalid_config","mkdocs/tests/config/config_options_tests.py::PagesTest::test_invalid_type","mkdocs/tests/config/config_options_tests.py::PagesTest::test_provided","mkdocs/tests/config/config_options_tests.py::PagesTest::test_provided_dict","mkdocs/tests/config/config_options_tests.py::PagesTest::test_provided_empty","mkdocs/tests/config/config_options_tests.py::NumPagesTest::test_invalid_pages","mkdocs/tests/config/config_options_tests.py::NumPagesTest::test_many_pages","mkdocs/tests/config/config_options_tests.py::NumPagesTest::test_one_page","mkdocs/tests/config/config_options_tests.py::NumPagesTest::test_provided","mkdocs/tests/config/config_options_tests.py::PrivateTest::test_defined","mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_builtins","mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_builtins_config","mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_configkey","mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_duplicates","mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_invalid_config_item","mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_invalid_config_option","mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_invalid_dict_item","mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_list_dicts","mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_mixed_list","mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_none","mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_not_list","mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_simple_list"],"string":"[\n \"mkdocs/tests/config/config_options_tests.py::OptionallyRequiredTest::test_default\",\n \"mkdocs/tests/config/config_options_tests.py::OptionallyRequiredTest::test_empty\",\n \"mkdocs/tests/config/config_options_tests.py::OptionallyRequiredTest::test_replace_default\",\n \"mkdocs/tests/config/config_options_tests.py::OptionallyRequiredTest::test_required\",\n \"mkdocs/tests/config/config_options_tests.py::OptionallyRequiredTest::test_required_no_default\",\n \"mkdocs/tests/config/config_options_tests.py::TypeTest::test_length\",\n \"mkdocs/tests/config/config_options_tests.py::TypeTest::test_multiple_types\",\n \"mkdocs/tests/config/config_options_tests.py::TypeTest::test_single_type\",\n \"mkdocs/tests/config/config_options_tests.py::URLTest::test_invalid\",\n \"mkdocs/tests/config/config_options_tests.py::URLTest::test_invalid_url\",\n \"mkdocs/tests/config/config_options_tests.py::URLTest::test_valid_url\",\n \"mkdocs/tests/config/config_options_tests.py::RepoURLTest::test_repo_name_bitbucket\",\n \"mkdocs/tests/config/config_options_tests.py::RepoURLTest::test_repo_name_custom\",\n \"mkdocs/tests/config/config_options_tests.py::RepoURLTest::test_repo_name_github\",\n \"mkdocs/tests/config/config_options_tests.py::DirTest::test_file\",\n \"mkdocs/tests/config/config_options_tests.py::DirTest::test_incorrect_type_attribute_error\",\n \"mkdocs/tests/config/config_options_tests.py::DirTest::test_incorrect_type_type_error\",\n \"mkdocs/tests/config/config_options_tests.py::DirTest::test_missing_dir\",\n \"mkdocs/tests/config/config_options_tests.py::DirTest::test_missing_dir_but_required\",\n \"mkdocs/tests/config/config_options_tests.py::DirTest::test_valid_dir\",\n \"mkdocs/tests/config/config_options_tests.py::SiteDirTest::test_doc_dir_in_site_dir\",\n \"mkdocs/tests/config/config_options_tests.py::SiteDirTest::test_site_dir_in_docs_dir\",\n \"mkdocs/tests/config/config_options_tests.py::ThemeTest::test_theme\",\n \"mkdocs/tests/config/config_options_tests.py::ThemeTest::test_theme_invalid\",\n \"mkdocs/tests/config/config_options_tests.py::ExtrasTest::test_empty\",\n \"mkdocs/tests/config/config_options_tests.py::ExtrasTest::test_invalid\",\n \"mkdocs/tests/config/config_options_tests.py::ExtrasTest::test_provided\",\n \"mkdocs/tests/config/config_options_tests.py::PagesTest::test_invalid_config\",\n \"mkdocs/tests/config/config_options_tests.py::PagesTest::test_invalid_type\",\n \"mkdocs/tests/config/config_options_tests.py::PagesTest::test_provided\",\n \"mkdocs/tests/config/config_options_tests.py::PagesTest::test_provided_dict\",\n \"mkdocs/tests/config/config_options_tests.py::PagesTest::test_provided_empty\",\n \"mkdocs/tests/config/config_options_tests.py::NumPagesTest::test_invalid_pages\",\n \"mkdocs/tests/config/config_options_tests.py::NumPagesTest::test_many_pages\",\n \"mkdocs/tests/config/config_options_tests.py::NumPagesTest::test_one_page\",\n \"mkdocs/tests/config/config_options_tests.py::NumPagesTest::test_provided\",\n \"mkdocs/tests/config/config_options_tests.py::PrivateTest::test_defined\",\n \"mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_builtins\",\n \"mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_builtins_config\",\n \"mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_configkey\",\n \"mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_duplicates\",\n \"mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_invalid_config_item\",\n \"mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_invalid_config_option\",\n \"mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_invalid_dict_item\",\n \"mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_list_dicts\",\n \"mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_mixed_list\",\n \"mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_none\",\n \"mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_not_list\",\n \"mkdocs/tests/config/config_options_tests.py::MarkdownExtensionsTest::test_simple_list\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"BSD 2-Clause \"Simplified\" License"},"__index_level_0__":{"kind":"number","value":176,"string":"176"},"num_tokens_patch":{"kind":"number","value":203,"string":"203"},"before_filepaths":{"kind":"list like","value":["mkdocs/config/config_options.py"],"string":"[\n \"mkdocs/config/config_options.py\"\n]"}}},{"rowIdx":40,"cells":{"instance_id":{"kind":"string","value":"praw-dev__praw-441"},"base_commit":{"kind":"string","value":"c64e3f71841e8f0c996d42eb5dc9a91fc0c25dcb"},"created_at":{"kind":"string","value":"2015-07-02 19:21:13"},"environment_setup_commit":{"kind":"string","value":"c64e3f71841e8f0c996d42eb5dc9a91fc0c25dcb"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/praw/objects.py b/praw/objects.py\nindex 4640a73a..505438ae 100755\n--- a/praw/objects.py\n+++ b/praw/objects.py\n@@ -81,10 +81,26 @@ class RedditContentObject(object):\n raise AttributeError('\\'%s\\' has no attribute \\'%s\\'' % (type(self),\n attr))\n \n+ def __getstate__(self):\n+ \"\"\"Needed for `pickle`.\n+\n+ Without this, pickle protocol version 0 will make HTTP requests\n+ upon serialization, hence slowing it down significantly.\n+ \"\"\"\n+ return self.__dict__\n+\n def __ne__(self, other):\n \"\"\"Return whether the other instance differs from the current.\"\"\"\n return not self == other\n \n+ def __reduce_ex__(self, protocol):\n+ \"\"\"Needed for `pickle`.\n+\n+ Without this, `pickle` protocol version 2 will make HTTP requests\n+ upon serialization, hence slowing it down significantly.\n+ \"\"\"\n+ return self.__reduce__()\n+\n def __setattr__(self, name, value):\n \"\"\"Set the `name` attribute to `value.\"\"\"\n if value and name == 'subreddit':\n"},"problem_statement":{"kind":"string","value":"Pickling Comment objects is slow\nTest case:\r\n\r\n```python\r\nimport pickle, praw\r\nr = praw.Reddit('test')\r\ncomment = r.get_info(thing_id='t1_aaaa')\r\npickle.dumps(comment)\r\n```\r\n\r\nLooking at Wireshark, it seems to be caused by an HTTP request.\r\n\r\nGood news: implementing `def __getstate__(self): return self.__dict__` in `praw.objects.RedditContentObject` fixes it.\r\n\r\nBad news: I'm not sure why since `pickle` use `__dict__` by default, [as per the docs](https://docs.python.org/2/library/pickle.html#object.__getstate__).\r\n\r\nI'm not really familiar with the intricacies of `pickle`, any ideas?"},"repo":{"kind":"string","value":"praw-dev/praw"},"test_patch":{"kind":"string","value":"diff --git a/tests/cassettes/test_pickling_v0.json b/tests/cassettes/test_pickling_v0.json\nnew file mode 100644\nindex 00000000..784fdddf\n--- /dev/null\n+++ b/tests/cassettes/test_pickling_v0.json\n@@ -0,0 +1,1 @@\n+{\"recorded_with\": \"betamax/0.4.2\", \"http_interactions\": [{\"response\": {\"body\": {\"base64_string\": \"H4sIAAAAAAAAAxzLy4oDIRBA0V+RWhvQKrXU78huGEK1D3ryMrS9C/3vIbO9h/uG6xxPyOoNbdvGNiGrn1+toMou//nZWr2s+/76Upf7bFrBY9RV5gpZwRxcirzqdIIhogTXBD07omZMXyQsS6JUHZFERl99AK2gjHH7a9+fyWAMrNFYfzJ8Mni2mC1lDNraUrm45LupyXPqYWHxyZYYKLEXF52lXgSO4/gAAAD//wMAkqq30coAAAA=\", \"encoding\": \"UTF-8\"}, \"status\": {\"message\": \"OK\", \"code\": 200}, \"url\": \"https://api.reddit.com/api/login/.json\", \"headers\": {\"x-xss-protection\": [\"1; mode=block\"], \"set-cookie\": [\"__cfduid=d39c55cd52ddf9bd97d92e1bfab8520cb1435864405; expires=Fri, 01-Jul-16 19:13:25 GMT; path=/; domain=.reddit.com; HttpOnly\", \"secure_session=; Domain=reddit.com; Max-Age=-1435864406; Path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT; HttpOnly\", \"reddit_session=7302867%2C2015-07-02T12%3A13%3A26%2C11cd7c495f0d9579f6b7a591c863975a48413fca; Domain=reddit.com; Path=/; HttpOnly\"], \"server\": [\"cloudflare-nginx\"], \"date\": [\"Thu, 02 Jul 2015 19:13:26 GMT\"], \"x-content-type-options\": [\"nosniff\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"x-moose\": [\"majestic\"], \"x-ua-compatible\": [\"IE=edge\"], \"pragma\": [\"no-cache\"], \"transfer-encoding\": [\"chunked\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"cf-ray\": [\"1ffcaaf8bc5f0893-FRA\"]}}, \"request\": {\"body\": {\"encoding\": \"utf-8\", \"string\": \"user=PyAPITestUser2&api_type=json&passwd=1111\"}, \"uri\": \"https://api.reddit.com/api/login/.json\", \"method\": \"POST\", \"headers\": {\"Content-Length\": [\"45\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0.0 Python/2.7.8 Linux-3.16.0-41-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Content-Type\": [\"application/x-www-form-urlencoded\"], \"Accept\": [\"*/*\"], \"Connection\": [\"keep-alive\"], \"Accept-Encoding\": [\"gzip, deflate\"]}}, \"recorded_at\": \"2015-07-02T19:13:26\"}, {\"response\": {\"body\": {\"base64_string\": \"H4sIAFeNlVUC/+2cXW/juBWG/4qRi0WLDif8/pjFoiiKBVqgF3uxi17sFAY/x5o4tmPLySSD/e8lKdkj22nGjiXZSXPj2JIsvuQ576NDSvHXi6ti4i4+DC7+VSzKYvLp4t3gwulSx01fL66nbqQXo7T7Vgj96d5+MUZgKL2lKBDBsJHC0+ACkcFJL7hGhEKLJIM0ncmOirGb+0k8w+9f102VaKOVxdLMvXNFOSyq3WyISzbl6aBxMbkalkU59mnPr35RDv6u7ch/GGiI4K3TfP6AoKWSccWdFNByJgUTzljItVcBO8sxNyFok85n9GTi3dDcx9NNluNx3DT319NbPR7OvV5Mk9J6e266VkSGxFD9uVxL0styNJ2nfb/c/+2XfyZhvy38HFcHXPlF3FXOlz6ffzYu8oaLtHcZD4ttzabzMm37/T9x20Lf+tRQ0ONF+krVql0UMzx16Uuf4jDmI2D8oOdxWDe/UJ2v7sL6tE+JnOkYlvWIN/u3sNN5Gm2UzjCbzae3WwNmp5MybZ0vCj0uyrQnyTJTl95e/CN2ZrCYXvvBclLYqYux+tPHJYQuHpT/uj+nZnwM+EYfKrXDMNbFfGgXi6Ed60XqS92sm97lrq3aGo7K63Fq8Idx+aMrbgf5+J8+Xly7jxc/fCp/TNtn6c0eitKxl/ngj5P8Pp4wfcoDssrP1FidqXpWDMs4nusBG44K53Kir/oz0dc5aUs0bETSxhhV/UaUMCwgI/B9jmqz+6X/klsL06nR83XWLee5w6OynH24vLy7u3tfyXlvp9eX88stbZdx63UM8uKyCu5l2ji0yT6XDSnDZWlXcjhXtZzlLI11yoEIge18nSyvG5vS4a6ix7JYjHLnUsz++OPd4M30zzH9aNyH6eu8VHnXsa7/bVLcLP0g9fv+w+DugY+YkTdTob1lSgZivTcUGwe5olBR5QMWghBliefOK9gzEo6V2wMvqiTY5QVGZ8WLWs4bL07Ii8rCXfOizSKh9l+dcR8GxWgJvfA3DwVXJnAvkZZOEGwlwRRDITjEQZHoPsG8j2WmPw0wjhDcAzKqPNhFBjovZNRyzgcZ/y6uisHPMWHvB9NJLgktSa/KHocDKr/QnnFws/C4eOgDBzHnbhauuNIt8qC+Hsv57OZKjW6vrqDhFDNukIdaSKYFJBgxLuM1GQfOnSUMCaL1x8nHyV9+jrEe/Jry+l2DDXXWSfWICbpAxLP70AREhYj84Vu3OibIt9TZIAjEcU7AHxm8vQjiJ+/vortmMRz6/XT+6bLprr8W7ic8v6O35kG5e4GpDRA7wr0yxEMkkDMkCIWcMDxAQUNELM8m3wELxFLRWuUbWDoCC3/pYLGf/efZPJ4Cca0QMyTW89SpAKWkmmJOlPdWRGNygpjGSPknwNJb0fFs8edAlCpndony7GWPXolydqshr40ouYtdE6XZv5aAsp4IeITIA1oyPGXWECa1EopKmuaVGiGHjEcExQs/DNCoOBVA6jQQOUJwH5TIebBLCSxfAiVqlW+U6IQSq1LgJVFij1sOT1QWdV5BpHazv1U27CHz9DXEKv7bdEAEs93xOTc6CFGrPB86JA+sV0gdZZQFDVIHAaXxxTDEAWbMMeehcCYvtT2fGehesy89M4PHTmXU9cCMdf96YMYGJbovHfZQ1LX715Fsuh9LxqK18DPdf8CqZg5uY1VzuPJLsktySzJL0yuPLntGvZTzWu95cgBRgyxhBlgNHaDKIqA4MYAQaCHTTmAljuUAu/7cOwdoedUHB3Kq4sVdvn90LAg2p/3QW+09CUBKZgElOEaGYgIU1hRRK4njudUeuXC4wO4xUQd6FxP8uVOIgzARc7uJiZWdkpuSmZKXmlZ6AhO13vPExGstF+gsj07XmGizXNie1xuBkAkSA6phtCGDEGgRI6VDzLtguCMmE7x/ThwksQdSVLF+hBQvrKCo9Z4nKV5pQYFLm5+R7YUUdf+OJcUeZfyTixFVtlG6645WabGHzCYcTrIYsY7/Fj2ohOK5ixEH0aOtOoPSWu950iNAxBQMFiQqxsuF5sBIx4AMDFsRLxpOZ9McQY8vDyPaPz1Qhl7X9MipCh/u8sz5WHxsVvvCEWqDCAAJFSPjYwUolYHAe8uwoFALdtqHOfcR2AMmqkDvYuLZT1IcgomU201MrOyUa4xopuSlppWewMTZPVPx/1Bk1AsJXWOizSJju9ZXjFPuMAEkXmkA5UwCpWUAmGukgnLYhKyof04cJLF7UtSx3iUFe2EFRa33PEnxSgsKBIXsixSr/h1Lij3q/O9ORyglYtcdrdJiD5mnn46s4r9NDwbJI9O11unRWp2BaK33jR490mM1Q3hJ9Ni+iBuJrYeYphsPPIYG6RiawIA30gdsjSQmbACk/zpjH4mdk2IV611S4Oc+iXkiUtR6z5MUXGImJFQg/d8NoDTGWhOB0xRUhKCoItX0+NmkwIsHT7LS/kgxWaprO+mHFN/6dywp9riAf7fOQBQ+clOgVVrsIfPUdca3+G/QA8UUZ+qRZ9RapkeVEk16rFyWTJY8lizWdNjj9GjqfaNHr/RgN33Qo0rV8W1u7Fh8bK4qEq2185QAZq0H1OsYGQ4lIMojaOPkmMITPdh9gMAeMFEF+hFMdL/s2S4mznnZ87VionZu15hos8jYrvUVglRbxkCcmLtY6zMBFMMIWGWV8VYyaE/0tNZBErsnRR3rXVKIF1ZQ1HrPkxTICEsUckByqwHllAETcLwq8HiFsDpOTDU5lhRG5SWoPkkhy0mW3Qsp6v4dS4o96vynpyM52xjZdUertNhD5umnI6v4b9ODEt79TZMqJTZumtQuSyZLHksWazrsf9Jjrfc86WFZgFQ5BhiVsc4wggNNFQSKaI8QjntU/lGzY+ihru77pwcr+qBHlapmNGsDH1sPORAEOaUeQG0UoBJZoDWVQELMrWHYYnyiVc8DBPaAiSrQu5igvWAi5nYTEys7JTclMyUvNa30BCZqveeJiVdbZFQ/Yto1JtosMrZrfW4wlRoFoCWKBEfeAaO0AJoLwQ2U0NgTPa11kMQeSFH/YO0OKUgv05H2Copa73mS4rUWFFb29FD4t/4dS4o96vzvTkcowW/TkUb8t+lBOO6FHm3VGWu950kPYhhiQslYTkZwUIYJkDqEtNhtbEDeOnf0siefL3unh7nrpc7IqSo6+V0tQyzlJoLcMQcBFdYCGSgCsXA1hrF48aK5Auy/zDhAYPeYqAO9iwnUy3Qk5nYTEys7JTclMyUvNa30BCZqveeJiddaZNQLCV1jos0iY7vWhz54owgCiJtIcB4gMFYqYDQOkCMMEc6K+ufEQRJ7IEUV6x1SMNX9f7O3WVCs9J4nKV5pQSE+o+zeXkhR9+9YUuxR5393OkLYYz8J0yot9pB5+unIKv7b9MAUPTI+7dOjrTpjrbcVeuTcDqXPqb05UMaHKnurI/8LycOnWhVpAAA=\", \"encoding\": \"UTF-8\"}, \"status\": {\"message\": \"OK\", \"code\": 200}, \"url\": \"https://api.reddit.com/user/PyAPITestUser2/comments.json?t=all&sort=new\", \"headers\": {\"x-xss-protection\": [\"1; mode=block\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"content-length\": [\"2606\"], \"server\": [\"cloudflare-nginx\"], \"date\": [\"Thu, 02 Jul 2015 19:13:27 GMT\"], \"x-content-type-options\": [\"nosniff\"], \"x-ratelimit-reset\": [\"393\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"x-reddit-tracking\": [\"https://pixel.redditmedia.com/pixel/of_destiny.png?v=y3Jhs4XJ5ugsyWdG9pnDnfGKSbeEgrfxPSdmstjKjWA%2BUzeRcc2LGH9Yml8p1SiJZyKNuVriYuO2wvi26Sdq9URNAtTXSZSa\"], \"x-moose\": [\"majestic\"], \"x-ua-compatible\": [\"IE=edge\"], \"vary\": [\"accept-encoding\"], \"pragma\": [\"no-cache\"], \"x-sup-id\": [\"http://www.reddit.com/sup.json#e4356386a7\"], \"x-ratelimit-used\": [\"1\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"x-ratelimit-remaining\": [\"299\"], \"cf-ray\": [\"1ffcaafdccd60893-FRA\"]}}, \"request\": {\"body\": {\"encoding\": \"utf-8\", \"string\": \"\"}, \"uri\": \"https://api.reddit.com/user/PyAPITestUser2/comments.json?t=all&sort=new\", \"method\": \"GET\", \"headers\": {\"Cookie\": [\"__cfduid=d39c55cd52ddf9bd97d92e1bfab8520cb1435864405; reddit_session=7302867%2C2015-07-02T12%3A13%3A26%2C11cd7c495f0d9579f6b7a591c863975a48413fca\"], \"Connection\": [\"keep-alive\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0.0 Python/2.7.8 Linux-3.16.0-41-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Accept\": [\"*/*\"], \"Accept-Encoding\": [\"gzip, deflate\"]}}, \"recorded_at\": \"2015-07-02T19:13:27\"}]}\n\\ No newline at end of file\ndiff --git a/tests/cassettes/test_pickling_v1.json b/tests/cassettes/test_pickling_v1.json\nnew file mode 100644\nindex 00000000..2b78d924\n--- /dev/null\n+++ b/tests/cassettes/test_pickling_v1.json\n@@ -0,0 +1,1 @@\n+{\"recorded_with\": \"betamax/0.4.2\", \"http_interactions\": [{\"response\": {\"body\": {\"base64_string\": \"H4sIAAAAAAAAAxzLSW7DMAxA0asIXCsASYmazpFdURSyhtptEhWWVw189yLd/of/hK85HpDUE9q+j31CUm/vWkHNR/7Pj9bqx3ocPy/q+TabVnAfdc1zhaRg3rft1vDXfrpeqVcWH4SWUthxjjFybmhKw+ZNXshFLKAVlDG+t/b6vUEOzmtGkgv6C/KVOJFJHDVTFYk2SJfgoqm9CKJdfCfLjrAGQhRrBc7z/AMAAP//AwBlfaprygAAAA==\", \"encoding\": \"UTF-8\"}, \"status\": {\"message\": \"OK\", \"code\": 200}, \"url\": \"https://api.reddit.com/api/login/.json\", \"headers\": {\"x-xss-protection\": [\"1; mode=block\"], \"set-cookie\": [\"__cfduid=dea6ea5a6ed306c9a2fbe4aea3094d7ad1435864409; expires=Fri, 01-Jul-16 19:13:29 GMT; path=/; domain=.reddit.com; HttpOnly\", \"secure_session=; Domain=reddit.com; Max-Age=-1435864409; Path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT; HttpOnly\", \"reddit_session=7302867%2C2015-07-02T12%3A13%3A29%2C21d559485f58693dfc5004b7f142610d81005445; Domain=reddit.com; Path=/; HttpOnly\"], \"server\": [\"cloudflare-nginx\"], \"date\": [\"Thu, 02 Jul 2015 19:13:29 GMT\"], \"x-content-type-options\": [\"nosniff\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"x-moose\": [\"majestic\"], \"x-ua-compatible\": [\"IE=edge\"], \"pragma\": [\"no-cache\"], \"transfer-encoding\": [\"chunked\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"cf-ray\": [\"1ffcab0cfb8008b1-FRA\"]}}, \"request\": {\"body\": {\"encoding\": \"utf-8\", \"string\": \"user=PyAPITestUser2&api_type=json&passwd=1111\"}, \"uri\": \"https://api.reddit.com/api/login/.json\", \"method\": \"POST\", \"headers\": {\"Content-Length\": [\"45\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0.0 Python/2.7.8 Linux-3.16.0-41-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Content-Type\": [\"application/x-www-form-urlencoded\"], \"Accept\": [\"*/*\"], \"Connection\": [\"keep-alive\"], \"Accept-Encoding\": [\"gzip, deflate\"]}}, \"recorded_at\": \"2015-07-02T19:13:29\"}, {\"response\": {\"body\": {\"base64_string\": \"H4sIAFqNlVUC/+2cy27jyBWGX0XwYpAgXe26X3owCIJggATIYhYzyGIcCHVtsS1LskTZbTfm3VNVpGRactySRVKy443bJmnWX3XO//GcEtvfzi6LiTv7NDj7V7Eoi8nnsw+DM6dLHQ99O7uaupFejNLp2WeJb9wdLqnlQmMpMGEYMW8QhlByZRkj3CIRT1sYDBMo3cmOirGb+0m8w+/f1kOV+dx6lMXSzL1zRTksqtNsiEs25emicTG5HJZFOfbpzK9+UQ7+ru3IfxpoiOCN03x+j6ClknHFnRTQciYFE85YyLVXATvLMTchaJPuZ/Rk4t3Q3MXbTZbjcTw091fTGz0ezr1eTJPS+ngeulZEhsRQ/aVcS9LLcjSdp3O/3P3tl38mYb8t/BxXF1z6RTxVzpc+3382LvKBs3R2GS+LY82m8zId+/0/8dhC3/g0UNDjRfqValS7KGZ46tIvfY7LmK+A8Qc9j8v6+Beq+9VTWN/2OZEzHcOyXvHm/BZ2Ok+rjdIdZrP59GZjwex0Uqaj80Whx0WZziRZZurSt2f/iJMZLKZXfrCcFHbqYqz+dLGE0MWL8r/uz2kYHwP+aA6V2mEY62I+tIvF0I71Is2lHtZNb/PUVmMNR+XVOA34w7j80RU3g3z9TxdnV+7i7IfP5Y/p+Cx9s4OidO15vvhikr+PN0w/5QVZ5WcarM5UPSuGZVzP9YINR4VzOdFX85noq5y0JRo2ImljjKp5IxodJCAj8GOOanP6pf+aRwvTqdHzddYt53nCo7KcfTo/v729/VjJ+WinV+fz8w1t5/HoVQzy4rwK7nk6OLTJPucNKcNlaVdyOFe1nOUsrXXKgQiBzXydLK8ah9LlrqLHsliM8uRSzP7448Pg3fQvMf1o3Ifp67xU+dShrv9tUlwv/SDN++7T4Paej5iR11OhvWVKBmK9NxQbB7miUFHlAxaCEGWJ584r2DMSDpXbAy+qJNjmBUYnxYtazjsvjsiLysJd86LNIqH2X51xnwbFaAm98Nf3BVcmcC+Rlk4QbCXBFEMhOMRBkeg+wbznGvnjAOMAwT0go8qDbWSg00JGLed0kPHv4rIY/BwT9m4wneSS0JL0VdnDcEDlV9ozDq4XHhf3feAg5tz1whWXukUe1M9jOZ9dX6rRzeUlNJxixg3yUAvJtIAkdp1cxmcyDpw7SxgSROuLycXkLz/HWA9+TXn9ocGGOuukesIEXSDixXNoAqJCRP7hYVodE+QhdR4RBOLYE/AnFm8ngvjJx9vorlkMh/44nX8+b7rrr4X7Cc9v6Y25V+5OYGoDxI5wrwzxEAnkDAlCIScMD1DQEBHLq42FTbBALBWtVb6DpSOw8NcOFvvFf5nN4y0Q1woxQ2I9T50KUEqqKeZEeW9FNCYniGmMlH8GLL0VHS8WfwpEqXJmmygv3vbolSgntxvy1oiSp9g1UZrzawko60bAI0Tu0ZLhKbOGMKmVUFTS1FdqhBwyHhEUH/wwQKNiK4DUcSBygOA+KJHzYJsSWL4GStQq3ynRCSVWpcBrosQOHzk8U1nUeQWR2s7+Vtmwg8zj1xCr+G/SARHMttfn1OggRK3ydOiQPLDeIXWUURY0SBMElMYvhiEOMGOOOQ+FM3mr7eXMQHeafe2ZGTxOKqOuB2as59cDMx5RovvSYQdFXbt/Hcmm+7FkLFoLv9D9e+xq5uA2djWHK78kuyS3JLM0vfLktmfUSzmv9Z4mBxA1yBJmgNXQAaosAooTAwiBFjLtBFbiUA6wqy+9c4CWl31wIKcqXtzmz48OBcHjth96q70nAUjJLKAEx8hQTIDCmiJqJXE8j9ojF/YX2D0m6kBvY4K/tIXYCxMxt5uYWNkpuSmZKXmpaaVnMFHrPU1MvNVygc7y6nSNiTbLhc2+3giETJAYUA2jDRmEQIsYKR1i3gXDHTGZ4P1zYi+JPZCiivUTpHhlBUWt9zRJ8UYLClza/I5sL6So53coKXYo45/djKiyjdJtd7RKix1kNuFwlM2Idfw36EElFC/djNiLHm3VGZTWek+THgEipmCwIFExPi40B0Y6BmRg2Ir40HA6m+YAeny9H9H+6YEy9LqmR05VeH+bO+dD8fG42heOUBtEAEioGBkfK0CpDATeW4YFhVqw477MuYvAHjBRBXobEy9+k2IfTKTcbmJiZadcY0QzJS81rfQMJk7unYr/hyKj3kjoGhNtFhmbtb5inHKHCSDxSQMoZxIoLQPAXCMVlMMmZEX9c2Ivid2Too71NinYKysoar2nSYo3WlAgKGRfpFjN71BS7FDnf7cdoZSIbXe0SosdZB6/HVnFf5MeDJIn2rXW6dFanYForfedHj3SY9UhvCZ6bD7EjcTWQ0zTBw88hgbpGJrAgDfSB2yNJCY8Akj/dcYuEjsnxSrW26TAL30T80ikqPWeJim4xExIqED6fzeA0hhrTQROLagIQVFFqvb4xaTAi3tPstL+SDFZqis76YcUD/M7lBQ7PMC/W2cgCp/4UKBVWuwg89h1xkP8H9EDxRRn6ol31FqmR5USTXqsXJZMljyWLNZ02NP0aOp9p0ev9GDXfdCjStXxTR7sUHw83lUkWmvnKQHMWg+o1zEyHEpAlEfQxuaYwiO92L2HwB4wUQX6CUx0v+3ZLiZOedvzrWKidm7XmGizyNis9RWCVFvGQGzMXaz1mQCKYQSsssp4Kxm0R3pbay+J3ZOijvU2KcQrKyhqvadJCmSEJQo5ILnVgHLKgAk4PhV4fEJYHRtTTQ4lhVF5C6pPUshykmX3Qop6foeSYoc6//l2JGcbI9vuaJUWO8g8fjuyiv8mPSjh3X9oUqXEow9NapclkyWPJYs1HfY/6bHWe5r0sCxAqhwDjMpYZxjBgaYKAkW0RwjHMyr/UbND6KEu7/qnByv6oEeVqmY0awMfGy85EAQ5pR5AbRSgElmgNZVAQsytYdhifKRdzz0E9oCJKtDbmKC9YCLmdhMTKzslNyUzJS81rfQMJmq9p4mJN1tkwPyJRdeYaLPI2Kz1ucFUahSAligSHHkHjNICaC4EN1BCY4/0ttZeEnsgRRXrbVKQXtqR9gqKWu9pkuKtFhRW9vRS+MP8DiXFDnX+d9sRSvB7O9KI/yY9CMe90KOtOmOt9zTpQQxDTCgZy8kIDsowAVKHkDa7jQ3IW+cO3vbk82Xv9DC3vdQZOVVFJ39XyxBLuYkgd8xBQIW1QAaKQCxcjWEsPrxorgD7LzP2ENg9JupAb2MC9dKOxNxuYmJlp+SmZKbkpaaVnsFErfc0MfFWi4x6I6FrTLRZZGzW+tAHbxRBAHETCc4DBMZKBYzGAXKEIcJZUf+c2EtiD6SoYr1FCqa6/9/sbRYUK72nSYo3WlCILyi7txdS1PM7lBQ71PnfbUcIe+pPwrRKix1kHr8dWcV/kx6YoifWp316tFVnrPW2Qo+c26H0ObUfL5Txocre6sr/Atr8huMVaQAA\", \"encoding\": \"UTF-8\"}, \"status\": {\"message\": \"OK\", \"code\": 200}, \"url\": \"https://api.reddit.com/user/PyAPITestUser2/comments.json?t=all&sort=new\", \"headers\": {\"x-xss-protection\": [\"1; mode=block\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"content-length\": [\"2607\"], \"server\": [\"cloudflare-nginx\"], \"date\": [\"Thu, 02 Jul 2015 19:13:30 GMT\"], \"x-content-type-options\": [\"nosniff\"], \"x-ratelimit-reset\": [\"390\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"x-reddit-tracking\": [\"https://pixel.redditmedia.com/pixel/of_destiny.png?v=9MZApNR3IAPjbhJiKbVbvujo6sivs6GURrLX9KX%2FCvGsONQwEOkhfoAl3ER7yTY2748o3j55GADAHujR7EOrq7oEdFe%2FFsY9\"], \"x-moose\": [\"majestic\"], \"x-ua-compatible\": [\"IE=edge\"], \"vary\": [\"accept-encoding\"], \"pragma\": [\"no-cache\"], \"x-sup-id\": [\"http://www.reddit.com/sup.json#e4356386a7\"], \"x-ratelimit-used\": [\"2\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"x-ratelimit-remaining\": [\"298\"], \"cf-ray\": [\"1ffcab124bf608b1-FRA\"]}}, \"request\": {\"body\": {\"encoding\": \"utf-8\", \"string\": \"\"}, \"uri\": \"https://api.reddit.com/user/PyAPITestUser2/comments.json?t=all&sort=new\", \"method\": \"GET\", \"headers\": {\"Cookie\": [\"__cfduid=dea6ea5a6ed306c9a2fbe4aea3094d7ad1435864409; reddit_session=7302867%2C2015-07-02T12%3A13%3A29%2C21d559485f58693dfc5004b7f142610d81005445\"], \"Connection\": [\"keep-alive\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0.0 Python/2.7.8 Linux-3.16.0-41-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Accept\": [\"*/*\"], \"Accept-Encoding\": [\"gzip, deflate\"]}}, \"recorded_at\": \"2015-07-02T19:13:30\"}]}\n\\ No newline at end of file\ndiff --git a/tests/cassettes/test_pickling_v2.json b/tests/cassettes/test_pickling_v2.json\nnew file mode 100644\nindex 00000000..3a4f3110\n--- /dev/null\n+++ b/tests/cassettes/test_pickling_v2.json\n@@ -0,0 +1,1 @@\n+{\"recorded_with\": \"betamax/0.4.2\", \"http_interactions\": [{\"response\": {\"body\": {\"base64_string\": \"H4sIAAAAAAAAAxzLy2rEMAxA0V8xWnvAkuL48R3dlVJkWyHz9OBkMwz59zLd3sN9w2XrD8jmDTpGHxtk8/1jDTTZ5T8/VNvvuu/PDy1y29QauPe2yrZCNvB6Tc9RxjpuhThh1EQ6YcEkpRL5ElRRQ5uLF6FSp+bBGqi9X8/6+QM7inOw5NCfXDg5+kLKyJnJcuJCsixLQsZJWqzOFU01xsTE4sIslZuPcBzHHwAAAP//AwAKbaoxygAAAA==\", \"encoding\": \"UTF-8\"}, \"status\": {\"message\": \"OK\", \"code\": 200}, \"url\": \"https://api.reddit.com/api/login/.json\", \"headers\": {\"x-xss-protection\": [\"1; mode=block\"], \"set-cookie\": [\"__cfduid=d49ca6cca210c0b0c94548e0d7457f5e81435864411; expires=Fri, 01-Jul-16 19:13:31 GMT; path=/; domain=.reddit.com; HttpOnly\", \"secure_session=; Domain=reddit.com; Max-Age=-1435864412; Path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT; HttpOnly\", \"reddit_session=7302867%2C2015-07-02T12%3A13%3A32%2C393b2afff91314ad8c00be9c889323a076ac3d58; Domain=reddit.com; Path=/; HttpOnly\"], \"server\": [\"cloudflare-nginx\"], \"date\": [\"Thu, 02 Jul 2015 19:13:32 GMT\"], \"x-content-type-options\": [\"nosniff\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"x-moose\": [\"majestic\"], \"x-ua-compatible\": [\"IE=edge\"], \"pragma\": [\"no-cache\"], \"transfer-encoding\": [\"chunked\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"cf-ray\": [\"1ffcab1d4ce40467-FRA\"]}}, \"request\": {\"body\": {\"encoding\": \"utf-8\", \"string\": \"user=PyAPITestUser2&api_type=json&passwd=1111\"}, \"uri\": \"https://api.reddit.com/api/login/.json\", \"method\": \"POST\", \"headers\": {\"Content-Length\": [\"45\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0.0 Python/2.7.8 Linux-3.16.0-41-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Content-Type\": [\"application/x-www-form-urlencoded\"], \"Accept\": [\"*/*\"], \"Connection\": [\"keep-alive\"], \"Accept-Encoding\": [\"gzip, deflate\"]}}, \"recorded_at\": \"2015-07-02T19:13:32\"}, {\"response\": {\"body\": {\"base64_string\": \"H4sIAF2NlVUC/+2cW2/juBmG/4qRi0WLDic8H2axKIpigRboxV7sohc7hcHjWBPHdiw5mWSw/70kJXtkO83YsSw7aW5ykBTxJb/vffSRYvz14qqYuIsPg4t/FWVVTD5dvBtcOF3peOjrxfXUjXQ5SqevvpTVLUPlohJYOyMcQwZrLoRBKmiDscJeUuo0kp4z5LhId7KjYuzmfhLv8PvXVVMVWmulXJi5d66ohkV9mg1xxaY8XTQuJlfDqqjGPp351ZfV4O/ajvyHgYYI3jrN5w8IWioZV9xJAS1nUjDhjIVcexWwsxxzE6LGdD+jJxPvhuY+3m6yGI/jobm/nt7q8XDudTlNSpvjuelGERkSQ/XnaiVJL6rRdJ7O/XL/t1/+mYT9Vvo5ri+48mU8Vc0XPt9/Ni7ygYt0dhEvi23NpvMqHfv9P/FYqW99aijocZn+pG7VlsUMT136o09xGPMVMP6i53FY1/+gvl/ThdVtnxI50zEsqxFv96+003kabZTuMJvNp7cbA2ankyodnZeFHhdVOpNkmalLP178I3ZmUE6v/WAxKezUxVj96eMCQhcvyt/dn1MzPgZ8rQ+12mEY62I+tGU5tGNdpr40zbrpXe7asq3hqLoepwZ/GFc/uuJ2kK//6ePFtft48cOn6sd0fJZ+2EFRuvYyX/xxkn+ON0y/5QFZ5mdqrMlUPSuGVRzP1YANR4VzOdGX/Zno65y0FRq2ImljjOp+I0oYFpAR+D5Htd39yn/JrYXp1Oj5KusW89zhUVXNPlxe3t3dva/lvLfT68v55Ya2y3j0Oga5vKyDe5kODm2yz2VLynBR2aUczlUjZzFLY51yIEJgM18ni+vWoXS5q+mxKMpR7lyK2R9/vBu8mf45ph+N+zB9k5cqnzrU9b9NipuFH6R+338Y3D3wETPyZiq0t0zJQKz3hmLjIFcUKqp8wEIQoizx3HkFe0bCoXJ74EWdBNu8wOiseNHIeePFCXlRW/jYvOiySGj812Tch0ExWkAv/M1DwZUJ3EukpRMEW0kwxVAIDnFQJLpPMO+5Rv40wDhAcA/IqPNgGxnovJDRyDkfZPy7uCoGP8eEvR9MJ7kktCR9VfYwHFD5hfaMg5vS4+KhDxzEnLspXXGlO+RB8zyW89nNlRrdXl1Bwylm3CAPtZBMC0gwYlzGZzIOnDtLGBJE64+Tj5O//BxjPfg15fW7FhuarJPqERMcAxHP7kMbEDUi8i/funVkgnxLnTWCQBznBPyRwduJIH7y/i66axbDod9P558u2+76a+F+wvM7emselLsXmNoAsSPcK0M8RAI5Q4JQyAnDAxQ0RMTybPItsEAsFW1UvoHlSGDhLx0s9rP/PJvHWyCuFWKGxHqeOhWglFRTzIny3opoTE4Q0xgp/wRYeis6ni3+HIhS58w2UZ697NErUc5uNeS1ESV38dhEafevI6CsJgIeIfKAFgxPmTWESa2EopKmeaVGyCHjEUHxwQ8DNCpOBZA6DUQOENwHJXIebFMCy5dAiUblGyWOQollKfCSKLHDK4cnKosmryBS29nfKRt2kHn6GmIZ/006IILZ9vicGx2EaFSeDx2SB1YrpI4yyoIGqYOA0vjFMMQBZswx56FwJi+1PZ8Z6F6zLz0zg8dOZdT1wIxV/3pgxholjl867KDo2O5fRbLtfiwZi9bCz3T/HquaObitVc3h0i/JLsktySxtrzy67Bn1Us4bvefJAUQNsoQZYDV0gCqLgOLEAEKghUw7gVXe0XEIB9j15945QKurPjiQUxWXd/n90aEgWJ/2Q2+19yQAKZkFlOAYGYoJUFhTRK0kjudWe+TC/gKPj4km0NuY4M+dQuyFiZjbbUws7ZTclMyUvNS20hOYaPSeJyZea7lAZ3l0jo2JLsuFzXm9EQiZIDGgGkYbMgiBFjFSOsS8C4Y7YjLB++fEXhJ7IEUd60dI8cIKikbveZLilRYUuLJ5j2wvpGj6dygpdijjn1yMqLON0m13dEqLHWS24XCSxYhV/DfoQSUUz12M2IseXdUZlDZ6z5MeASKmYLAgUTE+LjQHRjoGZGDYivjQcDqb5gB6fHkY0f7pgTL0jk2PnKrw4S7PnA/Fx3q1LxyhNogAkFAxMj5WgFIZCLy3DAsKtWCn3cy5i8AeMFEHehsTz95JsQ8mUm63MbG0U64xopmSl9pWegITZ7en4v+hyGgWEo6NiS6LjM1aXzFOucMEkPikAZQzCZSWAWCukQrKYROyov45sZfE45OiifU2KdgLKygavedJildaUCAoZF+kWPbvUFLsUOd/dzpCKRHb7uiUFjvIPP10ZBn/TXowSB6ZrnVOj87qDEQbvW/06JEeyxnCS6LH5kPcSGw9xDS9eOAxNEjH0AQGvJE+YGskMWENIP3XGbtIPDoplrHeJgV+7k7ME5Gi0XuepOASMyGhAun/bgClMdaaCJymoCIERRWpp8fPJgUuHzzJSvsjxWShru2kH1J869+hpNjhAf7dOgNR+MhLgU5psYPMU9cZ3+K/Rg8UU5ypR/aodUyPOiXa9Fi6LJkseSxZrO2wx+nR1vtGj17pwW76oEedquPb3Nih+FhfVSRaa+cpAcxaD6jXMTIcSkCUR9DGyTGFJ9rYvYfAHjBRB/oRTBx/2bNbTJzzsudrxUTj3GNjossiY7PWVwhSbRkDcWLuYq3PBFAMI2CVVcZbyaA90W6tvSQenxRNrLdJIV5YQdHoPU9SICMsUcgBya0GlFMGTMDxqcDjE8LqODHV5FBSGJWXoPokhawmWXYvpGj6dygpdqjzn56O5GxjZNsdndJiB5mnn44s479JD0r48V+a1Cmx9tKkcVkyWfJYsljbYf+THiu950kPywKkyjHAqIx1hhEcaKogUER7hHA8o/KHmh1CD3V13z89WNEHPepUNaNZF/jY2ORAEOSUegC1UYBKZIHWVAIJMbeGYYvxiVY99xDYAybqQG9jgvaCiZjbbUws7ZTclMyUvNS20hOYaPSeJyZebZEB8xuLY2OiyyJjs9bnBlOpUQBaokhw5B0wSguQPrmVGyihsSfarbWXxB5IUcd6mxSkl+lIdwVFo/c8SfFaCwore9oU/q1/h5Jihzr/u9MRSvDbdKQV/016EI57oUdXdcZK73nSgxiGmFAylpMRHJRhAqQOIS12GxuQt84dvOzJ54ve6WHueqkzcqqKo3yuliGWchNB7piDgAprgQwUgVi4GsNYfHjRXAH2X2bsIfD4mGgCvY0J1Mt0JOZ2GxNLOyU3JTMlL7Wt9AQmGr3niYnXWmQ0CwnHxkSXRcZmrQ998EYRBBA3keA8QGCsVMBoHCBHGCKcFfXPib0k9kCKOtZbpGDq+P/N3mVBsdR7nqR4pQWF+Iyye3shRdO/Q0mxQ53/3ekIYY99JEyntNhB5umnI8v4b9IDU/TI+HRPj67qjJXeTuiRcztUPqf2+kAZH+rsra/8L3S6MKwVaQAA\", \"encoding\": \"UTF-8\"}, \"status\": {\"message\": \"OK\", \"code\": 200}, \"url\": \"https://api.reddit.com/user/PyAPITestUser2/comments.json?t=all&sort=new\", \"headers\": {\"x-xss-protection\": [\"1; mode=block\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"content-length\": [\"2607\"], \"server\": [\"cloudflare-nginx\"], \"date\": [\"Thu, 02 Jul 2015 19:13:33 GMT\"], \"x-content-type-options\": [\"nosniff\"], \"x-ratelimit-reset\": [\"387\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"x-reddit-tracking\": [\"https://pixel.redditmedia.com/pixel/of_destiny.png?v=NI%2FS0Vy8geEeJ%2BBL7Qy5J2Q26m47mKxDD5uB2y%2B851CRfxV7GGUC7FAOqmbXqrgmuzZ%2BjeU5o6AO95wvK098lEadH8PZql7p\"], \"x-moose\": [\"majestic\"], \"x-ua-compatible\": [\"IE=edge\"], \"vary\": [\"accept-encoding\"], \"pragma\": [\"no-cache\"], \"x-sup-id\": [\"http://www.reddit.com/sup.json#e4356386a7\"], \"x-ratelimit-used\": [\"3\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"x-ratelimit-remaining\": [\"297\"], \"cf-ray\": [\"1ffcab26cdfa0467-FRA\"]}}, \"request\": {\"body\": {\"encoding\": \"utf-8\", \"string\": \"\"}, \"uri\": \"https://api.reddit.com/user/PyAPITestUser2/comments.json?t=all&sort=new\", \"method\": \"GET\", \"headers\": {\"Cookie\": [\"__cfduid=d49ca6cca210c0b0c94548e0d7457f5e81435864411; reddit_session=7302867%2C2015-07-02T12%3A13%3A32%2C393b2afff91314ad8c00be9c889323a076ac3d58\"], \"Connection\": [\"keep-alive\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0.0 Python/2.7.8 Linux-3.16.0-41-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Accept\": [\"*/*\"], \"Accept-Encoding\": [\"gzip, deflate\"]}}, \"recorded_at\": \"2015-07-02T19:13:33\"}]}\n\\ No newline at end of file\ndiff --git a/tests/cassettes/test_unpickle_comment.json b/tests/cassettes/test_unpickle_comment.json\ndeleted file mode 100644\nindex ce5e4d79..00000000\n--- a/tests/cassettes/test_unpickle_comment.json\n+++ /dev/null\n@@ -1,1 +0,0 @@\n-{\"recorded_with\": \"betamax/0.4.2\", \"http_interactions\": [{\"recorded_at\": \"2015-06-15T13:50:36\", \"response\": {\"status\": {\"code\": 200, \"message\": \"OK\"}, \"headers\": {\"transfer-encoding\": [\"chunked\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"server\": [\"cloudflare-nginx\"], \"set-cookie\": [\"__cfduid=d28895e21c18fe156bbe302205f9b22ac1434376236; expires=Tue, 14-Jun-16 13:50:36 GMT; path=/; domain=.reddit.com; HttpOnly\", \"secure_session=; Domain=reddit.com; Max-Age=-1434376237; Path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT; HttpOnly\", \"reddit_session=7302867%2C2015-06-15T06%3A50%3A37%2Cc0e114b1f45a1bc763984b34c83d31df49a92fed; Domain=reddit.com; Path=/; HttpOnly\"], \"x-moose\": [\"majestic\"], \"x-xss-protection\": [\"1; mode=block\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"pragma\": [\"no-cache\"], \"x-ua-compatible\": [\"IE=edge\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"cf-ray\": [\"1f6ebeb510a504a3-CDG\"], \"date\": [\"Mon, 15 Jun 2015 13:50:37 GMT\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"x-content-type-options\": [\"nosniff\"]}, \"body\": {\"encoding\": \"UTF-8\", \"base64_string\": \"H4sIAAAAAAAAAxzLTWrDMBBA4auIWSug0c+MpXNkV0oZWaM6TRMV26GL4LuXdPs+3hO+tnGHYp6g6zrWDYp5e7cGmuzyn++q7WPZ958Xdfne1Bq4jbbItkAxcPt8CD+uv3zBPElGVidEnZPXWmtLVSmRsnOkVTwqR7AG5jGuF339HJyfiK13mE6OTpjOjkpyJbCdnSLGij0mwTozhTzFGuI8hRaw9Zgl+64NjuP4AwAA//8DABH3aj7KAAAA\"}, \"url\": \"https://api.reddit.com/api/login/.json\"}, \"request\": {\"headers\": {\"Accept-Encoding\": [\"gzip, deflate\"], \"Connection\": [\"keep-alive\"], \"Accept\": [\"*/*\"], \"Content-Length\": [\"45\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0a1 Python/2.7.8 Linux-3.16.0-37-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Content-Type\": [\"application/x-www-form-urlencoded\"]}, \"body\": {\"encoding\": \"utf-8\", \"string\": \"passwd=1111&api_type=json&user=PyAPITestUser2\"}, \"uri\": \"https://api.reddit.com/api/login/.json\", \"method\": \"POST\"}}, {\"recorded_at\": \"2015-06-15T13:50:37\", \"response\": {\"status\": {\"code\": 200, \"message\": \"OK\"}, \"headers\": {\"x-ratelimit-remaining\": [\"299\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"content-length\": [\"2574\"], \"server\": [\"cloudflare-nginx\"], \"x-content-type-options\": [\"nosniff\"], \"x-moose\": [\"majestic\"], \"x-ratelimit-used\": [\"1\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"x-sup-id\": [\"http://www.reddit.com/sup.json#e4356386a7\"], \"x-xss-protection\": [\"1; mode=block\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"pragma\": [\"no-cache\"], \"x-ua-compatible\": [\"IE=edge\"], \"x-reddit-tracking\": [\"https://pixel.redditmedia.com/pixel/of_destiny.png?v=HcLLGdCwZSCTj%2BYMBgG8Ln0%2FKHA5a%2FIoJVNJ%2Fv%2FXrv6TSUaosRpQ67%2Fyfcg6Z7i5Diz8FZevtuCHzUmagS6TUQ7G47Go4bcv\"], \"cf-ray\": [\"1f6ebeb9f0cd04a3-CDG\"], \"date\": [\"Mon, 15 Jun 2015 13:50:37 GMT\"], \"x-ratelimit-reset\": [\"563\"], \"vary\": [\"accept-encoding\"]}, \"body\": {\"encoding\": \"UTF-8\", \"base64_string\": \"H4sIAC3YflUC/+2cW2/bRhqG/4rgi6KLzcRzPqQoFotFgV1gL3rRYi/qhTAnRox1ikT5FPS/d2ZIKpTkOpJFUrLrG8cmafKd+b734Ts0oy8X1/nUXXwYXPw3Xxb59OPFu8GF04UOm75cTGZupJejuNsvVlO4yPESeWSVdAR7yz3VAmVQQwup4BZxCWVmtDeCIB7PZEf52C38NJzhty/rSxVo4yrLlVl45/JimJe72RAXbJZOMM6n18MiL8Y+7vlffp0PfpoWi/vBbDq4WkFoSfyqbDzW6OnUu6G5D4dOV+Nx2LTwk9mNHg8XXi9nUUW1PZ22uhoZEirvaLG+nF4Vo9ki7vv5/p8//+cXvyx+XfoFLg+49suwq1isfDr/fJynDRdx7yocFq41ny2KuO23/4dtS33j44UyPV7GXymvaj8vPc4f4i99DFOUjoDhB70IU7b5C+X5qiGsT/uUyLkOU76eTTQMF3P5tY67lna2iFOJ4inm88XsZmvG7CxMb9i6WOZ6nBdxT9RlZi5+e/HrNP+88oM47vsPA7mYf75Wo5vra2g4xYwb5KEWkmkBCUYs9IOiOOPcWcKQIDpp8KHUGyMsxzLMxjpfDO1yObRjvUyTeneXOmV2mwZeCxmOisk47v5uXPzg8ptBOv7Hq4uJu7r47mPxQ9w+j98cKzee6DKd6Wqavg9Xiz+lqazbNiqpGljP82ERSrGe6uEody71fz3YqZ6kXi7rUjeBDeUtJwVRArEikKP3qSGac1P4u3i1ZhOvFmkmRkUx/3B56afvb4NH5mGK9fvZ4uNl0yP/yN2PeHFLb8yDcvcCU5tB7Aj3yhAPkUDOkEwo5IThGRQ0k07wZNVK3XBV2FqhVLRSuJrH2sSGCrjY7v7patLYFA93JWdW+XKUxhsH8/vv7wZveNjGA3/peLCf/Kf5IpwCca0QM8QST53KoJRUU8yJ8t6K4DlOENMYKX81vZr+/adQ68EvsdXfnRAWh4tvwqLERfrh63h6oEnZM7s0IfDcaVIpfKNJVzRJQ+yaJs3xtQQTO5tMwhU+DDxC5AGtGJ4xawiTWglFJeXaK42QQ8YjgsL9HGbQKOY9UqcByBGC+yBEGcx3CIHluROiUvhGiE4IUUeAl0SIf4fBDJaziR+sprmdOf9h8H0sgAsHpX/d355IFFVfQaR2O79VLuwh8/TZoa7/NhkQwWx3fs6JDEJUCs+HDLH/B//SdhRKrR1llGUaxAECSsMXwxAHmDHHnIfCGX8cL9C9ZqlFe+QFD4NKmOuBF+vx9cCLDUJ0Hxn2UNS189eVbDofS8aCtfAznH97e/u+lPI+JKHLxeWWrssqHy0vy8Jexo1DG80yrL0SrRKdEo3S9MnlYwwIWinnldbzZACiBlnCDLAaOkCVRUBxYgAh0EKmncBKHMsANvnUOwNocd0HA1Kb4uWtaQMCm8t86K32nmRASmYBJThUhmICFNYUUSuJ4+mqPTLhcIHdI6Iq9C4i+HOWDQchIvR1ExG1laKTopGij5o2egIRldbzRMRrjQl0nmana0S0GRO21/FGIGQyiQHVMFiQQQi0CJXSWei7zHBHTKJ3/4w4SGIPlChr/QglXlCQqLSeJyVeaZDAhU1/ee6FEtX4jqXEHtH9yYcPZbdRuuuMVkmxh8wmGE7y8GFd/y1yUAnFcx4+HESOtvIFpZXW8yRHBhFTMLMgEjHcJjQHRjoGZMawFeFm4XQyzBHkuHsY0f7JgRLwuiZHalP4cJtWyseiYzPhC0eozUQGkFChMj4kP6kMBN5bhgWFWjC4wY7e4sUBAntARFnoXUQ8602JQxAR+7qJiNpKKVsEI0UfNW30BCLO7p2Jv0K4qB4cdI2INsPFdr5XjFPuwrKfhLsMoJxJoLTMAOYaqUw5bLKkqH9GHCSxe0pUtd6lBHtBQaLSep6UeKVBAkEh+6JEPb5jKbFHtv/mEoRSInad0Sop9pB5+iVIXf9tcjBIHlmitUqO1vIFopXWN3L0SI56VfCSyLF98zYSWw8xjX9g4KE0SIfSZAx4I32GrZHEZBvw6D9f7COxc0rUtd6lBH7OG5YnokSl9TwpwSVmQkIFsIAhR9JQZ00EjktOkWWKKlIuh59NCbx88CQp7Y8S05Wa2Gk/lPg6vmMpsceN+5v5AlH4yMP/Vkmxh8xT54uv9d8gBwotztQj75+1SI6yHZrkqB0WDRb9Fe3VdNfj5GhqfSNHr+Rgn/sgR9mm45t0sWPRsfkEkWitnacEMGs9oF6HynAoAVEeQRsWxBSe6GXtAwT2gIiy0I8gottHnO0i4pwfcb5WRFSu7RoRbYaL7XyvEKTaMgbCQtyFfM8EUAwjYJVVxlvJoD3Rm1gHSeyeElWtdykhXlCQqLSeJyWQEZYo5IDkVgPKKQMmw+FuwMOdweqwENXkWEoYlR439UkJWUyT7F4oUY3vWErske2fXoKkbmNk1xmtkmIPmadfgtT13yYHJbzbP46U7bDxx5HKYdFg0V/RXk13/Sk51lrPkxyWZZAqxwCjMuQLIzjQVEGgiPYI4bBHuWPJoa7v+ycHy/sgR9mmZjRvAx1bLzEQBDmlHkBtFKASWaA1lUBCzK1h2GJ8oiecBwjsARFloXcRQTtHROjrJiJqK0UnRSNFHzVt9AQiKq3niYhXGy5g+stE14hoM1xs53tuMJUaZUBLFOiNvANGaQE0F4IbKKGxJ3oT6yCJPVCirPUuJUjnS5D2gkSl9Twp8VqDhJU9vej9dXzHUmKPbP/NJQgl+G0J0qj/NjkIx52To618sdZ6nuQghiEmlAwRMkCDMkyA1FkWH2obmyFvnTv6ESdfrHonh7ntJV+kNhWdfB6WIZZyEyDumIOACmuBzCgCIbAaw1i4cdGU/PqPFwcI7B4RVaF3EYE6X4KEvm4iorZSdFI0UvRR00ZPIKLSep6IeK3honpw0DUi2gwX2/ke+swbRRBA3AR68wwCY6UCRuMMcoQhwklR/4w4SGIPlChrvUMJprr9H+ltBola63lS4pUGCfEJJef2QolqfMdSYo9s/80lCGGPfZxLq6TYQ+bplyB1/bfJgSl6ZH7aJUdb+WKt9TzJoUmGHQ/RAmGO438k40BRG3IklJo5IS1l6XWfI8hx9zC77Z0c+bwXcsQ2LW5uJmmOjkXHZsJXFCsBRRbyHnKAYiKAMpkHmBlnEDImY6f9jO59BHaPiKrQO4ggnYeL2NdNRNRWik6KRoo+atrozxFRaz1PRLzWcNHbp2i2Fy528j0nRGhPASc4viOnGVDCGwCxDs5kmUblZzH2z4iDJPZAid1PzKyc93KCRK31PCnxOoNEuLcX6Zp9UKIe37GU2CPbf3MJEu7mfNcZrZJiD5knX4Ks679JDi4JedancB9CjpbyRUNrK+RIfZ0VPrX15iQZn5WdWx75B7y/uSWyaAAA\"}, \"url\": \"https://api.reddit.com/user/PyAPITestUser2/comments.json?sort=new&t=all\"}, \"request\": {\"headers\": {\"Connection\": [\"keep-alive\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0a1 Python/2.7.8 Linux-3.16.0-37-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Accept\": [\"*/*\"], \"Accept-Encoding\": [\"gzip, deflate\"], \"Cookie\": [\"reddit_session=7302867%2C2015-06-15T06%3A50%3A37%2Cc0e114b1f45a1bc763984b34c83d31df49a92fed; __cfduid=d28895e21c18fe156bbe302205f9b22ac1434376236\"]}, \"body\": {\"encoding\": \"utf-8\", \"string\": \"\"}, \"uri\": \"https://api.reddit.com/user/PyAPITestUser2/comments.json?sort=new&t=all\", \"method\": \"GET\"}}, {\"recorded_at\": \"2015-06-15T13:50:38\", \"response\": {\"status\": {\"code\": 200, \"message\": \"OK\"}, \"headers\": {\"x-ratelimit-remaining\": [\"298\"], \"transfer-encoding\": [\"chunked\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"x-moose\": [\"majestic\"], \"server\": [\"cloudflare-nginx\"], \"x-ratelimit-used\": [\"2\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"x-xss-protection\": [\"1; mode=block\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"pragma\": [\"no-cache\"], \"x-ua-compatible\": [\"IE=edge\"], \"x-reddit-tracking\": [\"https://pixel.redditmedia.com/pixel/of_destiny.png?v=6qsn21tVL7go5HvVpotLbf0tnpT2hujgxe4105fEz7G1t0%2BHh25pl%2FSGghZNuAZaGB%2FJKaxz67I%3D\"], \"cf-ray\": [\"1f6ebebe912c04a3-CDG\"], \"date\": [\"Mon, 15 Jun 2015 13:50:38 GMT\"], \"x-ratelimit-reset\": [\"562\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"x-content-type-options\": [\"nosniff\"]}, \"body\": {\"encoding\": \"UTF-8\", \"base64_string\": \"H4sIAAAAAAAAA1yRwW7DIBBEfwVxtqrYxgn2rcfecmjPaANLvYqBCnCUNsq/V6AkjXodzQ5vhgs/kjd8Yjx3vGHcQAY+sQufISkHtPCJWVgSNox7cFic++/X/ds7pvyRMNYrSspGwhp0d+uIkLEobSfFth02cnjZNIzPZFDZGJyK4RByerr5DItROqIxVPVid8HMkOby8LYVLq1j+Nl1BzNYsYGulwjCgu7sCOM49LtejhalMJ0WW7krcDcQtWb9gGnFHabUDOZ/1YX8UR0hujJG25WU4Bz6/BDHhvFwwqhaySeW41rOKKlS4SmIavyfozbE8xdFyBQ8n5hfl+UGcsJIltAovOHcY+sHCU1nW9f2h3BWOqw+l42u118AAAD//wMAKxRkF8UBAAA=\"}, \"url\": \"https://api.reddit.com/user/PyAPITestUser2/about/.json\"}, \"request\": {\"headers\": {\"Connection\": [\"keep-alive\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0a1 Python/2.7.8 Linux-3.16.0-37-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Accept\": [\"*/*\"], \"Accept-Encoding\": [\"gzip, deflate\"], \"Cookie\": [\"reddit_session=7302867%2C2015-06-15T06%3A50%3A37%2Cc0e114b1f45a1bc763984b34c83d31df49a92fed; __cfduid=d28895e21c18fe156bbe302205f9b22ac1434376236\"]}, \"body\": {\"encoding\": \"utf-8\", \"string\": \"\"}, \"uri\": \"https://api.reddit.com/user/PyAPITestUser2/about/.json\", \"method\": \"GET\"}}, {\"recorded_at\": \"2015-06-15T13:50:38\", \"response\": {\"status\": {\"code\": 200, \"message\": \"OK\"}, \"headers\": {\"x-ratelimit-remaining\": [\"297\"], \"content-type\": [\"application/json; charset=UTF-8\"], \"cache-control\": [\"private, no-cache\", \"no-cache\"], \"content-length\": [\"682\"], \"server\": [\"cloudflare-nginx\"], \"x-content-type-options\": [\"nosniff\"], \"x-moose\": [\"majestic\"], \"x-ratelimit-used\": [\"3\"], \"x-frame-options\": [\"SAMEORIGIN\"], \"x-xss-protection\": [\"1; mode=block\"], \"connection\": [\"keep-alive\"], \"content-encoding\": [\"gzip\"], \"pragma\": [\"no-cache\"], \"x-ua-compatible\": [\"IE=edge\"], \"x-reddit-tracking\": [\"https://pixel.redditmedia.com/pixel/of_destiny.png?v=AqxVkrSRF3bN55ymSSdkwfD%2FLdA4QMcYwodHHwNYU4Pccch5s1XTILSk9LACd6ER3FcO3MQmUDmhY5Rn5rzZjrp3D2F%2F%2BvsO\"], \"cf-ray\": [\"1f6ebec1714204a3-CDG\"], \"date\": [\"Mon, 15 Jun 2015 13:50:38 GMT\"], \"x-ratelimit-reset\": [\"562\"], \"vary\": [\"accept-encoding\"]}, \"body\": {\"encoding\": \"UTF-8\", \"base64_string\": \"H4sIAC7YflUC/61UyU7cQBD9FccHTsx4XwaUAyIimgOLICdC1OqlPNOZ9kJ3e2BA/Hu6G5sxHJCQcrHsqvKrV/Wq6tnf8Ib5R56vM//Q8xnW2Hw9+wQ3DUjE65V1WpfqSc010vCo0VrXwtibXgjj6ZWNVMj9Y8EqLBQYB3fIsc7a3CKMcbRttOSk1600fi17GzuBHzMyrjqBd6jBNVibBMZMCO64CVPahqwBsz3NtdbdURCQuV73NVHz1x9qYBzPaVsH0c/0PF5dIX41u87l7cU5e7g0hPqL5RKj/vIpOl1GJ7ebEHV0/rdbOQ6gqOSd5m0zVu0fCH38bTbzbk7R5dmZN5sdrPSxNTK+9ajASn2/82t254/2zr782CN5BS3ytHpI6D0UjEZZXpQQVqQK0yIvUhpnxYLQjMa0giTJwoyFFiZwOHeNeze5RviRy8VAxfLWXAvXtGvXA+/kaun9Mk3z0oeUb7aPOfRJRXLDglR5SnHF4qLMU8DVgkAZFSRMynBB8pDFFo62QuBOAWIgQAMzGtY1NFpN1O56IjhFk47Z/NOyxT3Uuo8SuSuyKCxTVuRltFiYSqO8jG3hizJb4CysGKQljUqXu92CjMpPE/1Hab7O8avScDP/SPEnK8+wQc402bVhrEcRh6hPOvv1gZqstODNBglMYLLTmNK2N/oiTDXfWhLRvvNa4qridCLJQHio6ncShoeeefx5TWJ5EpB2WOJ4n9edkg95x13XGXq7G1QC1u6wREkcZ1lYFNncJPB76UQPZPDhNASuiZwBwmw6ogMS6rUl/wFtOHnvlRlvVt2a+vC7i+Vcyqi0hhoQNJgIR3JwDxuCFG0lIEem5o1lY5OZFgyc9a5zFb/29k0Wpexcj07c7KYXdN/TsbiXl38Stiz/ywUAAA==\"}, \"url\": \"https://api.reddit.com/r/reddit_api_test/about/.json\"}, \"request\": {\"headers\": {\"Connection\": [\"keep-alive\"], \"User-Agent\": [\"PRAW_test_suite PRAW/3.0a1 Python/2.7.8 Linux-3.16.0-37-generic-x86_64-with-Ubuntu-14.10-utopic\"], \"Accept\": [\"*/*\"], \"Accept-Encoding\": [\"gzip, deflate\"], \"Cookie\": [\"reddit_session=7302867%2C2015-06-15T06%3A50%3A37%2Cc0e114b1f45a1bc763984b34c83d31df49a92fed; __cfduid=d28895e21c18fe156bbe302205f9b22ac1434376236\"]}, \"body\": {\"encoding\": \"utf-8\", \"string\": \"\"}, \"uri\": \"https://api.reddit.com/r/reddit_api_test/about/.json\", \"method\": \"GET\"}}]}\n\\ No newline at end of file\ndiff --git a/tests/test_comments.py b/tests/test_comments.py\nindex e3c3aa27..2253f27e 100644\n--- a/tests/test_comments.py\n+++ b/tests/test_comments.py\n@@ -2,6 +2,7 @@\n \n from __future__ import print_function, unicode_literals\n import pickle\n+import mock\n from praw import helpers\n from praw.objects import Comment, MoreComments\n from .helper import PRAWTest, betamax\n@@ -98,10 +99,24 @@ class CommentTest(PRAWTest):\n lambda item: isinstance(item, Comment))\n self.assertEqual(comment._replies, None)\n \n+ def _test_pickling(self, protocol):\n+ comment = next(self.r.user.get_comments())\n+ with mock.patch('praw.BaseReddit.request_json') as request_json_func:\n+ unpickled_comment = pickle.loads(pickle.dumps(comment, protocol))\n+ self.assertEqual(comment, unpickled_comment)\n+ self.assertEqual(request_json_func.called, 0)\n+\n @betamax()\n- def test_unpickle_comment(self):\n- item = next(self.r.user.get_comments())\n- self.assertEqual(item, pickle.loads(pickle.dumps(item)))\n+ def test_pickling_v0(self):\n+ self._test_pickling(0)\n+\n+ @betamax()\n+ def test_pickling_v1(self):\n+ self._test_pickling(1)\n+\n+ @betamax()\n+ def test_pickling_v2(self):\n+ self._test_pickling(2)\n \n \n class MoreCommentsTest(PRAWTest):\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_hyperlinks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 1\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"3.0"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"pytest\",\n \"pip_packages\": [\n \"betamax>=0.4.2\",\n \"betamax-matchers>=0.2.0\",\n \"flake8\",\n \"mock>=1.0.0\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-xdist\",\n \"pytest-mock\",\n \"pytest-asyncio\"\n ],\n \"pre_install\": null,\n \"python\": \"3.9\",\n \"reqs_path\": null,\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"betamax==0.9.0\nbetamax-matchers==0.4.0\ncertifi==2025.1.31\ncharset-normalizer==3.4.1\ncoverage==7.8.0\nexceptiongroup @ file:///croot/exceptiongroup_1706031385326/work\nexecnet==2.1.1\nflake8==7.2.0\nidna==3.10\niniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work\nmccabe==0.7.0\nmock==5.2.0\npackaging @ file:///croot/packaging_1734472117206/work\npluggy @ file:///croot/pluggy_1733169602837/work\n-e git+https://github.com/praw-dev/praw.git@c64e3f71841e8f0c996d42eb5dc9a91fc0c25dcb#egg=praw\npycodestyle==2.13.0\npyflakes==3.3.1\npytest @ file:///croot/pytest_1738938843180/work\npytest-asyncio==0.26.0\npytest-cov==6.0.0\npytest-mock==3.14.0\npytest-xdist==3.6.1\nrequests==2.32.3\nrequests-toolbelt==1.0.0\nsix==1.17.0\ntomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work\ntyping_extensions==4.13.0\nupdate-checker==0.18.0\nurllib3==2.3.0\n"},"environment":{"kind":"string","value":"name: praw\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - exceptiongroup=1.2.0=py39h06a4308_0\n - iniconfig=1.1.1=pyhd3eb1b0_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - packaging=24.2=py39h06a4308_0\n - pip=25.0=py39h06a4308_0\n - pluggy=1.5.0=py39h06a4308_0\n - pytest=8.3.4=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tomli=2.0.1=py39h06a4308_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - betamax==0.9.0\n - betamax-matchers==0.4.0\n - certifi==2025.1.31\n - charset-normalizer==3.4.1\n - coverage==7.8.0\n - execnet==2.1.1\n - flake8==7.2.0\n - idna==3.10\n - mccabe==0.7.0\n - mock==5.2.0\n - pycodestyle==2.13.0\n - pyflakes==3.3.1\n - pytest-asyncio==0.26.0\n - pytest-cov==6.0.0\n - pytest-mock==3.14.0\n - pytest-xdist==3.6.1\n - requests==2.32.3\n - requests-toolbelt==1.0.0\n - six==1.17.0\n - typing-extensions==4.13.0\n - update-checker==0.18.0\n - urllib3==2.3.0\nprefix: /opt/conda/envs/praw\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/test_comments.py::CommentTest::test_pickling_v0","tests/test_comments.py::CommentTest::test_pickling_v1","tests/test_comments.py::CommentTest::test_pickling_v2"],"string":"[\n \"tests/test_comments.py::CommentTest::test_pickling_v0\",\n \"tests/test_comments.py::CommentTest::test_pickling_v1\",\n \"tests/test_comments.py::CommentTest::test_pickling_v2\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/test_comments.py::CommentTest::test_add_comment","tests/test_comments.py::CommentTest::test_add_reply","tests/test_comments.py::CommentTest::test_edit","tests/test_comments.py::CommentTest::test_front_page_comment_replies_are_none","tests/test_comments.py::CommentTest::test_get_comments_permalink","tests/test_comments.py::CommentTest::test_inbox_comment_permalink","tests/test_comments.py::CommentTest::test_inbox_comment_replies_are_none","tests/test_comments.py::CommentTest::test_save_comment","tests/test_comments.py::CommentTest::test_spambox_comments_replies_are_none","tests/test_comments.py::CommentTest::test_unicode_comment","tests/test_comments.py::CommentTest::test_user_comment_permalink","tests/test_comments.py::CommentTest::test_user_comment_replies_are_none","tests/test_comments.py::MoreCommentsTest::test_all_comments","tests/test_comments.py::MoreCommentsTest::test_comments_method"],"string":"[\n \"tests/test_comments.py::CommentTest::test_add_comment\",\n \"tests/test_comments.py::CommentTest::test_add_reply\",\n \"tests/test_comments.py::CommentTest::test_edit\",\n \"tests/test_comments.py::CommentTest::test_front_page_comment_replies_are_none\",\n \"tests/test_comments.py::CommentTest::test_get_comments_permalink\",\n \"tests/test_comments.py::CommentTest::test_inbox_comment_permalink\",\n \"tests/test_comments.py::CommentTest::test_inbox_comment_replies_are_none\",\n \"tests/test_comments.py::CommentTest::test_save_comment\",\n \"tests/test_comments.py::CommentTest::test_spambox_comments_replies_are_none\",\n \"tests/test_comments.py::CommentTest::test_unicode_comment\",\n \"tests/test_comments.py::CommentTest::test_user_comment_permalink\",\n \"tests/test_comments.py::CommentTest::test_user_comment_replies_are_none\",\n \"tests/test_comments.py::MoreCommentsTest::test_all_comments\",\n \"tests/test_comments.py::MoreCommentsTest::test_comments_method\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"BSD 2-Clause \"Simplified\" License"},"__index_level_0__":{"kind":"number","value":180,"string":"180"},"num_tokens_patch":{"kind":"number","value":278,"string":"278"},"before_filepaths":{"kind":"list like","value":["praw/objects.py"],"string":"[\n \"praw/objects.py\"\n]"}}},{"rowIdx":41,"cells":{"instance_id":{"kind":"string","value":"mattboyer__git-guilt-34"},"base_commit":{"kind":"string","value":"58f92d3e37a115596a890ad3e2fe674636c682ee"},"created_at":{"kind":"string","value":"2015-07-02 20:15:01"},"environment_setup_commit":{"kind":"string","value":"58f92d3e37a115596a890ad3e2fe674636c682ee"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/git_guilt/guilt.py b/git_guilt/guilt.py\nindex 23a748a..3b400c5 100644\n--- a/git_guilt/guilt.py\n+++ b/git_guilt/guilt.py\n@@ -78,13 +78,14 @@ class GitRunner(object):\n raise GitError(\"Malformed Git version\")\n \n raw_version = self.run_git(GitRunner._version_args)\n- if not (raw_version and\n- 1 == len(raw_version) and\n- raw_version[0].startswith('git version')\n- ):\n- raise GitError(\"Couldn't determine Git version %s\" % raw_version)\n+ version_re = re.compile(r'^git version (\\d+.\\d+.\\d+)')\n \n- return version_string_to_tuple(raw_version[0].split()[-1])\n+ if raw_version and 1 == len(raw_version):\n+ match = version_re.match(raw_version[0])\n+ if match:\n+ return version_string_to_tuple(match.group(1))\n+\n+ raise GitError(\"Couldn't determine Git version %s\" % raw_version)\n \n def _get_git_root(self):\n # We should probably go beyond just finding the root dir for the Git\n"},"problem_statement":{"kind":"string","value":"Git version detection fails on MacOS\nHere's what a friendly user had to report:\r\n\r\n> my MACBOOK running latest 10.10.3 comes preinstalled with\r\n```\r\nLaurences-MacBook-Pro:security Laurence$ git version\r\ngit version 2.3.2 (Apple Git-55)\r\n```\r\n\r\nThe parsing code that consumes the output of `git version` should be made more robust."},"repo":{"kind":"string","value":"mattboyer/git-guilt"},"test_patch":{"kind":"string","value":"diff --git a/test/test_guilt.py b/test/test_guilt.py\nindex 1433e33..3abda65 100644\n--- a/test/test_guilt.py\n+++ b/test/test_guilt.py\n@@ -306,6 +306,27 @@ class GitRunnerTestCase(TestCase):\n )\n mock_process.reset_mock()\n \n+ @patch('git_guilt.guilt.subprocess.Popen')\n+ def test_mac_version(self, mock_process):\n+ mock_process.return_value.communicate = Mock(\n+ return_value=(b'git version 2.3.2 (Apple Git-55)', None)\n+ )\n+ mock_process.return_value.returncode = 0\n+ mock_process.return_value.wait = \\\n+ Mock(return_value=None)\n+\n+ version_tuple = self.runner._get_git_version()\n+\n+ mock_process.assert_called_once_with(\n+ ['nosuchgit', '--version'],\n+ cwd='/my/arbitrary/path',\n+ stderr=-1,\n+ stdout=-1\n+ )\n+ mock_process.reset_mock()\n+\n+ self.assertEquals((2,3,2), version_tuple)\n+\n def test_version_comparison(self):\n self.assertEquals((1, 0, 0), self.runner.version)\n \n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [],\n \"has_test_patch\": true,\n \"is_lite\": true,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 0,\n \"test_score\": 0\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"0.30"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .[dev]\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest\",\n \"pytest-cov\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.4\",\n \"reqs_path\": [\n \"requirements-3.4.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"alabaster==0.7.13\nastroid==2.11.7\nattrs==22.2.0\nBabel==2.11.0\ncertifi==2021.5.30\ncharset-normalizer==2.0.12\ncoverage==6.2\ncoveralls==3.3.1\ndill==0.3.4\ndocopt==0.6.2\ndocutils==0.18.1\n-e git+https://github.com/mattboyer/git-guilt.git@58f92d3e37a115596a890ad3e2fe674636c682ee#egg=git_guilt\nidna==3.10\nimagesize==1.4.1\nimportlib-metadata==4.8.3\niniconfig==1.1.1\nisort==5.10.1\nJinja2==3.0.3\nlazy-object-proxy==1.7.1\nMarkupSafe==2.0.1\nmccabe==0.7.0\nmock==5.2.0\nnose==1.3.7\npackaging==21.3\npep8==1.7.1\nplatformdirs==2.4.0\npluggy==1.0.0\npy==1.11.0\nPygments==2.14.0\npylint==2.13.9\npyparsing==3.1.4\npytest==7.0.1\npytest-cov==4.0.0\npytz==2025.2\nrequests==2.27.1\nsnowballstemmer==2.2.0\nSphinx==5.3.0\nsphinx-argparse==0.3.2\nsphinxcontrib-applehelp==1.0.2\nsphinxcontrib-devhelp==1.0.2\nsphinxcontrib-htmlhelp==2.0.0\nsphinxcontrib-jsmath==1.0.1\nsphinxcontrib-qthelp==1.0.3\nsphinxcontrib-serializinghtml==1.1.5\ntomli==1.2.3\ntyped-ast==1.5.5\ntyping_extensions==4.1.1\nurllib3==1.26.20\nwrapt==1.16.0\nzipp==3.6.0\n"},"environment":{"kind":"string","value":"name: git-guilt\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - certifi=2021.5.30=py36h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.3=he6710b0_2\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=1.1.1w=h7f8727e_0\n - pip=21.2.2=py36h06a4308_0\n - python=3.6.13=h12debd9_1\n - readline=8.2=h5eee18b_0\n - setuptools=58.0.4=py36h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - wheel=0.37.1=pyhd3eb1b0_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - alabaster==0.7.13\n - argparse==1.4.0\n - astroid==2.11.7\n - attrs==22.2.0\n - babel==2.11.0\n - charset-normalizer==2.0.12\n - coverage==6.2\n - coveralls==3.3.1\n - dill==0.3.4\n - docopt==0.6.2\n - docutils==0.18.1\n - idna==3.10\n - imagesize==1.4.1\n - importlib-metadata==4.8.3\n - iniconfig==1.1.1\n - isort==5.10.1\n - jinja2==3.0.3\n - lazy-object-proxy==1.7.1\n - markupsafe==2.0.1\n - mccabe==0.7.0\n - mock==5.2.0\n - nose==1.3.7\n - packaging==21.3\n - pep8==1.7.1\n - platformdirs==2.4.0\n - pluggy==1.0.0\n - py==1.11.0\n - pygments==2.14.0\n - pylint==2.13.9\n - pyparsing==3.1.4\n - pytest==7.0.1\n - pytest-cov==4.0.0\n - pytz==2025.2\n - requests==2.27.1\n - snowballstemmer==2.2.0\n - sphinx==5.3.0\n - sphinx-argparse==0.3.2\n - sphinxcontrib-applehelp==1.0.2\n - sphinxcontrib-devhelp==1.0.2\n - sphinxcontrib-htmlhelp==2.0.0\n - sphinxcontrib-jsmath==1.0.1\n - sphinxcontrib-qthelp==1.0.3\n - sphinxcontrib-serializinghtml==1.1.5\n - tomli==1.2.3\n - typed-ast==1.5.5\n - typing-extensions==4.1.1\n - urllib3==1.26.20\n - wrapt==1.16.0\n - zipp==3.6.0\nprefix: /opt/conda/envs/git-guilt\n"},"FAIL_TO_PASS":{"kind":"list like","value":["test/test_guilt.py::GitRunnerTestCase::test_mac_version"],"string":"[\n \"test/test_guilt.py::GitRunnerTestCase::test_mac_version\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["test/test_guilt.py::DeltaTestCase::test_comparison","test/test_guilt.py::DeltaTestCase::test_eq","test/test_guilt.py::DeltaTestCase::test_repr","test/test_guilt.py::BinaryDeltaTestCase::test_comparison","test/test_guilt.py::BinaryDeltaTestCase::test_eq","test/test_guilt.py::BinaryDeltaTestCase::test_repr","test/test_guilt.py::ArgTestCase::test_bad_args","test/test_guilt.py::ArgTestCase::test_help","test/test_guilt.py::GitRunnerTestCase::test_get_delta_files","test/test_guilt.py::GitRunnerTestCase::test_get_delta_no_files","test/test_guilt.py::GitRunnerTestCase::test_get_git_root_exception","test/test_guilt.py::GitRunnerTestCase::test_populate_rev_tree","test/test_guilt.py::GitRunnerTestCase::test_run_git","test/test_guilt.py::GitRunnerTestCase::test_run_git_cwd","test/test_guilt.py::GitRunnerTestCase::test_run_git_exception","test/test_guilt.py::GitRunnerTestCase::test_run_git_no_output_error","test/test_guilt.py::GitRunnerTestCase::test_run_git_no_output_no_error","test/test_guilt.py::GitRunnerTestCase::test_run_git_non_zerp","test/test_guilt.py::GitRunnerTestCase::test_run_git_stderr","test/test_guilt.py::GitRunnerTestCase::test_version_comparison","test/test_guilt.py::GitRunnerTestCase::test_version_retrieval","test/test_guilt.py::TextBlameTests::test_blame_locs","test/test_guilt.py::TextBlameTests::test_blame_locs_bad_encoding","test/test_guilt.py::TextBlameTests::test_blame_locs_empty_file","test/test_guilt.py::TextBlameTests::test_blame_locs_exception","test/test_guilt.py::TextBlameTests::test_blame_locs_file_missing","test/test_guilt.py::TextBlameTests::test_text_blame_repr","test/test_guilt.py::BinaryBlameTests::test_bin_blame_repr","test/test_guilt.py::BinaryBlameTests::test_blame_bytes","test/test_guilt.py::BinaryBlameTests::test_blame_bytes_empty_file","test/test_guilt.py::BinaryBlameTests::test_blame_bytes_file_missing","test/test_guilt.py::BinaryBlameTests::test_blame_bytes_locs_exception","test/test_guilt.py::GuiltTestCase::test_file_not_in_since_rev","test/test_guilt.py::GuiltTestCase::test_file_not_in_until_rev","test/test_guilt.py::GuiltTestCase::test_map_binary_blames","test/test_guilt.py::GuiltTestCase::test_map_text_blames","test/test_guilt.py::GuiltTestCase::test_populate_trees","test/test_guilt.py::GuiltTestCase::test_reduce_locs","test/test_guilt.py::GuiltTestCase::test_show_run","test/test_guilt.py::FormatterTestCase::test_get_width_not_tty","test/test_guilt.py::FormatterTestCase::test_get_width_tty","test/test_guilt.py::FormatterTestCase::test_green","test/test_guilt.py::FormatterTestCase::test_red","test/test_guilt.py::FormatterTestCase::test_show_binary_guilt","test/test_guilt.py::FormatterTestCase::test_show_text_guilt"],"string":"[\n \"test/test_guilt.py::DeltaTestCase::test_comparison\",\n \"test/test_guilt.py::DeltaTestCase::test_eq\",\n \"test/test_guilt.py::DeltaTestCase::test_repr\",\n \"test/test_guilt.py::BinaryDeltaTestCase::test_comparison\",\n \"test/test_guilt.py::BinaryDeltaTestCase::test_eq\",\n \"test/test_guilt.py::BinaryDeltaTestCase::test_repr\",\n \"test/test_guilt.py::ArgTestCase::test_bad_args\",\n \"test/test_guilt.py::ArgTestCase::test_help\",\n \"test/test_guilt.py::GitRunnerTestCase::test_get_delta_files\",\n \"test/test_guilt.py::GitRunnerTestCase::test_get_delta_no_files\",\n \"test/test_guilt.py::GitRunnerTestCase::test_get_git_root_exception\",\n \"test/test_guilt.py::GitRunnerTestCase::test_populate_rev_tree\",\n \"test/test_guilt.py::GitRunnerTestCase::test_run_git\",\n \"test/test_guilt.py::GitRunnerTestCase::test_run_git_cwd\",\n \"test/test_guilt.py::GitRunnerTestCase::test_run_git_exception\",\n \"test/test_guilt.py::GitRunnerTestCase::test_run_git_no_output_error\",\n \"test/test_guilt.py::GitRunnerTestCase::test_run_git_no_output_no_error\",\n \"test/test_guilt.py::GitRunnerTestCase::test_run_git_non_zerp\",\n \"test/test_guilt.py::GitRunnerTestCase::test_run_git_stderr\",\n \"test/test_guilt.py::GitRunnerTestCase::test_version_comparison\",\n \"test/test_guilt.py::GitRunnerTestCase::test_version_retrieval\",\n \"test/test_guilt.py::TextBlameTests::test_blame_locs\",\n \"test/test_guilt.py::TextBlameTests::test_blame_locs_bad_encoding\",\n \"test/test_guilt.py::TextBlameTests::test_blame_locs_empty_file\",\n \"test/test_guilt.py::TextBlameTests::test_blame_locs_exception\",\n \"test/test_guilt.py::TextBlameTests::test_blame_locs_file_missing\",\n \"test/test_guilt.py::TextBlameTests::test_text_blame_repr\",\n \"test/test_guilt.py::BinaryBlameTests::test_bin_blame_repr\",\n \"test/test_guilt.py::BinaryBlameTests::test_blame_bytes\",\n \"test/test_guilt.py::BinaryBlameTests::test_blame_bytes_empty_file\",\n \"test/test_guilt.py::BinaryBlameTests::test_blame_bytes_file_missing\",\n \"test/test_guilt.py::BinaryBlameTests::test_blame_bytes_locs_exception\",\n \"test/test_guilt.py::GuiltTestCase::test_file_not_in_since_rev\",\n \"test/test_guilt.py::GuiltTestCase::test_file_not_in_until_rev\",\n \"test/test_guilt.py::GuiltTestCase::test_map_binary_blames\",\n \"test/test_guilt.py::GuiltTestCase::test_map_text_blames\",\n \"test/test_guilt.py::GuiltTestCase::test_populate_trees\",\n \"test/test_guilt.py::GuiltTestCase::test_reduce_locs\",\n \"test/test_guilt.py::GuiltTestCase::test_show_run\",\n \"test/test_guilt.py::FormatterTestCase::test_get_width_not_tty\",\n \"test/test_guilt.py::FormatterTestCase::test_get_width_tty\",\n \"test/test_guilt.py::FormatterTestCase::test_green\",\n \"test/test_guilt.py::FormatterTestCase::test_red\",\n \"test/test_guilt.py::FormatterTestCase::test_show_binary_guilt\",\n \"test/test_guilt.py::FormatterTestCase::test_show_text_guilt\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"null"},"__index_level_0__":{"kind":"number","value":181,"string":"181"},"num_tokens_patch":{"kind":"number","value":283,"string":"283"},"before_filepaths":{"kind":"list like","value":["git_guilt/guilt.py"],"string":"[\n \"git_guilt/guilt.py\"\n]"}}},{"rowIdx":42,"cells":{"instance_id":{"kind":"string","value":"marshmallow-code__marshmallow-234"},"base_commit":{"kind":"string","value":"4e922445601219dc6bfe014d36b3c61d9528e2ad"},"created_at":{"kind":"string","value":"2015-07-07 10:29:53"},"environment_setup_commit":{"kind":"string","value":"b8ad05b5342914e857c442d75e8abe9ea8f867fb"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/marshmallow/schema.py b/marshmallow/schema.py\nindex 4de0a123..7fe1289f 100644\n--- a/marshmallow/schema.py\n+++ b/marshmallow/schema.py\n@@ -699,8 +699,8 @@ class BaseSchema(base.SchemaABC):\n \"\"\"\n if obj and many:\n try: # Homogeneous collection\n- obj_prototype = obj[0]\n- except IndexError: # Nothing to serialize\n+ obj_prototype = next(iter(obj))\n+ except StopIteration: # Nothing to serialize\n return self.declared_fields\n obj = obj_prototype\n ret = self.dict_class()\n"},"problem_statement":{"kind":"string","value":"fields.Nested does not support sets\nCurrently `fields.Nested` assumes that the value of the field is a list - https://github.com/marshmallow-code/marshmallow/blob/dev/marshmallow/schema.py#L702 - and fails for `set` during serialization"},"repo":{"kind":"string","value":"marshmallow-code/marshmallow"},"test_patch":{"kind":"string","value":"diff --git a/tests/test_schema.py b/tests/test_schema.py\nindex 29dada19..5d0dbbdf 100644\n--- a/tests/test_schema.py\n+++ b/tests/test_schema.py\n@@ -3,6 +3,7 @@\n \n import json\n import random\n+from collections import namedtuple\n \n import pytest\n \n@@ -687,6 +688,21 @@ def test_nested_only_and_exclude():\n assert 'bar' not in result.data['inner']\n \n \n+def test_nested_with_sets():\n+ class Inner(Schema):\n+ foo = fields.Field()\n+\n+ class Outer(Schema):\n+ inners = fields.Nested(Inner, many=True)\n+\n+ sch = Outer()\n+\n+ DataClass = namedtuple('DataClass', ['foo'])\n+ data = dict(inners=set([DataClass(42), DataClass(2)]))\n+ result = sch.dump(data)\n+ assert len(result.data['inners']) == 2\n+\n+\n def test_meta_serializer_fields():\n u = User(\"John\", age=42.3, email=\"john@example.com\",\n homepage=\"http://john.com\")\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_short_problem_statement\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 0\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"2.0"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .[dev]\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest\"\n ],\n \"pre_install\": null,\n \"python\": \"3.9\",\n \"reqs_path\": [\n \"dev-requirements.txt\",\n \"docs/requirements.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"alabaster @ git+https://github.com/sloria/alabaster.git@667b1b676c6bf7226db057f098ec826d84d3ae40\nbabel==2.17.0\ncachetools==5.5.2\ncertifi==2025.1.31\nchardet==5.2.0\ncharset-normalizer==3.4.1\ncolorama==0.4.6\ndistlib==0.3.9\ndocutils==0.20.1\nexceptiongroup==1.2.2\nfilelock==3.18.0\nflake8==2.4.0\nidna==3.10\nimagesize==1.4.1\nimportlib_metadata==8.6.1\niniconfig==2.1.0\ninvoke==2.2.0\nJinja2==3.1.6\nMarkupSafe==3.0.2\n-e git+https://github.com/marshmallow-code/marshmallow.git@4e922445601219dc6bfe014d36b3c61d9528e2ad#egg=marshmallow\nmccabe==0.3.1\npackaging==24.2\npep8==1.5.7\nplatformdirs==4.3.7\npluggy==1.5.0\npyflakes==0.8.1\nPygments==2.19.1\npyproject-api==1.9.0\npytest==8.3.5\npython-dateutil==2.9.0.post0\npytz==2025.2\nrequests==2.32.3\nsix==1.17.0\nsnowballstemmer==2.2.0\nSphinx==7.2.6\nsphinx-issues==0.2.0\nsphinxcontrib-applehelp==2.0.0\nsphinxcontrib-devhelp==2.0.0\nsphinxcontrib-htmlhelp==2.1.0\nsphinxcontrib-jsmath==1.0.1\nsphinxcontrib-qthelp==2.0.0\nsphinxcontrib-serializinghtml==2.0.0\ntomli==2.2.1\ntox==4.25.0\ntyping_extensions==4.13.0\nurllib3==2.3.0\nvirtualenv==20.29.3\nzipp==3.21.0\n"},"environment":{"kind":"string","value":"name: marshmallow\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - pip=25.0=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - alabaster==0.7.11+sloria0\n - babel==2.17.0\n - cachetools==5.5.2\n - certifi==2025.1.31\n - chardet==5.2.0\n - charset-normalizer==3.4.1\n - colorama==0.4.6\n - distlib==0.3.9\n - docutils==0.20.1\n - exceptiongroup==1.2.2\n - filelock==3.18.0\n - flake8==2.4.0\n - idna==3.10\n - imagesize==1.4.1\n - importlib-metadata==8.6.1\n - iniconfig==2.1.0\n - invoke==2.2.0\n - jinja2==3.1.6\n - markupsafe==3.0.2\n - mccabe==0.3.1\n - packaging==24.2\n - pep8==1.5.7\n - platformdirs==4.3.7\n - pluggy==1.5.0\n - pyflakes==0.8.1\n - pygments==2.19.1\n - pyproject-api==1.9.0\n - pytest==8.3.5\n - python-dateutil==2.9.0.post0\n - pytz==2025.2\n - requests==2.32.3\n - six==1.17.0\n - snowballstemmer==2.2.0\n - sphinx==7.2.6\n - sphinx-issues==0.2.0\n - sphinxcontrib-applehelp==2.0.0\n - sphinxcontrib-devhelp==2.0.0\n - sphinxcontrib-htmlhelp==2.1.0\n - sphinxcontrib-jsmath==1.0.1\n - sphinxcontrib-qthelp==2.0.0\n - sphinxcontrib-serializinghtml==2.0.0\n - tomli==2.2.1\n - tox==4.25.0\n - typing-extensions==4.13.0\n - urllib3==2.3.0\n - virtualenv==20.29.3\n - zipp==3.21.0\nprefix: /opt/conda/envs/marshmallow\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/test_schema.py::test_nested_with_sets"],"string":"[\n \"tests/test_schema.py::test_nested_with_sets\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/test_schema.py::test_serializing_basic_object[UserSchema]","tests/test_schema.py::test_serializing_basic_object[UserMetaSchema]","tests/test_schema.py::test_serializer_dump","tests/test_schema.py::test_dump_returns_dict_of_errors","tests/test_schema.py::test_dump_with_strict_mode_raises_error[UserSchema]","tests/test_schema.py::test_dump_with_strict_mode_raises_error[UserMetaSchema]","tests/test_schema.py::test_dump_resets_errors","tests/test_schema.py::test_load_resets_errors","tests/test_schema.py::test_dump_resets_error_fields","tests/test_schema.py::test_load_resets_error_fields","tests/test_schema.py::test_errored_fields_do_not_appear_in_output","tests/test_schema.py::test_load_many_stores_error_indices","tests/test_schema.py::test_dump_many","tests/test_schema.py::test_multiple_errors_can_be_stored_for_a_given_index","tests/test_schema.py::test_dump_many_stores_error_indices","tests/test_schema.py::test_dump_many_doesnt_stores_error_indices_when_index_errors_is_false","tests/test_schema.py::test_dump_returns_a_marshalresult","tests/test_schema.py::test_dumps_returns_a_marshalresult","tests/test_schema.py::test_dumping_single_object_with_collection_schema","tests/test_schema.py::test_loading_single_object_with_collection_schema","tests/test_schema.py::test_dumps_many","tests/test_schema.py::test_load_returns_an_unmarshalresult","tests/test_schema.py::test_load_many","tests/test_schema.py::test_loads_returns_an_unmarshalresult","tests/test_schema.py::test_loads_many","tests/test_schema.py::test_loads_deserializes_from_json","tests/test_schema.py::test_serializing_none","tests/test_schema.py::test_default_many_symmetry","tests/test_schema.py::TestValidate::test_validate_returns_errors_dict","tests/test_schema.py::TestValidate::test_validate_many","tests/test_schema.py::TestValidate::test_validate_many_doesnt_store_index_if_index_errors_option_is_false","tests/test_schema.py::TestValidate::test_validate_strict","tests/test_schema.py::TestValidate::test_validate_required","tests/test_schema.py::test_fields_are_not_copies[UserSchema]","tests/test_schema.py::test_fields_are_not_copies[UserMetaSchema]","tests/test_schema.py::test_dumps_returns_json","tests/test_schema.py::test_naive_datetime_field","tests/test_schema.py::test_datetime_formatted_field","tests/test_schema.py::test_datetime_iso_field","tests/test_schema.py::test_tz_datetime_field","tests/test_schema.py::test_local_datetime_field","tests/test_schema.py::test_class_variable","tests/test_schema.py::test_serialize_many[UserSchema]","tests/test_schema.py::test_serialize_many[UserMetaSchema]","tests/test_schema.py::test_inheriting_schema","tests/test_schema.py::test_custom_field","tests/test_schema.py::test_url_field","tests/test_schema.py::test_relative_url_field","tests/test_schema.py::test_stores_invalid_url_error[UserSchema]","tests/test_schema.py::test_stores_invalid_url_error[UserMetaSchema]","tests/test_schema.py::test_email_field[UserSchema]","tests/test_schema.py::test_email_field[UserMetaSchema]","tests/test_schema.py::test_stored_invalid_email","tests/test_schema.py::test_integer_field","tests/test_schema.py::test_fixed_field","tests/test_schema.py::test_as_string","tests/test_schema.py::test_decimal_field","tests/test_schema.py::test_price_field","tests/test_schema.py::test_extra","tests/test_schema.py::test_extra_many","tests/test_schema.py::test_method_field[UserSchema]","tests/test_schema.py::test_method_field[UserMetaSchema]","tests/test_schema.py::test_function_field","tests/test_schema.py::test_prefix[UserSchema]","tests/test_schema.py::test_prefix[UserMetaSchema]","tests/test_schema.py::test_fields_must_be_declared_as_instances","tests/test_schema.py::test_serializing_generator[UserSchema]","tests/test_schema.py::test_serializing_generator[UserMetaSchema]","tests/test_schema.py::test_serializing_empty_list_returns_empty_list","tests/test_schema.py::test_serializing_dict","tests/test_schema.py::test_serializing_dict_with_meta_fields","tests/test_schema.py::test_exclude_in_init[UserSchema]","tests/test_schema.py::test_exclude_in_init[UserMetaSchema]","tests/test_schema.py::test_only_in_init[UserSchema]","tests/test_schema.py::test_only_in_init[UserMetaSchema]","tests/test_schema.py::test_invalid_only_param","tests/test_schema.py::test_can_serialize_uuid","tests/test_schema.py::test_can_serialize_time","tests/test_schema.py::test_invalid_time","tests/test_schema.py::test_invalid_date","tests/test_schema.py::test_invalid_email","tests/test_schema.py::test_invalid_url","tests/test_schema.py::test_invalid_selection","tests/test_schema.py::test_custom_json","tests/test_schema.py::test_custom_error_message","tests/test_schema.py::test_load_errors_with_many","tests/test_schema.py::test_error_raised_if_fields_option_is_not_list","tests/test_schema.py::test_error_raised_if_additional_option_is_not_list","tests/test_schema.py::test_only_and_exclude","tests/test_schema.py::test_only_with_invalid_attribute","tests/test_schema.py::test_nested_only_and_exclude","tests/test_schema.py::test_meta_serializer_fields","tests/test_schema.py::test_meta_fields_mapping","tests/test_schema.py::test_meta_field_not_on_obj_raises_attribute_error","tests/test_schema.py::test_exclude_fields","tests/test_schema.py::test_fields_option_must_be_list_or_tuple","tests/test_schema.py::test_exclude_option_must_be_list_or_tuple","tests/test_schema.py::test_dateformat_option","tests/test_schema.py::test_default_dateformat","tests/test_schema.py::test_inherit_meta","tests/test_schema.py::test_inherit_meta_override","tests/test_schema.py::test_additional","tests/test_schema.py::test_cant_set_both_additional_and_fields","tests/test_schema.py::test_serializing_none_meta","tests/test_schema.py::TestErrorHandler::test_dump_with_custom_error_handler","tests/test_schema.py::TestErrorHandler::test_load_with_custom_error_handler","tests/test_schema.py::TestErrorHandler::test_validate_with_custom_error_handler","tests/test_schema.py::TestErrorHandler::test_multiple_serializers_with_same_error_handler","tests/test_schema.py::TestErrorHandler::test_setting_error_handler_class_attribute","tests/test_schema.py::TestSchemaValidator::test_validator_decorator_is_deprecated","tests/test_schema.py::TestSchemaValidator::test_validator_defined_on_class","tests/test_schema.py::TestSchemaValidator::test_validator_that_raises_error_with_dict","tests/test_schema.py::TestSchemaValidator::test_validator_that_raises_error_with_list","tests/test_schema.py::TestSchemaValidator::test_mixed_schema_validators","tests/test_schema.py::TestSchemaValidator::test_registered_validators_are_not_shared_with_ancestors","tests/test_schema.py::TestSchemaValidator::test_registered_validators_are_not_shared_with_children","tests/test_schema.py::TestSchemaValidator::test_inheriting_then_registering_validator","tests/test_schema.py::TestSchemaValidator::test_multiple_schema_errors_can_be_stored","tests/test_schema.py::TestSchemaValidator::test_schema_validation_error_with_stict_stores_correct_field_name","tests/test_schema.py::TestSchemaValidator::test_schema_validation_error_with_strict_when_field_is_specified","tests/test_schema.py::TestSchemaValidator::test_schema_validation_error_stored_on_multiple_fields","tests/test_schema.py::TestSchemaValidator::test_validator_with_strict","tests/test_schema.py::TestSchemaValidator::test_validator_defined_by_decorator","tests/test_schema.py::TestSchemaValidator::test_validators_are_inherited","tests/test_schema.py::TestSchemaValidator::test_uncaught_validation_errors_are_stored","tests/test_schema.py::TestSchemaValidator::test_validation_error_with_error_parameter","tests/test_schema.py::TestSchemaValidator::test_store_schema_validation_errors_on_specified_field","tests/test_schema.py::TestSchemaValidator::test_errors_are_cleared_on_load","tests/test_schema.py::TestSchemaValidator::test_errors_are_cleared_after_loading_collection","tests/test_schema.py::TestSchemaValidator::test_raises_error_with_list","tests/test_schema.py::TestSchemaValidator::test_raises_error_with_dict","tests/test_schema.py::TestSchemaValidator::test_nested_schema_validators","tests/test_schema.py::TestPreprocessors::test_preprocessor_decorator_is_deprecated","tests/test_schema.py::TestPreprocessors::test_preprocessors_defined_on_class","tests/test_schema.py::TestPreprocessors::test_registered_preprocessors_are_not_shared_with_ancestors","tests/test_schema.py::TestPreprocessors::test_registered_preprocessors_are_not_shared_with_children","tests/test_schema.py::TestPreprocessors::test_preprocessors_defined_by_decorator","tests/test_schema.py::TestDataHandler::test_data_handler_is_deprecated","tests/test_schema.py::TestDataHandler::test_schema_with_custom_data_handler","tests/test_schema.py::TestDataHandler::test_registered_data_handlers_are_not_shared_with_ancestors","tests/test_schema.py::TestDataHandler::test_registered_data_handlers_are_not_shared_with_children","tests/test_schema.py::TestDataHandler::test_serializer_with_multiple_data_handlers","tests/test_schema.py::TestDataHandler::test_setting_data_handlers_class_attribute","tests/test_schema.py::TestDataHandler::test_root_data_handler","tests/test_schema.py::test_schema_repr","tests/test_schema.py::TestNestedSchema::test_flat_nested","tests/test_schema.py::TestNestedSchema::test_nested_many_with_missing_attribute","tests/test_schema.py::TestNestedSchema::test_nested_with_attribute_none","tests/test_schema.py::TestNestedSchema::test_flat_nested2","tests/test_schema.py::TestNestedSchema::test_nested_field_does_not_validate_required","tests/test_schema.py::TestNestedSchema::test_nested_none","tests/test_schema.py::TestNestedSchema::test_nested","tests/test_schema.py::TestNestedSchema::test_nested_many_fields","tests/test_schema.py::TestNestedSchema::test_nested_meta_many","tests/test_schema.py::TestNestedSchema::test_nested_only","tests/test_schema.py::TestNestedSchema::test_exclude","tests/test_schema.py::TestNestedSchema::test_list_field","tests/test_schema.py::TestNestedSchema::test_list_field_parent","tests/test_schema.py::TestNestedSchema::test_nested_load_many","tests/test_schema.py::TestNestedSchema::test_nested_errors","tests/test_schema.py::TestNestedSchema::test_nested_strict","tests/test_schema.py::TestNestedSchema::test_nested_method_field","tests/test_schema.py::TestNestedSchema::test_nested_function_field","tests/test_schema.py::TestNestedSchema::test_nested_prefixed_field","tests/test_schema.py::TestNestedSchema::test_nested_prefixed_many_field","tests/test_schema.py::TestNestedSchema::test_invalid_float_field","tests/test_schema.py::TestNestedSchema::test_serializer_meta_with_nested_fields","tests/test_schema.py::TestNestedSchema::test_serializer_with_nested_meta_fields","tests/test_schema.py::TestNestedSchema::test_nested_fields_must_be_passed_a_serializer","tests/test_schema.py::TestNestedSchema::test_invalid_type_passed_to_nested_many_field","tests/test_schema.py::TestSelfReference::test_nesting_schema_within_itself","tests/test_schema.py::TestSelfReference::test_nesting_schema_by_passing_class_name","tests/test_schema.py::TestSelfReference::test_nesting_within_itself_meta","tests/test_schema.py::TestSelfReference::test_nested_self_with_only_param","tests/test_schema.py::TestSelfReference::test_multiple_nested_self_fields","tests/test_schema.py::TestSelfReference::test_nested_many","tests/test_schema.py::test_serialization_with_required_field","tests/test_schema.py::test_deserialization_with_required_field","tests/test_schema.py::test_deserialization_with_required_field_and_custom_validator","tests/test_schema.py::TestContext::test_context_method","tests/test_schema.py::TestContext::test_context_method_function","tests/test_schema.py::TestContext::test_function_field_raises_error_when_context_not_available","tests/test_schema.py::TestContext::test_fields_context","tests/test_schema.py::TestContext::test_nested_fields_inherit_context","tests/test_schema.py::test_serializer_can_specify_nested_object_as_attribute","tests/test_schema.py::TestFieldInheritance::test_inherit_fields_from_schema_subclass","tests/test_schema.py::TestFieldInheritance::test_inherit_fields_from_non_schema_subclass","tests/test_schema.py::TestFieldInheritance::test_inheritance_follows_mro","tests/test_schema.py::TestAccessor::test_accessor_is_used","tests/test_schema.py::TestAccessor::test_accessor_with_many","tests/test_schema.py::TestAccessor::test_accessor_decorator","tests/test_schema.py::TestRequiredFields::test_required_string_field_missing","tests/test_schema.py::TestRequiredFields::test_required_string_field_failure","tests/test_schema.py::TestRequiredFields::test_allow_none_param","tests/test_schema.py::TestRequiredFields::test_allow_none_custom_message","tests/test_schema.py::TestDefaults::test_missing_inputs_are_excluded_from_dump_output","tests/test_schema.py::TestDefaults::test_none_is_serialized_to_none","tests/test_schema.py::TestDefaults::test_default_and_value_missing","tests/test_schema.py::TestDefaults::test_loading_none","tests/test_schema.py::TestDefaults::test_missing_inputs_are_excluded_from_load_output"],"string":"[\n \"tests/test_schema.py::test_serializing_basic_object[UserSchema]\",\n \"tests/test_schema.py::test_serializing_basic_object[UserMetaSchema]\",\n \"tests/test_schema.py::test_serializer_dump\",\n \"tests/test_schema.py::test_dump_returns_dict_of_errors\",\n \"tests/test_schema.py::test_dump_with_strict_mode_raises_error[UserSchema]\",\n \"tests/test_schema.py::test_dump_with_strict_mode_raises_error[UserMetaSchema]\",\n \"tests/test_schema.py::test_dump_resets_errors\",\n \"tests/test_schema.py::test_load_resets_errors\",\n \"tests/test_schema.py::test_dump_resets_error_fields\",\n \"tests/test_schema.py::test_load_resets_error_fields\",\n \"tests/test_schema.py::test_errored_fields_do_not_appear_in_output\",\n \"tests/test_schema.py::test_load_many_stores_error_indices\",\n \"tests/test_schema.py::test_dump_many\",\n \"tests/test_schema.py::test_multiple_errors_can_be_stored_for_a_given_index\",\n \"tests/test_schema.py::test_dump_many_stores_error_indices\",\n \"tests/test_schema.py::test_dump_many_doesnt_stores_error_indices_when_index_errors_is_false\",\n \"tests/test_schema.py::test_dump_returns_a_marshalresult\",\n \"tests/test_schema.py::test_dumps_returns_a_marshalresult\",\n \"tests/test_schema.py::test_dumping_single_object_with_collection_schema\",\n \"tests/test_schema.py::test_loading_single_object_with_collection_schema\",\n \"tests/test_schema.py::test_dumps_many\",\n \"tests/test_schema.py::test_load_returns_an_unmarshalresult\",\n \"tests/test_schema.py::test_load_many\",\n \"tests/test_schema.py::test_loads_returns_an_unmarshalresult\",\n \"tests/test_schema.py::test_loads_many\",\n \"tests/test_schema.py::test_loads_deserializes_from_json\",\n \"tests/test_schema.py::test_serializing_none\",\n \"tests/test_schema.py::test_default_many_symmetry\",\n \"tests/test_schema.py::TestValidate::test_validate_returns_errors_dict\",\n \"tests/test_schema.py::TestValidate::test_validate_many\",\n \"tests/test_schema.py::TestValidate::test_validate_many_doesnt_store_index_if_index_errors_option_is_false\",\n \"tests/test_schema.py::TestValidate::test_validate_strict\",\n \"tests/test_schema.py::TestValidate::test_validate_required\",\n \"tests/test_schema.py::test_fields_are_not_copies[UserSchema]\",\n \"tests/test_schema.py::test_fields_are_not_copies[UserMetaSchema]\",\n \"tests/test_schema.py::test_dumps_returns_json\",\n \"tests/test_schema.py::test_naive_datetime_field\",\n \"tests/test_schema.py::test_datetime_formatted_field\",\n \"tests/test_schema.py::test_datetime_iso_field\",\n \"tests/test_schema.py::test_tz_datetime_field\",\n \"tests/test_schema.py::test_local_datetime_field\",\n \"tests/test_schema.py::test_class_variable\",\n \"tests/test_schema.py::test_serialize_many[UserSchema]\",\n \"tests/test_schema.py::test_serialize_many[UserMetaSchema]\",\n \"tests/test_schema.py::test_inheriting_schema\",\n \"tests/test_schema.py::test_custom_field\",\n \"tests/test_schema.py::test_url_field\",\n \"tests/test_schema.py::test_relative_url_field\",\n \"tests/test_schema.py::test_stores_invalid_url_error[UserSchema]\",\n \"tests/test_schema.py::test_stores_invalid_url_error[UserMetaSchema]\",\n \"tests/test_schema.py::test_email_field[UserSchema]\",\n \"tests/test_schema.py::test_email_field[UserMetaSchema]\",\n \"tests/test_schema.py::test_stored_invalid_email\",\n \"tests/test_schema.py::test_integer_field\",\n \"tests/test_schema.py::test_fixed_field\",\n \"tests/test_schema.py::test_as_string\",\n \"tests/test_schema.py::test_decimal_field\",\n \"tests/test_schema.py::test_price_field\",\n \"tests/test_schema.py::test_extra\",\n \"tests/test_schema.py::test_extra_many\",\n \"tests/test_schema.py::test_method_field[UserSchema]\",\n \"tests/test_schema.py::test_method_field[UserMetaSchema]\",\n \"tests/test_schema.py::test_function_field\",\n \"tests/test_schema.py::test_prefix[UserSchema]\",\n \"tests/test_schema.py::test_prefix[UserMetaSchema]\",\n \"tests/test_schema.py::test_fields_must_be_declared_as_instances\",\n \"tests/test_schema.py::test_serializing_generator[UserSchema]\",\n \"tests/test_schema.py::test_serializing_generator[UserMetaSchema]\",\n \"tests/test_schema.py::test_serializing_empty_list_returns_empty_list\",\n \"tests/test_schema.py::test_serializing_dict\",\n \"tests/test_schema.py::test_serializing_dict_with_meta_fields\",\n \"tests/test_schema.py::test_exclude_in_init[UserSchema]\",\n \"tests/test_schema.py::test_exclude_in_init[UserMetaSchema]\",\n \"tests/test_schema.py::test_only_in_init[UserSchema]\",\n \"tests/test_schema.py::test_only_in_init[UserMetaSchema]\",\n \"tests/test_schema.py::test_invalid_only_param\",\n \"tests/test_schema.py::test_can_serialize_uuid\",\n \"tests/test_schema.py::test_can_serialize_time\",\n \"tests/test_schema.py::test_invalid_time\",\n \"tests/test_schema.py::test_invalid_date\",\n \"tests/test_schema.py::test_invalid_email\",\n \"tests/test_schema.py::test_invalid_url\",\n \"tests/test_schema.py::test_invalid_selection\",\n \"tests/test_schema.py::test_custom_json\",\n \"tests/test_schema.py::test_custom_error_message\",\n \"tests/test_schema.py::test_load_errors_with_many\",\n \"tests/test_schema.py::test_error_raised_if_fields_option_is_not_list\",\n \"tests/test_schema.py::test_error_raised_if_additional_option_is_not_list\",\n \"tests/test_schema.py::test_only_and_exclude\",\n \"tests/test_schema.py::test_only_with_invalid_attribute\",\n \"tests/test_schema.py::test_nested_only_and_exclude\",\n \"tests/test_schema.py::test_meta_serializer_fields\",\n \"tests/test_schema.py::test_meta_fields_mapping\",\n \"tests/test_schema.py::test_meta_field_not_on_obj_raises_attribute_error\",\n \"tests/test_schema.py::test_exclude_fields\",\n \"tests/test_schema.py::test_fields_option_must_be_list_or_tuple\",\n \"tests/test_schema.py::test_exclude_option_must_be_list_or_tuple\",\n \"tests/test_schema.py::test_dateformat_option\",\n \"tests/test_schema.py::test_default_dateformat\",\n \"tests/test_schema.py::test_inherit_meta\",\n \"tests/test_schema.py::test_inherit_meta_override\",\n \"tests/test_schema.py::test_additional\",\n \"tests/test_schema.py::test_cant_set_both_additional_and_fields\",\n \"tests/test_schema.py::test_serializing_none_meta\",\n \"tests/test_schema.py::TestErrorHandler::test_dump_with_custom_error_handler\",\n \"tests/test_schema.py::TestErrorHandler::test_load_with_custom_error_handler\",\n \"tests/test_schema.py::TestErrorHandler::test_validate_with_custom_error_handler\",\n \"tests/test_schema.py::TestErrorHandler::test_multiple_serializers_with_same_error_handler\",\n \"tests/test_schema.py::TestErrorHandler::test_setting_error_handler_class_attribute\",\n \"tests/test_schema.py::TestSchemaValidator::test_validator_decorator_is_deprecated\",\n \"tests/test_schema.py::TestSchemaValidator::test_validator_defined_on_class\",\n \"tests/test_schema.py::TestSchemaValidator::test_validator_that_raises_error_with_dict\",\n \"tests/test_schema.py::TestSchemaValidator::test_validator_that_raises_error_with_list\",\n \"tests/test_schema.py::TestSchemaValidator::test_mixed_schema_validators\",\n \"tests/test_schema.py::TestSchemaValidator::test_registered_validators_are_not_shared_with_ancestors\",\n \"tests/test_schema.py::TestSchemaValidator::test_registered_validators_are_not_shared_with_children\",\n \"tests/test_schema.py::TestSchemaValidator::test_inheriting_then_registering_validator\",\n \"tests/test_schema.py::TestSchemaValidator::test_multiple_schema_errors_can_be_stored\",\n \"tests/test_schema.py::TestSchemaValidator::test_schema_validation_error_with_stict_stores_correct_field_name\",\n \"tests/test_schema.py::TestSchemaValidator::test_schema_validation_error_with_strict_when_field_is_specified\",\n \"tests/test_schema.py::TestSchemaValidator::test_schema_validation_error_stored_on_multiple_fields\",\n \"tests/test_schema.py::TestSchemaValidator::test_validator_with_strict\",\n \"tests/test_schema.py::TestSchemaValidator::test_validator_defined_by_decorator\",\n \"tests/test_schema.py::TestSchemaValidator::test_validators_are_inherited\",\n \"tests/test_schema.py::TestSchemaValidator::test_uncaught_validation_errors_are_stored\",\n \"tests/test_schema.py::TestSchemaValidator::test_validation_error_with_error_parameter\",\n \"tests/test_schema.py::TestSchemaValidator::test_store_schema_validation_errors_on_specified_field\",\n \"tests/test_schema.py::TestSchemaValidator::test_errors_are_cleared_on_load\",\n \"tests/test_schema.py::TestSchemaValidator::test_errors_are_cleared_after_loading_collection\",\n \"tests/test_schema.py::TestSchemaValidator::test_raises_error_with_list\",\n \"tests/test_schema.py::TestSchemaValidator::test_raises_error_with_dict\",\n \"tests/test_schema.py::TestSchemaValidator::test_nested_schema_validators\",\n \"tests/test_schema.py::TestPreprocessors::test_preprocessor_decorator_is_deprecated\",\n \"tests/test_schema.py::TestPreprocessors::test_preprocessors_defined_on_class\",\n \"tests/test_schema.py::TestPreprocessors::test_registered_preprocessors_are_not_shared_with_ancestors\",\n \"tests/test_schema.py::TestPreprocessors::test_registered_preprocessors_are_not_shared_with_children\",\n \"tests/test_schema.py::TestPreprocessors::test_preprocessors_defined_by_decorator\",\n \"tests/test_schema.py::TestDataHandler::test_data_handler_is_deprecated\",\n \"tests/test_schema.py::TestDataHandler::test_schema_with_custom_data_handler\",\n \"tests/test_schema.py::TestDataHandler::test_registered_data_handlers_are_not_shared_with_ancestors\",\n \"tests/test_schema.py::TestDataHandler::test_registered_data_handlers_are_not_shared_with_children\",\n \"tests/test_schema.py::TestDataHandler::test_serializer_with_multiple_data_handlers\",\n \"tests/test_schema.py::TestDataHandler::test_setting_data_handlers_class_attribute\",\n \"tests/test_schema.py::TestDataHandler::test_root_data_handler\",\n \"tests/test_schema.py::test_schema_repr\",\n \"tests/test_schema.py::TestNestedSchema::test_flat_nested\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_many_with_missing_attribute\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_with_attribute_none\",\n \"tests/test_schema.py::TestNestedSchema::test_flat_nested2\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_field_does_not_validate_required\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_none\",\n \"tests/test_schema.py::TestNestedSchema::test_nested\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_many_fields\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_meta_many\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_only\",\n \"tests/test_schema.py::TestNestedSchema::test_exclude\",\n \"tests/test_schema.py::TestNestedSchema::test_list_field\",\n \"tests/test_schema.py::TestNestedSchema::test_list_field_parent\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_load_many\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_errors\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_strict\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_method_field\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_function_field\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_prefixed_field\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_prefixed_many_field\",\n \"tests/test_schema.py::TestNestedSchema::test_invalid_float_field\",\n \"tests/test_schema.py::TestNestedSchema::test_serializer_meta_with_nested_fields\",\n \"tests/test_schema.py::TestNestedSchema::test_serializer_with_nested_meta_fields\",\n \"tests/test_schema.py::TestNestedSchema::test_nested_fields_must_be_passed_a_serializer\",\n \"tests/test_schema.py::TestNestedSchema::test_invalid_type_passed_to_nested_many_field\",\n \"tests/test_schema.py::TestSelfReference::test_nesting_schema_within_itself\",\n \"tests/test_schema.py::TestSelfReference::test_nesting_schema_by_passing_class_name\",\n \"tests/test_schema.py::TestSelfReference::test_nesting_within_itself_meta\",\n \"tests/test_schema.py::TestSelfReference::test_nested_self_with_only_param\",\n \"tests/test_schema.py::TestSelfReference::test_multiple_nested_self_fields\",\n \"tests/test_schema.py::TestSelfReference::test_nested_many\",\n \"tests/test_schema.py::test_serialization_with_required_field\",\n \"tests/test_schema.py::test_deserialization_with_required_field\",\n \"tests/test_schema.py::test_deserialization_with_required_field_and_custom_validator\",\n \"tests/test_schema.py::TestContext::test_context_method\",\n \"tests/test_schema.py::TestContext::test_context_method_function\",\n \"tests/test_schema.py::TestContext::test_function_field_raises_error_when_context_not_available\",\n \"tests/test_schema.py::TestContext::test_fields_context\",\n \"tests/test_schema.py::TestContext::test_nested_fields_inherit_context\",\n \"tests/test_schema.py::test_serializer_can_specify_nested_object_as_attribute\",\n \"tests/test_schema.py::TestFieldInheritance::test_inherit_fields_from_schema_subclass\",\n \"tests/test_schema.py::TestFieldInheritance::test_inherit_fields_from_non_schema_subclass\",\n \"tests/test_schema.py::TestFieldInheritance::test_inheritance_follows_mro\",\n \"tests/test_schema.py::TestAccessor::test_accessor_is_used\",\n \"tests/test_schema.py::TestAccessor::test_accessor_with_many\",\n \"tests/test_schema.py::TestAccessor::test_accessor_decorator\",\n \"tests/test_schema.py::TestRequiredFields::test_required_string_field_missing\",\n \"tests/test_schema.py::TestRequiredFields::test_required_string_field_failure\",\n \"tests/test_schema.py::TestRequiredFields::test_allow_none_param\",\n \"tests/test_schema.py::TestRequiredFields::test_allow_none_custom_message\",\n \"tests/test_schema.py::TestDefaults::test_missing_inputs_are_excluded_from_dump_output\",\n \"tests/test_schema.py::TestDefaults::test_none_is_serialized_to_none\",\n \"tests/test_schema.py::TestDefaults::test_default_and_value_missing\",\n \"tests/test_schema.py::TestDefaults::test_loading_none\",\n \"tests/test_schema.py::TestDefaults::test_missing_inputs_are_excluded_from_load_output\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"MIT License"},"__index_level_0__":{"kind":"number","value":189,"string":"189"},"num_tokens_patch":{"kind":"number","value":163,"string":"163"},"before_filepaths":{"kind":"list like","value":["marshmallow/schema.py"],"string":"[\n \"marshmallow/schema.py\"\n]"}}},{"rowIdx":43,"cells":{"instance_id":{"kind":"string","value":"cdent__gabbi-56"},"base_commit":{"kind":"string","value":"f2a32ad31bc205580834f009f05586a533f390f7"},"created_at":{"kind":"string","value":"2015-07-16 05:25:12"},"environment_setup_commit":{"kind":"string","value":"081a75f5f0ddfdc31c4bab62db2f084a50c9ee99"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/gabbi/handlers.py b/gabbi/handlers.py\nindex f754d94..d39a987 100644\n--- a/gabbi/handlers.py\n+++ b/gabbi/handlers.py\n@@ -120,6 +120,8 @@ class HeadersResponseHandler(ResponseHandler):\n test_key_value = {}\n \n def action(self, test, header, value):\n+ header = header.lower() # case-insensitive comparison\n+\n response = test.response\n header_value = test.replace_template(value)\n \n"},"problem_statement":{"kind":"string","value":"case-insensitive headers\nAs far as I can tell, gabbi enforces lowercase headers:\r\n\r\n```yaml\r\nresponse_headers:\r\n content-type: text/html; charset=utf-8\r\n```\r\n\r\n```\r\n... ✓ front page returns HTML\r\n```\r\n\r\nvs.\r\n\r\n```yaml\r\nresponse_headers:\r\n Content-Type: text/html; charset=utf-8\r\n```\r\n\r\n```\r\n... E front page returns HTML\r\n\r\nERROR: front page returns HTML\r\n\t \"'Content-Type' header not available in response keys: dict_keys(['server', 'content-type', 'access-control-allow-origin', 'date', 'access-control-allow-credentials', 'connection', 'content-location', 'content-length', 'status'])\"\r\n```\r\n\r\nFrom my perspective, the second version is more readable - so it would be nice if header name comparisons were case-insensitive.\r\n"},"repo":{"kind":"string","value":"cdent/gabbi"},"test_patch":{"kind":"string","value":"diff --git a/gabbi/tests/test_handlers.py b/gabbi/tests/test_handlers.py\nindex b18e8ec..b647e80 100644\n--- a/gabbi/tests/test_handlers.py\n+++ b/gabbi/tests/test_handlers.py\n@@ -94,10 +94,16 @@ class HandlersTest(unittest.TestCase):\n \n def test_response_headers(self):\n handler = handlers.HeadersResponseHandler(self.test_class)\n+ self.test.response = {'content-type': 'text/plain'}\n+\n self.test.test_data = {'response_headers': {\n 'content-type': 'text/plain',\n }}\n- self.test.response = {'content-type': 'text/plain'}\n+ self._assert_handler(handler)\n+\n+ self.test.test_data = {'response_headers': {\n+ 'Content-Type': 'text/plain',\n+ }}\n self._assert_handler(handler)\n \n def test_response_headers_regex(self):\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [],\n \"has_test_patch\": true,\n \"is_lite\": true,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 0,\n \"test_score\": 0\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"1.1"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"tox\",\n \"pytest\"\n ],\n \"pre_install\": [\n \"pip install tox\"\n ],\n \"python\": \"3.4\",\n \"reqs_path\": [\n \"requirements.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"attrs==22.2.0\ncertifi==2021.5.30\ndecorator==5.1.1\ndistlib==0.3.9\nfilelock==3.4.1\nfixtures==4.0.1\n-e git+https://github.com/cdent/gabbi.git@f2a32ad31bc205580834f009f05586a533f390f7#egg=gabbi\nhttplib2==0.22.0\nimportlib-metadata==4.8.3\nimportlib-resources==5.4.0\niniconfig==1.1.1\njsonpath-rw==1.4.0\npackaging==21.3\npbr==6.1.1\nplatformdirs==2.4.0\npluggy==1.0.0\nply==3.11\npy==1.11.0\npyparsing==3.1.4\npytest==7.0.1\nPyYAML==6.0.1\nsix==1.17.0\ntesttools==2.6.0\ntoml==0.10.2\ntomli==1.2.3\ntox==3.28.0\ntyping_extensions==4.1.1\nvirtualenv==20.17.1\nwsgi_intercept==1.13.1\nzipp==3.6.0\n"},"environment":{"kind":"string","value":"name: gabbi\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - certifi=2021.5.30=py36h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.3=he6710b0_2\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=1.1.1w=h7f8727e_0\n - pip=21.2.2=py36h06a4308_0\n - python=3.6.13=h12debd9_1\n - readline=8.2=h5eee18b_0\n - setuptools=58.0.4=py36h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - wheel=0.37.1=pyhd3eb1b0_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - attrs==22.2.0\n - decorator==5.1.1\n - distlib==0.3.9\n - filelock==3.4.1\n - fixtures==4.0.1\n - httplib2==0.22.0\n - importlib-metadata==4.8.3\n - importlib-resources==5.4.0\n - iniconfig==1.1.1\n - jsonpath-rw==1.4.0\n - packaging==21.3\n - pbr==6.1.1\n - platformdirs==2.4.0\n - pluggy==1.0.0\n - ply==3.11\n - py==1.11.0\n - pyparsing==3.1.4\n - pytest==7.0.1\n - pyyaml==6.0.1\n - six==1.17.0\n - testtools==2.6.0\n - toml==0.10.2\n - tomli==1.2.3\n - tox==3.28.0\n - typing-extensions==4.1.1\n - virtualenv==20.17.1\n - wsgi-intercept==1.13.1\n - zipp==3.6.0\nprefix: /opt/conda/envs/gabbi\n"},"FAIL_TO_PASS":{"kind":"list like","value":["gabbi/tests/test_handlers.py::HandlersTest::test_response_headers"],"string":"[\n \"gabbi/tests/test_handlers.py::HandlersTest::test_response_headers\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["gabbi/tests/test_handlers.py::HandlersTest::test_response_headers_fail_data","gabbi/tests/test_handlers.py::HandlersTest::test_response_headers_fail_header","gabbi/tests/test_handlers.py::HandlersTest::test_response_headers_regex","gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths","gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths_fail_data","gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths_fail_path","gabbi/tests/test_handlers.py::HandlersTest::test_response_strings","gabbi/tests/test_handlers.py::HandlersTest::test_response_strings_fail"],"string":"[\n \"gabbi/tests/test_handlers.py::HandlersTest::test_response_headers_fail_data\",\n \"gabbi/tests/test_handlers.py::HandlersTest::test_response_headers_fail_header\",\n \"gabbi/tests/test_handlers.py::HandlersTest::test_response_headers_regex\",\n \"gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths\",\n \"gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths_fail_data\",\n \"gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths_fail_path\",\n \"gabbi/tests/test_handlers.py::HandlersTest::test_response_strings\",\n \"gabbi/tests/test_handlers.py::HandlersTest::test_response_strings_fail\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"Apache License 2.0"},"__index_level_0__":{"kind":"number","value":194,"string":"194"},"num_tokens_patch":{"kind":"number","value":134,"string":"134"},"before_filepaths":{"kind":"list like","value":["gabbi/handlers.py"],"string":"[\n \"gabbi/handlers.py\"\n]"}}},{"rowIdx":44,"cells":{"instance_id":{"kind":"string","value":"tailhook__injections-6"},"base_commit":{"kind":"string","value":"680d3403f0086e0a94d69604bba0bfcbd9596014"},"created_at":{"kind":"string","value":"2015-07-16 17:37:03"},"environment_setup_commit":{"kind":"string","value":"680d3403f0086e0a94d69604bba0bfcbd9596014"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/injections/__init__.py b/injections/__init__.py\nindex 47bdc0d..dce8a9e 100644\n--- a/injections/__init__.py\n+++ b/injections/__init__.py\n@@ -1,6 +1,7 @@\n from .core import (\n Container,\n Dependency,\n+ MissingDependencyError,\n has,\n depends,\n propagate,\n@@ -11,6 +12,7 @@ from .core import (\n __all__ = [\n 'Container',\n 'Dependency',\n+ 'MissingDependencyError',\n 'has',\n 'depends',\n 'propagate',\ndiff --git a/injections/core.py b/injections/core.py\nindex a4dccae..edff1db 100644\n--- a/injections/core.py\n+++ b/injections/core.py\n@@ -76,6 +76,13 @@ class Dependency:\n depends = Dependency # nicer declarative name\n \n \n+class MissingDependencyError(KeyError):\n+ \"\"\"Required dependency is missed in container\"\"\"\n+\n+ def __str__(self):\n+ return \"Dependency {!r} is missed in container\".format(self.args[0])\n+\n+\n class Container(object):\n \"\"\"Container for things that will be dependency-injected\n \n@@ -104,7 +111,10 @@ class Container(object):\n deps = getattr(inst, '__injections__', None)\n if deps:\n for attr, dep in deps.items():\n- val = pro[dep.name]\n+ val = pro.get(dep.name)\n+ if val is None:\n+ raise MissingDependencyError(dep.name)\n+\n if not isinstance(val, dep.type):\n raise TypeError(\"Wrong provider for {!r}\".format(val))\n setattr(inst, attr, val)\ndiff --git a/setup.py b/setup.py\nindex 41cf797..c1e7d04 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -16,4 +16,5 @@ setup(name='injections',\n 'Programming Language :: Python :: 3',\n 'Programming Language :: Python :: 2',\n ],\n+ license='MIT',\n )\n"},"problem_statement":{"kind":"string","value":"Use custom exception for injecting container into object with unknown dependencies\nI have a class\r\n```\r\n@has\r\nclass A:\r\n redis = depends(Redis)\r\n loop = depends(AbstractLoop)\r\n```\r\n\r\nWhen I try to initialize it from container with missing dependencies I have a `KeyError`.\r\n```\r\ninj = Container()\r\ninj['redis'] = create_redis()\r\ninj.inject(A()) # raises KeyError\r\n```\r\n\r\nException on injection stage is pretty cool but I suggest using custom exception class. Not `KeyError` but derived from it. Exception text also should be more informative than just `KeyError: 'loop'`."},"repo":{"kind":"string","value":"tailhook/injections"},"test_patch":{"kind":"string","value":"diff --git a/injections/test_core.py b/injections/test_core.py\nindex 2e9aabe..06006cd 100644\n--- a/injections/test_core.py\n+++ b/injections/test_core.py\n@@ -126,3 +126,21 @@ class TestCore(TestCase):\n c['name'] = 1\n with self.assertRaises(TypeError):\n c.inject(self.Consumer())\n+\n+ def test_missing_dependency(self):\n+ c = di.Container()\n+ c['a'] = 1\n+\n+ @di.has\n+ class Consumer:\n+ a = di.depends(int)\n+ b = di.depends(int)\n+\n+ if hasattr(self, 'assertRaisesRegex'):\n+ checker = self.assertRaisesRegex\n+ else:\n+ checker = self.assertRaisesRegexp\n+\n+ with checker(di.MissingDependencyError,\n+ \"Dependency 'b' is missed in container\"):\n+ c.inject(Consumer())\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_many_modified_files\",\n \"has_many_hunks\",\n \"has_pytest_match_arg\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 3\n },\n \"num_modified_files\": 3\n}"},"version":{"kind":"string","value":"0.2"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"pytest\",\n \"pip_packages\": [\n \"nose\",\n \"pytest\"\n ],\n \"pre_install\": null,\n \"python\": \"3.4\",\n \"reqs_path\": null,\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work\ncertifi==2021.5.30\nimportlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work\niniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work\n-e git+https://github.com/tailhook/injections.git@680d3403f0086e0a94d69604bba0bfcbd9596014#egg=injections\nmore-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work\nnose==1.3.7\npackaging @ file:///tmp/build/80754af9/packaging_1637314298585/work\npluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work\npy @ file:///opt/conda/conda-bld/py_1644396412707/work\npyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work\npytest==6.2.4\ntoml @ file:///tmp/build/80754af9/toml_1616166611790/work\ntyping_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work\nzipp @ file:///tmp/build/80754af9/zipp_1633618647012/work\n"},"environment":{"kind":"string","value":"name: injections\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - attrs=21.4.0=pyhd3eb1b0_0\n - ca-certificates=2025.2.25=h06a4308_0\n - certifi=2021.5.30=py36h06a4308_0\n - importlib-metadata=4.8.1=py36h06a4308_0\n - importlib_metadata=4.8.1=hd3eb1b0_0\n - iniconfig=1.1.1=pyhd3eb1b0_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.3=he6710b0_2\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - more-itertools=8.12.0=pyhd3eb1b0_0\n - ncurses=6.4=h6a678d5_0\n - openssl=1.1.1w=h7f8727e_0\n - packaging=21.3=pyhd3eb1b0_0\n - pip=21.2.2=py36h06a4308_0\n - pluggy=0.13.1=py36h06a4308_0\n - py=1.11.0=pyhd3eb1b0_0\n - pyparsing=3.0.4=pyhd3eb1b0_0\n - pytest=6.2.4=py36h06a4308_2\n - python=3.6.13=h12debd9_1\n - readline=8.2=h5eee18b_0\n - setuptools=58.0.4=py36h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - toml=0.10.2=pyhd3eb1b0_0\n - typing_extensions=4.1.1=pyh06a4308_0\n - wheel=0.37.1=pyhd3eb1b0_0\n - xz=5.6.4=h5eee18b_1\n - zipp=3.6.0=pyhd3eb1b0_0\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - nose==1.3.7\nprefix: /opt/conda/envs/injections\n"},"FAIL_TO_PASS":{"kind":"list like","value":["injections/test_core.py::TestCore::test_missing_dependency"],"string":"[\n \"injections/test_core.py::TestCore::test_missing_dependency\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["injections/test_core.py::TestCore::test_clone","injections/test_core.py::TestCore::test_cyclic","injections/test_core.py::TestCore::test_interconnect","injections/test_core.py::TestCore::test_larger_cycle","injections/test_core.py::TestCore::test_ok","injections/test_core.py::TestCore::test_wrong_type"],"string":"[\n \"injections/test_core.py::TestCore::test_clone\",\n \"injections/test_core.py::TestCore::test_cyclic\",\n \"injections/test_core.py::TestCore::test_interconnect\",\n \"injections/test_core.py::TestCore::test_larger_cycle\",\n \"injections/test_core.py::TestCore::test_ok\",\n \"injections/test_core.py::TestCore::test_wrong_type\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"MIT License"},"__index_level_0__":{"kind":"number","value":196,"string":"196"},"num_tokens_patch":{"kind":"number","value":483,"string":"483"},"before_filepaths":{"kind":"list like","value":["injections/__init__.py","injections/core.py","setup.py"],"string":"[\n \"injections/__init__.py\",\n \"injections/core.py\",\n \"setup.py\"\n]"}}},{"rowIdx":45,"cells":{"instance_id":{"kind":"string","value":"softlayer__softlayer-python-602"},"base_commit":{"kind":"string","value":"1195b2020ef6efc40462d59eb079f26e5f39a6d8"},"created_at":{"kind":"string","value":"2015-08-10 15:51:18"},"environment_setup_commit":{"kind":"string","value":"1195b2020ef6efc40462d59eb079f26e5f39a6d8"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/SoftLayer/CLI/server/detail.py b/SoftLayer/CLI/server/detail.py\nindex 1b9d588e..9fc76c5d 100644\n--- a/SoftLayer/CLI/server/detail.py\n+++ b/SoftLayer/CLI/server/detail.py\n@@ -62,14 +62,11 @@ def cli(env, identifier, passwords, price):\n table.add_row(\n ['created', result['provisionDate'] or formatting.blank()])\n \n- if utils.lookup(result, 'billingItem') != []:\n- table.add_row(['owner', formatting.FormattedItem(\n- utils.lookup(result, 'billingItem', 'orderItem',\n- 'order', 'userRecord',\n- 'username') or formatting.blank(),\n- )])\n- else:\n- table.add_row(['owner', formatting.blank()])\n+ table.add_row(['owner', formatting.FormattedItem(\n+ utils.lookup(result, 'billingItem', 'orderItem',\n+ 'order', 'userRecord',\n+ 'username') or formatting.blank()\n+ )])\n \n vlan_table = formatting.Table(['type', 'number', 'id'])\n \ndiff --git a/SoftLayer/CLI/virt/detail.py b/SoftLayer/CLI/virt/detail.py\nindex b003e413..4fc115ce 100644\n--- a/SoftLayer/CLI/virt/detail.py\n+++ b/SoftLayer/CLI/virt/detail.py\n@@ -67,14 +67,11 @@ def cli(self, identifier, passwords=False, price=False):\n table.add_row(['private_cpu', result['dedicatedAccountHostOnlyFlag']])\n table.add_row(['created', result['createDate']])\n table.add_row(['modified', result['modifyDate']])\n- if utils.lookup(result, 'billingItem') != []:\n- table.add_row(['owner', formatting.FormattedItem(\n- utils.lookup(result, 'billingItem', 'orderItem',\n- 'order', 'userRecord',\n- 'username') or formatting.blank(),\n- )])\n- else:\n- table.add_row(['owner', formatting.blank()])\n+ table.add_row(['owner', formatting.FormattedItem(\n+ utils.lookup(result, 'billingItem', 'orderItem',\n+ 'order', 'userRecord',\n+ 'username') or formatting.blank(),\n+ )])\n \n vlan_table = formatting.Table(['type', 'number', 'id'])\n for vlan in result['networkVlans']:\ndiff --git a/SoftLayer/managers/vs.py b/SoftLayer/managers/vs.py\nindex 30de90b3..40ea9925 100644\n--- a/SoftLayer/managers/vs.py\n+++ b/SoftLayer/managers/vs.py\n@@ -423,6 +423,7 @@ def verify_create_instance(self, **kwargs):\n Without actually placing an order.\n See :func:`create_instance` for a list of available options.\n \"\"\"\n+ kwargs.pop('tags', None)\n create_options = self._generate_create_dict(**kwargs)\n return self.guest.generateOrderTemplate(create_options)\n \n"},"problem_statement":{"kind":"string","value":"got an unexpected keyword argument 'tags'\nHi there\r\n\r\nI came across an error when creating VS and providing tags either in the form of -g or --tag\r\n\r\nC:\\Python34\\Scripts>slcli vs create --test --hostname OS --domain vm.local --cpu 1 --memory 1024 --os WIN_LATEST_64 --datacenter lon02 --tag 1234\r\nAn unexpected error has occured:\r\nTraceback (most recent call last):\r\n File \"C:\\Python34\\lib\\site-packages\\SoftLayer\\CLI\\core.py\", line 181, in main\r\n cli.main()\r\n File \"C:\\Python34\\lib\\site-packages\\click\\core.py\", line 644, in main\r\n rv = self.invoke(ctx)\r\n File \"C:\\Python34\\lib\\site-packages\\click\\core.py\", line 991, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File \"C:\\Python34\\lib\\site-packages\\click\\core.py\", line 991, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File \"C:\\Python34\\lib\\site-packages\\click\\core.py\", line 837, in invoke\r\n return ctx.invoke(self.callback, **ctx.params)\r\n File \"C:\\Python34\\lib\\site-packages\\click\\core.py\", line 464, in invoke\r\n return callback(*args, **kwargs)\r\n File \"C:\\Python34\\lib\\site-packages\\click\\decorators.py\", line 64, in new_func\r\n return ctx.invoke(f, obj, *args[1:], **kwargs)\r\n File \"C:\\Python34\\lib\\site-packages\\click\\core.py\", line 464, in invoke\r\n return callback(*args, **kwargs)\r\n File \"C:\\Python34\\lib\\site-packages\\SoftLayer\\CLI\\virt\\create.py\", line 92, in cli\r\n result = vsi.verify_create_instance(**data)\r\n File \"C:\\Python34\\lib\\site-packages\\SoftLayer\\managers\\vs.py\", line 426, in verify_create_instance\r\n create_options = self._generate_create_dict(**kwargs)\r\nTypeError: _generate_create_dict() got an unexpected keyword argument 'tags'"},"repo":{"kind":"string","value":"softlayer/softlayer-python"},"test_patch":{"kind":"string","value":"diff --git a/SoftLayer/tests/managers/vs_tests.py b/SoftLayer/tests/managers/vs_tests.py\nindex 3a179b46..9bdb3459 100644\n--- a/SoftLayer/tests/managers/vs_tests.py\n+++ b/SoftLayer/tests/managers/vs_tests.py\n@@ -141,7 +141,7 @@ def test_reload_instance(self):\n def test_create_verify(self, create_dict):\n create_dict.return_value = {'test': 1, 'verify': 1}\n \n- self.vs.verify_create_instance(test=1, verify=1)\n+ self.vs.verify_create_instance(test=1, verify=1, tags=['test', 'tags'])\n \n create_dict.assert_called_once_with(test=1, verify=1)\n self.assert_called_with('SoftLayer_Virtual_Guest',\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_many_modified_files\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 2\n },\n \"num_modified_files\": 3\n}"},"version":{"kind":"string","value":"4.0"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .[dev]\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.6\",\n \"reqs_path\": [\n \"tools/test-requirements.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"alabaster==0.7.13\nattrs==22.2.0\nBabel==2.11.0\ncertifi==2021.5.30\ncharset-normalizer==2.0.12\nclick==8.0.4\ncoverage==6.2\ndistlib==0.3.9\ndocutils==0.18.1\nfilelock==3.4.1\nfixtures==4.0.1\nidna==3.10\nimagesize==1.4.1\nimportlib-metadata==4.8.3\nimportlib-resources==5.4.0\niniconfig==1.1.1\nJinja2==3.0.3\nMarkupSafe==2.0.1\nmock==5.2.0\nnose==1.3.7\npackaging==21.3\npbr==6.1.1\nplatformdirs==2.4.0\npluggy==1.0.0\nprettytable==2.5.0\npy==1.11.0\nPygments==2.14.0\npyparsing==3.1.4\npytest==7.0.1\npytz==2025.2\nrequests==2.27.1\nsix==1.17.0\nsnowballstemmer==2.2.0\n-e git+https://github.com/softlayer/softlayer-python.git@1195b2020ef6efc40462d59eb079f26e5f39a6d8#egg=SoftLayer\nSphinx==5.3.0\nsphinxcontrib-applehelp==1.0.2\nsphinxcontrib-devhelp==1.0.2\nsphinxcontrib-htmlhelp==2.0.0\nsphinxcontrib-jsmath==1.0.1\nsphinxcontrib-qthelp==1.0.3\nsphinxcontrib-serializinghtml==1.1.5\ntesttools==2.6.0\ntoml==0.10.2\ntomli==1.2.3\ntox==3.28.0\ntyping_extensions==4.1.1\nurllib3==1.26.20\nvirtualenv==20.17.1\nwcwidth==0.2.13\nzipp==3.6.0\n"},"environment":{"kind":"string","value":"name: softlayer-python\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - certifi=2021.5.30=py36h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.3=he6710b0_2\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=1.1.1w=h7f8727e_0\n - pip=21.2.2=py36h06a4308_0\n - python=3.6.13=h12debd9_1\n - readline=8.2=h5eee18b_0\n - setuptools=58.0.4=py36h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - wheel=0.37.1=pyhd3eb1b0_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - alabaster==0.7.13\n - attrs==22.2.0\n - babel==2.11.0\n - charset-normalizer==2.0.12\n - click==8.0.4\n - coverage==6.2\n - distlib==0.3.9\n - docutils==0.18.1\n - filelock==3.4.1\n - fixtures==4.0.1\n - idna==3.10\n - imagesize==1.4.1\n - importlib-metadata==4.8.3\n - importlib-resources==5.4.0\n - iniconfig==1.1.1\n - jinja2==3.0.3\n - markupsafe==2.0.1\n - mock==5.2.0\n - nose==1.3.7\n - packaging==21.3\n - pbr==6.1.1\n - platformdirs==2.4.0\n - pluggy==1.0.0\n - prettytable==2.5.0\n - py==1.11.0\n - pygments==2.14.0\n - pyparsing==3.1.4\n - pytest==7.0.1\n - pytz==2025.2\n - requests==2.27.1\n - six==1.17.0\n - snowballstemmer==2.2.0\n - sphinx==5.3.0\n - sphinxcontrib-applehelp==1.0.2\n - sphinxcontrib-devhelp==1.0.2\n - sphinxcontrib-htmlhelp==2.0.0\n - sphinxcontrib-jsmath==1.0.1\n - sphinxcontrib-qthelp==1.0.3\n - sphinxcontrib-serializinghtml==1.1.5\n - testtools==2.6.0\n - toml==0.10.2\n - tomli==1.2.3\n - tox==3.28.0\n - typing-extensions==4.1.1\n - urllib3==1.26.20\n - virtualenv==20.17.1\n - wcwidth==0.2.13\n - zipp==3.6.0\nprefix: /opt/conda/envs/softlayer-python\n"},"FAIL_TO_PASS":{"kind":"list like","value":["SoftLayer/tests/managers/vs_tests.py::VSTests::test_create_verify"],"string":"[\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_create_verify\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["SoftLayer/tests/managers/vs_tests.py::VSTests::test_cancel_instance","SoftLayer/tests/managers/vs_tests.py::VSTests::test_capture_additional_disks","SoftLayer/tests/managers/vs_tests.py::VSTests::test_captures","SoftLayer/tests/managers/vs_tests.py::VSTests::test_change_port_speed_private","SoftLayer/tests/managers/vs_tests.py::VSTests::test_change_port_speed_public","SoftLayer/tests/managers/vs_tests.py::VSTests::test_create_instance","SoftLayer/tests/managers/vs_tests.py::VSTests::test_create_instances","SoftLayer/tests/managers/vs_tests.py::VSTests::test_edit_blank","SoftLayer/tests/managers/vs_tests.py::VSTests::test_edit_full","SoftLayer/tests/managers/vs_tests.py::VSTests::test_edit_metadata","SoftLayer/tests/managers/vs_tests.py::VSTests::test_edit_tags","SoftLayer/tests/managers/vs_tests.py::VSTests::test_edit_tags_blank","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_basic","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_datacenter","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_dedicated","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_image_id","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_missing","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_monthly","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_multi_disk","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_network","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_no_disks","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_os_and_image","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_post_uri","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_private_network_only","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_private_vlan","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_public_vlan","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_single_disk","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_sshkey","SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_userdata","SoftLayer/tests/managers/vs_tests.py::VSTests::test_get_create_options","SoftLayer/tests/managers/vs_tests.py::VSTests::test_get_instance","SoftLayer/tests/managers/vs_tests.py::VSTests::test_get_item_id_for_upgrade","SoftLayer/tests/managers/vs_tests.py::VSTests::test_list_instances","SoftLayer/tests/managers/vs_tests.py::VSTests::test_list_instances_hourly","SoftLayer/tests/managers/vs_tests.py::VSTests::test_list_instances_monthly","SoftLayer/tests/managers/vs_tests.py::VSTests::test_list_instances_neither","SoftLayer/tests/managers/vs_tests.py::VSTests::test_list_instances_with_filters","SoftLayer/tests/managers/vs_tests.py::VSTests::test_reload_instance","SoftLayer/tests/managers/vs_tests.py::VSTests::test_rescue","SoftLayer/tests/managers/vs_tests.py::VSTests::test_resolve_ids_hostname","SoftLayer/tests/managers/vs_tests.py::VSTests::test_resolve_ids_ip","SoftLayer/tests/managers/vs_tests.py::VSTests::test_resolve_ids_ip_invalid","SoftLayer/tests/managers/vs_tests.py::VSTests::test_resolve_ids_ip_private","SoftLayer/tests/managers/vs_tests.py::VSTests::test_upgrade","SoftLayer/tests/managers/vs_tests.py::VSTests::test_upgrade_blank","SoftLayer/tests/managers/vs_tests.py::VSTests::test_upgrade_full","SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_active_and_provisiondate","SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_active_not_provisioned","SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_active_provision_pending","SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_active_reload","SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_iter_four_complete","SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_iter_once_complete","SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_iter_ten_incomplete","SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_iter_two_incomplete","SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_ready_iter_once_incomplete","SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_reload_no_pending","SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_reload_pending","SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_wait_interface"],"string":"[\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_cancel_instance\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_capture_additional_disks\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_captures\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_change_port_speed_private\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_change_port_speed_public\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_create_instance\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_create_instances\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_edit_blank\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_edit_full\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_edit_metadata\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_edit_tags\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_edit_tags_blank\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_basic\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_datacenter\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_dedicated\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_image_id\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_missing\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_monthly\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_multi_disk\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_network\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_no_disks\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_os_and_image\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_post_uri\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_private_network_only\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_private_vlan\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_public_vlan\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_single_disk\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_sshkey\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_generate_userdata\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_get_create_options\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_get_instance\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_get_item_id_for_upgrade\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_list_instances\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_list_instances_hourly\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_list_instances_monthly\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_list_instances_neither\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_list_instances_with_filters\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_reload_instance\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_rescue\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_resolve_ids_hostname\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_resolve_ids_ip\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_resolve_ids_ip_invalid\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_resolve_ids_ip_private\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_upgrade\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_upgrade_blank\",\n \"SoftLayer/tests/managers/vs_tests.py::VSTests::test_upgrade_full\",\n \"SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_active_and_provisiondate\",\n \"SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_active_not_provisioned\",\n \"SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_active_provision_pending\",\n \"SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_active_reload\",\n \"SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_iter_four_complete\",\n \"SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_iter_once_complete\",\n \"SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_iter_ten_incomplete\",\n \"SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_iter_two_incomplete\",\n \"SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_ready_iter_once_incomplete\",\n \"SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_reload_no_pending\",\n \"SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_reload_pending\",\n \"SoftLayer/tests/managers/vs_tests.py::VSWaitReadyGoTests::test_wait_interface\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"MIT License"},"__index_level_0__":{"kind":"number","value":209,"string":"209"},"num_tokens_patch":{"kind":"number","value":698,"string":"698"},"before_filepaths":{"kind":"list like","value":["SoftLayer/CLI/server/detail.py","SoftLayer/CLI/virt/detail.py","SoftLayer/managers/vs.py"],"string":"[\n \"SoftLayer/CLI/server/detail.py\",\n \"SoftLayer/CLI/virt/detail.py\",\n \"SoftLayer/managers/vs.py\"\n]"}}},{"rowIdx":46,"cells":{"instance_id":{"kind":"string","value":"tobgu__pyrsistent-57"},"base_commit":{"kind":"string","value":"d35ea98728473bd070ff1e6ac5304e4e12ea816c"},"created_at":{"kind":"string","value":"2015-09-14 21:17:17"},"environment_setup_commit":{"kind":"string","value":"87706acb8297805b56bcc2c0f89ffa73eb1de0d1"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/pyrsistent/_field_common.py b/pyrsistent/_field_common.py\nindex 6934978..04231c0 100644\n--- a/pyrsistent/_field_common.py\n+++ b/pyrsistent/_field_common.py\n@@ -2,7 +2,8 @@ from collections import Iterable\n import six\n from pyrsistent._checked_types import (\n CheckedType, CheckedPSet, CheckedPMap, CheckedPVector,\n- optional as optional_type, InvariantException, get_type, wrap_invariant)\n+ optional as optional_type, InvariantException, get_type, wrap_invariant,\n+ _restore_pickle)\n \n \n def set_fields(dct, bases, name):\n@@ -121,12 +122,42 @@ class PTypeError(TypeError):\n self.actual_type = actual_type\n \n \n-def _sequence_field(checked_class, suffix, item_type, optional, initial):\n+SEQ_FIELD_TYPE_SUFFIXES = {\n+ CheckedPVector: \"PVector\",\n+ CheckedPSet: \"PSet\",\n+}\n+\n+# Global dictionary to hold auto-generated field types: used for unpickling\n+_seq_field_types = {}\n+\n+def _restore_seq_field_pickle(checked_class, item_type, data):\n+ \"\"\"Unpickling function for auto-generated PVec/PSet field types.\"\"\"\n+ type_ = _seq_field_types[checked_class, item_type]\n+ return _restore_pickle(type_, data)\n+\n+def _make_seq_field_type(checked_class, item_type):\n+ \"\"\"Create a subclass of the given checked class with the given item type.\"\"\"\n+ type_ = _seq_field_types.get((checked_class, item_type))\n+ if type_ is not None:\n+ return type_\n+\n+ class TheType(checked_class):\n+ __type__ = item_type\n+\n+ def __reduce__(self):\n+ return (_restore_seq_field_pickle,\n+ (checked_class, item_type, list(self)))\n+\n+ suffix = SEQ_FIELD_TYPE_SUFFIXES[checked_class]\n+ TheType.__name__ = item_type.__name__.capitalize() + suffix\n+ _seq_field_types[checked_class, item_type] = TheType\n+ return TheType\n+\n+def _sequence_field(checked_class, item_type, optional, initial):\n \"\"\"\n Create checked field for either ``PSet`` or ``PVector``.\n \n :param checked_class: ``CheckedPSet`` or ``CheckedPVector``.\n- :param suffix: Suffix for new type name.\n :param item_type: The required type for the items in the set.\n :param optional: If true, ``None`` can be used as a value for\n this field.\n@@ -134,9 +165,7 @@ def _sequence_field(checked_class, suffix, item_type, optional, initial):\n \n :return: A ``field`` containing a checked class.\n \"\"\"\n- class TheType(checked_class):\n- __type__ = item_type\n- TheType.__name__ = item_type.__name__.capitalize() + suffix\n+ TheType = _make_seq_field_type(checked_class, item_type)\n \n if optional:\n def factory(argument):\n@@ -164,7 +193,7 @@ def pset_field(item_type, optional=False, initial=()):\n \n :return: A ``field`` containing a ``CheckedPSet`` of the given type.\n \"\"\"\n- return _sequence_field(CheckedPSet, \"PSet\", item_type, optional,\n+ return _sequence_field(CheckedPSet, item_type, optional,\n initial)\n \n \n@@ -180,13 +209,41 @@ def pvector_field(item_type, optional=False, initial=()):\n \n :return: A ``field`` containing a ``CheckedPVector`` of the given type.\n \"\"\"\n- return _sequence_field(CheckedPVector, \"PVector\", item_type, optional,\n+ return _sequence_field(CheckedPVector, item_type, optional,\n initial)\n \n \n _valid = lambda item: (True, \"\")\n \n \n+# Global dictionary to hold auto-generated field types: used for unpickling\n+_pmap_field_types = {}\n+\n+def _restore_pmap_field_pickle(key_type, value_type, data):\n+ \"\"\"Unpickling function for auto-generated PMap field types.\"\"\"\n+ type_ = _pmap_field_types[key_type, value_type]\n+ return _restore_pickle(type_, data)\n+\n+def _make_pmap_field_type(key_type, value_type):\n+ \"\"\"Create a subclass of CheckedPMap with the given key and value types.\"\"\"\n+ type_ = _pmap_field_types.get((key_type, value_type))\n+ if type_ is not None:\n+ return type_\n+\n+ class TheMap(CheckedPMap):\n+ __key_type__ = key_type\n+ __value_type__ = value_type\n+\n+ def __reduce__(self):\n+ return (_restore_pmap_field_pickle,\n+ (self.__key_type__, self.__value_type__, dict(self)))\n+\n+ TheMap.__name__ = (key_type.__name__.capitalize() +\n+ value_type.__name__.capitalize() + \"PMap\")\n+ _pmap_field_types[key_type, value_type] = TheMap\n+ return TheMap\n+\n+\n def pmap_field(key_type, value_type, optional=False, invariant=PFIELD_NO_INVARIANT):\n \"\"\"\n Create a checked ``PMap`` field.\n@@ -199,11 +256,7 @@ def pmap_field(key_type, value_type, optional=False, invariant=PFIELD_NO_INVARIA\n \n :return: A ``field`` containing a ``CheckedPMap``.\n \"\"\"\n- class TheMap(CheckedPMap):\n- __key_type__ = key_type\n- __value_type__ = value_type\n- TheMap.__name__ = (key_type.__name__.capitalize() +\n- value_type.__name__.capitalize() + \"PMap\")\n+ TheMap = _make_pmap_field_type(key_type, value_type)\n \n if optional:\n def factory(argument):\n"},"problem_statement":{"kind":"string","value":"p*_field prevents pickle from working on a PClass\nI would never use pickle in production, but as I was trying to write some strawman example storage code for an example app, I discovered that while I could pickle basic PClasses, I can't pickle any that use pmap_field or pvector_field (and probably others that have similar implementations)\r\n\r\ne.g.:\r\n\r\n```\r\n>>> class Foo(PClass):\r\n... v = pvector_field(int)\r\n...\r\n>>> Foo()\r\nFoo(v=IntPVector([]))\r\n>>> dumps(Foo())\r\nTraceback (most recent call last):\r\n File \"\", line 1, in \r\ncPickle.PicklingError: Can't pickle : attribute lookup pyrsistent._field_common.IntPVector failed\r\n```\r\n\r\nThe same happens for `pmap_field`.\r\n\r\nI guess this is because of the way that those functions generate classes at runtime?\r\n\r\n@tobgu if you can let me know what needs done to fix this I can try to submit a PR."},"repo":{"kind":"string","value":"tobgu/pyrsistent"},"test_patch":{"kind":"string","value":"diff --git a/tests/class_test.py b/tests/class_test.py\nindex f7254b4..0caddba 100644\n--- a/tests/class_test.py\n+++ b/tests/class_test.py\n@@ -2,7 +2,9 @@ from collections import Hashable\n import math\n import pickle\n import pytest\n-from pyrsistent import field, InvariantException, PClass, optional, CheckedPVector\n+from pyrsistent import (\n+ field, InvariantException, PClass, optional, CheckedPVector,\n+ pmap_field, pset_field, pvector_field)\n \n \n class Point(PClass):\n@@ -11,6 +13,12 @@ class Point(PClass):\n z = field(type=int, initial=0)\n \n \n+class TypedContainerObj(PClass):\n+ map = pmap_field(str, str)\n+ set = pset_field(str)\n+ vec = pvector_field(str)\n+\n+\n def test_evolve_pclass_instance():\n p = Point(x=1, y=2)\n p2 = p.set(x=p.x+2)\n@@ -165,6 +173,12 @@ def test_supports_pickling():\n assert isinstance(p2, Point)\n \n \n+def test_supports_pickling_with_typed_container_fields():\n+ obj = TypedContainerObj(map={'foo': 'bar'}, set=['hello', 'there'], vec=['a', 'b'])\n+ obj2 = pickle.loads(pickle.dumps(obj))\n+ assert obj == obj2\n+\n+\n def test_can_remove_optional_member():\n p1 = Point(x=1, y=2)\n p2 = p1.remove('y')\n@@ -250,4 +264,4 @@ def test_multiple_global_invariants():\n MultiInvariantGlobal(one=1)\n assert False\n except InvariantException as e:\n- assert e.invariant_errors == (('x', 'y'),)\n\\ No newline at end of file\n+ assert e.invariant_errors == (('x', 'y'),)\ndiff --git a/tests/record_test.py b/tests/record_test.py\nindex 9146bd0..b2439e5 100644\n--- a/tests/record_test.py\n+++ b/tests/record_test.py\n@@ -13,6 +13,12 @@ class ARecord(PRecord):\n y = field()\n \n \n+class RecordContainingContainers(PRecord):\n+ map = pmap_field(str, str)\n+ vec = pvector_field(str)\n+ set = pset_field(str)\n+\n+\n def test_create():\n r = ARecord(x=1, y='foo')\n assert r.x == 1\n@@ -223,6 +229,11 @@ def test_pickling():\n assert x == y\n assert isinstance(y, ARecord)\n \n+def test_supports_pickling_with_typed_container_fields():\n+ obj = RecordContainingContainers(\n+ map={'foo': 'bar'}, set=['hello', 'there'], vec=['a', 'b'])\n+ obj2 = pickle.loads(pickle.dumps(obj))\n+ assert obj == obj2\n \n def test_all_invariant_errors_reported():\n class BRecord(PRecord):\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_many_hunks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 2,\n \"test_score\": 1\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"0.11"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest\",\n \"pytest-cov\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.9\",\n \"reqs_path\": [\n \"requirements.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"alabaster==0.7.16\nattrs==25.3.0\nbabel==2.17.0\ncachetools==5.5.2\ncertifi==2025.1.31\nchardet==5.2.0\ncharset-normalizer==3.4.1\ncolorama==0.4.6\ncoverage==7.8.0\ndistlib==0.3.9\ndocutils==0.21.2\nexceptiongroup==1.2.2\nfilelock==3.18.0\nhypothesis==6.130.5\nidna==3.10\nimagesize==1.4.1\nimportlib_metadata==8.6.1\niniconfig==2.1.0\nJinja2==3.1.6\nMarkupSafe==3.0.2\nmemory_profiler==0.31\npackaging==24.2\nplatformdirs==4.3.7\npluggy==1.5.0\npsutil==2.1.1\npy==1.11.0\nPygments==2.19.1\npyperform==1.86\npyproject-api==1.9.0\n-e git+https://github.com/tobgu/pyrsistent.git@d35ea98728473bd070ff1e6ac5304e4e12ea816c#egg=pyrsistent\npytest==8.3.5\npytest-cov==6.0.0\nrequests==2.32.3\nsix==1.17.0\nsnowballstemmer==2.2.0\nsortedcontainers==2.4.0\nSphinx==7.4.7\nsphinx_rtd_theme==0.1.5\nsphinxcontrib-applehelp==2.0.0\nsphinxcontrib-devhelp==2.0.0\nsphinxcontrib-htmlhelp==2.1.0\nsphinxcontrib-jsmath==1.0.1\nsphinxcontrib-qthelp==2.0.0\nsphinxcontrib-serializinghtml==2.0.0\ntomli==2.2.1\ntox==4.25.0\ntyping_extensions==4.13.0\nurllib3==2.3.0\nvirtualenv==20.29.3\nzipp==3.21.0\n"},"environment":{"kind":"string","value":"name: pyrsistent\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - pip=25.0=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - alabaster==0.7.16\n - attrs==25.3.0\n - babel==2.17.0\n - cachetools==5.5.2\n - certifi==2025.1.31\n - chardet==5.2.0\n - charset-normalizer==3.4.1\n - colorama==0.4.6\n - coverage==7.8.0\n - distlib==0.3.9\n - docutils==0.21.2\n - exceptiongroup==1.2.2\n - filelock==3.18.0\n - hypothesis==6.130.5\n - idna==3.10\n - imagesize==1.4.1\n - importlib-metadata==8.6.1\n - iniconfig==2.1.0\n - jinja2==3.1.6\n - markupsafe==3.0.2\n - memory-profiler==0.31\n - packaging==24.2\n - platformdirs==4.3.7\n - pluggy==1.5.0\n - psutil==2.1.1\n - py==1.11.0\n - pygments==2.19.1\n - pyperform==1.86\n - pyproject-api==1.9.0\n - pytest==8.3.5\n - pytest-cov==6.0.0\n - requests==2.32.3\n - six==1.17.0\n - snowballstemmer==2.2.0\n - sortedcontainers==2.4.0\n - sphinx==7.4.7\n - sphinx-rtd-theme==0.1.5\n - sphinxcontrib-applehelp==2.0.0\n - sphinxcontrib-devhelp==2.0.0\n - sphinxcontrib-htmlhelp==2.1.0\n - sphinxcontrib-jsmath==1.0.1\n - sphinxcontrib-qthelp==2.0.0\n - sphinxcontrib-serializinghtml==2.0.0\n - tomli==2.2.1\n - tox==4.25.0\n - typing-extensions==4.13.0\n - urllib3==2.3.0\n - virtualenv==20.29.3\n - zipp==3.21.0\nprefix: /opt/conda/envs/pyrsistent\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/class_test.py::test_supports_pickling_with_typed_container_fields","tests/record_test.py::test_supports_pickling_with_typed_container_fields"],"string":"[\n \"tests/class_test.py::test_supports_pickling_with_typed_container_fields\",\n \"tests/record_test.py::test_supports_pickling_with_typed_container_fields\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/class_test.py::test_evolve_pclass_instance","tests/class_test.py::test_direct_assignment_not_possible","tests/class_test.py::test_direct_delete_not_possible","tests/class_test.py::test_cannot_construct_with_undeclared_fields","tests/class_test.py::test_cannot_construct_with_wrong_type","tests/class_test.py::test_cannot_construct_without_mandatory_fields","tests/class_test.py::test_field_invariant_must_hold","tests/class_test.py::test_initial_value_set_when_not_present_in_arguments","tests/class_test.py::test_can_create_nested_structures_from_dict_and_serialize_back_to_dict","tests/class_test.py::test_can_serialize_with_custom_serializer","tests/class_test.py::test_implements_proper_equality_based_on_equality_of_fields","tests/class_test.py::test_is_hashable","tests/class_test.py::test_supports_nested_transformation","tests/class_test.py::test_repr","tests/class_test.py::test_global_invariant_check","tests/class_test.py::test_supports_pickling","tests/class_test.py::test_can_remove_optional_member","tests/class_test.py::test_cannot_remove_mandatory_member","tests/class_test.py::test_cannot_remove_non_existing_member","tests/class_test.py::test_evolver_without_evolution_returns_original_instance","tests/class_test.py::test_evolver_with_evolution_to_same_element_returns_original_instance","tests/class_test.py::test_evolver_supports_chained_set_and_remove","tests/class_test.py::test_string_as_type_specifier","tests/class_test.py::test_multiple_invariants_on_field","tests/class_test.py::test_multiple_global_invariants","tests/record_test.py::test_create","tests/record_test.py::test_correct_assignment","tests/record_test.py::test_direct_assignment_not_possible","tests/record_test.py::test_cannot_assign_undeclared_fields","tests/record_test.py::test_cannot_assign_wrong_type_to_fields","tests/record_test.py::test_cannot_construct_with_undeclared_fields","tests/record_test.py::test_cannot_construct_with_fields_of_wrong_type","tests/record_test.py::test_support_record_inheritance","tests/record_test.py::test_single_type_spec","tests/record_test.py::test_remove","tests/record_test.py::test_remove_non_existing_member","tests/record_test.py::test_field_invariant_must_hold","tests/record_test.py::test_global_invariant_must_hold","tests/record_test.py::test_set_multiple_fields","tests/record_test.py::test_initial_value","tests/record_test.py::test_type_specification_must_be_a_type","tests/record_test.py::test_initial_must_be_of_correct_type","tests/record_test.py::test_invariant_must_be_callable","tests/record_test.py::test_global_invariants_are_inherited","tests/record_test.py::test_global_invariants_must_be_callable","tests/record_test.py::test_repr","tests/record_test.py::test_factory","tests/record_test.py::test_factory_must_be_callable","tests/record_test.py::test_nested_record_construction","tests/record_test.py::test_pickling","tests/record_test.py::test_all_invariant_errors_reported","tests/record_test.py::test_precord_factory_method_is_idempotent","tests/record_test.py::test_serialize","tests/record_test.py::test_nested_serialize","tests/record_test.py::test_serializer_must_be_callable","tests/record_test.py::test_transform_without_update_returns_same_precord","tests/record_test.py::test_nested_create_serialize","tests/record_test.py::test_pset_field_initial_value","tests/record_test.py::test_pset_field_custom_initial","tests/record_test.py::test_pset_field_factory","tests/record_test.py::test_pset_field_checked_set","tests/record_test.py::test_pset_field_type","tests/record_test.py::test_pset_field_mandatory","tests/record_test.py::test_pset_field_default_non_optional","tests/record_test.py::test_pset_field_explicit_non_optional","tests/record_test.py::test_pset_field_optional","tests/record_test.py::test_pset_field_name","tests/record_test.py::test_pvector_field_initial_value","tests/record_test.py::test_pvector_field_custom_initial","tests/record_test.py::test_pvector_field_factory","tests/record_test.py::test_pvector_field_checked_vector","tests/record_test.py::test_pvector_field_type","tests/record_test.py::test_pvector_field_mandatory","tests/record_test.py::test_pvector_field_default_non_optional","tests/record_test.py::test_pvector_field_explicit_non_optional","tests/record_test.py::test_pvector_field_optional","tests/record_test.py::test_pvector_field_name","tests/record_test.py::test_pvector_field_create_from_nested_serialized_data","tests/record_test.py::test_pmap_field_initial_value","tests/record_test.py::test_pmap_field_factory","tests/record_test.py::test_pmap_field_checked_map_key","tests/record_test.py::test_pmap_field_checked_map_value","tests/record_test.py::test_pmap_field_mandatory","tests/record_test.py::test_pmap_field_default_non_optional","tests/record_test.py::test_pmap_field_explicit_non_optional","tests/record_test.py::test_pmap_field_optional","tests/record_test.py::test_pmap_field_name","tests/record_test.py::test_pmap_field_invariant","tests/record_test.py::test_pmap_field_create_from_nested_serialized_data"],"string":"[\n \"tests/class_test.py::test_evolve_pclass_instance\",\n \"tests/class_test.py::test_direct_assignment_not_possible\",\n \"tests/class_test.py::test_direct_delete_not_possible\",\n \"tests/class_test.py::test_cannot_construct_with_undeclared_fields\",\n \"tests/class_test.py::test_cannot_construct_with_wrong_type\",\n \"tests/class_test.py::test_cannot_construct_without_mandatory_fields\",\n \"tests/class_test.py::test_field_invariant_must_hold\",\n \"tests/class_test.py::test_initial_value_set_when_not_present_in_arguments\",\n \"tests/class_test.py::test_can_create_nested_structures_from_dict_and_serialize_back_to_dict\",\n \"tests/class_test.py::test_can_serialize_with_custom_serializer\",\n \"tests/class_test.py::test_implements_proper_equality_based_on_equality_of_fields\",\n \"tests/class_test.py::test_is_hashable\",\n \"tests/class_test.py::test_supports_nested_transformation\",\n \"tests/class_test.py::test_repr\",\n \"tests/class_test.py::test_global_invariant_check\",\n \"tests/class_test.py::test_supports_pickling\",\n \"tests/class_test.py::test_can_remove_optional_member\",\n \"tests/class_test.py::test_cannot_remove_mandatory_member\",\n \"tests/class_test.py::test_cannot_remove_non_existing_member\",\n \"tests/class_test.py::test_evolver_without_evolution_returns_original_instance\",\n \"tests/class_test.py::test_evolver_with_evolution_to_same_element_returns_original_instance\",\n \"tests/class_test.py::test_evolver_supports_chained_set_and_remove\",\n \"tests/class_test.py::test_string_as_type_specifier\",\n \"tests/class_test.py::test_multiple_invariants_on_field\",\n \"tests/class_test.py::test_multiple_global_invariants\",\n \"tests/record_test.py::test_create\",\n \"tests/record_test.py::test_correct_assignment\",\n \"tests/record_test.py::test_direct_assignment_not_possible\",\n \"tests/record_test.py::test_cannot_assign_undeclared_fields\",\n \"tests/record_test.py::test_cannot_assign_wrong_type_to_fields\",\n \"tests/record_test.py::test_cannot_construct_with_undeclared_fields\",\n \"tests/record_test.py::test_cannot_construct_with_fields_of_wrong_type\",\n \"tests/record_test.py::test_support_record_inheritance\",\n \"tests/record_test.py::test_single_type_spec\",\n \"tests/record_test.py::test_remove\",\n \"tests/record_test.py::test_remove_non_existing_member\",\n \"tests/record_test.py::test_field_invariant_must_hold\",\n \"tests/record_test.py::test_global_invariant_must_hold\",\n \"tests/record_test.py::test_set_multiple_fields\",\n \"tests/record_test.py::test_initial_value\",\n \"tests/record_test.py::test_type_specification_must_be_a_type\",\n \"tests/record_test.py::test_initial_must_be_of_correct_type\",\n \"tests/record_test.py::test_invariant_must_be_callable\",\n \"tests/record_test.py::test_global_invariants_are_inherited\",\n \"tests/record_test.py::test_global_invariants_must_be_callable\",\n \"tests/record_test.py::test_repr\",\n \"tests/record_test.py::test_factory\",\n \"tests/record_test.py::test_factory_must_be_callable\",\n \"tests/record_test.py::test_nested_record_construction\",\n \"tests/record_test.py::test_pickling\",\n \"tests/record_test.py::test_all_invariant_errors_reported\",\n \"tests/record_test.py::test_precord_factory_method_is_idempotent\",\n \"tests/record_test.py::test_serialize\",\n \"tests/record_test.py::test_nested_serialize\",\n \"tests/record_test.py::test_serializer_must_be_callable\",\n \"tests/record_test.py::test_transform_without_update_returns_same_precord\",\n \"tests/record_test.py::test_nested_create_serialize\",\n \"tests/record_test.py::test_pset_field_initial_value\",\n \"tests/record_test.py::test_pset_field_custom_initial\",\n \"tests/record_test.py::test_pset_field_factory\",\n \"tests/record_test.py::test_pset_field_checked_set\",\n \"tests/record_test.py::test_pset_field_type\",\n \"tests/record_test.py::test_pset_field_mandatory\",\n \"tests/record_test.py::test_pset_field_default_non_optional\",\n \"tests/record_test.py::test_pset_field_explicit_non_optional\",\n \"tests/record_test.py::test_pset_field_optional\",\n \"tests/record_test.py::test_pset_field_name\",\n \"tests/record_test.py::test_pvector_field_initial_value\",\n \"tests/record_test.py::test_pvector_field_custom_initial\",\n \"tests/record_test.py::test_pvector_field_factory\",\n \"tests/record_test.py::test_pvector_field_checked_vector\",\n \"tests/record_test.py::test_pvector_field_type\",\n \"tests/record_test.py::test_pvector_field_mandatory\",\n \"tests/record_test.py::test_pvector_field_default_non_optional\",\n \"tests/record_test.py::test_pvector_field_explicit_non_optional\",\n \"tests/record_test.py::test_pvector_field_optional\",\n \"tests/record_test.py::test_pvector_field_name\",\n \"tests/record_test.py::test_pvector_field_create_from_nested_serialized_data\",\n \"tests/record_test.py::test_pmap_field_initial_value\",\n \"tests/record_test.py::test_pmap_field_factory\",\n \"tests/record_test.py::test_pmap_field_checked_map_key\",\n \"tests/record_test.py::test_pmap_field_checked_map_value\",\n \"tests/record_test.py::test_pmap_field_mandatory\",\n \"tests/record_test.py::test_pmap_field_default_non_optional\",\n \"tests/record_test.py::test_pmap_field_explicit_non_optional\",\n \"tests/record_test.py::test_pmap_field_optional\",\n \"tests/record_test.py::test_pmap_field_name\",\n \"tests/record_test.py::test_pmap_field_invariant\",\n \"tests/record_test.py::test_pmap_field_create_from_nested_serialized_data\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"MIT License"},"__index_level_0__":{"kind":"number","value":238,"string":"238"},"num_tokens_patch":{"kind":"number","value":1348,"string":"1,348"},"before_filepaths":{"kind":"list like","value":["pyrsistent/_field_common.py"],"string":"[\n \"pyrsistent/_field_common.py\"\n]"}}},{"rowIdx":47,"cells":{"instance_id":{"kind":"string","value":"docker__docker-py-770"},"base_commit":{"kind":"string","value":"02f330d8dc3da47215bed47b44fac73941ea6920"},"created_at":{"kind":"string","value":"2015-09-15 21:47:09"},"environment_setup_commit":{"kind":"string","value":"f479720d517a7db7f886916190b3032d29d18f10"},"hints_text":{"kind":"string","value":"shin-: #764 needs to be merged for the tests to pass."},"patch":{"kind":"string","value":"diff --git a/docker/utils/utils.py b/docker/utils/utils.py\nindex 46b35160..36edf8de 100644\n--- a/docker/utils/utils.py\n+++ b/docker/utils/utils.py\n@@ -457,7 +457,8 @@ def create_host_config(\n restart_policy=None, cap_add=None, cap_drop=None, devices=None,\n extra_hosts=None, read_only=None, pid_mode=None, ipc_mode=None,\n security_opt=None, ulimits=None, log_config=None, mem_limit=None,\n- memswap_limit=None, cgroup_parent=None, group_add=None, version=None\n+ memswap_limit=None, cgroup_parent=None, group_add=None, cpu_quota=None,\n+ cpu_period=None, version=None\n ):\n host_config = {}\n \n@@ -518,7 +519,7 @@ def create_host_config(\n host_config['Devices'] = parse_devices(devices)\n \n if group_add:\n- if compare_version(version, '1.20') < 0:\n+ if version_lt(version, '1.20'):\n raise errors.InvalidVersion(\n 'group_add param not supported for API version < 1.20'\n )\n@@ -601,6 +602,30 @@ def create_host_config(\n log_config = LogConfig(**log_config)\n host_config['LogConfig'] = log_config\n \n+ if cpu_quota:\n+ if not isinstance(cpu_quota, int):\n+ raise TypeError(\n+ 'Invalid type for cpu_quota param: expected int but'\n+ ' found {0}'.format(type(cpu_quota))\n+ )\n+ if version_lt(version, '1.19'):\n+ raise errors.InvalidVersion(\n+ 'cpu_quota param not supported for API version < 1.19'\n+ )\n+ host_config['CpuQuota'] = cpu_quota\n+\n+ if cpu_period:\n+ if not isinstance(cpu_period, int):\n+ raise TypeError(\n+ 'Invalid type for cpu_period param: expected int but'\n+ ' found {0}'.format(type(cpu_period))\n+ )\n+ if version_lt(version, '1.19'):\n+ raise errors.InvalidVersion(\n+ 'cpu_period param not supported for API version < 1.19'\n+ )\n+ host_config['CpuPeriod'] = cpu_period\n+\n return host_config\n \n \n"},"problem_statement":{"kind":"string","value":"Add support for --cpu-quota & --cpu-period run flags\nAny chance we could add support for the above run flags?\r\nhttps://docs.docker.com/reference/commandline/run/"},"repo":{"kind":"string","value":"docker/docker-py"},"test_patch":{"kind":"string","value":"diff --git a/tests/utils_test.py b/tests/utils_test.py\nindex b67ac4ec..45929f73 100644\n--- a/tests/utils_test.py\n+++ b/tests/utils_test.py\n@@ -25,6 +25,159 @@ TEST_CERT_DIR = os.path.join(\n )\n \n \n+class HostConfigTest(base.BaseTestCase):\n+ def test_create_host_config_no_options(self):\n+ config = create_host_config(version='1.19')\n+ self.assertFalse('NetworkMode' in config)\n+\n+ def test_create_host_config_no_options_newer_api_version(self):\n+ config = create_host_config(version='1.20')\n+ self.assertEqual(config['NetworkMode'], 'default')\n+\n+ def test_create_host_config_invalid_cpu_cfs_types(self):\n+ with pytest.raises(TypeError):\n+ create_host_config(version='1.20', cpu_quota='0')\n+\n+ with pytest.raises(TypeError):\n+ create_host_config(version='1.20', cpu_period='0')\n+\n+ with pytest.raises(TypeError):\n+ create_host_config(version='1.20', cpu_quota=23.11)\n+\n+ with pytest.raises(TypeError):\n+ create_host_config(version='1.20', cpu_period=1999.0)\n+\n+ def test_create_host_config_with_cpu_quota(self):\n+ config = create_host_config(version='1.20', cpu_quota=1999)\n+ self.assertEqual(config.get('CpuQuota'), 1999)\n+\n+ def test_create_host_config_with_cpu_period(self):\n+ config = create_host_config(version='1.20', cpu_period=1999)\n+ self.assertEqual(config.get('CpuPeriod'), 1999)\n+\n+\n+class UlimitTest(base.BaseTestCase):\n+ def test_create_host_config_dict_ulimit(self):\n+ ulimit_dct = {'name': 'nofile', 'soft': 8096}\n+ config = create_host_config(\n+ ulimits=[ulimit_dct], version=DEFAULT_DOCKER_API_VERSION\n+ )\n+ self.assertIn('Ulimits', config)\n+ self.assertEqual(len(config['Ulimits']), 1)\n+ ulimit_obj = config['Ulimits'][0]\n+ self.assertTrue(isinstance(ulimit_obj, Ulimit))\n+ self.assertEqual(ulimit_obj.name, ulimit_dct['name'])\n+ self.assertEqual(ulimit_obj.soft, ulimit_dct['soft'])\n+ self.assertEqual(ulimit_obj['Soft'], ulimit_obj.soft)\n+\n+ def test_create_host_config_dict_ulimit_capitals(self):\n+ ulimit_dct = {'Name': 'nofile', 'Soft': 8096, 'Hard': 8096 * 4}\n+ config = create_host_config(\n+ ulimits=[ulimit_dct], version=DEFAULT_DOCKER_API_VERSION\n+ )\n+ self.assertIn('Ulimits', config)\n+ self.assertEqual(len(config['Ulimits']), 1)\n+ ulimit_obj = config['Ulimits'][0]\n+ self.assertTrue(isinstance(ulimit_obj, Ulimit))\n+ self.assertEqual(ulimit_obj.name, ulimit_dct['Name'])\n+ self.assertEqual(ulimit_obj.soft, ulimit_dct['Soft'])\n+ self.assertEqual(ulimit_obj.hard, ulimit_dct['Hard'])\n+ self.assertEqual(ulimit_obj['Soft'], ulimit_obj.soft)\n+\n+ def test_create_host_config_obj_ulimit(self):\n+ ulimit_dct = Ulimit(name='nofile', soft=8096)\n+ config = create_host_config(\n+ ulimits=[ulimit_dct], version=DEFAULT_DOCKER_API_VERSION\n+ )\n+ self.assertIn('Ulimits', config)\n+ self.assertEqual(len(config['Ulimits']), 1)\n+ ulimit_obj = config['Ulimits'][0]\n+ self.assertTrue(isinstance(ulimit_obj, Ulimit))\n+ self.assertEqual(ulimit_obj, ulimit_dct)\n+\n+ def test_ulimit_invalid_type(self):\n+ self.assertRaises(ValueError, lambda: Ulimit(name=None))\n+ self.assertRaises(ValueError, lambda: Ulimit(name='hello', soft='123'))\n+ self.assertRaises(ValueError, lambda: Ulimit(name='hello', hard='456'))\n+\n+\n+class LogConfigTest(base.BaseTestCase):\n+ def test_create_host_config_dict_logconfig(self):\n+ dct = {'type': LogConfig.types.SYSLOG, 'config': {'key1': 'val1'}}\n+ config = create_host_config(\n+ version=DEFAULT_DOCKER_API_VERSION, log_config=dct\n+ )\n+ self.assertIn('LogConfig', config)\n+ self.assertTrue(isinstance(config['LogConfig'], LogConfig))\n+ self.assertEqual(dct['type'], config['LogConfig'].type)\n+\n+ def test_create_host_config_obj_logconfig(self):\n+ obj = LogConfig(type=LogConfig.types.SYSLOG, config={'key1': 'val1'})\n+ config = create_host_config(\n+ version=DEFAULT_DOCKER_API_VERSION, log_config=obj\n+ )\n+ self.assertIn('LogConfig', config)\n+ self.assertTrue(isinstance(config['LogConfig'], LogConfig))\n+ self.assertEqual(obj, config['LogConfig'])\n+\n+ def test_logconfig_invalid_config_type(self):\n+ with pytest.raises(ValueError):\n+ LogConfig(type=LogConfig.types.JSON, config='helloworld')\n+\n+\n+class KwargsFromEnvTest(base.BaseTestCase):\n+ def setUp(self):\n+ self.os_environ = os.environ.copy()\n+\n+ def tearDown(self):\n+ os.environ = self.os_environ\n+\n+ def test_kwargs_from_env_empty(self):\n+ os.environ.update(DOCKER_HOST='',\n+ DOCKER_CERT_PATH='',\n+ DOCKER_TLS_VERIFY='')\n+\n+ kwargs = kwargs_from_env()\n+ self.assertEqual(None, kwargs.get('base_url'))\n+ self.assertEqual(None, kwargs.get('tls'))\n+\n+ def test_kwargs_from_env_tls(self):\n+ os.environ.update(DOCKER_HOST='tcp://192.168.59.103:2376',\n+ DOCKER_CERT_PATH=TEST_CERT_DIR,\n+ DOCKER_TLS_VERIFY='1')\n+ kwargs = kwargs_from_env(assert_hostname=False)\n+ self.assertEqual('https://192.168.59.103:2376', kwargs['base_url'])\n+ self.assertTrue('ca.pem' in kwargs['tls'].verify)\n+ self.assertTrue('cert.pem' in kwargs['tls'].cert[0])\n+ self.assertTrue('key.pem' in kwargs['tls'].cert[1])\n+ self.assertEqual(False, kwargs['tls'].assert_hostname)\n+ try:\n+ client = Client(**kwargs)\n+ self.assertEqual(kwargs['base_url'], client.base_url)\n+ self.assertEqual(kwargs['tls'].verify, client.verify)\n+ self.assertEqual(kwargs['tls'].cert, client.cert)\n+ except TypeError as e:\n+ self.fail(e)\n+\n+ def test_kwargs_from_env_no_cert_path(self):\n+ try:\n+ temp_dir = tempfile.mkdtemp()\n+ cert_dir = os.path.join(temp_dir, '.docker')\n+ shutil.copytree(TEST_CERT_DIR, cert_dir)\n+\n+ os.environ.update(HOME=temp_dir,\n+ DOCKER_CERT_PATH='',\n+ DOCKER_TLS_VERIFY='1')\n+\n+ kwargs = kwargs_from_env()\n+ self.assertIn(cert_dir, kwargs['tls'].verify)\n+ self.assertIn(cert_dir, kwargs['tls'].cert[0])\n+ self.assertIn(cert_dir, kwargs['tls'].cert[1])\n+ finally:\n+ if temp_dir:\n+ shutil.rmtree(temp_dir)\n+\n+\n class UtilsTest(base.BaseTestCase):\n longMessage = True\n \n@@ -39,12 +192,6 @@ class UtilsTest(base.BaseTestCase):\n local_tempfile.close()\n return local_tempfile.name\n \n- def setUp(self):\n- self.os_environ = os.environ.copy()\n-\n- def tearDown(self):\n- os.environ = self.os_environ\n-\n def test_parse_repository_tag(self):\n self.assertEqual(parse_repository_tag(\"root\"),\n (\"root\", None))\n@@ -103,51 +250,6 @@ class UtilsTest(base.BaseTestCase):\n \n assert parse_host(val, 'win32') == tcp_port\n \n- def test_kwargs_from_env_empty(self):\n- os.environ.update(DOCKER_HOST='',\n- DOCKER_CERT_PATH='',\n- DOCKER_TLS_VERIFY='')\n-\n- kwargs = kwargs_from_env()\n- self.assertEqual(None, kwargs.get('base_url'))\n- self.assertEqual(None, kwargs.get('tls'))\n-\n- def test_kwargs_from_env_tls(self):\n- os.environ.update(DOCKER_HOST='tcp://192.168.59.103:2376',\n- DOCKER_CERT_PATH=TEST_CERT_DIR,\n- DOCKER_TLS_VERIFY='1')\n- kwargs = kwargs_from_env(assert_hostname=False)\n- self.assertEqual('https://192.168.59.103:2376', kwargs['base_url'])\n- self.assertTrue('ca.pem' in kwargs['tls'].verify)\n- self.assertTrue('cert.pem' in kwargs['tls'].cert[0])\n- self.assertTrue('key.pem' in kwargs['tls'].cert[1])\n- self.assertEqual(False, kwargs['tls'].assert_hostname)\n- try:\n- client = Client(**kwargs)\n- self.assertEqual(kwargs['base_url'], client.base_url)\n- self.assertEqual(kwargs['tls'].verify, client.verify)\n- self.assertEqual(kwargs['tls'].cert, client.cert)\n- except TypeError as e:\n- self.fail(e)\n-\n- def test_kwargs_from_env_no_cert_path(self):\n- try:\n- temp_dir = tempfile.mkdtemp()\n- cert_dir = os.path.join(temp_dir, '.docker')\n- shutil.copytree(TEST_CERT_DIR, cert_dir)\n-\n- os.environ.update(HOME=temp_dir,\n- DOCKER_CERT_PATH='',\n- DOCKER_TLS_VERIFY='1')\n-\n- kwargs = kwargs_from_env()\n- self.assertIn(cert_dir, kwargs['tls'].verify)\n- self.assertIn(cert_dir, kwargs['tls'].cert[0])\n- self.assertIn(cert_dir, kwargs['tls'].cert[1])\n- finally:\n- if temp_dir:\n- shutil.rmtree(temp_dir)\n-\n def test_parse_env_file_proper(self):\n env_file = self.generate_tempfile(\n file_content='USER=jdoe\\nPASS=secret')\n@@ -181,79 +283,6 @@ class UtilsTest(base.BaseTestCase):\n for filters, expected in tests:\n self.assertEqual(convert_filters(filters), expected)\n \n- def test_create_host_config_no_options(self):\n- config = create_host_config(version='1.19')\n- self.assertFalse('NetworkMode' in config)\n-\n- def test_create_host_config_no_options_newer_api_version(self):\n- config = create_host_config(version='1.20')\n- self.assertEqual(config['NetworkMode'], 'default')\n-\n- def test_create_host_config_dict_ulimit(self):\n- ulimit_dct = {'name': 'nofile', 'soft': 8096}\n- config = create_host_config(\n- ulimits=[ulimit_dct], version=DEFAULT_DOCKER_API_VERSION\n- )\n- self.assertIn('Ulimits', config)\n- self.assertEqual(len(config['Ulimits']), 1)\n- ulimit_obj = config['Ulimits'][0]\n- self.assertTrue(isinstance(ulimit_obj, Ulimit))\n- self.assertEqual(ulimit_obj.name, ulimit_dct['name'])\n- self.assertEqual(ulimit_obj.soft, ulimit_dct['soft'])\n- self.assertEqual(ulimit_obj['Soft'], ulimit_obj.soft)\n-\n- def test_create_host_config_dict_ulimit_capitals(self):\n- ulimit_dct = {'Name': 'nofile', 'Soft': 8096, 'Hard': 8096 * 4}\n- config = create_host_config(\n- ulimits=[ulimit_dct], version=DEFAULT_DOCKER_API_VERSION\n- )\n- self.assertIn('Ulimits', config)\n- self.assertEqual(len(config['Ulimits']), 1)\n- ulimit_obj = config['Ulimits'][0]\n- self.assertTrue(isinstance(ulimit_obj, Ulimit))\n- self.assertEqual(ulimit_obj.name, ulimit_dct['Name'])\n- self.assertEqual(ulimit_obj.soft, ulimit_dct['Soft'])\n- self.assertEqual(ulimit_obj.hard, ulimit_dct['Hard'])\n- self.assertEqual(ulimit_obj['Soft'], ulimit_obj.soft)\n-\n- def test_create_host_config_obj_ulimit(self):\n- ulimit_dct = Ulimit(name='nofile', soft=8096)\n- config = create_host_config(\n- ulimits=[ulimit_dct], version=DEFAULT_DOCKER_API_VERSION\n- )\n- self.assertIn('Ulimits', config)\n- self.assertEqual(len(config['Ulimits']), 1)\n- ulimit_obj = config['Ulimits'][0]\n- self.assertTrue(isinstance(ulimit_obj, Ulimit))\n- self.assertEqual(ulimit_obj, ulimit_dct)\n-\n- def test_ulimit_invalid_type(self):\n- self.assertRaises(ValueError, lambda: Ulimit(name=None))\n- self.assertRaises(ValueError, lambda: Ulimit(name='hello', soft='123'))\n- self.assertRaises(ValueError, lambda: Ulimit(name='hello', hard='456'))\n-\n- def test_create_host_config_dict_logconfig(self):\n- dct = {'type': LogConfig.types.SYSLOG, 'config': {'key1': 'val1'}}\n- config = create_host_config(\n- version=DEFAULT_DOCKER_API_VERSION, log_config=dct\n- )\n- self.assertIn('LogConfig', config)\n- self.assertTrue(isinstance(config['LogConfig'], LogConfig))\n- self.assertEqual(dct['type'], config['LogConfig'].type)\n-\n- def test_create_host_config_obj_logconfig(self):\n- obj = LogConfig(type=LogConfig.types.SYSLOG, config={'key1': 'val1'})\n- config = create_host_config(\n- version=DEFAULT_DOCKER_API_VERSION, log_config=obj\n- )\n- self.assertIn('LogConfig', config)\n- self.assertTrue(isinstance(config['LogConfig'], LogConfig))\n- self.assertEqual(obj, config['LogConfig'])\n-\n- def test_logconfig_invalid_config_type(self):\n- with pytest.raises(ValueError):\n- LogConfig(type=LogConfig.types.JSON, config='helloworld')\n-\n def test_resolve_repository_name(self):\n # docker hub library image\n self.assertEqual(\n@@ -407,6 +436,8 @@ class UtilsTest(base.BaseTestCase):\n None,\n )\n \n+\n+class PortsTest(base.BaseTestCase):\n def test_split_port_with_host_ip(self):\n internal_port, external_port = split_port(\"127.0.0.1:1000:2000\")\n self.assertEqual(internal_port, [\"2000\"])\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_short_problem_statement\",\n \"has_hyperlinks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 2\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"1.4"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest\",\n \"flake8\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.9\",\n \"reqs_path\": [\n \"requirements.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"-e git+https://github.com/docker/docker-py.git@02f330d8dc3da47215bed47b44fac73941ea6920#egg=docker_py\nexceptiongroup==1.2.2\nflake8==7.2.0\niniconfig==2.1.0\nmccabe==0.7.0\npackaging==24.2\npluggy==1.5.0\npycodestyle==2.13.0\npyflakes==3.3.2\npytest==8.3.5\nrequests==2.5.3\nsix==1.17.0\ntomli==2.2.1\nwebsocket_client==0.32.0\n"},"environment":{"kind":"string","value":"name: docker-py\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - pip=25.0=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - exceptiongroup==1.2.2\n - flake8==7.2.0\n - iniconfig==2.1.0\n - mccabe==0.7.0\n - packaging==24.2\n - pluggy==1.5.0\n - pycodestyle==2.13.0\n - pyflakes==3.3.2\n - pytest==8.3.5\n - requests==2.5.3\n - six==1.17.0\n - tomli==2.2.1\n - websocket-client==0.32.0\nprefix: /opt/conda/envs/docker-py\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/utils_test.py::HostConfigTest::test_create_host_config_with_cpu_period","tests/utils_test.py::HostConfigTest::test_create_host_config_with_cpu_quota"],"string":"[\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_with_cpu_period\",\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_with_cpu_quota\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/utils_test.py::HostConfigTest::test_create_host_config_invalid_cpu_cfs_types","tests/utils_test.py::HostConfigTest::test_create_host_config_no_options","tests/utils_test.py::HostConfigTest::test_create_host_config_no_options_newer_api_version","tests/utils_test.py::UlimitTest::test_create_host_config_dict_ulimit","tests/utils_test.py::UlimitTest::test_create_host_config_dict_ulimit_capitals","tests/utils_test.py::UlimitTest::test_create_host_config_obj_ulimit","tests/utils_test.py::UlimitTest::test_ulimit_invalid_type","tests/utils_test.py::LogConfigTest::test_create_host_config_dict_logconfig","tests/utils_test.py::LogConfigTest::test_create_host_config_obj_logconfig","tests/utils_test.py::LogConfigTest::test_logconfig_invalid_config_type","tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_empty","tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_no_cert_path","tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_tls","tests/utils_test.py::UtilsTest::test_convert_filters","tests/utils_test.py::UtilsTest::test_parse_bytes","tests/utils_test.py::UtilsTest::test_parse_env_file_commented_line","tests/utils_test.py::UtilsTest::test_parse_env_file_invalid_line","tests/utils_test.py::UtilsTest::test_parse_env_file_proper","tests/utils_test.py::UtilsTest::test_parse_host","tests/utils_test.py::UtilsTest::test_parse_host_empty_value","tests/utils_test.py::UtilsTest::test_parse_repository_tag","tests/utils_test.py::UtilsTest::test_resolve_authconfig","tests/utils_test.py::UtilsTest::test_resolve_registry_and_auth","tests/utils_test.py::UtilsTest::test_resolve_repository_name","tests/utils_test.py::PortsTest::test_build_port_bindings_with_matching_internal_port_ranges","tests/utils_test.py::PortsTest::test_build_port_bindings_with_matching_internal_ports","tests/utils_test.py::PortsTest::test_build_port_bindings_with_nonmatching_internal_port_ranges","tests/utils_test.py::PortsTest::test_build_port_bindings_with_nonmatching_internal_ports","tests/utils_test.py::PortsTest::test_build_port_bindings_with_one_port","tests/utils_test.py::PortsTest::test_build_port_bindings_with_port_range","tests/utils_test.py::PortsTest::test_host_only_with_colon","tests/utils_test.py::PortsTest::test_non_matching_length_port_ranges","tests/utils_test.py::PortsTest::test_port_and_range_invalid","tests/utils_test.py::PortsTest::test_port_only_with_colon","tests/utils_test.py::PortsTest::test_split_port_invalid","tests/utils_test.py::PortsTest::test_split_port_no_host_port","tests/utils_test.py::PortsTest::test_split_port_range_no_host_port","tests/utils_test.py::PortsTest::test_split_port_range_with_host_ip_no_port","tests/utils_test.py::PortsTest::test_split_port_range_with_host_port","tests/utils_test.py::PortsTest::test_split_port_range_with_protocol","tests/utils_test.py::PortsTest::test_split_port_with_host_ip","tests/utils_test.py::PortsTest::test_split_port_with_host_ip_no_port","tests/utils_test.py::PortsTest::test_split_port_with_host_port","tests/utils_test.py::PortsTest::test_split_port_with_protocol","tests/utils_test.py::ExcludePathsTest::test_directory","tests/utils_test.py::ExcludePathsTest::test_directory_with_single_exception","tests/utils_test.py::ExcludePathsTest::test_directory_with_subdir_exception","tests/utils_test.py::ExcludePathsTest::test_directory_with_trailing_slash","tests/utils_test.py::ExcludePathsTest::test_directory_with_wildcard_exception","tests/utils_test.py::ExcludePathsTest::test_exclude_custom_dockerfile","tests/utils_test.py::ExcludePathsTest::test_exclude_dockerfile_dockerignore","tests/utils_test.py::ExcludePathsTest::test_no_dupes","tests/utils_test.py::ExcludePathsTest::test_no_excludes","tests/utils_test.py::ExcludePathsTest::test_question_mark","tests/utils_test.py::ExcludePathsTest::test_single_filename","tests/utils_test.py::ExcludePathsTest::test_single_filename_trailing_slash","tests/utils_test.py::ExcludePathsTest::test_single_subdir_single_filename","tests/utils_test.py::ExcludePathsTest::test_single_subdir_wildcard_filename","tests/utils_test.py::ExcludePathsTest::test_subdirectory","tests/utils_test.py::ExcludePathsTest::test_wildcard_exclude","tests/utils_test.py::ExcludePathsTest::test_wildcard_filename_end","tests/utils_test.py::ExcludePathsTest::test_wildcard_filename_start","tests/utils_test.py::ExcludePathsTest::test_wildcard_subdir_single_filename","tests/utils_test.py::ExcludePathsTest::test_wildcard_subdir_wildcard_filename","tests/utils_test.py::ExcludePathsTest::test_wildcard_with_exception","tests/utils_test.py::ExcludePathsTest::test_wildcard_with_wildcard_exception"],"string":"[\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_invalid_cpu_cfs_types\",\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_no_options\",\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_no_options_newer_api_version\",\n \"tests/utils_test.py::UlimitTest::test_create_host_config_dict_ulimit\",\n \"tests/utils_test.py::UlimitTest::test_create_host_config_dict_ulimit_capitals\",\n \"tests/utils_test.py::UlimitTest::test_create_host_config_obj_ulimit\",\n \"tests/utils_test.py::UlimitTest::test_ulimit_invalid_type\",\n \"tests/utils_test.py::LogConfigTest::test_create_host_config_dict_logconfig\",\n \"tests/utils_test.py::LogConfigTest::test_create_host_config_obj_logconfig\",\n \"tests/utils_test.py::LogConfigTest::test_logconfig_invalid_config_type\",\n \"tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_empty\",\n \"tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_no_cert_path\",\n \"tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_tls\",\n \"tests/utils_test.py::UtilsTest::test_convert_filters\",\n \"tests/utils_test.py::UtilsTest::test_parse_bytes\",\n \"tests/utils_test.py::UtilsTest::test_parse_env_file_commented_line\",\n \"tests/utils_test.py::UtilsTest::test_parse_env_file_invalid_line\",\n \"tests/utils_test.py::UtilsTest::test_parse_env_file_proper\",\n \"tests/utils_test.py::UtilsTest::test_parse_host\",\n \"tests/utils_test.py::UtilsTest::test_parse_host_empty_value\",\n \"tests/utils_test.py::UtilsTest::test_parse_repository_tag\",\n \"tests/utils_test.py::UtilsTest::test_resolve_authconfig\",\n \"tests/utils_test.py::UtilsTest::test_resolve_registry_and_auth\",\n \"tests/utils_test.py::UtilsTest::test_resolve_repository_name\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_matching_internal_port_ranges\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_matching_internal_ports\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_nonmatching_internal_port_ranges\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_nonmatching_internal_ports\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_one_port\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_port_range\",\n \"tests/utils_test.py::PortsTest::test_host_only_with_colon\",\n \"tests/utils_test.py::PortsTest::test_non_matching_length_port_ranges\",\n \"tests/utils_test.py::PortsTest::test_port_and_range_invalid\",\n \"tests/utils_test.py::PortsTest::test_port_only_with_colon\",\n \"tests/utils_test.py::PortsTest::test_split_port_invalid\",\n \"tests/utils_test.py::PortsTest::test_split_port_no_host_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_range_no_host_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_range_with_host_ip_no_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_range_with_host_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_range_with_protocol\",\n \"tests/utils_test.py::PortsTest::test_split_port_with_host_ip\",\n \"tests/utils_test.py::PortsTest::test_split_port_with_host_ip_no_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_with_host_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_with_protocol\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory_with_single_exception\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory_with_subdir_exception\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory_with_trailing_slash\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory_with_wildcard_exception\",\n \"tests/utils_test.py::ExcludePathsTest::test_exclude_custom_dockerfile\",\n \"tests/utils_test.py::ExcludePathsTest::test_exclude_dockerfile_dockerignore\",\n \"tests/utils_test.py::ExcludePathsTest::test_no_dupes\",\n \"tests/utils_test.py::ExcludePathsTest::test_no_excludes\",\n \"tests/utils_test.py::ExcludePathsTest::test_question_mark\",\n \"tests/utils_test.py::ExcludePathsTest::test_single_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_single_filename_trailing_slash\",\n \"tests/utils_test.py::ExcludePathsTest::test_single_subdir_single_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_single_subdir_wildcard_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_subdirectory\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_exclude\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_filename_end\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_filename_start\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_subdir_single_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_subdir_wildcard_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_with_exception\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_with_wildcard_exception\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"Apache License 2.0"},"__index_level_0__":{"kind":"number","value":239,"string":"239"},"num_tokens_patch":{"kind":"number","value":527,"string":"527"},"before_filepaths":{"kind":"list like","value":["docker/utils/utils.py"],"string":"[\n \"docker/utils/utils.py\"\n]"}}},{"rowIdx":48,"cells":{"instance_id":{"kind":"string","value":"docker__docker-py-787"},"base_commit":{"kind":"string","value":"5e331a55a8e8e10354693172dce1aa63f58ebe97"},"created_at":{"kind":"string","value":"2015-09-23 21:07:40"},"environment_setup_commit":{"kind":"string","value":"f479720d517a7db7f886916190b3032d29d18f10"},"hints_text":{"kind":"string","value":"shin-: @aanand Thanks, didn't know about `six.u`. PTAL?\naanand: Cool. Perhaps the first test should be rewritten so it tests byte string input on all Python versions:\r\n\r\n```python\r\n def test_convert_volume_bindings_binary_input(self):\r\n expected = [six.u('/mnt/지연:/unicode/박:rw')]\r\n\r\n data = {\r\n b'/mnt/지연': {\r\n 'bind': b'/unicode/박',\r\n 'mode': 'rw'\r\n }\r\n }\r\n self.assertEqual(\r\n convert_volume_binds(data), expected\r\n )\r\n```\nshin-: Okay, I've tried all sorts of combination, I've settled on just separating py2 and py3 tests completely (so it's 2+2 now). On the bright side, results were consistent all along (and we have tests to prove it)!\naanand: OK, I see the rationale, but instead of entirely separate test methods, could we just switch on the Python version *inside* the method?\r\n\r\n```python\r\ndef test_convert_volume_binds_unicode_bytes_input(self):\r\n if six.PY2:\r\n expected = [unicode('/mnt/지연:/unicode/박:rw', 'utf-8')]\r\n data = {\r\n '/mnt/지연': {\r\n 'bind': '/unicode/박',\r\n 'mode': 'rw'\r\n }\r\n }\r\n else:\r\n expected = ['/mnt/지연:/unicode/박:rw']\r\n data = {\r\n bytes('/mnt/지연', 'utf-8'): {\r\n 'bind': bytes('/unicode/박', 'utf-8'),\r\n 'mode': 'rw'\r\n }\r\n }\r\n\r\n self.assertEqual(convert_volume_binds(data), expected)\r\n\r\ndef test_convert_volume_binds_unicode_unicode_input(self):\r\n if six.PY2:\r\n expected = [unicode('/mnt/지연:/unicode/박:rw', 'utf-8')]\r\n data = {\r\n unicode('/mnt/지연', 'utf-8'): {\r\n 'bind': unicode('/unicode/박', 'utf-8'),\r\n 'mode': 'rw'\r\n }\r\n }\r\n else:\r\n expected = ['/mnt/지연:/unicode/박:rw']\r\n data = {\r\n '/mnt/지연': {\r\n 'bind': '/unicode/박',\r\n 'mode': 'rw'\r\n }\r\n }\r\n\r\n self.assertEqual(convert_volume_binds(data), expected)\r\n```"},"patch":{"kind":"string","value":"diff --git a/docker/utils/utils.py b/docker/utils/utils.py\nindex 36edf8de..1fce1377 100644\n--- a/docker/utils/utils.py\n+++ b/docker/utils/utils.py\n@@ -242,6 +242,9 @@ def convert_volume_binds(binds):\n \n result = []\n for k, v in binds.items():\n+ if isinstance(k, six.binary_type):\n+ k = k.decode('utf-8')\n+\n if isinstance(v, dict):\n if 'ro' in v and 'mode' in v:\n raise ValueError(\n@@ -249,6 +252,10 @@ def convert_volume_binds(binds):\n .format(repr(v))\n )\n \n+ bind = v['bind']\n+ if isinstance(bind, six.binary_type):\n+ bind = bind.decode('utf-8')\n+\n if 'ro' in v:\n mode = 'ro' if v['ro'] else 'rw'\n elif 'mode' in v:\n@@ -256,11 +263,15 @@ def convert_volume_binds(binds):\n else:\n mode = 'rw'\n \n- result.append('{0}:{1}:{2}'.format(\n- k, v['bind'], mode\n- ))\n+ result.append(\n+ six.text_type('{0}:{1}:{2}').format(k, bind, mode)\n+ )\n else:\n- result.append('{0}:{1}:rw'.format(k, v))\n+ if isinstance(v, six.binary_type):\n+ v = v.decode('utf-8')\n+ result.append(\n+ six.text_type('{0}:{1}:rw').format(k, v)\n+ )\n return result\n \n \n"},"problem_statement":{"kind":"string","value":"Create container bind volume with Unicode folder name\nIf bind volume folder name is Unicode, for example Japanese, It will raise exception:\r\nHost volume and container volume both should handle Unicode.\r\n\r\n```\r\n File \"/home/vagrant/.local/share/virtualenvs/qnap/local/lib/python2.7/site-packages/docker/utils/utils.py\", line 461, in create_host_config\r\n host_config['Binds'] = convert_volume_binds(binds)\r\n File \"/home/vagrant/.local/share/virtualenvs/qnap/local/lib/python2.7/site-packages/docker/utils/utils.py\", line 208, in convert_volume_binds\r\n k, v['bind'], mode\r\n```"},"repo":{"kind":"string","value":"docker/docker-py"},"test_patch":{"kind":"string","value":"diff --git a/tests/utils_test.py b/tests/utils_test.py\nindex 45929f73..8ac1dcb9 100644\n--- a/tests/utils_test.py\n+++ b/tests/utils_test.py\n@@ -1,15 +1,20 @@\n+# -*- coding: utf-8 -*-\n+\n import os\n import os.path\n import shutil\n import tempfile\n \n+import pytest\n+import six\n+\n from docker.client import Client\n from docker.constants import DEFAULT_DOCKER_API_VERSION\n from docker.errors import DockerException\n from docker.utils import (\n parse_repository_tag, parse_host, convert_filters, kwargs_from_env,\n create_host_config, Ulimit, LogConfig, parse_bytes, parse_env_file,\n- exclude_paths,\n+ exclude_paths, convert_volume_binds,\n )\n from docker.utils.ports import build_port_bindings, split_port\n from docker.auth import resolve_repository_name, resolve_authconfig\n@@ -17,7 +22,6 @@ from docker.auth import resolve_repository_name, resolve_authconfig\n from . import base\n from .helpers import make_tree\n \n-import pytest\n \n TEST_CERT_DIR = os.path.join(\n os.path.dirname(__file__),\n@@ -192,6 +196,89 @@ class UtilsTest(base.BaseTestCase):\n local_tempfile.close()\n return local_tempfile.name\n \n+ def test_convert_volume_binds_empty(self):\n+ self.assertEqual(convert_volume_binds({}), [])\n+ self.assertEqual(convert_volume_binds([]), [])\n+\n+ def test_convert_volume_binds_list(self):\n+ data = ['/a:/a:ro', '/b:/c:z']\n+ self.assertEqual(convert_volume_binds(data), data)\n+\n+ def test_convert_volume_binds_complete(self):\n+ data = {\n+ '/mnt/vol1': {\n+ 'bind': '/data',\n+ 'mode': 'ro'\n+ }\n+ }\n+ self.assertEqual(convert_volume_binds(data), ['/mnt/vol1:/data:ro'])\n+\n+ def test_convert_volume_binds_compact(self):\n+ data = {\n+ '/mnt/vol1': '/data'\n+ }\n+ self.assertEqual(convert_volume_binds(data), ['/mnt/vol1:/data:rw'])\n+\n+ def test_convert_volume_binds_no_mode(self):\n+ data = {\n+ '/mnt/vol1': {\n+ 'bind': '/data'\n+ }\n+ }\n+ self.assertEqual(convert_volume_binds(data), ['/mnt/vol1:/data:rw'])\n+\n+ def test_convert_volume_binds_unicode_bytes_input(self):\n+ if six.PY2:\n+ expected = [unicode('/mnt/지연:/unicode/박:rw', 'utf-8')]\n+\n+ data = {\n+ '/mnt/지연': {\n+ 'bind': '/unicode/박',\n+ 'mode': 'rw'\n+ }\n+ }\n+ self.assertEqual(\n+ convert_volume_binds(data), expected\n+ )\n+ else:\n+ expected = ['/mnt/지연:/unicode/박:rw']\n+\n+ data = {\n+ bytes('/mnt/지연', 'utf-8'): {\n+ 'bind': bytes('/unicode/박', 'utf-8'),\n+ 'mode': 'rw'\n+ }\n+ }\n+ self.assertEqual(\n+ convert_volume_binds(data), expected\n+ )\n+\n+ def test_convert_volume_binds_unicode_unicode_input(self):\n+ if six.PY2:\n+ expected = [unicode('/mnt/지연:/unicode/박:rw', 'utf-8')]\n+\n+ data = {\n+ unicode('/mnt/지연', 'utf-8'): {\n+ 'bind': unicode('/unicode/박', 'utf-8'),\n+ 'mode': 'rw'\n+ }\n+ }\n+ self.assertEqual(\n+ convert_volume_binds(data), expected\n+ )\n+ else:\n+ expected = ['/mnt/지연:/unicode/박:rw']\n+\n+ data = {\n+ '/mnt/지연': {\n+ 'bind': '/unicode/박',\n+ 'mode': 'rw'\n+ }\n+ }\n+ self.assertEqual(\n+ convert_volume_binds(data), expected\n+ )\n+\n def test_parse_repository_tag(self):\n self.assertEqual(parse_repository_tag(\"root\"),\n (\"root\", None))\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [],\n \"has_test_patch\": true,\n \"is_lite\": true,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 0\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"1.4"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .[dev]\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest pytest-cov\",\n \"pytest\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.7\",\n \"reqs_path\": [\n \"requirements.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"certifi @ file:///croot/certifi_1671487769961/work/certifi\ncoverage==7.2.7\n-e git+https://github.com/docker/docker-py.git@5e331a55a8e8e10354693172dce1aa63f58ebe97#egg=docker_py\nexceptiongroup==1.2.2\nimportlib-metadata==6.7.0\niniconfig==2.0.0\npackaging==24.0\npluggy==1.2.0\npytest==7.4.4\npytest-cov==4.1.0\nrequests==2.5.3\nsix==1.17.0\ntomli==2.0.1\ntyping_extensions==4.7.1\nwebsocket-client==0.32.0\nzipp==3.15.0\n"},"environment":{"kind":"string","value":"name: docker-py\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - certifi=2022.12.7=py37h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=1.1.1w=h7f8727e_0\n - pip=22.3.1=py37h06a4308_0\n - python=3.7.16=h7a1cb2a_0\n - readline=8.2=h5eee18b_0\n - setuptools=65.6.3=py37h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - wheel=0.38.4=py37h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - coverage==7.2.7\n - exceptiongroup==1.2.2\n - importlib-metadata==6.7.0\n - iniconfig==2.0.0\n - packaging==24.0\n - pluggy==1.2.0\n - pytest==7.4.4\n - pytest-cov==4.1.0\n - requests==2.5.3\n - six==1.17.0\n - tomli==2.0.1\n - typing-extensions==4.7.1\n - websocket-client==0.32.0\n - zipp==3.15.0\nprefix: /opt/conda/envs/docker-py\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/utils_test.py::UtilsTest::test_convert_volume_binds_unicode_bytes_input"],"string":"[\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_unicode_bytes_input\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/utils_test.py::HostConfigTest::test_create_host_config_invalid_cpu_cfs_types","tests/utils_test.py::HostConfigTest::test_create_host_config_no_options","tests/utils_test.py::HostConfigTest::test_create_host_config_no_options_newer_api_version","tests/utils_test.py::HostConfigTest::test_create_host_config_with_cpu_period","tests/utils_test.py::HostConfigTest::test_create_host_config_with_cpu_quota","tests/utils_test.py::UlimitTest::test_create_host_config_dict_ulimit","tests/utils_test.py::UlimitTest::test_create_host_config_dict_ulimit_capitals","tests/utils_test.py::UlimitTest::test_create_host_config_obj_ulimit","tests/utils_test.py::UlimitTest::test_ulimit_invalid_type","tests/utils_test.py::LogConfigTest::test_create_host_config_dict_logconfig","tests/utils_test.py::LogConfigTest::test_create_host_config_obj_logconfig","tests/utils_test.py::LogConfigTest::test_logconfig_invalid_config_type","tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_empty","tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_no_cert_path","tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_tls","tests/utils_test.py::UtilsTest::test_convert_filters","tests/utils_test.py::UtilsTest::test_convert_volume_binds_compact","tests/utils_test.py::UtilsTest::test_convert_volume_binds_complete","tests/utils_test.py::UtilsTest::test_convert_volume_binds_empty","tests/utils_test.py::UtilsTest::test_convert_volume_binds_list","tests/utils_test.py::UtilsTest::test_convert_volume_binds_no_mode","tests/utils_test.py::UtilsTest::test_convert_volume_binds_unicode_unicode_input","tests/utils_test.py::UtilsTest::test_parse_bytes","tests/utils_test.py::UtilsTest::test_parse_env_file_commented_line","tests/utils_test.py::UtilsTest::test_parse_env_file_invalid_line","tests/utils_test.py::UtilsTest::test_parse_env_file_proper","tests/utils_test.py::UtilsTest::test_parse_host","tests/utils_test.py::UtilsTest::test_parse_host_empty_value","tests/utils_test.py::UtilsTest::test_parse_repository_tag","tests/utils_test.py::UtilsTest::test_resolve_authconfig","tests/utils_test.py::UtilsTest::test_resolve_registry_and_auth","tests/utils_test.py::UtilsTest::test_resolve_repository_name","tests/utils_test.py::PortsTest::test_build_port_bindings_with_matching_internal_port_ranges","tests/utils_test.py::PortsTest::test_build_port_bindings_with_matching_internal_ports","tests/utils_test.py::PortsTest::test_build_port_bindings_with_nonmatching_internal_port_ranges","tests/utils_test.py::PortsTest::test_build_port_bindings_with_nonmatching_internal_ports","tests/utils_test.py::PortsTest::test_build_port_bindings_with_one_port","tests/utils_test.py::PortsTest::test_build_port_bindings_with_port_range","tests/utils_test.py::PortsTest::test_host_only_with_colon","tests/utils_test.py::PortsTest::test_non_matching_length_port_ranges","tests/utils_test.py::PortsTest::test_port_and_range_invalid","tests/utils_test.py::PortsTest::test_port_only_with_colon","tests/utils_test.py::PortsTest::test_split_port_invalid","tests/utils_test.py::PortsTest::test_split_port_no_host_port","tests/utils_test.py::PortsTest::test_split_port_range_no_host_port","tests/utils_test.py::PortsTest::test_split_port_range_with_host_ip_no_port","tests/utils_test.py::PortsTest::test_split_port_range_with_host_port","tests/utils_test.py::PortsTest::test_split_port_range_with_protocol","tests/utils_test.py::PortsTest::test_split_port_with_host_ip","tests/utils_test.py::PortsTest::test_split_port_with_host_ip_no_port","tests/utils_test.py::PortsTest::test_split_port_with_host_port","tests/utils_test.py::PortsTest::test_split_port_with_protocol","tests/utils_test.py::ExcludePathsTest::test_directory","tests/utils_test.py::ExcludePathsTest::test_directory_with_single_exception","tests/utils_test.py::ExcludePathsTest::test_directory_with_subdir_exception","tests/utils_test.py::ExcludePathsTest::test_directory_with_trailing_slash","tests/utils_test.py::ExcludePathsTest::test_directory_with_wildcard_exception","tests/utils_test.py::ExcludePathsTest::test_exclude_custom_dockerfile","tests/utils_test.py::ExcludePathsTest::test_exclude_dockerfile_dockerignore","tests/utils_test.py::ExcludePathsTest::test_no_dupes","tests/utils_test.py::ExcludePathsTest::test_no_excludes","tests/utils_test.py::ExcludePathsTest::test_question_mark","tests/utils_test.py::ExcludePathsTest::test_single_filename","tests/utils_test.py::ExcludePathsTest::test_single_filename_trailing_slash","tests/utils_test.py::ExcludePathsTest::test_single_subdir_single_filename","tests/utils_test.py::ExcludePathsTest::test_single_subdir_wildcard_filename","tests/utils_test.py::ExcludePathsTest::test_subdirectory","tests/utils_test.py::ExcludePathsTest::test_wildcard_exclude","tests/utils_test.py::ExcludePathsTest::test_wildcard_filename_end","tests/utils_test.py::ExcludePathsTest::test_wildcard_filename_start","tests/utils_test.py::ExcludePathsTest::test_wildcard_subdir_single_filename","tests/utils_test.py::ExcludePathsTest::test_wildcard_subdir_wildcard_filename","tests/utils_test.py::ExcludePathsTest::test_wildcard_with_exception","tests/utils_test.py::ExcludePathsTest::test_wildcard_with_wildcard_exception"],"string":"[\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_invalid_cpu_cfs_types\",\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_no_options\",\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_no_options_newer_api_version\",\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_with_cpu_period\",\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_with_cpu_quota\",\n \"tests/utils_test.py::UlimitTest::test_create_host_config_dict_ulimit\",\n \"tests/utils_test.py::UlimitTest::test_create_host_config_dict_ulimit_capitals\",\n \"tests/utils_test.py::UlimitTest::test_create_host_config_obj_ulimit\",\n \"tests/utils_test.py::UlimitTest::test_ulimit_invalid_type\",\n \"tests/utils_test.py::LogConfigTest::test_create_host_config_dict_logconfig\",\n \"tests/utils_test.py::LogConfigTest::test_create_host_config_obj_logconfig\",\n \"tests/utils_test.py::LogConfigTest::test_logconfig_invalid_config_type\",\n \"tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_empty\",\n \"tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_no_cert_path\",\n \"tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_tls\",\n \"tests/utils_test.py::UtilsTest::test_convert_filters\",\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_compact\",\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_complete\",\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_empty\",\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_list\",\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_no_mode\",\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_unicode_unicode_input\",\n \"tests/utils_test.py::UtilsTest::test_parse_bytes\",\n \"tests/utils_test.py::UtilsTest::test_parse_env_file_commented_line\",\n \"tests/utils_test.py::UtilsTest::test_parse_env_file_invalid_line\",\n \"tests/utils_test.py::UtilsTest::test_parse_env_file_proper\",\n \"tests/utils_test.py::UtilsTest::test_parse_host\",\n \"tests/utils_test.py::UtilsTest::test_parse_host_empty_value\",\n \"tests/utils_test.py::UtilsTest::test_parse_repository_tag\",\n \"tests/utils_test.py::UtilsTest::test_resolve_authconfig\",\n \"tests/utils_test.py::UtilsTest::test_resolve_registry_and_auth\",\n \"tests/utils_test.py::UtilsTest::test_resolve_repository_name\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_matching_internal_port_ranges\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_matching_internal_ports\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_nonmatching_internal_port_ranges\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_nonmatching_internal_ports\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_one_port\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_port_range\",\n \"tests/utils_test.py::PortsTest::test_host_only_with_colon\",\n \"tests/utils_test.py::PortsTest::test_non_matching_length_port_ranges\",\n \"tests/utils_test.py::PortsTest::test_port_and_range_invalid\",\n \"tests/utils_test.py::PortsTest::test_port_only_with_colon\",\n \"tests/utils_test.py::PortsTest::test_split_port_invalid\",\n \"tests/utils_test.py::PortsTest::test_split_port_no_host_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_range_no_host_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_range_with_host_ip_no_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_range_with_host_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_range_with_protocol\",\n \"tests/utils_test.py::PortsTest::test_split_port_with_host_ip\",\n \"tests/utils_test.py::PortsTest::test_split_port_with_host_ip_no_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_with_host_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_with_protocol\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory_with_single_exception\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory_with_subdir_exception\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory_with_trailing_slash\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory_with_wildcard_exception\",\n \"tests/utils_test.py::ExcludePathsTest::test_exclude_custom_dockerfile\",\n \"tests/utils_test.py::ExcludePathsTest::test_exclude_dockerfile_dockerignore\",\n \"tests/utils_test.py::ExcludePathsTest::test_no_dupes\",\n \"tests/utils_test.py::ExcludePathsTest::test_no_excludes\",\n \"tests/utils_test.py::ExcludePathsTest::test_question_mark\",\n \"tests/utils_test.py::ExcludePathsTest::test_single_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_single_filename_trailing_slash\",\n \"tests/utils_test.py::ExcludePathsTest::test_single_subdir_single_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_single_subdir_wildcard_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_subdirectory\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_exclude\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_filename_end\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_filename_start\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_subdir_single_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_subdir_wildcard_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_with_exception\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_with_wildcard_exception\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"Apache License 2.0"},"__index_level_0__":{"kind":"number","value":246,"string":"246"},"num_tokens_patch":{"kind":"number","value":386,"string":"386"},"before_filepaths":{"kind":"list like","value":["docker/utils/utils.py"],"string":"[\n \"docker/utils/utils.py\"\n]"}}},{"rowIdx":49,"cells":{"instance_id":{"kind":"string","value":"keleshev__schema-85"},"base_commit":{"kind":"string","value":"29286c1f9cce20cf70f2b15d9247f2ca6ef1d6c9"},"created_at":{"kind":"string","value":"2015-09-26 00:20:07"},"environment_setup_commit":{"kind":"string","value":"eb7670f0f4615195393dc5350d49fa9a33304137"},"hints_text":{"kind":"string","value":"codecov-io: ## [Current coverage][1] is `98.07%`\n> Merging **#85** into **master** will increase coverage by **+0.05%** as of [`ea3e9e6`][3]\n\n\n```diff\n@@ master #85 diff @@\n======================================\n Files 1 1 \n Stmts 152 156 +4\n Branches 0 0 \n Methods 0 0 \n======================================\n+ Hit 149 153 +4\n Partial 0 0 \n Missed 3 3 \n```\n\n> Review entire [Coverage Diff][4] as of [`ea3e9e6`][3]\n\n\n[1]: https://codecov.io/github/keleshev/schema?ref=ea3e9e6de11ed22e995df1b30ede806b9912bba5\n[2]: https://codecov.io/github/keleshev/schema/features/suggestions?ref=ea3e9e6de11ed22e995df1b30ede806b9912bba5\n[3]: https://codecov.io/github/keleshev/schema/commit/ea3e9e6de11ed22e995df1b30ede806b9912bba5\n[4]: https://codecov.io/github/keleshev/schema/compare/e94b7144f3016654d1360eb1c070fd2db0d54a43...ea3e9e6de11ed22e995df1b30ede806b9912bba5\n\n> Powered by [Codecov](https://codecov.io). Updated on successful CI builds.\nsjakobi: Anybody know a better name than `callable_str`?\r\n\r\nAnd does that function possibly need `_` as a prefix?\nskorokithakis: I think that the method does need an underscore as a prefix, it's not meant to be exported by the module. Other than that, I'm ready to merge this.\nskorokithakis: Oops, looks like there's a merge conflict. Can you resolve that so I can merge this?"},"patch":{"kind":"string","value":"diff --git a/schema.py b/schema.py\nindex 1ecf845..d24744d 100644\n--- a/schema.py\n+++ b/schema.py\n@@ -70,7 +70,7 @@ class Use(object):\n except SchemaError as x:\n raise SchemaError([None] + x.autos, [self._error] + x.errors)\n except BaseException as x:\n- f = self._callable.__name__\n+ f = _callable_str(self._callable)\n raise SchemaError('%s(%r) raised %r' % (f, data, x), self._error)\n \n \n@@ -176,7 +176,7 @@ class Schema(object):\n raise SchemaError('%r.validate(%r) raised %r' % (s, data, x),\n self._error)\n if flavor == CALLABLE:\n- f = s.__name__\n+ f = _callable_str(s)\n try:\n if s(data):\n return data\n@@ -211,3 +211,9 @@ class Optional(Schema):\n '\"%r\" is too complex.' % (self._schema,))\n self.default = default\n self.key = self._schema\n+\n+\n+def _callable_str(callable_):\n+ if hasattr(callable_, '__name__'):\n+ return callable_.__name__\n+ return str(callable_)\n"},"problem_statement":{"kind":"string","value":"doesn't work with operator.methodcaller\n from operator import methodcaller\r\n from schema import Schema\r\n\r\n f = methodcaller('endswith', '.csv')\r\n assert f('test.csv')\r\n\r\n Schema(f).validate('test.csv')\r\n\r\n AttributeError: 'operator.methodcaller' object has no attribute '__name__'\r\n\r\nWe can't assume that all callables have a `__name__`, it would seem."},"repo":{"kind":"string","value":"keleshev/schema"},"test_patch":{"kind":"string","value":"diff --git a/test_schema.py b/test_schema.py\nindex ad49343..967dec0 100644\n--- a/test_schema.py\n+++ b/test_schema.py\n@@ -1,5 +1,6 @@\n from __future__ import with_statement\n from collections import defaultdict, namedtuple\n+from operator import methodcaller\n import os\n \n from pytest import raises\n@@ -383,8 +384,18 @@ def test_missing_keys_exception_with_non_str_dict_keys():\n try:\n Schema({1: 'x'}).validate(dict())\n except SchemaError as e:\n- assert (e.args[0] ==\n- \"Missing keys: 1\")\n+ assert e.args[0] == \"Missing keys: 1\"\n+ raise\n+\n+\n+def test_issue_56_cant_rely_on_callables_to_have_name():\n+ s = Schema(methodcaller('endswith', '.csv'))\n+ assert s.validate('test.csv') == 'test.csv'\n+ with SE:\n+ try:\n+ s.validate('test.py')\n+ except SchemaError as e:\n+ assert \"operator.methodcaller\" in e.args[0]\n raise\n \n \n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_short_problem_statement\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 2,\n \"test_score\": 0\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"0.3"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest\",\n \"pytest-cov\"\n ],\n \"pre_install\": null,\n \"python\": \"3.9\",\n \"reqs_path\": null,\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"coverage==7.8.0\nexceptiongroup==1.2.2\niniconfig==2.1.0\npackaging==24.2\npluggy==1.5.0\npytest==8.3.5\npytest-cov==6.0.0\n-e git+https://github.com/keleshev/schema.git@29286c1f9cce20cf70f2b15d9247f2ca6ef1d6c9#egg=schema\ntomli==2.2.1\n"},"environment":{"kind":"string","value":"name: schema\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - pip=25.0=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - coverage==7.8.0\n - exceptiongroup==1.2.2\n - iniconfig==2.1.0\n - packaging==24.2\n - pluggy==1.5.0\n - pytest==8.3.5\n - pytest-cov==6.0.0\n - tomli==2.2.1\nprefix: /opt/conda/envs/schema\n"},"FAIL_TO_PASS":{"kind":"list like","value":["test_schema.py::test_issue_56_cant_rely_on_callables_to_have_name"],"string":"[\n \"test_schema.py::test_issue_56_cant_rely_on_callables_to_have_name\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["test_schema.py::test_schema","test_schema.py::test_validate_file","test_schema.py::test_and","test_schema.py::test_or","test_schema.py::test_validate_list","test_schema.py::test_list_tuple_set_frozenset","test_schema.py::test_strictly","test_schema.py::test_dict","test_schema.py::test_dict_keys","test_schema.py::test_dict_optional_keys","test_schema.py::test_dict_optional_defaults","test_schema.py::test_dict_subtypes","test_schema.py::test_complex","test_schema.py::test_nice_errors","test_schema.py::test_use_error_handling","test_schema.py::test_or_error_handling","test_schema.py::test_and_error_handling","test_schema.py::test_schema_error_handling","test_schema.py::test_use_json","test_schema.py::test_error_reporting","test_schema.py::test_schema_repr","test_schema.py::test_validate_object","test_schema.py::test_issue_9_prioritized_key_comparison","test_schema.py::test_issue_9_prioritized_key_comparison_in_dicts","test_schema.py::test_missing_keys_exception_with_non_str_dict_keys","test_schema.py::test_exception_handling_with_bad_validators"],"string":"[\n \"test_schema.py::test_schema\",\n \"test_schema.py::test_validate_file\",\n \"test_schema.py::test_and\",\n \"test_schema.py::test_or\",\n \"test_schema.py::test_validate_list\",\n \"test_schema.py::test_list_tuple_set_frozenset\",\n \"test_schema.py::test_strictly\",\n \"test_schema.py::test_dict\",\n \"test_schema.py::test_dict_keys\",\n \"test_schema.py::test_dict_optional_keys\",\n \"test_schema.py::test_dict_optional_defaults\",\n \"test_schema.py::test_dict_subtypes\",\n \"test_schema.py::test_complex\",\n \"test_schema.py::test_nice_errors\",\n \"test_schema.py::test_use_error_handling\",\n \"test_schema.py::test_or_error_handling\",\n \"test_schema.py::test_and_error_handling\",\n \"test_schema.py::test_schema_error_handling\",\n \"test_schema.py::test_use_json\",\n \"test_schema.py::test_error_reporting\",\n \"test_schema.py::test_schema_repr\",\n \"test_schema.py::test_validate_object\",\n \"test_schema.py::test_issue_9_prioritized_key_comparison\",\n \"test_schema.py::test_issue_9_prioritized_key_comparison_in_dicts\",\n \"test_schema.py::test_missing_keys_exception_with_non_str_dict_keys\",\n \"test_schema.py::test_exception_handling_with_bad_validators\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"MIT License"},"__index_level_0__":{"kind":"number","value":250,"string":"250"},"num_tokens_patch":{"kind":"number","value":308,"string":"308"},"before_filepaths":{"kind":"list like","value":["schema.py"],"string":"[\n \"schema.py\"\n]"}}},{"rowIdx":50,"cells":{"instance_id":{"kind":"string","value":"pypa__twine-134"},"base_commit":{"kind":"string","value":"b34f042da78aed22b6e512df61b495638b06ba03"},"created_at":{"kind":"string","value":"2015-09-27 21:52:01"},"environment_setup_commit":{"kind":"string","value":"f487b7da9c42e4932bc33bf10d70cdc59fd16fd5"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/twine/commands/upload.py b/twine/commands/upload.py\nindex 032cc21..2bd4a52 100644\n--- a/twine/commands/upload.py\n+++ b/twine/commands/upload.py\n@@ -67,11 +67,13 @@ def upload(dists, repository, sign, identity, username, password, comment,\n if not sign and identity:\n raise ValueError(\"sign must be given along with identity\")\n \n+ dists = find_dists(dists)\n+\n # Determine if the user has passed in pre-signed distributions\n signatures = dict(\n (os.path.basename(d), d) for d in dists if d.endswith(\".asc\")\n )\n- dists = [i for i in dists if not i.endswith(\".asc\")]\n+ uploads = [i for i in dists if not i.endswith(\".asc\")]\n \n config = utils.get_repository_from_config(config_file, repository)\n \n@@ -86,24 +88,14 @@ def upload(dists, repository, sign, identity, username, password, comment,\n \n repository = Repository(config[\"repository\"], username, password)\n \n- uploads = find_dists(dists)\n-\n for filename in uploads:\n package = PackageFile.from_filename(filename, comment)\n- # Sign the dist if requested\n- # if sign:\n- # sign_file(sign_with, filename, identity)\n \n- # signed_name = os.path.basename(filename) + \".asc\"\n- signed_name = package.signed_filename\n+ signed_name = package.signed_basefilename\n if signed_name in signatures:\n- with open(signatures[signed_name], \"rb\") as gpg:\n- package.gpg_signature = (signed_name, gpg.read())\n- # data[\"gpg_signature\"] = (signed_name, gpg.read())\n+ package.add_gpg_signature(signatures[signed_name], signed_name)\n elif sign:\n package.sign(sign_with, identity)\n- # with open(filename + \".asc\", \"rb\") as gpg:\n- # data[\"gpg_signature\"] = (signed_name, gpg.read())\n \n resp = repository.upload(package)\n \ndiff --git a/twine/package.py b/twine/package.py\nindex e80116a..e062c71 100644\n--- a/twine/package.py\n+++ b/twine/package.py\n@@ -49,6 +49,7 @@ class PackageFile(object):\n self.filetype = filetype\n self.safe_name = pkg_resources.safe_name(metadata.name)\n self.signed_filename = self.filename + '.asc'\n+ self.signed_basefilename = self.basefilename + '.asc'\n self.gpg_signature = None\n \n md5_hash = hashlib.md5()\n@@ -141,6 +142,13 @@ class PackageFile(object):\n \n return data\n \n+ def add_gpg_signature(self, signature_filepath, signature_filename):\n+ if self.gpg_signature is not None:\n+ raise ValueError('GPG Signature can only be added once')\n+\n+ with open(signature_filepath, \"rb\") as gpg:\n+ self.gpg_signature = (signature_filename, gpg.read())\n+\n def sign(self, sign_with, identity):\n print(\"Signing {0}\".format(self.basefilename))\n gpg_args = (sign_with, \"--detach-sign\")\n@@ -149,5 +157,4 @@ class PackageFile(object):\n gpg_args += (\"-a\", self.filename)\n subprocess.check_call(gpg_args)\n \n- with open(self.signed_filename, \"rb\") as gpg:\n- self.pg_signature = (self.signed_filename, gpg.read())\n+ self.add_gpg_signature(self.signed_filename, self.signed_basefilename)\n"},"problem_statement":{"kind":"string","value":"\"twine upload\" usually fails to upload .asc files\nOn the most recent Foolscap release, I signed the sdist tarballs as usual, and tried to use twine to upload everything:\r\n\r\n```\r\n% python setup.py sdist --formats=zip,gztar bdist_wheel\r\n% ls dist\r\nfoolscap-0.9.1-py2-none-any.whl\t\tfoolscap-0.9.1.tar.gz\t\t\tfoolscap-0.9.1.zip\r\n% (gpg sign them all)\r\n% ls dist\r\nfoolscap-0.9.1-py2-none-any.whl\t\tfoolscap-0.9.1.tar.gz\t\t\tfoolscap-0.9.1.zip\r\nfoolscap-0.9.1-py2-none-any.whl.asc\tfoolscap-0.9.1.tar.gz.asc\t\tfoolscap-0.9.1.zip.asc\r\n% python setup.py register\r\n% twine upload dist/*\r\n```\r\n\r\nTwine uploaded the tar/zip/whl files, but ignored the .asc signatures, and the resulting [pypi page](https://pypi.python.org/pypi/foolscap/0.9.1) doesn't show them either.\r\n\r\nAfter some digging, I found that `twine/upload.py upload()` will only use pre-signed .asc files if the command was run like `cd dist; twine upload *`. It won't use them if it was run as `cd dist; twine upload ./*` or `twine upload dist/*`. The problem seems to be that the `signatures` dictionary is indexed by the basename of the signature files, while the lookup key is using the full (original) filename of the tarball/etc with \".asc\" appended.\r\n\r\nI think it might be simpler and safer to have the code just check for a neighboring .asc file inside the upload loop, something like:\r\n\r\n```python\r\nfor filename in uploads:\r\n package = PackageFile.from_filename(filename, comment)\r\n maybe_sig = package.signed_filename + \".asc\"\r\n if os.path.exists(maybe_sig):\r\n package.gpg_signature = (os.path.basename(maybe_sig), sigdata)\r\n ...\r\n```\r\n\r\nI'll write up a patch for this. I started to look for a way of adding a test, but the code that looks for signatures happens deep enough in `upload()` that it'd need a oversized mock \"Repository\" class to exercise the .asc check without actually uploading anything. I'm not sure what the best way to approach the test would be.\r\n"},"repo":{"kind":"string","value":"pypa/twine"},"test_patch":{"kind":"string","value":"diff --git a/tests/test_package.py b/tests/test_package.py\nindex fcc827a..d28eec1 100644\n--- a/tests/test_package.py\n+++ b/tests/test_package.py\n@@ -55,3 +55,18 @@ def test_sign_file_with_identity(monkeypatch):\n pass\n args = ('gpg', '--detach-sign', '--local-user', 'identity', '-a', filename)\n assert replaced_check_call.calls == [pretend.call(args)]\n+\n+\n+def test_package_signed_name_is_correct():\n+ filename = 'tests/fixtures/deprecated-pypirc'\n+\n+ pkg = package.PackageFile(\n+ filename=filename,\n+ comment=None,\n+ metadata=pretend.stub(name=\"deprecated-pypirc\"),\n+ python_version=None,\n+ filetype=None\n+ )\n+\n+ assert pkg.signed_basefilename == \"deprecated-pypirc.asc\"\n+ assert pkg.signed_filename == (filename + '.asc')\ndiff --git a/tests/test_upload.py b/tests/test_upload.py\nindex b40660f..7f99510 100644\n--- a/tests/test_upload.py\n+++ b/tests/test_upload.py\n@@ -66,6 +66,7 @@ def test_find_dists_handles_real_files():\n \n def test_get_config_old_format(tmpdir):\n pypirc = os.path.join(str(tmpdir), \".pypirc\")\n+ dists = [\"tests/fixtures/twine-1.5.0-py2.py3-none-any.whl\"]\n \n with open(pypirc, \"w\") as fp:\n fp.write(textwrap.dedent(\"\"\"\n@@ -75,7 +76,7 @@ def test_get_config_old_format(tmpdir):\n \"\"\"))\n \n try:\n- upload.upload(dists=\"foo\", repository=\"pypi\", sign=None, identity=None,\n+ upload.upload(dists=dists, repository=\"pypi\", sign=None, identity=None,\n username=None, password=None, comment=None,\n sign_with=None, config_file=pypirc, skip_existing=False)\n except KeyError as err:\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_hyperlinks\",\n \"has_many_modified_files\",\n \"has_many_hunks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 3\n },\n \"num_modified_files\": 2\n}"},"version":{"kind":"string","value":"1.6"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"pytest\",\n \"pip_packages\": [\n \"pytest\",\n \"coverage\",\n \"pretend\",\n \"flake8\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.9\",\n \"reqs_path\": null,\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"certifi==2025.1.31\ncharset-normalizer==3.4.1\ncoverage==7.8.0\nexceptiongroup @ file:///croot/exceptiongroup_1706031385326/work\nflake8==7.2.0\nidna==3.10\niniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work\nmccabe==0.7.0\npackaging @ file:///croot/packaging_1734472117206/work\npkginfo==1.12.1.2\npluggy @ file:///croot/pluggy_1733169602837/work\npretend==1.0.9\npycodestyle==2.13.0\npyflakes==3.3.1\npytest @ file:///croot/pytest_1738938843180/work\nrequests==2.32.3\nrequests-toolbelt==1.0.0\ntomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work\n-e git+https://github.com/pypa/twine.git@b34f042da78aed22b6e512df61b495638b06ba03#egg=twine\nurllib3==2.3.0\n"},"environment":{"kind":"string","value":"name: twine\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - exceptiongroup=1.2.0=py39h06a4308_0\n - iniconfig=1.1.1=pyhd3eb1b0_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - packaging=24.2=py39h06a4308_0\n - pip=25.0=py39h06a4308_0\n - pluggy=1.5.0=py39h06a4308_0\n - pytest=8.3.4=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tomli=2.0.1=py39h06a4308_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - certifi==2025.1.31\n - charset-normalizer==3.4.1\n - coverage==7.8.0\n - flake8==7.2.0\n - idna==3.10\n - mccabe==0.7.0\n - pkginfo==1.12.1.2\n - pretend==1.0.9\n - pycodestyle==2.13.0\n - pyflakes==3.3.1\n - requests==2.32.3\n - requests-toolbelt==1.0.0\n - urllib3==2.3.0\nprefix: /opt/conda/envs/twine\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/test_package.py::test_package_signed_name_is_correct"],"string":"[\n \"tests/test_package.py::test_package_signed_name_is_correct\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/test_package.py::test_sign_file","tests/test_package.py::test_sign_file_with_identity","tests/test_upload.py::test_ensure_wheel_files_uploaded_first","tests/test_upload.py::test_ensure_if_no_wheel_files","tests/test_upload.py::test_find_dists_expands_globs","tests/test_upload.py::test_find_dists_errors_on_invalid_globs","tests/test_upload.py::test_find_dists_handles_real_files","tests/test_upload.py::test_get_config_old_format","tests/test_upload.py::test_skip_existing_skips_files_already_on_PyPI","tests/test_upload.py::test_skip_upload_respects_skip_existing"],"string":"[\n \"tests/test_package.py::test_sign_file\",\n \"tests/test_package.py::test_sign_file_with_identity\",\n \"tests/test_upload.py::test_ensure_wheel_files_uploaded_first\",\n \"tests/test_upload.py::test_ensure_if_no_wheel_files\",\n \"tests/test_upload.py::test_find_dists_expands_globs\",\n \"tests/test_upload.py::test_find_dists_errors_on_invalid_globs\",\n \"tests/test_upload.py::test_find_dists_handles_real_files\",\n \"tests/test_upload.py::test_get_config_old_format\",\n \"tests/test_upload.py::test_skip_existing_skips_files_already_on_PyPI\",\n \"tests/test_upload.py::test_skip_upload_respects_skip_existing\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"Apache License 2.0"},"__index_level_0__":{"kind":"number","value":253,"string":"253"},"num_tokens_patch":{"kind":"number","value":834,"string":"834"},"before_filepaths":{"kind":"list like","value":["twine/commands/upload.py","twine/package.py"],"string":"[\n \"twine/commands/upload.py\",\n \"twine/package.py\"\n]"}}},{"rowIdx":51,"cells":{"instance_id":{"kind":"string","value":"docker__docker-py-806"},"base_commit":{"kind":"string","value":"f479720d517a7db7f886916190b3032d29d18f10"},"created_at":{"kind":"string","value":"2015-10-09 19:03:05"},"environment_setup_commit":{"kind":"string","value":"f479720d517a7db7f886916190b3032d29d18f10"},"hints_text":{"kind":"string","value":"dnephin: some CI failures, otherwise looks good"},"patch":{"kind":"string","value":"diff --git a/docker/auth/auth.py b/docker/auth/auth.py\nindex 366bc67e..1ee9f812 100644\n--- a/docker/auth/auth.py\n+++ b/docker/auth/auth.py\n@@ -102,7 +102,7 @@ def decode_auth(auth):\n \n def encode_header(auth):\n auth_json = json.dumps(auth).encode('ascii')\n- return base64.b64encode(auth_json)\n+ return base64.urlsafe_b64encode(auth_json)\n \n \n def parse_auth(entries):\n"},"problem_statement":{"kind":"string","value":"Auth fails with long passwords\nSee https://github.com/docker/docker/issues/16840\r\n\r\ndocker-py is encoding `X-Registry-Auth` with regular base64 and not the url safe version of base64 that jwt tokens use."},"repo":{"kind":"string","value":"docker/docker-py"},"test_patch":{"kind":"string","value":"diff --git a/tests/utils_test.py b/tests/utils_test.py\nindex b1adde26..04183f9f 100644\n--- a/tests/utils_test.py\n+++ b/tests/utils_test.py\n@@ -19,7 +19,9 @@ from docker.utils import (\n exclude_paths, convert_volume_binds, decode_json_header\n )\n from docker.utils.ports import build_port_bindings, split_port\n-from docker.auth import resolve_repository_name, resolve_authconfig\n+from docker.auth import (\n+ resolve_repository_name, resolve_authconfig, encode_header\n+)\n \n from . import base\n from .helpers import make_tree\n@@ -376,12 +378,21 @@ class UtilsTest(base.BaseTestCase):\n obj = {'a': 'b', 'c': 1}\n data = None\n if six.PY3:\n- data = base64.b64encode(bytes(json.dumps(obj), 'utf-8'))\n+ data = base64.urlsafe_b64encode(bytes(json.dumps(obj), 'utf-8'))\n else:\n- data = base64.b64encode(json.dumps(obj))\n+ data = base64.urlsafe_b64encode(json.dumps(obj))\n decoded_data = decode_json_header(data)\n self.assertEqual(obj, decoded_data)\n \n+ def test_803_urlsafe_encode(self):\n+ auth_data = {\n+ 'username': 'root',\n+ 'password': 'GR?XGR?XGR?XGR?X'\n+ }\n+ encoded = encode_header(auth_data)\n+ assert b'/' not in encoded\n+ assert b'_' in encoded\n+\n def test_resolve_repository_name(self):\n # docker hub library image\n self.assertEqual(\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_short_problem_statement\",\n \"has_hyperlinks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 0,\n \"test_score\": 2\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"1.4"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .[dev]\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest pytest-cov\",\n \"pytest\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.7\",\n \"reqs_path\": [\n \"requirements.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"certifi @ file:///croot/certifi_1671487769961/work/certifi\ncoverage==7.2.7\n-e git+https://github.com/docker/docker-py.git@f479720d517a7db7f886916190b3032d29d18f10#egg=docker_py\nexceptiongroup==1.2.2\nimportlib-metadata==6.7.0\niniconfig==2.0.0\npackaging==24.0\npluggy==1.2.0\npytest==7.4.4\npytest-cov==4.1.0\nrequests==2.5.3\nsix==1.17.0\ntomli==2.0.1\ntyping_extensions==4.7.1\nwebsocket-client==0.32.0\nzipp==3.15.0\n"},"environment":{"kind":"string","value":"name: docker-py\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - certifi=2022.12.7=py37h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=1.1.1w=h7f8727e_0\n - pip=22.3.1=py37h06a4308_0\n - python=3.7.16=h7a1cb2a_0\n - readline=8.2=h5eee18b_0\n - setuptools=65.6.3=py37h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - wheel=0.38.4=py37h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - coverage==7.2.7\n - exceptiongroup==1.2.2\n - importlib-metadata==6.7.0\n - iniconfig==2.0.0\n - packaging==24.0\n - pluggy==1.2.0\n - pytest==7.4.4\n - pytest-cov==4.1.0\n - requests==2.5.3\n - six==1.17.0\n - tomli==2.0.1\n - typing-extensions==4.7.1\n - websocket-client==0.32.0\n - zipp==3.15.0\nprefix: /opt/conda/envs/docker-py\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/utils_test.py::UtilsTest::test_803_urlsafe_encode"],"string":"[\n \"tests/utils_test.py::UtilsTest::test_803_urlsafe_encode\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/utils_test.py::HostConfigTest::test_create_host_config_invalid_cpu_cfs_types","tests/utils_test.py::HostConfigTest::test_create_host_config_no_options","tests/utils_test.py::HostConfigTest::test_create_host_config_no_options_newer_api_version","tests/utils_test.py::HostConfigTest::test_create_host_config_with_cpu_period","tests/utils_test.py::HostConfigTest::test_create_host_config_with_cpu_quota","tests/utils_test.py::UlimitTest::test_create_host_config_dict_ulimit","tests/utils_test.py::UlimitTest::test_create_host_config_dict_ulimit_capitals","tests/utils_test.py::UlimitTest::test_create_host_config_obj_ulimit","tests/utils_test.py::UlimitTest::test_ulimit_invalid_type","tests/utils_test.py::LogConfigTest::test_create_host_config_dict_logconfig","tests/utils_test.py::LogConfigTest::test_create_host_config_obj_logconfig","tests/utils_test.py::LogConfigTest::test_logconfig_invalid_config_type","tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_empty","tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_no_cert_path","tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_tls","tests/utils_test.py::UtilsTest::test_convert_filters","tests/utils_test.py::UtilsTest::test_convert_volume_binds_compact","tests/utils_test.py::UtilsTest::test_convert_volume_binds_complete","tests/utils_test.py::UtilsTest::test_convert_volume_binds_empty","tests/utils_test.py::UtilsTest::test_convert_volume_binds_list","tests/utils_test.py::UtilsTest::test_convert_volume_binds_no_mode","tests/utils_test.py::UtilsTest::test_convert_volume_binds_unicode_bytes_input","tests/utils_test.py::UtilsTest::test_convert_volume_binds_unicode_unicode_input","tests/utils_test.py::UtilsTest::test_decode_json_header","tests/utils_test.py::UtilsTest::test_parse_bytes","tests/utils_test.py::UtilsTest::test_parse_env_file_commented_line","tests/utils_test.py::UtilsTest::test_parse_env_file_invalid_line","tests/utils_test.py::UtilsTest::test_parse_env_file_proper","tests/utils_test.py::UtilsTest::test_parse_host","tests/utils_test.py::UtilsTest::test_parse_host_empty_value","tests/utils_test.py::UtilsTest::test_parse_repository_tag","tests/utils_test.py::UtilsTest::test_resolve_authconfig","tests/utils_test.py::UtilsTest::test_resolve_registry_and_auth","tests/utils_test.py::UtilsTest::test_resolve_repository_name","tests/utils_test.py::PortsTest::test_build_port_bindings_with_matching_internal_port_ranges","tests/utils_test.py::PortsTest::test_build_port_bindings_with_matching_internal_ports","tests/utils_test.py::PortsTest::test_build_port_bindings_with_nonmatching_internal_port_ranges","tests/utils_test.py::PortsTest::test_build_port_bindings_with_nonmatching_internal_ports","tests/utils_test.py::PortsTest::test_build_port_bindings_with_one_port","tests/utils_test.py::PortsTest::test_build_port_bindings_with_port_range","tests/utils_test.py::PortsTest::test_host_only_with_colon","tests/utils_test.py::PortsTest::test_non_matching_length_port_ranges","tests/utils_test.py::PortsTest::test_port_and_range_invalid","tests/utils_test.py::PortsTest::test_port_only_with_colon","tests/utils_test.py::PortsTest::test_split_port_invalid","tests/utils_test.py::PortsTest::test_split_port_no_host_port","tests/utils_test.py::PortsTest::test_split_port_range_no_host_port","tests/utils_test.py::PortsTest::test_split_port_range_with_host_ip_no_port","tests/utils_test.py::PortsTest::test_split_port_range_with_host_port","tests/utils_test.py::PortsTest::test_split_port_range_with_protocol","tests/utils_test.py::PortsTest::test_split_port_with_host_ip","tests/utils_test.py::PortsTest::test_split_port_with_host_ip_no_port","tests/utils_test.py::PortsTest::test_split_port_with_host_port","tests/utils_test.py::PortsTest::test_split_port_with_protocol","tests/utils_test.py::ExcludePathsTest::test_directory","tests/utils_test.py::ExcludePathsTest::test_directory_with_single_exception","tests/utils_test.py::ExcludePathsTest::test_directory_with_subdir_exception","tests/utils_test.py::ExcludePathsTest::test_directory_with_trailing_slash","tests/utils_test.py::ExcludePathsTest::test_directory_with_wildcard_exception","tests/utils_test.py::ExcludePathsTest::test_exclude_custom_dockerfile","tests/utils_test.py::ExcludePathsTest::test_exclude_dockerfile_dockerignore","tests/utils_test.py::ExcludePathsTest::test_no_dupes","tests/utils_test.py::ExcludePathsTest::test_no_excludes","tests/utils_test.py::ExcludePathsTest::test_question_mark","tests/utils_test.py::ExcludePathsTest::test_single_filename","tests/utils_test.py::ExcludePathsTest::test_single_filename_trailing_slash","tests/utils_test.py::ExcludePathsTest::test_single_subdir_single_filename","tests/utils_test.py::ExcludePathsTest::test_single_subdir_wildcard_filename","tests/utils_test.py::ExcludePathsTest::test_subdirectory","tests/utils_test.py::ExcludePathsTest::test_wildcard_exclude","tests/utils_test.py::ExcludePathsTest::test_wildcard_filename_end","tests/utils_test.py::ExcludePathsTest::test_wildcard_filename_start","tests/utils_test.py::ExcludePathsTest::test_wildcard_subdir_single_filename","tests/utils_test.py::ExcludePathsTest::test_wildcard_subdir_wildcard_filename","tests/utils_test.py::ExcludePathsTest::test_wildcard_with_exception","tests/utils_test.py::ExcludePathsTest::test_wildcard_with_wildcard_exception"],"string":"[\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_invalid_cpu_cfs_types\",\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_no_options\",\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_no_options_newer_api_version\",\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_with_cpu_period\",\n \"tests/utils_test.py::HostConfigTest::test_create_host_config_with_cpu_quota\",\n \"tests/utils_test.py::UlimitTest::test_create_host_config_dict_ulimit\",\n \"tests/utils_test.py::UlimitTest::test_create_host_config_dict_ulimit_capitals\",\n \"tests/utils_test.py::UlimitTest::test_create_host_config_obj_ulimit\",\n \"tests/utils_test.py::UlimitTest::test_ulimit_invalid_type\",\n \"tests/utils_test.py::LogConfigTest::test_create_host_config_dict_logconfig\",\n \"tests/utils_test.py::LogConfigTest::test_create_host_config_obj_logconfig\",\n \"tests/utils_test.py::LogConfigTest::test_logconfig_invalid_config_type\",\n \"tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_empty\",\n \"tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_no_cert_path\",\n \"tests/utils_test.py::KwargsFromEnvTest::test_kwargs_from_env_tls\",\n \"tests/utils_test.py::UtilsTest::test_convert_filters\",\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_compact\",\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_complete\",\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_empty\",\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_list\",\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_no_mode\",\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_unicode_bytes_input\",\n \"tests/utils_test.py::UtilsTest::test_convert_volume_binds_unicode_unicode_input\",\n \"tests/utils_test.py::UtilsTest::test_decode_json_header\",\n \"tests/utils_test.py::UtilsTest::test_parse_bytes\",\n \"tests/utils_test.py::UtilsTest::test_parse_env_file_commented_line\",\n \"tests/utils_test.py::UtilsTest::test_parse_env_file_invalid_line\",\n \"tests/utils_test.py::UtilsTest::test_parse_env_file_proper\",\n \"tests/utils_test.py::UtilsTest::test_parse_host\",\n \"tests/utils_test.py::UtilsTest::test_parse_host_empty_value\",\n \"tests/utils_test.py::UtilsTest::test_parse_repository_tag\",\n \"tests/utils_test.py::UtilsTest::test_resolve_authconfig\",\n \"tests/utils_test.py::UtilsTest::test_resolve_registry_and_auth\",\n \"tests/utils_test.py::UtilsTest::test_resolve_repository_name\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_matching_internal_port_ranges\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_matching_internal_ports\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_nonmatching_internal_port_ranges\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_nonmatching_internal_ports\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_one_port\",\n \"tests/utils_test.py::PortsTest::test_build_port_bindings_with_port_range\",\n \"tests/utils_test.py::PortsTest::test_host_only_with_colon\",\n \"tests/utils_test.py::PortsTest::test_non_matching_length_port_ranges\",\n \"tests/utils_test.py::PortsTest::test_port_and_range_invalid\",\n \"tests/utils_test.py::PortsTest::test_port_only_with_colon\",\n \"tests/utils_test.py::PortsTest::test_split_port_invalid\",\n \"tests/utils_test.py::PortsTest::test_split_port_no_host_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_range_no_host_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_range_with_host_ip_no_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_range_with_host_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_range_with_protocol\",\n \"tests/utils_test.py::PortsTest::test_split_port_with_host_ip\",\n \"tests/utils_test.py::PortsTest::test_split_port_with_host_ip_no_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_with_host_port\",\n \"tests/utils_test.py::PortsTest::test_split_port_with_protocol\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory_with_single_exception\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory_with_subdir_exception\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory_with_trailing_slash\",\n \"tests/utils_test.py::ExcludePathsTest::test_directory_with_wildcard_exception\",\n \"tests/utils_test.py::ExcludePathsTest::test_exclude_custom_dockerfile\",\n \"tests/utils_test.py::ExcludePathsTest::test_exclude_dockerfile_dockerignore\",\n \"tests/utils_test.py::ExcludePathsTest::test_no_dupes\",\n \"tests/utils_test.py::ExcludePathsTest::test_no_excludes\",\n \"tests/utils_test.py::ExcludePathsTest::test_question_mark\",\n \"tests/utils_test.py::ExcludePathsTest::test_single_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_single_filename_trailing_slash\",\n \"tests/utils_test.py::ExcludePathsTest::test_single_subdir_single_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_single_subdir_wildcard_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_subdirectory\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_exclude\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_filename_end\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_filename_start\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_subdir_single_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_subdir_wildcard_filename\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_with_exception\",\n \"tests/utils_test.py::ExcludePathsTest::test_wildcard_with_wildcard_exception\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"Apache License 2.0"},"__index_level_0__":{"kind":"number","value":264,"string":"264"},"num_tokens_patch":{"kind":"number","value":124,"string":"124"},"before_filepaths":{"kind":"list like","value":["docker/auth/auth.py"],"string":"[\n \"docker/auth/auth.py\"\n]"}}},{"rowIdx":52,"cells":{"instance_id":{"kind":"string","value":"pystorm__pystorm-14"},"base_commit":{"kind":"string","value":"111356b63c7a44261fb4d0c827745e793ca8717e"},"created_at":{"kind":"string","value":"2015-10-27 16:46:13"},"environment_setup_commit":{"kind":"string","value":"eaa0bf28f57e43950379dfaabac7174ad5db4740"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/pystorm/component.py b/pystorm/component.py\nindex 23d82e8..80c5abf 100644\n--- a/pystorm/component.py\n+++ b/pystorm/component.py\n@@ -3,14 +3,17 @@ from __future__ import absolute_import, print_function, unicode_literals\n \n import logging\n import os\n+import re\n import signal\n import sys\n-from collections import deque, namedtuple\n+from collections import defaultdict, deque, namedtuple\n from logging.handlers import RotatingFileHandler\n from os.path import join\n from threading import RLock\n from traceback import format_exc\n \n+from six import iteritems\n+\n from .exceptions import StormWentAwayError\n from .serializers.msgpack_serializer import MsgpackSerializer\n from .serializers.json_serializer import JSONSerializer\n@@ -36,6 +39,9 @@ _PYTHON_LOG_LEVELS = {'critical': logging.CRITICAL,\n 'debug': logging.DEBUG,\n 'trace': logging.DEBUG}\n _SERIALIZERS = {\"json\": JSONSerializer, \"msgpack\": MsgpackSerializer}\n+# Convert names to valid Python identifiers by replacing non-word characters\n+# whitespace and leading digits with underscores.\n+_IDENTIFIER_RE = re.compile(r'\\W|^(?=\\d)')\n \n \n log = logging.getLogger(__name__)\n@@ -121,7 +127,7 @@ Tuple = namedtuple('Tuple', 'id component stream task values')\n :ivar task: the task the Tuple was generated from.\n :type task: int\n :ivar values: the payload of the Tuple where data is stored.\n-:type values: list\n+:type values: tuple (or namedtuple for Storm 0.10.0+)\n \"\"\"\n \n \n@@ -177,6 +183,7 @@ class Component(object):\n self.context = None\n self.pid = os.getpid()\n self.logger = None\n+ self._source_tuple_types = defaultdict(dict)\n # pending commands/Tuples we read while trying to read task IDs\n self._pending_commands = deque()\n # pending task IDs we read while trying to read commands/Tuples\n@@ -207,6 +214,15 @@ class Component(object):\n self.topology_name = storm_conf.get('topology.name', '')\n self.task_id = context.get('taskid', '')\n self.component_name = context.get('componentid')\n+ # source->stream->fields requires Storm 0.10.0 or later\n+ source_stream_fields = context.get('source->stream->fields', {})\n+ for source, stream_fields in iteritems(source_stream_fields):\n+ for stream, fields in iteritems(stream_fields):\n+ type_name = (_IDENTIFIER_RE.sub('_', source.title()) +\n+ _IDENTIFIER_RE.sub('_', stream.title()) +\n+ 'Tuple')\n+ self._source_tuple_types[source][stream] = namedtuple(type_name,\n+ fields)\n # If using Storm before 0.10.0 componentid is not available\n if self.component_name is None:\n self.component_name = context.get('task->component', {})\\\n@@ -280,8 +296,12 @@ class Component(object):\n \n def read_tuple(self):\n cmd = self.read_command()\n- return Tuple(cmd['id'], cmd['comp'], cmd['stream'], cmd['task'],\n- cmd['tuple'])\n+ source = cmd['comp']\n+ stream = cmd['stream']\n+ values = cmd['tuple']\n+ val_type = self._source_tuple_types[source].get(stream)\n+ return Tuple(cmd['id'], source, stream, cmd['task'],\n+ tuple(values) if val_type is None else val_type(*values))\n \n def read_handshake(self):\n \"\"\"Read and process an initial handshake message from Storm.\"\"\"\n"},"problem_statement":{"kind":"string","value":"Have Tuple.values be a namedtuple so fields can be accessed by name\n_From @dan-blanchard on April 15, 2015 13:57_\r\n\r\nThis was brought up as part of our discussion of the rejected #120. What we want to do is:\r\n\r\n- [x] Submit a PR to Storm that serializes [`TopologyContext.componentToStreamToFields`](https://github.com/apache/storm/blob/master/storm-core/src/jvm/backtype/storm/task/TopologyContext.java#L61) and sends that along as part of Multi-Lang handshake.\r\n- [x] Add a `_stream_fields` dictionary attribute to the `Component` class that maps from streams to `namedtuple` types representing the names of fields/values in the tuple. This should get created at handshake time based on the contents of `componentToStreamToFields`.\r\n- [x] Modify `Component.read_tuple()` to set `Tuple.values` to be a `namedtuple` of the appropriate type for the current stream (by looking it up in `Component._stream_fields`.\r\n\r\nThis will allow users to get values out of their tuples by accessing values directly by name (`word = tup.values.word`), or by unpacking (`word, count = tup.values`).\r\n\r\n_Copied from original issue: Parsely/streamparse#127_"},"repo":{"kind":"string","value":"pystorm/pystorm"},"test_patch":{"kind":"string","value":"diff --git a/test/pystorm/test_bolt.py b/test/pystorm/test_bolt.py\nindex f9586c3..80cf5c8 100644\n--- a/test/pystorm/test_bolt.py\n+++ b/test/pystorm/test_bolt.py\n@@ -34,7 +34,7 @@ class BoltTests(unittest.TestCase):\n tup_json = \"{}\\nend\\n\".format(json.dumps(self.tup_dict)).encode('utf-8')\n self.tup = Tuple(self.tup_dict['id'], self.tup_dict['comp'],\n self.tup_dict['stream'], self.tup_dict['task'],\n- self.tup_dict['tuple'],)\n+ tuple(self.tup_dict['tuple']),)\n self.bolt = Bolt(input_stream=BytesIO(tup_json),\n output_stream=BytesIO())\n self.bolt.initialize({}, {})\n@@ -190,7 +190,7 @@ class BoltTests(unittest.TestCase):\n def test_heartbeat_response(self, send_message_mock, read_tuple_mock):\n # Make sure we send sync for heartbeats\n read_tuple_mock.return_value = Tuple(id='foo', task=-1,\n- stream='__heartbeat', values=[],\n+ stream='__heartbeat', values=(),\n component='__system')\n self.bolt._run()\n send_message_mock.assert_called_with(self.bolt, {'command': 'sync'})\n@@ -201,7 +201,7 @@ class BoltTests(unittest.TestCase):\n # Make sure we send sync for heartbeats\n read_tuple_mock.return_value = Tuple(id=None, task=-1,\n component='__system',\n- stream='__tick', values=[50])\n+ stream='__tick', values=(50,))\n self.bolt._run()\n process_tick_mock.assert_called_with(self.bolt,\n read_tuple_mock.return_value)\n@@ -239,8 +239,8 @@ class BatchingBoltTests(unittest.TestCase):\n tups_json = '\\nend\\n'.join([json.dumps(tup_dict) for tup_dict in\n self.tup_dicts] + [''])\n self.tups = [Tuple(tup_dict['id'], tup_dict['comp'], tup_dict['stream'],\n- tup_dict['task'], tup_dict['tuple']) for tup_dict in\n- self.tup_dicts]\n+ tup_dict['task'], tuple(tup_dict['tuple']))\n+ for tup_dict in self.tup_dicts]\n self.nontick_tups = [tup for tup in self.tups if tup.stream != '__tick']\n self.bolt = BatchingBolt(input_stream=BytesIO(tups_json.encode('utf-8')),\n output_stream=BytesIO())\n@@ -364,7 +364,7 @@ class BatchingBoltTests(unittest.TestCase):\n def test_heartbeat_response(self, send_message_mock, read_tuple_mock):\n # Make sure we send sync for heartbeats\n read_tuple_mock.return_value = Tuple(id='foo', task=-1,\n- stream='__heartbeat', values=[],\n+ stream='__heartbeat', values=(),\n component='__system')\n self.bolt._run()\n send_message_mock.assert_called_with(self.bolt, {'command': 'sync'})\n@@ -375,7 +375,7 @@ class BatchingBoltTests(unittest.TestCase):\n # Make sure we send sync for heartbeats\n read_tuple_mock.return_value = Tuple(id=None, task=-1,\n component='__system',\n- stream='__tick', values=[50])\n+ stream='__tick', values=(50,))\n self.bolt._run()\n process_tick_mock.assert_called_with(self.bolt,\n read_tuple_mock.return_value)\ndiff --git a/test/pystorm/test_component.py b/test/pystorm/test_component.py\nindex f7228f4..c508ae1 100644\n--- a/test/pystorm/test_component.py\n+++ b/test/pystorm/test_component.py\n@@ -7,6 +7,7 @@ from __future__ import absolute_import, print_function, unicode_literals\n import logging\n import os\n import unittest\n+from collections import namedtuple\n from io import BytesIO\n \n import simplejson as json\n@@ -24,49 +25,48 @@ log = logging.getLogger(__name__)\n \n \n class ComponentTests(unittest.TestCase):\n-\n- def test_read_handshake(self):\n- handshake_dict = {\n- \"conf\": {\n- \"topology.message.timeout.secs\": 3,\n- \"topology.tick.tuple.freq.secs\": 1,\n- \"topology.debug\": True\n- },\n- \"pidDir\": \".\",\n- \"context\": {\n- \"task->component\": {\n- \"1\": \"example-spout\",\n- \"2\": \"__acker\",\n- \"3\": \"example-bolt1\",\n- \"4\": \"example-bolt2\"\n- },\n- \"taskid\": 3,\n- # Everything below this line is only available in Storm 0.10.0+\n- \"componentid\": \"example-bolt1\",\n- \"stream->target->grouping\": {\n- \"default\": {\n- \"example-bolt2\": {\n- \"type\": \"SHUFFLE\"\n- }\n- }\n- },\n- \"streams\": [\"default\"],\n- \"stream->outputfields\": {\"default\": [\"word\"]},\n- \"source->stream->grouping\": {\n- \"example-spout\": {\n- \"default\": {\n- \"type\": \"FIELDS\",\n- \"fields\": [\"word\"]\n- }\n- }\n- },\n- \"source->stream->fields\": {\n- \"example-spout\": {\n- \"default\": [\"word\"]\n- }\n+ conf = {\"topology.message.timeout.secs\": 3,\n+ \"topology.tick.tuple.freq.secs\": 1,\n+ \"topology.debug\": True,\n+ \"topology.name\": \"foo\"}\n+ context = {\n+ \"task->component\": {\n+ \"1\": \"example-spout\",\n+ \"2\": \"__acker\",\n+ \"3\": \"example-bolt1\",\n+ \"4\": \"example-bolt2\"\n+ },\n+ \"taskid\": 3,\n+ # Everything below this line is only available in Storm 0.11.0+\n+ \"componentid\": \"example-bolt1\",\n+ \"stream->target->grouping\": {\n+ \"default\": {\n+ \"example-bolt2\": {\n+ \"type\": \"SHUFFLE\"\n+ }\n+ }\n+ },\n+ \"streams\": [\"default\"],\n+ \"stream->outputfields\": {\"default\": [\"word\"]},\n+ \"source->stream->grouping\": {\n+ \"example-spout\": {\n+ \"default\": {\n+ \"type\": \"FIELDS\",\n+ \"fields\": [\"word\"]\n }\n }\n+ },\n+ \"source->stream->fields\": {\n+ \"example-spout\": {\n+ \"default\": [\"sentence\", \"word\", \"number\"]\n+ }\n }\n+ }\n+\n+ def test_read_handshake(self):\n+ handshake_dict = {\"conf\": self.conf,\n+ \"pidDir\": \".\",\n+ \"context\": self.context}\n pid_dir = handshake_dict['pidDir']\n expected_conf = handshake_dict['conf']\n expected_context = handshake_dict['context']\n@@ -84,52 +84,18 @@ class ComponentTests(unittest.TestCase):\n component.serializer.output_stream.buffer.getvalue())\n \n def test_setup_component(self):\n- conf = {\"topology.message.timeout.secs\": 3,\n- \"topology.tick.tuple.freq.secs\": 1,\n- \"topology.debug\": True,\n- \"topology.name\": \"foo\"}\n- context = {\n- \"task->component\": {\n- \"1\": \"example-spout\",\n- \"2\": \"__acker\",\n- \"3\": \"example-bolt1\",\n- \"4\": \"example-bolt2\"\n- },\n- \"taskid\": 3,\n- # Everything below this line is only available in Storm 0.11.0+\n- \"componentid\": \"example-bolt1\",\n- \"stream->target->grouping\": {\n- \"default\": {\n- \"example-bolt2\": {\n- \"type\": \"SHUFFLE\"\n- }\n- }\n- },\n- \"streams\": [\"default\"],\n- \"stream->outputfields\": {\"default\": [\"word\"]},\n- \"source->stream->grouping\": {\n- \"example-spout\": {\n- \"default\": {\n- \"type\": \"FIELDS\",\n- \"fields\": [\"word\"]\n- }\n- }\n- },\n- \"source->stream->fields\": {\n- \"example-spout\": {\n- \"default\": [\"word\"]\n- }\n- }\n- }\n+ conf = self.conf\n component = Component(input_stream=BytesIO(),\n output_stream=BytesIO())\n- component._setup_component(conf, context)\n+ component._setup_component(conf, self.context)\n+ self.assertEqual(component._source_tuple_types['example-spout']['default'].__name__,\n+ 'Example_SpoutDefaultTuple')\n self.assertEqual(component.topology_name, conf['topology.name'])\n- self.assertEqual(component.task_id, context['taskid'])\n+ self.assertEqual(component.task_id, self.context['taskid'])\n self.assertEqual(component.component_name,\n- context['task->component'][str(context['taskid'])])\n+ self.context['task->component'][str(self.context['taskid'])])\n self.assertEqual(component.storm_conf, conf)\n- self.assertEqual(component.context, context)\n+ self.assertEqual(component.context, self.context)\n \n def test_read_message(self):\n inputs = [# Task IDs\n@@ -259,7 +225,7 @@ class ComponentTests(unittest.TestCase):\n for msg in inputs[::2]:\n output = json.loads(msg)\n output['component'] = output['comp']\n- output['values'] = output['tuple']\n+ output['values'] = tuple(output['tuple'])\n del output['comp']\n del output['tuple']\n outputs.append(Tuple(**output))\n@@ -272,6 +238,38 @@ class ComponentTests(unittest.TestCase):\n tup = component.read_tuple()\n self.assertEqual(output, tup)\n \n+ def test_read_tuple_named_fields(self):\n+ # This is only valid for bolts, so we only need to test with task IDs\n+ # and Tuples\n+ inputs = [('{ \"id\": \"-6955786537413359385\", \"comp\": \"example-spout\", '\n+ '\"stream\": \"default\", \"task\": 9, \"tuple\": [\"snow white and '\n+ 'the seven dwarfs\", \"field2\", 3]}\\n'), 'end\\n']\n+\n+ component = Component(input_stream=BytesIO(''.join(inputs).encode('utf-8')),\n+ output_stream=BytesIO())\n+ component._setup_component(self.conf, self.context)\n+\n+ Example_SpoutDefaultTuple = namedtuple('Example_SpoutDefaultTuple',\n+ field_names=['sentence', 'word',\n+ 'number'])\n+\n+ outputs = []\n+ for msg in inputs[::2]:\n+ output = json.loads(msg)\n+ output['component'] = output['comp']\n+ output['values'] = Example_SpoutDefaultTuple(*output['tuple'])\n+ del output['comp']\n+ del output['tuple']\n+ outputs.append(Tuple(**output))\n+\n+ for output in outputs:\n+ log.info('Checking Tuple for %r', output)\n+ tup = component.read_tuple()\n+ self.assertEqual(output.values.sentence, tup.values.sentence)\n+ self.assertEqual(output.values.word, tup.values.word)\n+ self.assertEqual(output.values.number, tup.values.number)\n+ self.assertEqual(output, tup)\n+\n def test_send_message(self):\n component = Component(input_stream=BytesIO(), output_stream=BytesIO())\n inputs = [{\"command\": \"emit\", \"id\": 4, \"stream\": \"\", \"task\": 9,\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_hyperlinks\",\n \"has_many_hunks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 0,\n \"test_score\": 0\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"1.0"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .[all]\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest\",\n \"mock\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.5\",\n \"reqs_path\": [\n \"requirements.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"attrs==22.2.0\ncertifi==2021.5.30\nimportlib-metadata==4.8.3\niniconfig==1.1.1\nmock==5.2.0\nmsgpack-python==0.5.6\npackaging==21.3\npluggy==1.0.0\npy==1.11.0\npyparsing==3.1.4\n-e git+https://github.com/pystorm/pystorm.git@111356b63c7a44261fb4d0c827745e793ca8717e#egg=pystorm\npytest==7.0.1\nsimplejson==3.20.1\nsix==1.17.0\ntomli==1.2.3\ntyping_extensions==4.1.1\nzipp==3.6.0\n"},"environment":{"kind":"string","value":"name: pystorm\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - certifi=2021.5.30=py36h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.3=he6710b0_2\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=1.1.1w=h7f8727e_0\n - pip=21.2.2=py36h06a4308_0\n - python=3.6.13=h12debd9_1\n - readline=8.2=h5eee18b_0\n - setuptools=58.0.4=py36h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - wheel=0.37.1=pyhd3eb1b0_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - attrs==22.2.0\n - importlib-metadata==4.8.3\n - iniconfig==1.1.1\n - mock==5.2.0\n - msgpack-python==0.5.6\n - packaging==21.3\n - pluggy==1.0.0\n - py==1.11.0\n - pyparsing==3.1.4\n - pytest==7.0.1\n - simplejson==3.20.1\n - six==1.17.0\n - tomli==1.2.3\n - typing-extensions==4.1.1\n - zipp==3.6.0\nprefix: /opt/conda/envs/pystorm\n"},"FAIL_TO_PASS":{"kind":"list like","value":["test/pystorm/test_bolt.py::BoltTests::test_auto_ack_on","test/pystorm/test_bolt.py::BoltTests::test_run","test/pystorm/test_bolt.py::BatchingBoltTests::test_auto_ack_off","test/pystorm/test_bolt.py::BatchingBoltTests::test_auto_ack_on","test/pystorm/test_bolt.py::BatchingBoltTests::test_auto_fail_on","test/pystorm/test_bolt.py::BatchingBoltTests::test_batching","test/pystorm/test_bolt.py::BatchingBoltTests::test_group_key","test/pystorm/test_component.py::ComponentTests::test_read_tuple","test/pystorm/test_component.py::ComponentTests::test_read_tuple_named_fields","test/pystorm/test_component.py::ComponentTests::test_setup_component"],"string":"[\n \"test/pystorm/test_bolt.py::BoltTests::test_auto_ack_on\",\n \"test/pystorm/test_bolt.py::BoltTests::test_run\",\n \"test/pystorm/test_bolt.py::BatchingBoltTests::test_auto_ack_off\",\n \"test/pystorm/test_bolt.py::BatchingBoltTests::test_auto_ack_on\",\n \"test/pystorm/test_bolt.py::BatchingBoltTests::test_auto_fail_on\",\n \"test/pystorm/test_bolt.py::BatchingBoltTests::test_batching\",\n \"test/pystorm/test_bolt.py::BatchingBoltTests::test_group_key\",\n \"test/pystorm/test_component.py::ComponentTests::test_read_tuple\",\n \"test/pystorm/test_component.py::ComponentTests::test_read_tuple_named_fields\",\n \"test/pystorm/test_component.py::ComponentTests::test_setup_component\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["test/pystorm/test_bolt.py::BoltTests::test_ack_id","test/pystorm/test_bolt.py::BoltTests::test_ack_tuple","test/pystorm/test_bolt.py::BoltTests::test_auto_ack_off","test/pystorm/test_bolt.py::BoltTests::test_auto_anchor_off","test/pystorm/test_bolt.py::BoltTests::test_auto_anchor_on","test/pystorm/test_bolt.py::BoltTests::test_auto_anchor_override","test/pystorm/test_bolt.py::BoltTests::test_auto_fail_off","test/pystorm/test_bolt.py::BoltTests::test_auto_fail_on","test/pystorm/test_bolt.py::BoltTests::test_emit_basic","test/pystorm/test_bolt.py::BoltTests::test_emit_direct","test/pystorm/test_bolt.py::BoltTests::test_emit_stream_anchors","test/pystorm/test_bolt.py::BoltTests::test_fail_id","test/pystorm/test_bolt.py::BoltTests::test_fail_tuple","test/pystorm/test_bolt.py::BoltTests::test_heartbeat_response","test/pystorm/test_bolt.py::BoltTests::test_process_tick","test/pystorm/test_bolt.py::BatchingBoltTests::test_auto_fail_off","test/pystorm/test_bolt.py::BatchingBoltTests::test_auto_fail_partial","test/pystorm/test_bolt.py::BatchingBoltTests::test_heartbeat_response","test/pystorm/test_bolt.py::BatchingBoltTests::test_process_tick","test/pystorm/test_component.py::ComponentTests::test_log","test/pystorm/test_component.py::ComponentTests::test_read_command","test/pystorm/test_component.py::ComponentTests::test_read_handshake","test/pystorm/test_component.py::ComponentTests::test_read_message","test/pystorm/test_component.py::ComponentTests::test_read_message_unicode","test/pystorm/test_component.py::ComponentTests::test_read_split_message","test/pystorm/test_component.py::ComponentTests::test_read_task_ids","test/pystorm/test_component.py::ComponentTests::test_send_message","test/pystorm/test_component.py::ComponentTests::test_send_message_unicode"],"string":"[\n \"test/pystorm/test_bolt.py::BoltTests::test_ack_id\",\n \"test/pystorm/test_bolt.py::BoltTests::test_ack_tuple\",\n \"test/pystorm/test_bolt.py::BoltTests::test_auto_ack_off\",\n \"test/pystorm/test_bolt.py::BoltTests::test_auto_anchor_off\",\n \"test/pystorm/test_bolt.py::BoltTests::test_auto_anchor_on\",\n \"test/pystorm/test_bolt.py::BoltTests::test_auto_anchor_override\",\n \"test/pystorm/test_bolt.py::BoltTests::test_auto_fail_off\",\n \"test/pystorm/test_bolt.py::BoltTests::test_auto_fail_on\",\n \"test/pystorm/test_bolt.py::BoltTests::test_emit_basic\",\n \"test/pystorm/test_bolt.py::BoltTests::test_emit_direct\",\n \"test/pystorm/test_bolt.py::BoltTests::test_emit_stream_anchors\",\n \"test/pystorm/test_bolt.py::BoltTests::test_fail_id\",\n \"test/pystorm/test_bolt.py::BoltTests::test_fail_tuple\",\n \"test/pystorm/test_bolt.py::BoltTests::test_heartbeat_response\",\n \"test/pystorm/test_bolt.py::BoltTests::test_process_tick\",\n \"test/pystorm/test_bolt.py::BatchingBoltTests::test_auto_fail_off\",\n \"test/pystorm/test_bolt.py::BatchingBoltTests::test_auto_fail_partial\",\n \"test/pystorm/test_bolt.py::BatchingBoltTests::test_heartbeat_response\",\n \"test/pystorm/test_bolt.py::BatchingBoltTests::test_process_tick\",\n \"test/pystorm/test_component.py::ComponentTests::test_log\",\n \"test/pystorm/test_component.py::ComponentTests::test_read_command\",\n \"test/pystorm/test_component.py::ComponentTests::test_read_handshake\",\n \"test/pystorm/test_component.py::ComponentTests::test_read_message\",\n \"test/pystorm/test_component.py::ComponentTests::test_read_message_unicode\",\n \"test/pystorm/test_component.py::ComponentTests::test_read_split_message\",\n \"test/pystorm/test_component.py::ComponentTests::test_read_task_ids\",\n \"test/pystorm/test_component.py::ComponentTests::test_send_message\",\n \"test/pystorm/test_component.py::ComponentTests::test_send_message_unicode\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"Apache License 2.0"},"__index_level_0__":{"kind":"number","value":276,"string":"276"},"num_tokens_patch":{"kind":"number","value":821,"string":"821"},"before_filepaths":{"kind":"list like","value":["pystorm/component.py"],"string":"[\n \"pystorm/component.py\"\n]"}}},{"rowIdx":53,"cells":{"instance_id":{"kind":"string","value":"scrapy__scrapy-1563"},"base_commit":{"kind":"string","value":"dd9f777ba725d7a7dbb192302cc52a120005ad64"},"created_at":{"kind":"string","value":"2015-10-29 06:21:42"},"environment_setup_commit":{"kind":"string","value":"6aa85aee2a274393307ac3e777180fcbdbdc9848"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/scrapy/http/request/form.py b/scrapy/http/request/form.py\nindex a12a2fd07..4a9bd732e 100644\n--- a/scrapy/http/request/form.py\n+++ b/scrapy/http/request/form.py\n@@ -11,6 +11,7 @@ from parsel.selector import create_root_node\n import six\n from scrapy.http.request import Request\n from scrapy.utils.python import to_bytes, is_listlike\n+from scrapy.utils.response import get_base_url\n \n \n class FormRequest(Request):\n@@ -44,7 +45,7 @@ class FormRequest(Request):\n \n def _get_form_url(form, url):\n if url is None:\n- return form.action or form.base_url\n+ return urljoin(form.base_url, form.action)\n return urljoin(form.base_url, url)\n \n \n@@ -58,7 +59,7 @@ def _urlencode(seq, enc):\n def _get_form(response, formname, formid, formnumber, formxpath):\n \"\"\"Find the form element \"\"\"\n text = response.body_as_unicode()\n- root = create_root_node(text, lxml.html.HTMLParser, base_url=response.url)\n+ root = create_root_node(text, lxml.html.HTMLParser, base_url=get_base_url(response))\n forms = root.xpath('//form')\n if not forms:\n raise ValueError(\"No
element found in %s\" % response)\n"},"problem_statement":{"kind":"string","value":"[Bug] Incorrectly picked URL in `scrapy.http.FormRequest.from_response` when there is a `` tag\n## Issue Description\r\n\r\nIncorrectly picked URL in `scrapy.http.FormRequest.from_response` when there is a `` tag.\r\n\r\n## How to Reproduce the Issue & Version Used\r\n\r\n```\r\n[pengyu@GLaDOS tmp]$ python2\r\nPython 2.7.10 (default, Sep 7 2015, 13:51:49) \r\n[GCC 5.2.0] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import scrapy\r\n>>> scrapy.__version__\r\nu'1.0.3'\r\n>>> html_body = '''\r\n... \r\n... \r\n... \r\n... \r\n... \r\n... \r\n...
\r\n... \r\n... \r\n... '''\r\n>>> response = scrapy.http.TextResponse(url='http://a.com/', body=html_body)\r\n>>> request = scrapy.http.FormRequest.from_response(response)\r\n>>> request.url\r\n'http://a.com/test_form'\r\n```\r\n\r\n## Expected Result\r\n\r\n`request.url` shall be `'http://b.com/test_form'`\r\n\r\n## Suggested Fix\r\n\r\nThe issue can be fixed by fixing a few lines in `scrapy/http/request/form.py`"},"repo":{"kind":"string","value":"scrapy/scrapy"},"test_patch":{"kind":"string","value":"diff --git a/tests/test_http_request.py b/tests/test_http_request.py\nindex ff0941961..60fd855dd 100644\n--- a/tests/test_http_request.py\n+++ b/tests/test_http_request.py\n@@ -801,6 +801,25 @@ class FormRequestTest(RequestTest):\n self.assertEqual(fs[b'test2'], [b'val2'])\n self.assertEqual(fs[b'button1'], [b''])\n \n+ def test_html_base_form_action(self):\n+ response = _buildresponse(\n+ \"\"\"\n+ \n+ \n+ \n+ \n+ \n+
\n+
\n+ \n+ \n+ \"\"\",\n+ url='http://a.com/'\n+ )\n+ req = self.request_class.from_response(response)\n+ self.assertEqual(req.url, 'http://b.com/test_form')\n+\n+\n def _buildresponse(body, **kwargs):\n kwargs.setdefault('body', body)\n kwargs.setdefault('url', 'http://example.com')\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_hyperlinks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 0,\n \"test_score\": 0\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"1.0"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev\"\n ],\n \"python\": \"3.9\",\n \"reqs_path\": [\n \"requirements.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"attrs==25.3.0\nAutomat==24.8.1\ncffi==1.17.1\nconstantly==23.10.4\ncoverage==7.8.0\ncryptography==44.0.2\ncssselect==1.3.0\nexceptiongroup==1.2.2\nexecnet==2.1.1\nhyperlink==21.0.0\nidna==3.10\nincremental==24.7.2\niniconfig==2.1.0\njmespath==1.0.1\nlxml==5.3.1\npackaging==24.2\nparsel==1.10.0\npluggy==1.5.0\npyasn1==0.6.1\npyasn1_modules==0.4.2\npycparser==2.22\nPyDispatcher==2.0.7\npyOpenSSL==25.0.0\npytest==8.3.5\npytest-asyncio==0.26.0\npytest-cov==6.0.0\npytest-mock==3.14.0\npytest-xdist==3.6.1\nqueuelib==1.7.0\n-e git+https://github.com/scrapy/scrapy.git@dd9f777ba725d7a7dbb192302cc52a120005ad64#egg=Scrapy\nservice-identity==24.2.0\nsix==1.17.0\ntomli==2.2.1\nTwisted==24.11.0\ntyping_extensions==4.13.0\nw3lib==2.3.1\nzope.interface==7.2\n"},"environment":{"kind":"string","value":"name: scrapy\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - pip=25.0=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - attrs==25.3.0\n - automat==24.8.1\n - cffi==1.17.1\n - constantly==23.10.4\n - coverage==7.8.0\n - cryptography==44.0.2\n - cssselect==1.3.0\n - exceptiongroup==1.2.2\n - execnet==2.1.1\n - hyperlink==21.0.0\n - idna==3.10\n - incremental==24.7.2\n - iniconfig==2.1.0\n - jmespath==1.0.1\n - lxml==5.3.1\n - packaging==24.2\n - parsel==1.10.0\n - pluggy==1.5.0\n - pyasn1==0.6.1\n - pyasn1-modules==0.4.2\n - pycparser==2.22\n - pydispatcher==2.0.7\n - pyopenssl==25.0.0\n - pytest==8.3.5\n - pytest-asyncio==0.26.0\n - pytest-cov==6.0.0\n - pytest-mock==3.14.0\n - pytest-xdist==3.6.1\n - queuelib==1.7.0\n - service-identity==24.2.0\n - six==1.17.0\n - tomli==2.2.1\n - twisted==24.11.0\n - typing-extensions==4.13.0\n - w3lib==2.3.1\n - zope-interface==7.2\nprefix: /opt/conda/envs/scrapy\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/test_http_request.py::FormRequestTest::test_html_base_form_action"],"string":"[\n \"tests/test_http_request.py::FormRequestTest::test_html_base_form_action\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":["tests/test_http_request.py::FormRequestTest::test_from_response_button_notype","tests/test_http_request.py::FormRequestTest::test_from_response_button_novalue","tests/test_http_request.py::FormRequestTest::test_from_response_button_submit","tests/test_http_request.py::FormRequestTest::test_from_response_checkbox","tests/test_http_request.py::FormRequestTest::test_from_response_descendants","tests/test_http_request.py::FormRequestTest::test_from_response_dont_click","tests/test_http_request.py::FormRequestTest::test_from_response_dont_submit_image_as_input","tests/test_http_request.py::FormRequestTest::test_from_response_dont_submit_reset_as_input","tests/test_http_request.py::FormRequestTest::test_from_response_formid_exists","tests/test_http_request.py::FormRequestTest::test_from_response_formid_notexist","tests/test_http_request.py::FormRequestTest::test_from_response_formname_exists","tests/test_http_request.py::FormRequestTest::test_from_response_formname_notexist","tests/test_http_request.py::FormRequestTest::test_from_response_formname_notexists_fallback_formid","tests/test_http_request.py::FormRequestTest::test_from_response_get","tests/test_http_request.py::FormRequestTest::test_from_response_input_hidden","tests/test_http_request.py::FormRequestTest::test_from_response_input_text","tests/test_http_request.py::FormRequestTest::test_from_response_input_textarea","tests/test_http_request.py::FormRequestTest::test_from_response_invalid_html5","tests/test_http_request.py::FormRequestTest::test_from_response_multiple_clickdata","tests/test_http_request.py::FormRequestTest::test_from_response_multiple_forms_clickdata","tests/test_http_request.py::FormRequestTest::test_from_response_noformname","tests/test_http_request.py::FormRequestTest::test_from_response_nr_index_clickdata","tests/test_http_request.py::FormRequestTest::test_from_response_override_clickable","tests/test_http_request.py::FormRequestTest::test_from_response_override_params","tests/test_http_request.py::FormRequestTest::test_from_response_post","tests/test_http_request.py::FormRequestTest::test_from_response_radio","tests/test_http_request.py::FormRequestTest::test_from_response_select","tests/test_http_request.py::FormRequestTest::test_from_response_submit_first_clickable","tests/test_http_request.py::FormRequestTest::test_from_response_submit_not_first_clickable","tests/test_http_request.py::FormRequestTest::test_from_response_submit_novalue","tests/test_http_request.py::FormRequestTest::test_from_response_unicode_clickdata","tests/test_http_request.py::FormRequestTest::test_from_response_xpath"],"string":"[\n \"tests/test_http_request.py::FormRequestTest::test_from_response_button_notype\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_button_novalue\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_button_submit\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_checkbox\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_descendants\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_dont_click\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_dont_submit_image_as_input\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_dont_submit_reset_as_input\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_formid_exists\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_formid_notexist\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_formname_exists\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_formname_notexist\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_formname_notexists_fallback_formid\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_get\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_input_hidden\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_input_text\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_input_textarea\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_invalid_html5\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_multiple_clickdata\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_multiple_forms_clickdata\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_noformname\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_nr_index_clickdata\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_override_clickable\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_override_params\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_post\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_radio\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_select\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_submit_first_clickable\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_submit_not_first_clickable\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_submit_novalue\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_unicode_clickdata\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_xpath\"\n]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/test_http_request.py::RequestTest::test_ajax_url","tests/test_http_request.py::RequestTest::test_body","tests/test_http_request.py::RequestTest::test_copy","tests/test_http_request.py::RequestTest::test_copy_inherited_classes","tests/test_http_request.py::RequestTest::test_eq","tests/test_http_request.py::RequestTest::test_headers","tests/test_http_request.py::RequestTest::test_immutable_attributes","tests/test_http_request.py::RequestTest::test_init","tests/test_http_request.py::RequestTest::test_method_always_str","tests/test_http_request.py::RequestTest::test_replace","tests/test_http_request.py::RequestTest::test_url","tests/test_http_request.py::RequestTest::test_url_no_scheme","tests/test_http_request.py::RequestTest::test_url_quoting","tests/test_http_request.py::FormRequestTest::test_ajax_url","tests/test_http_request.py::FormRequestTest::test_body","tests/test_http_request.py::FormRequestTest::test_copy","tests/test_http_request.py::FormRequestTest::test_copy_inherited_classes","tests/test_http_request.py::FormRequestTest::test_custom_encoding","tests/test_http_request.py::FormRequestTest::test_empty_formdata","tests/test_http_request.py::FormRequestTest::test_eq","tests/test_http_request.py::FormRequestTest::test_from_response_ambiguous_clickdata","tests/test_http_request.py::FormRequestTest::test_from_response_errors_formnumber","tests/test_http_request.py::FormRequestTest::test_from_response_errors_noform","tests/test_http_request.py::FormRequestTest::test_from_response_extra_headers","tests/test_http_request.py::FormRequestTest::test_from_response_formid_errors_formnumber","tests/test_http_request.py::FormRequestTest::test_from_response_formname_errors_formnumber","tests/test_http_request.py::FormRequestTest::test_from_response_invalid_nr_index_clickdata","tests/test_http_request.py::FormRequestTest::test_from_response_non_matching_clickdata","tests/test_http_request.py::FormRequestTest::test_from_response_override_method","tests/test_http_request.py::FormRequestTest::test_from_response_override_url","tests/test_http_request.py::FormRequestTest::test_headers","tests/test_http_request.py::FormRequestTest::test_immutable_attributes","tests/test_http_request.py::FormRequestTest::test_init","tests/test_http_request.py::FormRequestTest::test_method_always_str","tests/test_http_request.py::FormRequestTest::test_multi_key_values","tests/test_http_request.py::FormRequestTest::test_replace","tests/test_http_request.py::FormRequestTest::test_url","tests/test_http_request.py::FormRequestTest::test_url_no_scheme","tests/test_http_request.py::FormRequestTest::test_url_quoting","tests/test_http_request.py::XmlRpcRequestTest::test_ajax_url","tests/test_http_request.py::XmlRpcRequestTest::test_body","tests/test_http_request.py::XmlRpcRequestTest::test_copy","tests/test_http_request.py::XmlRpcRequestTest::test_copy_inherited_classes","tests/test_http_request.py::XmlRpcRequestTest::test_eq","tests/test_http_request.py::XmlRpcRequestTest::test_headers","tests/test_http_request.py::XmlRpcRequestTest::test_immutable_attributes","tests/test_http_request.py::XmlRpcRequestTest::test_init","tests/test_http_request.py::XmlRpcRequestTest::test_method_always_str","tests/test_http_request.py::XmlRpcRequestTest::test_replace","tests/test_http_request.py::XmlRpcRequestTest::test_url","tests/test_http_request.py::XmlRpcRequestTest::test_url_no_scheme","tests/test_http_request.py::XmlRpcRequestTest::test_url_quoting","tests/test_http_request.py::XmlRpcRequestTest::test_xmlrpc_dumps"],"string":"[\n \"tests/test_http_request.py::RequestTest::test_ajax_url\",\n \"tests/test_http_request.py::RequestTest::test_body\",\n \"tests/test_http_request.py::RequestTest::test_copy\",\n \"tests/test_http_request.py::RequestTest::test_copy_inherited_classes\",\n \"tests/test_http_request.py::RequestTest::test_eq\",\n \"tests/test_http_request.py::RequestTest::test_headers\",\n \"tests/test_http_request.py::RequestTest::test_immutable_attributes\",\n \"tests/test_http_request.py::RequestTest::test_init\",\n \"tests/test_http_request.py::RequestTest::test_method_always_str\",\n \"tests/test_http_request.py::RequestTest::test_replace\",\n \"tests/test_http_request.py::RequestTest::test_url\",\n \"tests/test_http_request.py::RequestTest::test_url_no_scheme\",\n \"tests/test_http_request.py::RequestTest::test_url_quoting\",\n \"tests/test_http_request.py::FormRequestTest::test_ajax_url\",\n \"tests/test_http_request.py::FormRequestTest::test_body\",\n \"tests/test_http_request.py::FormRequestTest::test_copy\",\n \"tests/test_http_request.py::FormRequestTest::test_copy_inherited_classes\",\n \"tests/test_http_request.py::FormRequestTest::test_custom_encoding\",\n \"tests/test_http_request.py::FormRequestTest::test_empty_formdata\",\n \"tests/test_http_request.py::FormRequestTest::test_eq\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_ambiguous_clickdata\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_errors_formnumber\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_errors_noform\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_extra_headers\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_formid_errors_formnumber\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_formname_errors_formnumber\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_invalid_nr_index_clickdata\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_non_matching_clickdata\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_override_method\",\n \"tests/test_http_request.py::FormRequestTest::test_from_response_override_url\",\n \"tests/test_http_request.py::FormRequestTest::test_headers\",\n \"tests/test_http_request.py::FormRequestTest::test_immutable_attributes\",\n \"tests/test_http_request.py::FormRequestTest::test_init\",\n \"tests/test_http_request.py::FormRequestTest::test_method_always_str\",\n \"tests/test_http_request.py::FormRequestTest::test_multi_key_values\",\n \"tests/test_http_request.py::FormRequestTest::test_replace\",\n \"tests/test_http_request.py::FormRequestTest::test_url\",\n \"tests/test_http_request.py::FormRequestTest::test_url_no_scheme\",\n \"tests/test_http_request.py::FormRequestTest::test_url_quoting\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_ajax_url\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_body\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_copy\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_copy_inherited_classes\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_eq\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_headers\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_immutable_attributes\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_init\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_method_always_str\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_replace\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_url\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_url_no_scheme\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_url_quoting\",\n \"tests/test_http_request.py::XmlRpcRequestTest::test_xmlrpc_dumps\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"BSD 3-Clause \"New\" or \"Revised\" License"},"__index_level_0__":{"kind":"number","value":279,"string":"279"},"num_tokens_patch":{"kind":"number","value":309,"string":"309"},"before_filepaths":{"kind":"list like","value":["scrapy/http/request/form.py"],"string":"[\n \"scrapy/http/request/form.py\"\n]"}}},{"rowIdx":54,"cells":{"instance_id":{"kind":"string","value":"docker__docker-py-832"},"base_commit":{"kind":"string","value":"47ab89ec2bd3bddf1221b856ffbaff333edeabb4"},"created_at":{"kind":"string","value":"2015-10-29 15:17:54"},"environment_setup_commit":{"kind":"string","value":"1ca2bc58f0cf2e2cdda2734395bd3e7ad9b178bf"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/docker/auth/auth.py b/docker/auth/auth.py\nindex 2ed894ee..416dd7c4 100644\n--- a/docker/auth/auth.py\n+++ b/docker/auth/auth.py\n@@ -96,7 +96,7 @@ def decode_auth(auth):\n auth = auth.encode('ascii')\n s = base64.b64decode(auth)\n login, pwd = s.split(b':', 1)\n- return login.decode('ascii'), pwd.decode('ascii')\n+ return login.decode('utf8'), pwd.decode('utf8')\n \n \n def encode_header(auth):\n"},"problem_statement":{"kind":"string","value":"decode_auth function does not handle utf-8 logins or password\nHI\r\n\r\nI have found that the function **decode_auth** (line 96, [file](https://github.com/docker/docker-py/blob/master/docker/auth/auth.py)) fails when decoding UTF-8 passwords from the .dockercfg file, and **load_config** returning an empty config.\r\n\r\nI have checked and docker hub can handle UTF-8 passwords, this code proves that:\r\n```python\r\n# coding=utf-8\r\nfrom docker import Client\r\ncred = { 'username': , 'password': }\r\nc = Client(base_url='unix://var/run/docker.sock')\r\nres = c.pull(repository='', tag='latest', auth_config=cred)\r\nprint(res)\r\n```\r\n\r\nThank you"},"repo":{"kind":"string","value":"docker/docker-py"},"test_patch":{"kind":"string","value":"diff --git a/tests/unit/auth_test.py b/tests/unit/auth_test.py\nindex 9f4d439b..67830381 100644\n--- a/tests/unit/auth_test.py\n+++ b/tests/unit/auth_test.py\n@@ -316,3 +316,33 @@ class LoadConfigTest(base.Cleanup, base.BaseTestCase):\n self.assertEqual(cfg['password'], 'izayoi')\n self.assertEqual(cfg['email'], 'sakuya@scarlet.net')\n self.assertEqual(cfg.get('auth'), None)\n+\n+ def test_load_config_custom_config_env_utf8(self):\n+ folder = tempfile.mkdtemp()\n+ self.addCleanup(shutil.rmtree, folder)\n+\n+ dockercfg_path = os.path.join(folder, 'config.json')\n+ registry = 'https://your.private.registry.io'\n+ auth_ = base64.b64encode(\n+ b'sakuya\\xc3\\xa6:izayoi\\xc3\\xa6').decode('ascii')\n+ config = {\n+ 'auths': {\n+ registry: {\n+ 'auth': '{0}'.format(auth_),\n+ 'email': 'sakuya@scarlet.net'\n+ }\n+ }\n+ }\n+\n+ with open(dockercfg_path, 'w') as f:\n+ json.dump(config, f)\n+\n+ with mock.patch.dict(os.environ, {'DOCKER_CONFIG': folder}):\n+ cfg = auth.load_config(None)\n+ assert registry in cfg\n+ self.assertNotEqual(cfg[registry], None)\n+ cfg = cfg[registry]\n+ self.assertEqual(cfg['username'], b'sakuya\\xc3\\xa6'.decode('utf8'))\n+ self.assertEqual(cfg['password'], b'izayoi\\xc3\\xa6'.decode('utf8'))\n+ self.assertEqual(cfg['email'], 'sakuya@scarlet.net')\n+ self.assertEqual(cfg.get('auth'), None)\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [],\n \"has_test_patch\": true,\n \"is_lite\": true,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 1,\n \"test_score\": 0\n },\n \"num_modified_files\": 1\n}"},"version":{"kind":"string","value":"1.5"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": [\n \"pytest\",\n \"pytest-cov\",\n \"pytest-xdist\",\n \"pytest-mock\"\n ],\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.7\",\n \"reqs_path\": [\n \"requirements.txt\"\n ],\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"certifi @ file:///croot/certifi_1671487769961/work/certifi\ncoverage==7.2.7\n-e git+https://github.com/docker/docker-py.git@47ab89ec2bd3bddf1221b856ffbaff333edeabb4#egg=docker_py\nexceptiongroup==1.2.2\nexecnet==2.0.2\nimportlib-metadata==6.7.0\niniconfig==2.0.0\npackaging==24.0\npluggy==1.2.0\npytest==7.4.4\npytest-cov==4.1.0\npytest-mock==3.11.1\npytest-xdist==3.5.0\nrequests==2.5.3\nsix==1.17.0\ntomli==2.0.1\ntyping_extensions==4.7.1\nwebsocket-client==0.32.0\nzipp==3.15.0\n"},"environment":{"kind":"string","value":"name: docker-py\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - certifi=2022.12.7=py37h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=1.1.1w=h7f8727e_0\n - pip=22.3.1=py37h06a4308_0\n - python=3.7.16=h7a1cb2a_0\n - readline=8.2=h5eee18b_0\n - setuptools=65.6.3=py37h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - wheel=0.38.4=py37h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - coverage==7.2.7\n - exceptiongroup==1.2.2\n - execnet==2.0.2\n - importlib-metadata==6.7.0\n - iniconfig==2.0.0\n - packaging==24.0\n - pluggy==1.2.0\n - pytest==7.4.4\n - pytest-cov==4.1.0\n - pytest-mock==3.11.1\n - pytest-xdist==3.5.0\n - requests==2.5.3\n - six==1.17.0\n - tomli==2.0.1\n - typing-extensions==4.7.1\n - websocket-client==0.32.0\n - zipp==3.15.0\nprefix: /opt/conda/envs/docker-py\n"},"FAIL_TO_PASS":{"kind":"list like","value":["tests/unit/auth_test.py::LoadConfigTest::test_load_config_custom_config_env_utf8"],"string":"[\n \"tests/unit/auth_test.py::LoadConfigTest::test_load_config_custom_config_env_utf8\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["tests/unit/auth_test.py::RegressionTest::test_803_urlsafe_encode","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_default_explicit_none","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_default_registry","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_fully_explicit","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_hostname_only","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_legacy_config","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_no_match","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_no_path","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_no_path_trailing_slash","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_no_path_wrong_insecure_proto","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_no_path_wrong_secure_proto","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_no_protocol","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_path_wrong_proto","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_registry_and_auth_hub_image","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_registry_and_auth_library_image","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_registry_and_auth_private_registry","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_registry_and_auth_unauthenticated_registry","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_hub_image","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_hub_library_image","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_localhost","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_localhost_with_username","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_no_dots_but_port","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_no_dots_but_port_and_username","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_private_registry","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_private_registry_with_port","tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_private_registry_with_username","tests/unit/auth_test.py::LoadConfigTest::test_load_config","tests/unit/auth_test.py::LoadConfigTest::test_load_config_custom_config_env","tests/unit/auth_test.py::LoadConfigTest::test_load_config_custom_config_env_with_auths","tests/unit/auth_test.py::LoadConfigTest::test_load_config_no_file","tests/unit/auth_test.py::LoadConfigTest::test_load_config_with_random_name"],"string":"[\n \"tests/unit/auth_test.py::RegressionTest::test_803_urlsafe_encode\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_default_explicit_none\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_default_registry\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_fully_explicit\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_hostname_only\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_legacy_config\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_no_match\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_no_path\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_no_path_trailing_slash\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_no_path_wrong_insecure_proto\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_no_path_wrong_secure_proto\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_no_protocol\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_authconfig_path_wrong_proto\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_registry_and_auth_hub_image\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_registry_and_auth_library_image\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_registry_and_auth_private_registry\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_registry_and_auth_unauthenticated_registry\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_hub_image\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_hub_library_image\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_localhost\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_localhost_with_username\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_no_dots_but_port\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_no_dots_but_port_and_username\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_private_registry\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_private_registry_with_port\",\n \"tests/unit/auth_test.py::ResolveAuthTest::test_resolve_repository_name_private_registry_with_username\",\n \"tests/unit/auth_test.py::LoadConfigTest::test_load_config\",\n \"tests/unit/auth_test.py::LoadConfigTest::test_load_config_custom_config_env\",\n \"tests/unit/auth_test.py::LoadConfigTest::test_load_config_custom_config_env_with_auths\",\n \"tests/unit/auth_test.py::LoadConfigTest::test_load_config_no_file\",\n \"tests/unit/auth_test.py::LoadConfigTest::test_load_config_with_random_name\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"Apache License 2.0"},"__index_level_0__":{"kind":"number","value":281,"string":"281"},"num_tokens_patch":{"kind":"number","value":136,"string":"136"},"before_filepaths":{"kind":"list like","value":["docker/auth/auth.py"],"string":"[\n \"docker/auth/auth.py\"\n]"}}},{"rowIdx":55,"cells":{"instance_id":{"kind":"string","value":"jonathanj__eliottree-40"},"base_commit":{"kind":"string","value":"4dae7890294edb4d845b00a8bb310bc08c555352"},"created_at":{"kind":"string","value":"2015-10-30 07:46:22"},"environment_setup_commit":{"kind":"string","value":"26748c5e640b6d25d71eefad95920c41dab0f8db"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/eliottree/_cli.py b/eliottree/_cli.py\nindex 6b0d24e..c333d8c 100644\n--- a/eliottree/_cli.py\n+++ b/eliottree/_cli.py\n@@ -2,36 +2,20 @@ import argparse\n import codecs\n import json\n import sys\n-from datetime import datetime\n from itertools import chain\n \n from six import PY3\n from six.moves import map\n-from toolz import compose\n \n from eliottree import (\n Tree, filter_by_jmespath, filter_by_uuid, render_task_nodes)\n \n \n-def _convert_timestamp(task):\n- \"\"\"\n- Convert a ``timestamp`` key to a ``datetime``.\n- \"\"\"\n- task['timestamp'] = datetime.utcfromtimestamp(task['timestamp'])\n- return task\n-\n-\n-def build_task_nodes(files=None, select=None, task_uuid=None,\n- human_readable=True):\n+def build_task_nodes(files=None, select=None, task_uuid=None):\n \"\"\"\n Build the task nodes given some input data, query criteria and formatting\n options.\n \"\"\"\n- def task_transformers():\n- if human_readable:\n- yield _convert_timestamp\n- yield json.loads\n-\n def filter_funcs():\n if select is not None:\n for query in select:\n@@ -47,8 +31,7 @@ def build_task_nodes(files=None, select=None, task_uuid=None,\n files = [codecs.getreader('utf-8')(sys.stdin)]\n \n tree = Tree()\n- tasks = map(compose(*task_transformers()),\n- chain.from_iterable(files))\n+ tasks = map(json.loads, chain.from_iterable(files))\n return tree.nodes(tree.merge_tasks(tasks, filter_funcs()))\n \n \n@@ -65,13 +48,13 @@ def display_task_tree(args):\n nodes = build_task_nodes(\n files=args.files,\n select=args.select,\n- task_uuid=args.task_uuid,\n- human_readable=args.human_readable)\n+ task_uuid=args.task_uuid)\n render_task_nodes(\n write=write,\n nodes=nodes,\n ignored_task_keys=set(args.ignored_task_keys) or None,\n- field_limit=args.field_limit)\n+ field_limit=args.field_limit,\n+ human_readable=args.human_readable)\n \n \n def main():\ndiff --git a/eliottree/render.py b/eliottree/render.py\nindex 4876a3e..626683c 100644\n--- a/eliottree/render.py\n+++ b/eliottree/render.py\n@@ -8,20 +8,42 @@ DEFAULT_IGNORED_KEYS = set([\n u'message_type'])\n \n \n-def _format_value(value):\n+def _format_value_raw(value):\n \"\"\"\n- Format a value for a task tree.\n+ Format a value.\n \"\"\"\n if isinstance(value, datetime):\n if PY3:\n return value.isoformat(' ')\n else:\n return value.isoformat(' ').decode('ascii')\n- elif isinstance(value, text_type):\n+ return None\n+\n+\n+def _format_value_hint(value, hint):\n+ \"\"\"\n+ Format a value given a rendering hint.\n+ \"\"\"\n+ if hint == u'timestamp':\n+ return _format_value_raw(datetime.utcfromtimestamp(value))\n+ return None\n+\n+\n+def _format_value(value, field_hint=None, human_readable=False):\n+ \"\"\"\n+ Format a value for a task tree.\n+ \"\"\"\n+ if isinstance(value, text_type):\n return value\n elif isinstance(value, binary_type):\n # We guess bytes values are UTF-8.\n return value.decode('utf-8', 'replace')\n+ if human_readable:\n+ formatted = _format_value_raw(value)\n+ if formatted is None:\n+ formatted = _format_value_hint(value, field_hint)\n+ if formatted is not None:\n+ return formatted\n result = repr(value)\n if isinstance(result, binary_type):\n result = result.decode('utf-8', 'replace')\n@@ -48,7 +70,7 @@ def _truncate_value(value, limit):\n return value\n \n \n-def _render_task(write, task, ignored_task_keys, field_limit):\n+def _render_task(write, task, ignored_task_keys, field_limit, human_readable):\n \"\"\"\n Render a single ``_TaskNode`` as an ``ASCII`` tree.\n \n@@ -64,6 +86,9 @@ def _render_task(write, task, ignored_task_keys, field_limit):\n \n :type ignored_task_keys: ``set`` of ``text_type``\n :param ignored_task_keys: Set of task key names to ignore.\n+\n+ :type human_readable: ``bool``\n+ :param human_readable: Should this be rendered as human-readable?\n \"\"\"\n _write = _indented_write(write)\n num_items = len(task)\n@@ -78,9 +103,12 @@ def _render_task(write, task, ignored_task_keys, field_limit):\n _render_task(write=_write,\n task=value,\n ignored_task_keys={},\n- field_limit=field_limit)\n+ field_limit=field_limit,\n+ human_readable=human_readable)\n else:\n- _value = _format_value(value)\n+ _value = _format_value(value,\n+ field_hint=key,\n+ human_readable=human_readable)\n if field_limit:\n first_line = _truncate_value(_value, field_limit)\n else:\n@@ -96,7 +124,8 @@ def _render_task(write, task, ignored_task_keys, field_limit):\n _write(line + '\\n')\n \n \n-def _render_task_node(write, node, field_limit, ignored_task_keys):\n+def _render_task_node(write, node, field_limit, ignored_task_keys,\n+ human_readable):\n \"\"\"\n Render a single ``_TaskNode`` as an ``ASCII`` tree.\n \n@@ -112,6 +141,9 @@ def _render_task_node(write, node, field_limit, ignored_task_keys):\n \n :type ignored_task_keys: ``set`` of ``text_type``\n :param ignored_task_keys: Set of task key names to ignore.\n+\n+ :type human_readable: ``bool``\n+ :param human_readable: Should this be rendered as human-readable?\n \"\"\"\n _child_write = _indented_write(write)\n write(\n@@ -120,17 +152,20 @@ def _render_task_node(write, node, field_limit, ignored_task_keys):\n write=_child_write,\n task=node.task,\n field_limit=field_limit,\n- ignored_task_keys=ignored_task_keys)\n+ ignored_task_keys=ignored_task_keys,\n+ human_readable=human_readable)\n \n for child in node.children():\n _render_task_node(\n write=_child_write,\n node=child,\n field_limit=field_limit,\n- ignored_task_keys=ignored_task_keys)\n+ ignored_task_keys=ignored_task_keys,\n+ human_readable=human_readable)\n \n \n-def render_task_nodes(write, nodes, field_limit, ignored_task_keys=None):\n+def render_task_nodes(write, nodes, field_limit, ignored_task_keys=None,\n+ human_readable=False):\n \"\"\"\n Render a tree of task nodes as an ``ASCII`` tree.\n \n@@ -147,6 +182,9 @@ def render_task_nodes(write, nodes, field_limit, ignored_task_keys=None):\n \n :type ignored_task_keys: ``set`` of ``text_type``\n :param ignored_task_keys: Set of task key names to ignore.\n+\n+ :type human_readable: ``bool``\n+ :param human_readable: Should this be rendered as human-readable?\n \"\"\"\n if ignored_task_keys is None:\n ignored_task_keys = DEFAULT_IGNORED_KEYS\n@@ -156,7 +194,8 @@ def render_task_nodes(write, nodes, field_limit, ignored_task_keys=None):\n write=write,\n node=node,\n field_limit=field_limit,\n- ignored_task_keys=ignored_task_keys)\n+ ignored_task_keys=ignored_task_keys,\n+ human_readable=human_readable)\n write('\\n')\n \n \ndiff --git a/setup.py b/setup.py\nindex e54a48d..9767156 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -29,7 +29,6 @@ setup(\n install_requires=[\n \"six>=1.9.0\",\n \"jmespath>=0.7.1\",\n- \"toolz>=0.7.2\",\n ],\n extras_require={\n \"dev\": [\"pytest>=2.7.1\", \"testtools>=1.8.0\"],\n"},"problem_statement":{"kind":"string","value":"Human-readable values should only be formatted when rendered instead of modifying the tree data\nThe problem with modifying the tree data is that it makes it very difficult to write queries against it if eliot-tree is changing it in undisclosed ways to suit it's renderer."},"repo":{"kind":"string","value":"jonathanj/eliottree"},"test_patch":{"kind":"string","value":"diff --git a/eliottree/test/test_render.py b/eliottree/test/test_render.py\nindex 81d3128..81dea43 100644\n--- a/eliottree/test/test_render.py\n+++ b/eliottree/test/test_render.py\n@@ -15,14 +15,14 @@ class FormatValueTests(TestCase):\n \"\"\"\n Tests for ``eliottree.render._format_value``.\n \"\"\"\n- def test_datetime(self):\n+ def test_datetime_human_readable(self):\n \"\"\"\n Format ``datetime`` values as ISO8601.\n \"\"\"\n now = datetime(2015, 6, 6, 22, 57, 12)\n self.assertThat(\n- _format_value(now),\n- Equals('2015-06-06 22:57:12'))\n+ _format_value(now, human_readable=True),\n+ Equals(u'2015-06-06 22:57:12'))\n \n def test_unicode(self):\n \"\"\"\n@@ -59,6 +59,16 @@ class FormatValueTests(TestCase):\n _format_value({'a': u('\\N{SNOWMAN}')}),\n Equals(\"{'a': u'\\\\u2603'}\"))\n \n+ def test_timestamp_hint(self):\n+ \"\"\"\n+ Format \"timestamp\" hinted data as timestamps.\n+ \"\"\"\n+ # datetime(2015, 6, 6, 22, 57, 12)\n+ now = 1433631432\n+ self.assertThat(\n+ _format_value(now, field_hint='timestamp', human_readable=True),\n+ Equals(u'2015-06-06 22:57:12'))\n+\n \n class RenderTaskNodesTests(TestCase):\n \"\"\"\n@@ -85,6 +95,28 @@ class RenderTaskNodesTests(TestCase):\n ' +-- app:action@2/succeeded\\n'\n ' `-- timestamp: 1425356800\\n\\n'))\n \n+ def test_tasks_human_readable(self):\n+ \"\"\"\n+ Render two tasks of sequential levels, by default most standard Eliot\n+ task keys are ignored, values are formatted to be human readable.\n+ \"\"\"\n+ fd = StringIO()\n+ tree = Tree()\n+ tree.merge_tasks([action_task, action_task_end])\n+ render_task_nodes(\n+ write=fd.write,\n+ nodes=tree.nodes(),\n+ field_limit=0,\n+ human_readable=True)\n+ self.assertThat(\n+ fd.getvalue(),\n+ Equals(\n+ 'f3a32bb3-ea6b-457c-aa99-08a3d0491ab4\\n'\n+ '+-- app:action@1/started\\n'\n+ ' `-- timestamp: 2015-03-03 04:26:40\\n'\n+ ' +-- app:action@2/succeeded\\n'\n+ ' `-- timestamp: 2015-03-03 04:26:40\\n\\n'))\n+\n def test_multiline_field(self):\n \"\"\"\n When no field limit is specified for task values, multiple lines are\n"},"meta":{"kind":"string","value":"{\n \"commit_name\": \"head_commit\",\n \"failed_lite_validators\": [\n \"has_many_modified_files\",\n \"has_many_hunks\"\n ],\n \"has_test_patch\": true,\n \"is_lite\": false,\n \"llm_score\": {\n \"difficulty_score\": 1,\n \"issue_text_score\": 2,\n \"test_score\": 3\n },\n \"num_modified_files\": 3\n}"},"version":{"kind":"string","value":"15.3"},"install_config":{"kind":"string","value":"{\n \"env_vars\": null,\n \"env_yml_path\": null,\n \"install\": \"pip install -e .[dev]\",\n \"log_parser\": \"parse_log_pytest\",\n \"no_use_env\": null,\n \"packages\": \"requirements.txt\",\n \"pip_packages\": null,\n \"pre_install\": [\n \"apt-get update\",\n \"apt-get install -y gcc\"\n ],\n \"python\": \"3.9\",\n \"reqs_path\": null,\n \"test_cmd\": \"pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning\"\n}"},"requirements":{"kind":"string","value":"-e git+https://github.com/jonathanj/eliottree.git@4dae7890294edb4d845b00a8bb310bc08c555352#egg=eliot_tree\nexceptiongroup==1.2.2\niniconfig==2.1.0\njmespath==1.0.1\npackaging==24.2\npluggy==1.5.0\npytest==8.3.5\nsix==1.17.0\ntesttools==2.7.2\ntomli==2.2.1\ntoolz==1.0.0\n"},"environment":{"kind":"string","value":"name: eliottree\nchannels:\n - defaults\n - https://repo.anaconda.com/pkgs/main\n - https://repo.anaconda.com/pkgs/r\n - conda-forge\ndependencies:\n - _libgcc_mutex=0.1=main\n - _openmp_mutex=5.1=1_gnu\n - ca-certificates=2025.2.25=h06a4308_0\n - ld_impl_linux-64=2.40=h12ee557_0\n - libffi=3.4.4=h6a678d5_1\n - libgcc-ng=11.2.0=h1234567_1\n - libgomp=11.2.0=h1234567_1\n - libstdcxx-ng=11.2.0=h1234567_1\n - ncurses=6.4=h6a678d5_0\n - openssl=3.0.16=h5eee18b_0\n - pip=25.0=py39h06a4308_0\n - python=3.9.21=he870216_1\n - readline=8.2=h5eee18b_0\n - setuptools=75.8.0=py39h06a4308_0\n - sqlite=3.45.3=h5eee18b_0\n - tk=8.6.14=h39e8969_0\n - tzdata=2025a=h04d1e81_0\n - wheel=0.45.1=py39h06a4308_0\n - xz=5.6.4=h5eee18b_1\n - zlib=1.2.13=h5eee18b_1\n - pip:\n - exceptiongroup==1.2.2\n - iniconfig==2.1.0\n - jmespath==1.0.1\n - packaging==24.2\n - pluggy==1.5.0\n - pytest==8.3.5\n - six==1.17.0\n - testtools==2.7.2\n - tomli==2.2.1\n - toolz==1.0.0\nprefix: /opt/conda/envs/eliottree\n"},"FAIL_TO_PASS":{"kind":"list like","value":["eliottree/test/test_render.py::FormatValueTests::test_datetime_human_readable","eliottree/test/test_render.py::FormatValueTests::test_timestamp_hint","eliottree/test/test_render.py::RenderTaskNodesTests::test_tasks_human_readable"],"string":"[\n \"eliottree/test/test_render.py::FormatValueTests::test_datetime_human_readable\",\n \"eliottree/test/test_render.py::FormatValueTests::test_timestamp_hint\",\n \"eliottree/test/test_render.py::RenderTaskNodesTests::test_tasks_human_readable\"\n]"},"FAIL_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"PASS_TO_PASS":{"kind":"list like","value":["eliottree/test/test_render.py::FormatValueTests::test_other","eliottree/test/test_render.py::FormatValueTests::test_str","eliottree/test/test_render.py::FormatValueTests::test_unicode","eliottree/test/test_render.py::RenderTaskNodesTests::test_dict_data","eliottree/test/test_render.py::RenderTaskNodesTests::test_field_limit","eliottree/test/test_render.py::RenderTaskNodesTests::test_ignored_keys","eliottree/test/test_render.py::RenderTaskNodesTests::test_multiline_field","eliottree/test/test_render.py::RenderTaskNodesTests::test_multiline_field_limit","eliottree/test/test_render.py::RenderTaskNodesTests::test_nested","eliottree/test/test_render.py::RenderTaskNodesTests::test_task_data","eliottree/test/test_render.py::RenderTaskNodesTests::test_tasks"],"string":"[\n \"eliottree/test/test_render.py::FormatValueTests::test_other\",\n \"eliottree/test/test_render.py::FormatValueTests::test_str\",\n \"eliottree/test/test_render.py::FormatValueTests::test_unicode\",\n \"eliottree/test/test_render.py::RenderTaskNodesTests::test_dict_data\",\n \"eliottree/test/test_render.py::RenderTaskNodesTests::test_field_limit\",\n \"eliottree/test/test_render.py::RenderTaskNodesTests::test_ignored_keys\",\n \"eliottree/test/test_render.py::RenderTaskNodesTests::test_multiline_field\",\n \"eliottree/test/test_render.py::RenderTaskNodesTests::test_multiline_field_limit\",\n \"eliottree/test/test_render.py::RenderTaskNodesTests::test_nested\",\n \"eliottree/test/test_render.py::RenderTaskNodesTests::test_task_data\",\n \"eliottree/test/test_render.py::RenderTaskNodesTests::test_tasks\"\n]"},"PASS_TO_FAIL":{"kind":"list like","value":[],"string":"[]"},"license_name":{"kind":"string","value":"MIT License"},"__index_level_0__":{"kind":"number","value":282,"string":"282"},"num_tokens_patch":{"kind":"number","value":1897,"string":"1,897"},"before_filepaths":{"kind":"list like","value":["eliottree/_cli.py","eliottree/render.py","setup.py"],"string":"[\n \"eliottree/_cli.py\",\n \"eliottree/render.py\",\n \"setup.py\"\n]"}}},{"rowIdx":56,"cells":{"instance_id":{"kind":"string","value":"sprymix__csscompressor-4"},"base_commit":{"kind":"string","value":"153ab1bb6cd925dc73a314af74db874a3314010f"},"created_at":{"kind":"string","value":"2015-11-01 06:16:44"},"environment_setup_commit":{"kind":"string","value":"bec3e582cb5ab7182a0ca08ba381e491b94ed10c"},"hints_text":{"kind":"string","value":""},"patch":{"kind":"string","value":"diff --git a/csscompressor/__init__.py b/csscompressor/__init__.py\nindex 1b41119..1233cd3 100644\n--- a/csscompressor/__init__.py\n+++ b/csscompressor/__init__.py\n@@ -56,9 +56,12 @@ _space_after_re = re.compile(r'([!{}:;>+\\(\\[,])\\s+')\n _semi_re = re.compile(r';+}')\n \n _zero_fmt_spec_re = re.compile(r'''(\\s|:|\\(|,)(?:0?\\.)?0\n- (?:px|em|%|in|cm|mm|pc|pt|ex|deg|g?rad|m?s|k?hz)''',\n+ (?:px|em|%|in|cm|mm|pc|pt|ex|deg|g?rad|k?hz)''',\n re.I | re.X)\n \n+_zero_req_unit_re = re.compile(r'''(\\s|:|\\(|,)(?:0?\\.)?0\n+ (m?s)''', re.I | re.X)\n+\n _bg_pos_re = re.compile(r'''(background-position|webkit-mask-position|transform-origin|\n webkit-transform-origin|moz-transform-origin|o-transform-origin|\n ms-transform-origin):0(;|})''', re.I | re.X)\n@@ -377,6 +380,9 @@ def _compress(css, max_linelen=0):\n # Replace 0(px,em,%) with 0.\n css = _zero_fmt_spec_re.sub(lambda match: match.group(1) + '0', css)\n \n+ # Replace 0.0(m,ms) or .0(m,ms) with 0(m,ms)\n+ css = _zero_req_unit_re.sub(lambda match: match.group(1) + '0' + match.group(2), css)\n+\n # Replace 0 0 0 0; with 0.\n css = _quad_0_re.sub(r':0\\1', css)\n css = _trip_0_re.sub(r':0\\1', css)\n"},"problem_statement":{"kind":"string","value":"Omitting the unit on a time value is invalid\nInput: `csscompressor.compress(\"transition: background-color 1s linear 0ms;\")`\r\nExpected output: `'transition:background-color 1s linear 0ms;'`\r\nActual output: `'transition:background-color 1s linear 0;'`\r\n\r\nAccording to the [MDN page on \\