-
Notifications
You must be signed in to change notification settings - Fork 11
pytz 2021.1
Cory Francis Myers edited this page Sep 21, 2021
·
5 revisions
According to https://libraries.io/pypi/pytz, pytz
has had 148 releases between 19 August 2005 and 1 February 2021.
pytz
is supported by Tidelift.
Bandit finds no high-priority issues:
cfm@ozymandias{1014}$ bandit -r pytz -x pytz/tests
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 3.9.6
Run started:2021-09-21 18:32:49.275170
Test results:
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
Location: pytz/reference.py:124
More Info: https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
123 return ZERO
124 assert dt.tzinfo is self
125
126 # Find first Sunday in April & the last in October.
127 start = first_sunday_on_or_after(DSTSTART.replace(year=dt.year))
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
Location: pytz/tzfile.py:31
More Info: https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
30 # Make sure it is a tzfile(5) file
31 assert magic == _byte_string('TZif'), 'Got magic %s' % repr(magic)
32
33 # Read out the transition times, localtime indices and ttinfo structures.
34 data_fmt = '>%(timecnt)dl %(timecnt)dB %(ttinfo)s %(charcnt)ds' % dict(
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
Location: pytz/tzfile.py:40
More Info: https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
39 # make sure we unpacked the right number of values
40 assert len(data) == 2 * timecnt + 3 * typecnt + 1
41 transitions = [memorized_datetime(trans)
--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
Location: pytz/tzinfo.py:392
More Info: https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
391 local_dt.replace(tzinfo=None) - local_dt.tzinfo._utcoffset)
392 assert utc_time not in dates
393 dates[utc_time] = local_dt
--------------------------------------------------
Code scanned:
Total lines of code: 2185
Total lines skipped (#nosec): 0
Run metrics:
Total issues (by severity):
Undefined: 0.0
Low: 4.0
Medium: 0.0
High: 0.0
Total issues (by confidence):
Undefined: 0.0
Low: 0.0
Medium: 0.0
High: 4.0
Files skipped (0)
According to https://libraries.io/pypi/pytz, pytz
is a dependency of 2.81K packages and 77.5K repositories (as of this review).
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Reviewed from:
83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da pytz-2021.1.tar.gz
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEE8m422wF7k3FrJQXVFKLelAvuBhMFAmFKJwEACgkQFKLelAvu
BhPkqgf7BxWYEndMq/YKlyauHktEr9dnw1Iwgn955JKl8bcxvttgzS0eqt1D5ji/
f1NND953+sj8Z9cDmpoJNt3cds+EwjxW/dvNDvEU5aRzZnS3hqspoMjmLgqXUAC3
3cCoPeD6jsizlxPpeh7qYm31Wss4ykiKhGLkQvPhwGhX64z/E1eEGXOQnpiUPQMD
u5o9/WMcDaOQl90D9Z3YPYaxi5+W5DBm1c5QMoPD9FoWU3NaGtxEf3tnLAkPY9+Z
KSRWG3CuFIYLPAooLzBkkXn+hbbp3yaUorq+JDOsFEzbpdGDQoptKEc/AYMzipLI
1X5rI0RYSrS/ze9mmwQmS/vk8Efcyg==
=MMb4
-----END PGP SIGNATURE-----