[issue33802] Regression in logging configuration

2018-08-06 Thread Steap


Steap  added the comment:

It seems like this regression has not completely been fixed: there are still 
issues with "None":

$ python3.6 -c 'import configparser; configparser.ConfigParser(defaults={"a": 
None})'

$ python3.7 -c 'import configparser; configparser.ConfigParser(defaults={"a": 
1})'

$ python3.7 -c 'import configparser; configparser.ConfigParser(defaults={"a": 
None})'
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.7/configparser.py", line 638, in __init__
self._read_defaults(defaults)
  File "/usr/lib/python3.7/configparser.py", line 1216, in _read_defaults
self.read_dict({self.default_section: defaults})
  File "/usr/lib/python3.7/configparser.py", line 753, in read_dict
self.set(section, key, value)
  File "/usr/lib/python3.7/configparser.py", line 1197, in set
self._validate_value_types(option=option, value=value)
  File "/usr/lib/python3.7/configparser.py", line 1182, in _validate_value_types
raise TypeError("option values must be strings")
TypeError: option values must be strings

Should "None" not be used, or should this bug be reopened?

--
nosy: +Steap

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



[issue20868] Lib/test/test_socket.py: skip testGetServBy if /etc/services is not found

2014-03-14 Thread Steap

Steap added the comment:

I did not know that /etc/services is not always used :/

The main issue is that when you run the test suite in a chroot (to do "pure" 
builds) or in a network sandbox (for other functions). I get the following 
errors:

==
ERROR: testGetServBy (test.test_socket.GeneralModuleTests)
--
Traceback (most recent call last):
  File 
"/tmp/nix-build-python-3.3.4.drv-0/Python-3.3.4/Lib/test/test_socket.py", line 
840, in testGetServBy
raise socket.error
OSError

==
ERROR: testGetaddrinfo (test.test_socket.GeneralModuleTests)
--
Traceback (most recent call last):
  File 
"/tmp/nix-build-python-3.3.4.drv-0/Python-3.3.4/Lib/test/test_socket.py", line 
1126, in testGetaddrinfo
socket.getaddrinfo(HOST, "http")
socket.gaierror: [Errno -8] Servname not supported for ai_socktype

==
ERROR: test_idna (test.test_socket.GeneralModuleTests)
--
Traceback (most recent call last):
  File 
"/tmp/nix-build-python-3.3.4.drv-0/Python-3.3.4/Lib/test/test_socket.py", line 
1186, in test_idna

socket.gethostbyname('\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435.python.org')
socket.gaierror: [Errno -2] Name or service not known

--

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



[issue20868] Lib/test/test_socket.py: skip testGetServBy if /etc/services is not found

2014-03-07 Thread Steap

New submission from Steap:

In Lib/test/test_socket.py, testGetServBy calls socket.getservbyname(), which 
needs /etc/services (see "man getservbyname"). If this file is not found, the 
test fails instead of being skipped.

The attached patch was written against the latest revision of the Mercurial 
repository. It might be worth applying it for every currently supported version 
of Python.

--
files: skip_testGetServBy.patch
keywords: patch
messages: 212910
nosy: Steap
priority: normal
severity: normal
status: open
title: Lib/test/test_socket.py: skip testGetServBy if /etc/services is not found
Added file: http://bugs.python.org/file34304/skip_testGetServBy.patch

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