Your message dated Wed, 01 Jan 2025 00:21:05 +0000
with message-id <e1tsmtx-008tdy...@fasolo.debian.org>
and subject line Bug#1082338: fixed in yarsync 0.2.1-4
has caused the Debian Bug report #1082338,
regarding yarsync FTBFS with Python 3.13
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1082338: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1082338
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: yarsync
Version: 0.2.1-3
Severity: normal
User: debian-pyt...@lists.debian.org
Usertags: python3.13

This package failed build from source when test-built against a version of
python3-defaults that includes 3.13 as a supported version.

To reproduce this issue, build against python3-defaults (python3-all-dev etc.)
from Debian experimental.

What's new in Python 3.13:
https://docs.python.org/3.13/whatsnew/3.13.html

Log snippet:

I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_yarsync/build; 
python3.13 -m pytest --ignore=tests/test_clone.py --ignore=tests/test_status.py
============================= test session starts ==============================
platform linux -- Python 3.13.0rc2, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_yarsync/build
configfile: pytest.ini
plugins: typeguard-4.3.0, cov-5.0.0, mock-3.14.0
collected 31 items

tests/test_commit.py F.....                                              [ 19%]
tests/test_env_vars.py .                                                 [ 22%]
tests/test_init.py FF.                                                   [ 32%]
tests/test_log.py ....                                                   [ 45%]
tests/test_pull_push.py ......                                           [ 64%]
tests/test_remote.py .                                                   [ 67%]
tests/test_sync.py ..                                                    [ 74%]
tests/test_ys_helpers.py ........                                        [100%]

=================================== FAILURES ===================================
_________________________________ test_commit __________________________________

mocker = <pytest_mock.plugin.MockerFixture object at 0xffffaccd63c0>

    def test_commit(mocker):
        """Test commit creation and logging."""
        os.chdir(TEST_DIR_EMPTY)
    
        # important that it goes before patches, need normal initialization
        commit_msg = "initial commit"
        args = ["yarsync", "commit", "-m", commit_msg]
        # we initialize ys here, but don't create a commit.
        ys = YARsync(args)
    
        # time.localtime uses time.time
        time_3 = time.localtime(3)
        def loctime(sec=None):
            return time_3
        mocker.patch("time.localtime", loctime)
        # hope this will work in another time zone.
        mocker.patch("time.tzname", "MSK")
        # time.time is called a slight instant after time.localtime
        # their order is not important though.
        commit_time = 2
        mocker.patch("time.time", lambda: commit_time)
        rename = mocker.patch("os.rename")
        mkdir = mocker.patch("os.mkdir")
        mocker.patch("socket.gethostname", lambda: "host")
        mocker.patch("getpass.getuser", lambda: "user")
    
        m = mocker.mock_open()
        # adapted from https://stackoverflow.com/a/38618056/952234
        def my_open(filename, mode="r"):
            if mode != "r":
                return m.return_value
    
            if filename == ys.REPOFILE:
                content = "myhost"
            else:
                raise FileNotFoundError(filename)
            file_object = mocker.mock_open(read_data=content).return_value
            file_object.__iter__.return_value = content.splitlines(True)
            return file_object
    
        mocker.patch("builtins.open", new=my_open)
    
        popen = mocker.patch("subprocess.Popen")
        subprocess_mock = mocker.Mock()
        attrs = {'communicate.return_value': ('output', 'error')}
        subprocess_mock.configure_mock(**attrs)
        subprocess_mock.configure_mock(**{"returncode": 0})
        popen.return_value = subprocess_mock
    
        commit_name = str(int(commit_time))
        commit_dir = os.path.join(ys.COMMITDIR, commit_name)
        commit_dir_tmp = commit_dir + "_tmp"
        commit_log_path = os.path.join(ys.LOGDIR, commit_name + ".txt")
        commit_time_str = time.strftime(ys.DATEFMT, time.localtime())
    
        # call _commit
        res = ys()
        filter_ = ys._get_filter(include_commits=False)
        call = mocker.call
    
        assert res == 0
        assert mkdir.mock_calls == [
            call(ys.COMMITDIR),
            call(ys.LOGDIR),
        ]
        assert rename.mock_calls == [
            call(commit_dir_tmp, commit_dir),
        ]
        assert popen.mock_calls == [
            call(["rsync", "-a", "--link-dest=../../..", "--exclude=/.ys"]
                 + filter_ +
                 [ys.root_dir + '/', os.path.join(ys.COMMITDIR, "2_tmp")],
                 stdout=-3),
            call().communicate(),
        ]
    
        # this seems patched, but the date on Python 3.6 is still different
        assert time.tzname == "MSK"
        # if sys.version_info.minor <= 6:
        #     # will be UTC
        #     time_str = time.strftime(ys.DATEFMT, time_3)
        # else:
        #     time_str = "Thu, 01 Jan 1970 03:00:03 MSK"
        time_str = time.strftime(ys.DATEFMT, time.localtime(3))
    
