[issue38682] struct timeval is not declared

2019-11-04 Thread Mithil


New submission from Mithil :

pytime.h compilation gives warnings - 

pytime.h:123:59: warning: 'struct timeval' declared inside parameter list will 
not be visible outside of this definition or declaration
 PyAPI_FUNC(int) _PyTime_FromTimeval(_PyTime_t *tp, struct timeval *tv);
   ^~~
pytime.h:130:12: warning: 'struct timeval' declared inside parameter list will 
not be visible outside of this definition or declaration
 struct timeval *tv,
^~~
pytime.h:135:12: warning: 'struct timeval' declared inside parameter list will 
not be visible outside of this definition or declaration
 struct timeval *tv,

=

I think the reason for this is that the struct timeval isn't declared anywhere 
before the declaration of this function. For me on windows, the structure is 
defined inside of winsock.h and including it before the other python header 
files fixes the problem.

--
components: Windows
messages: 355932
nosy: Mithil, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: struct timeval is not declared
type: compile error
versions: Python 3.7

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



[issue42075] Verbose/confusing default format on warnings

2020-10-18 Thread Mithil


New submission from Mithil :

The default format prints a lot of details like filename, line number, and the 
source code on that line. A particular case where the warn message is written 
on the next line like -
warn(
   "Message here")
Will only print warn( as the source code and not the entire block.
My concern is, can this formatting be less detailed by default. Or, can this 
format be freely changed in a project A without worrying about affecting the 
global usage in any other project B that imports it.
Or at the very least, can this be made to print the entire block of code and 
not just the one line, because that makes it very confusing for the user.

More takes on the issue here - https://github.com/PyCQA/isort/issues/1568

--
components: Library (Lib)
messages: 378906
nosy: Mithil
priority: normal
severity: normal
status: open
title: Verbose/confusing default format on warnings
type: behavior
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

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



[issue42075] Verbose/confusing default format on warnings

2020-10-18 Thread Mithil


Mithil  added the comment:

I ran the file that you linked and this is what it printed.

C:\Users\mithi\p\test\file.py:3: UserWarning: Danger danger danger Will 
Robinson!!!
  warnings.warn(

As you see, the warnings.warn( line is not desirable.
More details about my machine -
Windows 10
python 3.9.0

I have also tried running this with Python 3.10.0a1. Same result.

--

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



[issue42075] Verbose/confusing default format on warnings

2020-10-18 Thread Mithil


Mithil  added the comment:

I also ran this on Fedora 32, python 3.8.6 and still got the same result.

--

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