I want to log into file using fileConfig and my lconfiguration file. I provide a simple example of how to reproduce my output (I'm using Python 3.11.9). 

```python
import logging.config

logging.config.fileConfig("path_of_your_logging.conf", defaults={"logpath": "C:\\Users\\{yourusename}\\example.log"})
logger = logging.getLogger(__name__)
logger.error("hi")
```

And this is my `logging.conf` file

```conf
[loggers]
keys=root

[handlers]
keys=consoleHandler,fileHandler

[formatters]
keys=simpleFormatter

[logger_root]
level=DEBUG
handlers=consoleHandler,fileHandler

[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=simpleFormatter
args=(sys.stdout,)

[handler_fileHandler]
class=FileHandler
level=DEBUG
formatter=simpleFormatter
args=("%(logpath)s",)

[formatter_simpleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
```
The error that I get is the following (inside the fileConfig function):

```python
    args = eval(args, vars(logging))
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 1
    ("C:\Users\{yourusename}\example.log",)
                                            ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
```

The same code works on Unix and the way the I have found in order to make it work even with Windows is to parse my path with this function 

```python
def format_path(path):
    if os.name == 'nt':  # Windows requires escaping backslashes
        return str(path).replace('\\', '\\\\')
    else:
        return str(path)
```

I'm pretty sure there is a better way and maybe this is not a bug, however I don't find how to solve differently my issue.

### CPython versions tested on:

3.11

### Operating systems tested on:

Windows
eval path in fileConfig from logging does not format properly Windows path
This is a GitHub Issue
repo:cpython
owner:python
Title : eval path in fileConfig from logging does not format properly Windows path
Issue date:

--- start body ---
I want to log into file using fileConfig and my lconfiguration file. I provide a simple example of how to reproduce my output (I'm using Python 3.11.9). 

```python
import logging.config

logging.config.fileConfig("path_of_your_logging.conf", defaults={"logpath": "C:\\Users\\{yourusename}\\example.log"})
logger = logging.getLogger(__name__)
logger.error("hi")
```

And this is my `logging.conf` file

```conf
[loggers]
keys=root

[handlers]
keys=consoleHandler,fileHandler

[formatters]
keys=simpleFormatter

[logger_root]
level=DEBUG
handlers=consoleHandler,fileHandler

[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=simpleFormatter
args=(sys.stdout,)

[handler_fileHandler]
class=FileHandler
level=DEBUG
formatter=simpleFormatter
args=("%(logpath)s",)

[formatter_simpleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
```
The error that I get is the following (inside the fileConfig function):

```python
    args = eval(args, vars(logging))
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 1
    ("C:\Users\{yourusename}\example.log",)
                                            ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
```

The same code works on Unix and the way the I have found in order to make it work even with Windows is to parse my path with this function 

```python
def format_path(path):
    if os.name == 'nt':  # Windows requires escaping backslashes
        return str(path).replace('\\', '\\\\')
    else:
        return str(path)
```

I'm pretty sure there is a better way and maybe this is not a bug, however I don't find how to solve differently my issue.

### CPython versions tested on:

3.11

### Operating systems tested on:

Windows
--- end body ---