>       assert m.mock_calls == [
            # call(ys.REPOFILE),
            # call().__enter__(),
            # call().read(),
            # call().__exit__(None, None, None),
            # call(commit_log_path, "w"),
            call().__enter__(),
            call().write(commit_msg + "\n\n"
                         "When: {}\n".format(time_str) +
                         "Where: user@myhost"),
            call().write('\n'),
            call().__exit__(None, None, None),
        ]
E       assert [call().__ent...all().close()] == [call().__ent..., None, None)]
E         
E         Left contains one more item: call().close()
E         Use -v to get more diff

/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_yarsync/build/tests/test_commit.py:97: 
AssertionError
----------------------------- Captured stdout call -----------------------------
mkdir 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_yarsync/build/tests/test_dir_empty/.ys/commits
rsync -a --link-dest=../../.. --exclude=/.ys '--filter=merge 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_yarsync/build/tests/test_dir_empty/.ys/rsync-filter'
 --exclude=/.ys/* 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_yarsync/build/tests/test_dir_empty/ 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_yarsync/build/tests/test_dir_empty/.ys/commits/2_tmp
mkdir 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_yarsync/build/tests/test_dir_empty/.ys/logs
commit 2 created

initial commit

When: Thu, 01 Jan 1970 00:00:03 UTC
Where: user@myhost
_______________________________ test_init_mixed ________________________________

mocker = <pytest_mock.plugin.MockerFixture object at 0xffffac911ae0>

    def test_init_mixed(mocker):
        ## Mock existing directory and non-existent files ##
        args = "yarsync init".split()
        ys0 = YARsync(args)
        conffile = ys0.CONFIGFILE
        repofile = ys0.REPOFILE.format("my_repo")
    
        def _os_path_exists(filepath):
            if filepath == YSDIR:
                return True
            elif filepath == conffile:
                return True
            elif filepath.startswith(YSDIR):
                print(filepath)
                return False
            else:
                return False  # won't get access to real 
os.path.exists(filepath)
    
        m = mocker.mock_open()
        mocker.patch("builtins.open", m)
        # the user inputs "my_host"
        mocker.patch("builtins.input", lambda _: "my_repo")
        mocker.patch("os.path.exists", _os_path_exists)
        # otherwise listdir will complain that .ys doesn't exist
        mocker.patch("os.listdir", lambda _: [])
    
        # call _init
        res = ys0()
        assert res == 0
    
        call = mocker.call
>       assert m.mock_calls == [
            # call(conffile, "w"), call().__enter__(),
            # call().write(CONFIG_EXAMPLE), call().write(''),
            # call().__exit__(None, None, None),
            call(repofile, "x"), call().__enter__(),
            call().__exit__(None, None, None)
        ]
E       AssertionError: assert [call('.ys/re...all().close()] == 
[call('.ys/re..., None, None)]
E         
E         Left contains one more item: call().close()
E         Use -v to get more diff

/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_yarsync/build/tests/test_init.py:44: 
AssertionError
----------------------------- Captured stdout call -----------------------------
Initialize configuration
.ys already exists, skip
.ys/config.ini already exists, skip
# create configuration file .ys/repo_my_repo.txt

Initialized yarsync configuration in 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_yarsync/build/tests/test_dir_empty/.ys 
____________________________ test_init_non_existent ____________________________

mocker = <pytest_mock.plugin.MockerFixture object at 0xffffaccbde10>

    def test_init_non_existent(mocker):
        def _os_path_exists(filepath):
            return False
    
        m = mocker.mock_open()
        mocker.patch("builtins.open", m)
        mocker.patch("os.path.exists", _os_path_exists)
        mkdir = mocker.patch("os.mkdir")
        mocker.patch("os.listdir", lambda _: [])
    
        args = "yarsync init myhost".split()
        ys = YARsync(args)
        conffile = ys.CONFIGFILE
        repofile = ys.REPOFILE.format("myhost")
    
        res = ys()
        assert res == 0
        call = mocker.call
        assert mkdir.mock_calls == [call(YSDIR)]
        # assert mkdir.mock_calls == [call(YSDIR, ys.DIRMODE)]
>       assert m.mock_calls == [
            # mkdir is recorded separately
            call(conffile, "w"), call().__enter__(),
            call().write(CONFIG_EXAMPLE), call().write(''),
            call().__exit__(None, None, None),
            call(repofile, "x"), call().__enter__(),
            call().__exit__(None, None, None)
        ]
E       AssertionError: assert [call('.ys/co...all().close()] == 
[call('.ys/co...t', 'x'), ...]
E         
E         At index 5 diff: call().close() != call('.ys/repo_myhost.txt', 'x')
E         Left contains 2 more items, first extra item: call().__exit__(None, 
None, None)
E         Use -v to get more diff

/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_yarsync/build/tests/test_init.py:87: 
AssertionError
----------------------------- Captured stdout call -----------------------------
Initialize configuration for 'myhost'
mkdir .ys
# create configuration file .ys/config.ini
# create configuration file .ys/repo_myhost.txt

Initialized yarsync configuration in 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_yarsync/build/tests/test_dir_empty/.ys 
=========================== short test summary info ============================
FAILED tests/test_commit.py::test_commit - assert [call().__ent...all().close...
FAILED tests/test_init.py::test_init_mixed - AssertionError: assert [call('.y...
FAILED tests/test_init.py::test_init_non_existent - AssertionError: assert [c...
========================= 3 failed, 28 passed in 1.67s =========================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_yarsync/build; python3.13 -m pytest 
--ignore=tests/test_clone.py --ignore=tests/test_status.py
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_yarsync/build; 
python3.12 -m pytest --ignore=tests/test_clone.py --ignore=tests/test_status.py
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_yarsync/build
configfile: pytest.ini
plugins: typeguard-4.3.0, cov-5.0.0, mock-3.14.0
collected 31 items

tests/test_commit.py ......                                              [ 19%]
tests/test_env_vars.py .                                                 [ 22%]
tests/test_init.py ...                                                   [ 32%]
tests/test_log.py ....                                                   [ 45%]
tests/test_pull_push.py ......                                           [ 64%]
tests/test_remote.py .                                                   [ 67%]
tests/test_sync.py ..                                                    [ 74%]
tests/test_ys_helpers.py ........                                        [100%]

============================== 31 passed in 1.66s ==============================
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 
3.12" returned exit code 13
make: *** [debian/rules:7: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-09-19T17:00:49Z

Finished
--------

This bug has been filed at "normal" severity, as we haven't started the
transition to add 3.13 as a supported version, yet. This will be raised to RC
as soon as that happens, hopefully well before trixie.

Thanks,

Stefano

--- End Message ---
--- Begin Message ---
Source: yarsync
Source-Version: 0.2.1-4
Done: Josenilson Ferreira da Silva <nilsonfsi...@hotmail.com>

We believe that the bug you reported is fixed in the latest version of
yarsync, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1082...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Josenilson Ferreira da Silva <nilsonfsi...@hotmail.com> (supplier of updated 
yarsync package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 31 Dec 2024 20:50:23 -0300
Source: yarsync
Architecture: source
Version: 0.2.1-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+pyt...@tracker.debian.org>
Changed-By: Josenilson Ferreira da Silva <nilsonfsi...@hotmail.com>
Closes: 1082338
Changes:
 yarsync (0.2.1-4) unstable; urgency=medium
 .
   * debian/control:
      - Bumped Standards-Version to 4.7.0
   * debian/patches:
      - Added function close()to mock_calls in Python 3.13.1 (Closes: #1082338)
Checksums-Sha1:
 d9aa8bd6a2fa4a81af794f33916094ce2ac7068c 2173 yarsync_0.2.1-4.dsc
 fc0b8c74efc9ab94b187cae4f8ac2b05895bf270 3392 yarsync_0.2.1-4.debian.tar.xz
 601d9ba146bb6b96b71cc555d5feef6c89d08e0d 9617 yarsync_0.2.1-4_source.buildinfo
Checksums-Sha256:
 4b8195cba21283d80b90fbea905cb2a2c3f146b7bab60f67fac86bdc10e88b2d 2173 
yarsync_0.2.1-4.dsc
 da5b65268f1126c1090f4b7de52d387639b60992080200bab2a1f62daa09f7a1 3392 
yarsync_0.2.1-4.debian.tar.xz
 2f882965faa808be5d7b508bfc338657eba4f7da47fbbed395c1285ac9e66afc 9617 
yarsync_0.2.1-4_source.buildinfo
Files:
 cc053fb8bb364d9b0d82991941421747 2173 utils optional yarsync_0.2.1-4.dsc
 12e60d1488ff5761868b8e3fb2cb84f3 3392 utils optional 
yarsync_0.2.1-4.debian.tar.xz
 d6da2c8eb14a45dbd816866c75c6fb4d 9617 utils optional 
yarsync_0.2.1-4_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEqBlNXRF+LQLfMNMNB6n1YjE0Rs0FAmd0hwwACgkQB6n1YjE0
Rs2w9xAAlBiUXSJPJd7saFVdV21je1s0xRvgsnOLNbX6WpVHZ11vjJs4sS/ltPxm
L+uJO5OXz4K25+cGiGXYrOD1XAHiP0qySztouS6rLoEZLPDbmcjS32Em6xsg31V0
9cV2zQ9FFRiRnhL2Dvc0dj/oQFa7iXe0U/oaCimH1uT2Red2EaK2kvpIAtKrHcUd
Ku2aEcdlgizPDBAqi1WV4CoqocN++WqUnJdyLzfac2pOW7LFtF3fNe506Tmp9tam
PoeC3G2tC+y2Mc2liq0ThBSsG6acsS1lvOPGMcqJUJtOzN8pXEfWrI/HItniK+c5
AT8dQwPeMDwQ8JR/RWlWLyz1uXXyKsBUpnGS1Jfsq8iavCeL6Vpo2Aa03obITOjR
ZEw53mWSvjcAGvLyYcq8sVh9/a+ELz04SjEnRaBadOH0zLeavmy3Bp11EbThTQlH
Eqdes8NkW/7rzzTMER1lEM29BI/TV5eepYOGvcSVc6WNr2nb9rpnHFWBTUuBMI3c
bQ/3AdYVLsUD23jEzR7JN/znKTn41WkqwSXhX4uQ5Czkaw38MA2ad3C0tfKQh9Q6
cUY4Zg0L2agolgajMFr3jc3ZVmoHeyyPA1O6Y1NwrmgOhU80c7z0mbploM03etnn
Hhj1/nFantxxcPwB7m/i0sbWFgMdjpTep5S7yGD8rIAmClXdBgU=
=FbCj
-----END PGP SIGNATURE-----

Attachment: pgpGGE_FGuuCk.pgp
Description: PGP signature


--- End Message ---

Reply via email to