Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be consistent with webdriver init kwarg service_log_path #5979

Conversation

jerry-git
Copy link
Contributor

Deprecate log_file for IE and log_path for Edge and Firefox.

Fixes #5725

Deprecate log_file for IE and log_path for Edge and Firefox.

Fixes SeleniumHQ#5725
if ie_options:
warnings.warn('use options instead of ie_options', DeprecationWarning)
options = ie_options
self.port = port
if self.port == 0:
self.port = utils.free_port()
self.host = host
self.log_level = log_level
self.log_file = log_file
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to spare log_level and log_file instance vars?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a code relevance as to why they are included as instance vars other than the fact that you can check them after setting them since they aren't available on the Service

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But you're right, I don't see them in any other webdrivers.

@lmtierney
Copy link
Member

@Dude-x care to have a look?

@isaulv
Copy link
Contributor

isaulv commented Jun 26, 2018

What about Chrome?

@lmtierney
Copy link
Member

Chrome already uses service_log_path

@isaulv
Copy link
Contributor

isaulv commented Jun 26, 2018

LGTM.

@lmtierney
Copy link
Member

Right, we should try and get this merged in the next release

@lmtierney lmtierney merged commit f1a7bf6 into SeleniumHQ:master Jul 24, 2018
@lmtierney
Copy link
Member

Merged, thank you for your contribution!

capabilities=None, port=0, verbose=False, log_path=None):
capabilities=None, port=0, verbose=False, service_log_path=None, log_path=None):
if log_path:
warnings.warn('use service_log_path instead of log_path', DeprecationWarning)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a stacklevel here and in the similar instances below, would help make the resultant warnings clearer, since they would reference the offending caller rather than the .warn() line in these files. I've filed #6274 for this (but it would be good to watch out for this when reviewing future PRs).

grigaman pushed a commit to grigaman/selenium that referenced this pull request Sep 20, 2018
…umHQ#5979)

Deprecate log_file for IE and log_path for Edge and Firefox.

Fixes SeleniumHQ#5725
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants