anaconda / anaconda-project

Tool for encapsulating, running, and reproducing data science projects
https://anaconda-project.readthedocs.io/en/latest/
Other
219 stars 88 forks source link

The logging library from Anaconda is different from the standard #296

Closed yoonghm closed 3 years ago

yoonghm commented 3 years ago

Below are versions of various software:

(base) D:\conda -V
conda 4.9.2

(base) D:\conda list Anaconda
# packages in environment at D:\Anaconda3:
#
# Name                    Version                   Build  Channel
_anaconda_depends         2020.07                  py38_0
anaconda                  custom                   py38_1
anaconda-client           1.7.2                    py38_0
anaconda-navigator        1.10.0                   py38_0
anaconda-project          0.8.4                      py_0

(base) D:\>python --version
Python 3.8.5

(base) D:\>python -c "import logging; print(logging.__version__)"
0.5.1.2

The latest logging has the following version: 0.5.1.2

The standard has the following lines of code

    def _after_at_fork_child_reinit_locks():
        for handler in _at_fork_reinit_lock_weakset:
            handler._at_fork_reinit()

        # _acquireLock() was called in the parent before forking.
        # The lock is reinitialized to unlocked state.
        _lock._at_fork_reinit()

However, the logging comes with Anaconda shows:

    def _after_at_fork_child_reinit_locks():
        # _acquireLock() was called in the parent before forking.
        for handler in _at_fork_reinit_lock_weakset:
            try:
                handler.createLock()
            except Exception as err:
                # Similar to what PyErr_WriteUnraisable does.
                print("Ignoring exception from logging atfork", instance,
                      "._reinit_lock() method:", err, file=sys.stderr)
        _releaseLock()  # Acquired by os.register_at_fork(before=.
jbednar commented 3 years ago

This repo is for the anaconda-project command-line tool, not for Anaconda in general. I'm not sure what the specific complaint is here, but see https://github.com/ContinuumIO/anaconda-issues if you have an issue with the packaging of a particular library from the defaults channel.