I am please to announce the availability of the "baseline" package.
This tool streamlines creation and maintenance of tests which compare string
output against a baseline. It offers a mechanism to compare a string against
a baselined copy and update the baselined copy to match the new value when a
mismatch occurs. The update process includes a manual step to facilitate a
review of the change before acceptance. The tool uses multi-line string
format
for string baselines to improve readability for human review.
Docs: https://baseline.readthedocs.io/en/latest/
PyPi: https://pypi.org/project/baseline/
Repo: https://github.com/dmgass/baseline
License: MIT
With Regards,
Dan Gass
(dan.gass at gmail)
***********
Quick Start
***********
Create an empty baseline with a triple quoted multi-line string. Place
the ending triple quote on a separate line and indent it to the level
you wish the string baseline update to be indented to. Add a compare of
the string being tested to the baseline string. Then save the file as
``fox.py``:
.. code-block:: python
from baseline import Baseline
expected = Baseline("""
""")
test_string = "THE QUICK BROWN FOX\n JUMPS\nOVER THE LAZY DOG."
assert test_string == expected
Run ``fox.py`` and observe that the ``assert`` raises an exception since
the strings are not equal. Because the comparison failed, the tool located
the triple quoted baseline string in the source file and updated it with the
miscompared value. When the interpretter exited, the tool saved the updated
source file but changed the file name to ``fox.update.py``:
.. code-block:: python
from baseline import Baseline
expected = Baseline("""
THE QUICK BROWN FOX
JUMPS
OVER THE LAZY DOG.
""")
test_string = "THE QUICK BROWN FOX\n JUMPS\nOVER THE LAZY DOG."
assert test_string == expected
After reviewing the change with your favorite file differencing tool,
accept the change by either manually overwriting the original file or use
the ``baseline`` command line tool to scan the directory for updated
scripts and accept them:
.. code-block:: shell
$ python -m baseline *
Found updates for:
fox.py
Hit [ENTER] to update, [Ctrl-C] to cancel
fox.update.py -> fox.py
Run ``fox.py`` again and observe the ``assert`` does not raise an exception
nor is a source file update generated. If in the future the test value
changes, the ``assert`` will raise an exception and cause a new source file
update to be generated. Simply repeat the review and acceptance step and you
are back in business!
<P><A HREF="https://baseline.readthedocs.io/en/latest/">
baseline 0.2.1</A> - Easy String Baseline (07-Jun-18)
This course will help you to expertise the usage of Python in Data Science world.
Carter your Python Knowledge so that it can be utilized to get the Insights of Data using Methodologies and Techniques of Data Science...
Objective:
Understand the concepts of Data science and Python
You will be able to use Python in Discovering Data.
You will have an idea of Statistical and Analytical methods to deal with huge data sets.
You will gain an expertise on Regular Expressions, looping functions and concepts of Object Oriented Programming.
You will be able to create business algorithms and data models using Python and it's techniques.
Work on Real-life Projects will help you to get a practical experience of real scenarios of IT Industry.
Start learning Python for Data Science from basics to advance levels here...
https://goo.gl/070wXw
At the last General Assembly of the EuroPython Society (EPS) at
EuroPython 2018 in Edinburgh, we voted on a new grant program we want
to put in place for future EuroPython conferences.
We all love Python and this is one of the main reasons we are putting
on EuroPython year after year, serving the "cast of thousands" which
support Python. But we also believe it is important to give something
back to the main team of developers who have contributed lots of their
time and energy to make Python happen: the Python Core Developers.
This group is small, works countless hours, often in their free time
and often close to burnout due to not enough new core developers
joining the team.
Free Tickets for Python Core Developers
---------------------------------------
To help with growing the team, putting it more into the spotlight and
give them a place to meet, demonstrate their work and a stage to
invite new developers, we decided to give Python Core Developers free
entry to future EuroPython conferences, starting with EuroPython 2019
in Basel, Switzerland
In recognition of Guido’s almost 20 years of leading this team, and
with his permission, we have named the grant “Guido van Rossum Core
Developer Grant”.
Details of the grant program are available on our core grant page:
https://www.europython-society.org/core-grant
PS: If you are a core developer and want to organize a workshop,
language summit or similar event at EuroPython 2019, please get in
touch with our program workgroup (program(a)europython.eu) soon, so that
we can arrange rooms, slots, etc.
PPS: If you want to become a core developer, please have a look at the
Python Dev Guide:
https://devguide.python.org/coredev/
Help spread the word
--------------------
Please help us spread this message by sharing it on your social
networks as widely as possible. Thank you !
Link to the blog post:
https://www.europython-society.org/post/182445627020/announcing-the-guido-v…
Tweet:
https://twitter.com/europythons/status/1090901995635073024
Enjoy,
--
EuroPython Society
https://ep2019.europython.eu/https://www.europython-society.org/
The pytest team is proud to announce the 4.2.0 release!
pytest is a mature Python testing tool with more than a 2000 tests
against itself, passing on many different interpreters and platforms.
This release contains a number of bugs fixes and improvements, so users are
encouraged
to take a look at the CHANGELOG:
https://docs.pytest.org/en/latest/changelog.html
For complete documentation, please visit:
https://docs.pytest.org/en/latest/
As usual, you can upgrade from pypi via:
pip install -U pytest
Thanks to all who contributed to this release, among them:
* Adam Uhlir
* Anthony Sottile
* Bruno Oliveira
* Christopher Dignam
* Daniel Hahler
* Joseph Hunkeler
* Kristoffer Nordstroem
* Ronny Pfannschmidt
* Thomas Hisch
* wim glenn
Happy testing,
The Pytest Development Team
Announcement: SMIL 0.9.1
========================
Hi all,
I'm pleased to announce SMIL - Simple Morphological Image Library - v. 0.9.1
SMIL is a library with all basic and some advanced mathematical morphology features which can be extended with plugins
and user modules.
Among its features it can handle 2D and 3D images and can handle data from/to NumPy data.
It's been developed in C++ and has a Python interface thanks to Swig.
SMIL is a product of CMM, the research Center of Mathematical Morphology of Mines-Paristech, where the discipline of
Mathematical Morphology was created in the 60's by Jean Serra and Georges Matheron.
SMIL is distributed with GPL license.
We use SMIL in our research and teaching activities in the field and may, eventually, be used besides scikit-image.
You can find SMIL - binaries and documentation - at our web site :
http://smil.cmm.mines-paristech.fr
or the source code at :
https://github.com/ensmp-cmm/smil
Thanks
Jose-Marcio
--
---------------------------------------------------------------
Jose Marcio MARTINS DA CRUZ, Ph.D.
Ecole des Mines de Paris
CMM - Centre de Morphologie Mathématique
---------------------------------------------------------------
Spam : http://amzn.to/LEscRu ou http://bit.ly/SpamJM
---------------------------------------------------------------
A new version of the Python module which wraps GnuPG has been released.
What Changed?=============This is an enhancement and security-fix release, and all users are stronglyencouraged to upgrade.
Brief summary:
* Fixed #108: Changed how any return value from the on_data callable is processed. In earlier versions, the return value was ignored. In this version, if the return value is False, the data received from gpg is not buffered. Otherwise (if the value is None or True, for example), the data is buffered as normal. This functionality can be used to do your own buffering, or to prevent buffering altogether.
The on_data callable is also called once with an empty byte-string to signal the end of data from gpg.
* Fixed #97: Added an additional attribute check_fingerprint_collisions to GPG instances, which defaults to False. It seems that gpg is happy to have duplicate keys and fingerprints in a keyring, so we can't be too strict. A user can set this attribute of an instance to True to trigger a check for collisions.
* Fixed #111: With GnuPG 2.2.7 or later, provide the fingerprint of a signing key for a failed signature verification, if available.
* Fixed #21: For verification where multiple signatures are involved, a mapping of signature_ids to fingerprint, keyid, username, creation date, creation timestamp and expiry timestamp is provided.
* Added a check to disallow certain control characters ('\r', '\n', NUL) in passphrases. This fix mitigates against CVE-2019-6690.
This release [2] has been signed with my code signing key:
Vinay Sajip (CODE SIGNING KEY) <vinay_sajip at yahoo.co.uk>Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86
Recent changes to PyPI don't show the GPG signature with the download links.An alternative download source where the signatures are available is the project'sown downloads page [5].
What Does It Do?================The gnupg module allows Python programs to make use of thefunctionality provided by the Gnu Privacy Guard (abbreviated GPG orGnuPG). Using this module, Python programs can encrypt and decryptdata, digitally sign documents and verify digital signatures, manage(generate, list and delete) encryption keys, using proven Public KeyInfrastructure (PKI) encryption technology based on OpenPGP.
This module is expected to be used with Python versions >= 2.4, as itmakes use of the subprocess module which appeared in that version ofPython. This module is a newer version derived from earlier work byAndrew Kuchling, Richard Jones and Steve Traugott.
A test suite using unittest is included with the source distribution.
Simple usage:
>>> import gnupg>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')>>> gpg.list_keys()
[{...'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2','keyid': '197D5DAC68F1AAB2','length': '1024','type': 'pub','uids': ['', 'Gary Gross (A test user) <gary.gr... at gamma.com>']},{...'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A','keyid': '0C5FEFA7A921FC4A','length': '1024',...'uids': ['', 'Danny Davis (A test user) <danny.da... at delta.com>']}]>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])>>> str(encrypted)
'-----BEGIN PGP MESSAGE-----\nVersion: GnuPG v1.4.9 (GNU/Linux)\n\nhQIOA/6NHMDTXUwcEAf.-----END PGP MESSAGE-----\n'>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')>>> str(decrypted)
'Hello, world!'>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')>>> verified = gpg.verify(str(signed))>>> print "Verified" if verified else "Not verified"
'Verified'
As always, your feedback is most welcome (especially bug reports [3],patches and suggestions for improvement, or any other points via themailing list/discussion group [4]).
Enjoy!
Cheers
Vinay SajipRed Dove Consultants Ltd.
[1] https://bitbucket.org/vinay.sajip/python-gnupg[2]https://pypi.python.org/pypi/python-gnupg/0.4.4[3]https://bitbucket.org/vinay.sajip/python-gnupg/issues[4]https://groups.google.com/forum/#!forum/python-gnupg[5]https://bitbucket.org/vinay.sajip/python-gnupg/downloads/
gcc-python-plugin is a plugin for GCC 4.6 onwards which embeds the
CPython interpreter within GCC, allowing you to write new compiler
warnings in Python, generate code visualizations, etc.
This release adds support for gcc 9 (along with continued support for
gcc 4.6, 4.7, 4.8, 4.9, 5, 6, 7, and 8).
Unfortunately, the reference-count checker no longer works for gcc 7
onwards, so it is disabled when embedded in those builds of gcc.
Additionally, this release contains the following improvements:
* the plugin can now be built in a separate build directory from the
source directory (thanks to Tom de Vries)
* gcc-with-cpychecker gained a --cpychecker-verbose option
Tarball releases are available at:
https://github.com/davidmalcolm/gcc-python-plugin/releases
Prebuilt-documentation can be seen at:
http://gcc-python-plugin.readthedocs.org/en/latest/index.html
The plugin is Free Software, licensed under the GPLv3 or later.
Enjoy!
Dave Malcolm
Hello all,
I'm glad to announce the release of psutil 5.5.0:
https://github.com/giampaolo/psutil
About
=====
psutil (process and system utilities) is a cross-platform library for
retrieving information on running processes and system utilization (CPU,
memory, disks, network) in Python. It is useful mainly for system
monitoring, profiling and limiting process resources and management of
running processes. It implements many functionalities offered by command
line tools such as: ps, top, lsof, netstat, ifconfig, who, df, kill, free,
nice, ionice, iostat, iotop, uptime, pidof, tty, taskset, pmap. It
currently supports Linux, Windows, macOS, Sun Solaris, FreeBSD, OpenBSD,
NetBSD and AIX, both 32-bit and 64-bit architectures, with Python versions
from 2.6 to 3.6. PyPy is also known to work.
What's new
==========
2019-0-23
**Enhancements**
- #1350: [FreeBSD] added support for sensors_temperatures(). (patch by Alex
Manuskin)
- #1352: [FreeBSD] added support for CPU frequency. (patch by Alex
Manuskin)
**Bug fixes**
- #1111: Process.oneshot() is now thread safe.
- #1354: [Linux] disk_io_counters() fails on Linux kernel 4.18+.
- #1357: [Linux] Process' memory_maps() and io_counters() method are no
longer
exposed if not supported by the kernel.
- #1368: [Windows] fix psutil.Process().ionice(...) mismatch. (patch by
EccoTheFlintstone)
- #1370: [Windows] improper usage of CloseHandle() may lead to override the
original error code when raising an exception.
- #1373: incorrect handling of cache in Process.oneshot() context causes
Process instances to return incorrect results.
- #1376: [Windows] OpenProcess() now uses PROCESS_QUERY_LIMITED_INFORMATION
access rights wherever possible, resulting in less AccessDenied exceptions
being thrown for system processes.
- #1376: [Windows] check if variable is NULL before free()ing it. (patch by
EccoTheFlintstone)
Links
=====
- Home page: https://github.com/giampaolo/psutil
- Download: https://pypi.org/project/psutil/#files
- Documentation: http://psutil.readthedocs.io
- What's new: https://github.com/giampaolo/psutil/blob/master/HISTORY.rst
--
Giampaolo - http://grodola.blogspot.com
PyCA cryptography 2.5 has been released to PyPI. cryptography includes both
high level recipes and low level interfaces to common cryptographic
algorithms such as symmetric ciphers, asymmetric algorithms, message
digests, X509, key derivation functions, and much more. We support Python
2.7, Python 3.4+, and PyPy.
Changelog (https://cryptography.io/en/latest/changelog/#v2-5):
* BACKWARDS INCOMPATIBLE: U-label strings were deprecated in version 2.1,
but this version removes the default idna dependency as well. If you still
need this deprecated path please install cryptography with the idna extra:
pip install cryptography[idna].
* BACKWARDS INCOMPATIBLE: The minimum supported PyPy version is now 5.4.
* Numerous classes and functions have been updated to allow bytes-like
types for keying material and passwords, including symmetric algorithms,
AEAD ciphers, KDFs, loading asymmetric keys, and one time password classes.
* Updated Windows, macOS, and manylinux1 wheels to be compiled with OpenSSL
1.1.1a.
* Added support for SHA512_224 and SHA512_256 when using OpenSSL 1.1.1.
* Added support for SHA3_224, SHA3_256, SHA3_384, and SHA3_512 when using
OpenSSL 1.1.1.
* Added support for X448 key exchange when using OpenSSL 1.1.1.
* Added support for SHAKE128 and SHAKE256 when using OpenSSL 1.1.1.
* Added initial support for parsing PKCS12 files with
load_key_and_certificates().
* Added support for IssuingDistributionPoint.
* Added rfc4514_string() method to x509.Name,
x509.RelativeDistinguishedName, and x509.NameAttribute to format the name
or component an RFC 4514 Distinguished Name string.
* Added from_encoded_point(), which immediately checks if the point is on
the curve and supports compressed points. Deprecated the previous method
from_encoded_point().
* Added signature_hash_algorithm to OCSPResponse.
* Updated X25519 key exchange support to allow additional serialization
methods. Calling public_bytes() with no arguments has been deprecated.
* Added support for encoding compressed and uncompressed points via
public_bytes(). Deprecated the previous method encode_point().
-Paul Kehrer (reaperhulk)