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

[DEP0096] DeprecationWarning #2003

Closed
aube-io opened this issue Apr 24, 2018 · 16 comments
Closed

[DEP0096] DeprecationWarning #2003

aube-io opened this issue Apr 24, 2018 · 16 comments

Comments

@aube-io
Copy link

aube-io commented Apr 24, 2018

[DEP0096] DeprecationWarning: timers.unenroll() is deprecated. Please use clearTimeout instead.
on mysql/lib/protocol/Protocol.js: Timers.unenroll(sequence);

NodeJS 10

@dougwilson
Copy link
Member

This module doesn't yet officially support Node.js 10, but if yourself or someone wants to volunteer to make the necessary changes, definitely welcome and the best way to move forward 👍

@dougwilson
Copy link
Member

Unless someone knows another way, it's not really fixable in Node.js 10.0. The PR in Node.js nodejs/node#20298 is rolling and so we'll then have a non-deprecated API to use hopefully in some future 10.x release.

@dougwilson
Copy link
Member

Node.js 10.1 came out but not with the API we need, so we're still waiting for a Node.js release.

@dougwilson
Copy link
Member

To update this: the needed API has been merged into Node.js 10.x branch now, and so it will be available with Node.js 10.2 I presume. The code still needs to be changed in this module to use the new APIs. I'm going to take a look, but if anyone is inclined to do so, you're also welcome to open a pull request with Node.js 10.x compat 👍

@coreyfarrell
Copy link
Contributor

@florenthagard not sure if github would have sent a notice so I'll comment here, I've created a PR that addresses nodejs 10 compatibility. semver 10.0 | 10.1 will still produce the deprecation warning as the new API is unavailable, the new API will be used by default for >=10.2. Compatibility is accomplished by creating a setTimeout and clearTimeout ponyfill. Both directly use the built-in nodejs functions if .refresh() is supported, otherwise both are re-implemented based on the deprecated API's.

I also fixed the error on test/unit/connection/test-connection-ssl-ciphers.js in nodejs 10. When I ran the test locally (using nvm on Fedora 28) RC4-SHA was not an available cipher so the test failed.

@yashwp
Copy link

yashwp commented Jun 26, 2018

I facing the same issue.. Please tell me, when can I expect this to be updated??

@AlexanderProd
Copy link

Same issue here, I'm wondering why the issue was closed.

@dougwilson
Copy link
Member

The PR was merged, which closed related issues automatically. I was mainly hoping someone would test it out. Would you be willing to test the fix to validate before release? Install instructions in the last section of https://github.com/mysqljs/mysql#install

@emirpalm
Copy link

@dougwilson run npm console install mysqljs / mysql and correct the problem

@jediborre
Copy link

Still In Node v10.6.0

(node:25325) [DEP0095] DeprecationWarning: timers.enroll() is deprecated. Please use setTimeout instead.
(node:25325) [DEP0096] DeprecationWarning: timers.unenroll() is deprecated. Please use clearTimeout instead.

@dougwilson
Copy link
Member

What version of this module are you using?

@jediborre
Copy link

v2.15.0

@dougwilson
Copy link
Member

So 2.15.0 was published before Node.js 10 existed, let alone when this was fixed :) You just need to install the current version of this module to get the Node.js 10 support 👍

@jediborre
Copy link

Working mysql@2.16.0

au5ton added a commit to au5ton/hatsume that referenced this issue Jul 25, 2018
@dragonfriend0013
Copy link

I have updated to node v10.8.0 and mysql version 2.16.0 and i am still getting this warning. any thoughts?

@dougwilson
Copy link
Member

Open a new issue with full code and steps to reproduce.

@mysqljs mysqljs locked as resolved and limited conversation to collaborators Aug 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

8 participants