In case anyone is still looking for a way to do this: (the author of this post mentioned above that now is using Shapely and Fiona).
I found different ways to avoid the warning messages mentioned in this post:
Fix the warning: if the warning mentions that a feature's field could not be written because of trying to write a number larger than the maximum width of the field, use your preferred GIS software to cut the number field by either creating another field with the same number but rounded up/down. This works in case you have a value with a large number of significant figures but they are actually not important.
If 1 would not work for you, run your pyqgis .py script through a .sh script and direct all warning and error messages to a log (or null in case you don't even want to have these messages). For example, I have the following .sh script:
while read line;
do
oid="$line"
echo $oid
python create_input_data.py --oid $oid
done < "/Users/list.txt
where create_input_data.py is the PyQGIS script that is printing the warnings.
When you run the .sh in the terminal, add the "> error.log 2>&1" after the name of the .sh script to create a text file that includes all lines that would have been printed otherwise at the terminal.