Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1265896
| From | Athanasius <debian@miggy.org> |
|---|---|
| Newsgroups | linux.debian.bugs.dist |
| Subject | Bug#1117986: wsdd: Warning about a truthiness test, line 649 |
| Date | 2025-10-13 12:50 +0200 |
| Message-ID | <LFohP-4RK7-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Package: wsdd
Version: 2:0.8-5
Severity: minor
Tags: newcomer
Dear Maintainer,
I'm on Debian trixie, but had other reason to allow testing packages
(pinned to not auto-install/upgrade). Due to wsdd having been removed
for trixie release the system then picked up the testing version.
In this version I see this logged:
2025-10-13T10:17:11.990915+01:00 emilia gvfsd[398794]: /usr/bin/wsdd:649: DeprecationWarning: Testing an element's truth value will always return True in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
which is from this section of code:
646 elif dialect == WSDP_URI + '/Relationship':
647 host_xpath = 'wsdp:Relationship[@Type="{}/host"]/wsdp:Host' .format(WSDP_URI)
648 host_sec = section.find(host_xpath, namespaces)
649 if (host_sec):
650 self.extract_host_props(host_sec)
651 else:
652 logger.debug('unknown metadata dialect ({})'.format(dialect ))
So, presumably `if (host_sec):` needs changing to `if host_sec is not
None:` or similar. Actually, I'm wondering why there are () on the
current version, perhaps those just need stripping ?
Obviously it currently works well enough, but will need correcting for
whatever future Python version changes the behaviour.
-- System Information:
Debian Release: 13.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable'), (499, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.17.1-athan (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages wsdd depends on:
ii python3 3.13.5-1
wsdd recommends no packages.
wsdd suggests no packages.
-- Configuration Files:
/etc/default/wsdd changed:
WSDD_PARAMS="-i brmiggy0"
-- no debconf information
Back to linux.debian.bugs.dist | Previous | Next — Next in thread | Find similar | Unroll thread
Bug#1117986: wsdd: Warning about a truthiness test, line 649 Athanasius <debian@miggy.org> - 2025-10-13 12:50 +0200 Bug#1117986: Acknowledgement (wsdd: Warning about a truthiness test, line 649) Athanasius <debian@miggy.org> - 2025-10-13 14:10 +0200
csiph-web