[issue45783] test_freeze fails if a file is removed

2021-11-23 Thread Petr Viktorin


Change by Petr Viktorin :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45783] test_freeze fails if a file is removed

2021-11-23 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 8ed1495ad900dd815ff8fb97926da5312aaa23f9 by Eric Snow in branch 
'main':
bpo-45783: Preserve file moves and deletions in the tests for the freeze tool. 
(GH-29527)
https://github.com/python/cpython/commit/8ed1495ad900dd815ff8fb97926da5312aaa23f9


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45783] test_freeze fails if a file is removed

2021-11-11 Thread Eric Snow


Change by Eric Snow :


--
keywords: +patch
pull_requests: +2
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29527

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45783] test_freeze fails if a file is removed

2021-11-11 Thread Eric Snow


Eric Snow  added the comment:

Thanks for the report, Petr!  I'll take a look.

--
assignee:  -> eric.snow
components: +Tests
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45783] test_freeze fails if a file is removed

2021-11-11 Thread Miro Hrončok

Change by Miro Hrončok :


--
nosy: +hroncok

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45783] test_freeze fails if a file is removed

2021-11-11 Thread Petr Viktorin


New submission from Petr Viktorin :

In Fedora, we remove the bundled wheels; pip & co. are supplied (and kept 
updated) by the system. I believe this is good practice.

However, removing any file from the CPython source checkout makes test_freeze 
fail:

Traceback (most recent call last):
  File 
"/builddir/build/BUILD/Python-3.11.0a2/Lib/test/test_tools/test_freeze.py", 
line 25, in test_freeze_simple_script
outdir, scriptfile, python = helper.prepare(script)
 ^^
  File "/builddir/build/BUILD/Python-3.11.0a2/Tools/freeze/test/freeze.py", 
line 144, in prepare
git_copy_repo(srcdir, SRCDIR)
^
  File "/builddir/build/BUILD/Python-3.11.0a2/Tools/freeze/test/freeze.py", 
line 97, in git_copy_repo
shutil.copy2(srcfile, dstfile)
^^
  File "/builddir/build/BUILD/Python-3.11.0a2/Lib/shutil.py", line 436, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
^^^
  File "/builddir/build/BUILD/Python-3.11.0a2/Lib/shutil.py", line 256, in 
copyfile
with open(src, 'rb') as fsrc:
 ^^^
FileNotFoundError: [Errno 2] No such file or directory: 
'/builddir/build/BUILD/Python-3.11.0a2/Lib/ensurepip/_bundled/pip-21.2.4-py3-none-any.whl'


It looks like this test is recreating uncommited modifications, is it OK to 
change it to support deletions as well?
Also, `git status --porcelain` should be used to get the output in a stable 
format.

--
messages: 406151
nosy: eric.snow, petr.viktorin
priority: normal
severity: normal
status: open
title: test_freeze fails if a file is removed
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com