Using requests.packages.urllib3.disable_warnings()

requests.packages.urllib3.disable_warnings()
throws
 requests.packages.urllib3.disable_warnings()
AttributeError: 'module' object has no attribute 'packages'
Traceback (most recent call last):
  File "/usr/local/tdproxy/USERIMP/userupload_prod.py", line 12, in <module>
    requests.packages.urllib3.disable_warnings()
AttributeError: 'module' object has no attribute 'packages'

## Expected Result
no error

What you expected.

## Actual Result

 requests.packages.urllib3.disable_warnings()
AttributeError: 'module' object has no attribute 'packages'
Traceback (most recent call last):
  File "/usr/local/tdproxy/USERIMP/userupload_prod.py", line 12, in <module>
    requests.packages.urllib3.disable_warnings()
AttributeError: 'module' object has no attribute 'packages'

## Reproduction Steps

```python
#!/usr/bin/env python

import sys,os
import requests
import datetime
import json
import ldap
import inspect
from time import sleep
import urllib3
import fn_group_functions_prod as group_functions
urllib3.disable_warnings() 
requests.packages.urllib3.disable_warnings()
print('11')
print os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
sys.path.insert(0,os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))+'/../../CONFIGS/')
print(sys.path)
#sys.exit(1)
import config
```

## System Information

    $ python -m requests.help

```
{
  "chardet": {
    "version": "3.0.4"
  }, 
  "cryptography": {
    "version": ""
  }, 
  "idna": {
    "version": "2.8"
  }, 
  "implementation": {
    "name": "CPython", 
    "version": "2.7.5"
  }, 
  "platform": {
    "release": "3.10.0-1062.9.1.el7.x86_64", 
    "system": "Linux"
  }, 
  "pyOpenSSL": {
    "openssl_version": "", 
    "version": null
  }, 
  "requests": {
    "version": "2.22.0"
  }, 
  "system_ssl": {
    "version": "100020bf"
  }, 
  "urllib3": {
    "version": "1.25.8"
  }, 
  "using_pyopenssl": false
}
```

This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).


Hi @bostonmacosx, have you validated other parts of requests work in this run environment? It looks like you may have another file named `requests.py` that’s on the Python path.

> Hi @bostonmacosx, have you validated other parts of requests work in this run environment? It looks like you may have another file named `requests.py` that’s on the Python path.
@nateprewitt 
I'm sorry how are you useeing that?

and yes. if I remove that line everything works swimmingly.. 


You aren’t using requests anywhere else in that script. What I was asking is if other calls to requests work in the same environment in this script.

Either way, the issue doesn’t appear to be reproducible with the versions of Requests and urllib3 you provided. It looks like you either have another file taking over the requests namespace, or have multiple versions of requests on your path which are old enough to not have `packages` defined.

I’d suggest starting with a fresh virtualenv and working from there. If you’re still having issues, Stackoverflow is the best forum for debugging issues like this. Thanks!